locked
Action for ultimate recipient is required but not present in the message. RRS feed

  • Question

  • Hi Guys,

    I am trying to consume a services that uses wse3 but i keep getting above mentioned error.

    I have added the soap message and the wse3policaycache.config if this might help.

    I am not sure what i am missing in the soap message ? please help

    Soap message

    ***********************************************

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
        <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-0000012c1bf4e337-00000000011258b2-8">
          <wsse:Username>username</wsse:Username>
          <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
          <wsu:Created>2010-11-05T12:13:42Z</wsu:Created>
        </wsse:UsernameToken>
      </wsse:Security>
      </soap:Header>
    <soap:Body>
    <tns:AccountTransactionDetail xmlns:tns="http://api.white-eagle.com/">
    <!-- Zero or one occurrences -->
    <tns:AccountTransactionDetailRqst>
    <!-- Element must appear exactly once -->
    <tns:LocalDate>2010-11-05T12:08:27Z</tns:LocalDate>
    <!-- Element must appear exactly once -->
    <tns:LocalTime>2010-11-05T12:08:27Z</tns:LocalTime>
    <!-- Zero or one occurrences -->
    <tns:ClientMessageID>12345</tns:ClientMessageID>
    <!-- Zero or one occurrences -->
    <tns:Last4PAN>9999</tns:Last4PAN>
    <!-- Element must appear exactly once -->
    <tns:CardholderID>12345</tns:CardholderID>
    <!-- Element must appear exactly once -->
    <tns:StartDate>2010-11-05T12:08:27Z</tns:StartDate>
    <!-- Element must appear exactly once -->
    <tns:EndDate>2010-11-05T12:08:27Z</tns:EndDate>
    <!-- Element must appear exactly once -->
    <tns:ServiceFee>1.0</tns:ServiceFee>
    </tns:AccountTransactionDetailRqst>
    <!-- Element must appear exactly once -->
    <tns:SponsorID>63d87015-52ac-4c19-8964-94d92aeee85d</tns:SponsorID>
    </tns:AccountTransactionDetail>
    </soap:Body>
    </soap:Envelope>

    ***************************************

    <policies xmlns="http://schemas.microsoft.com/wse/2005/06/policy">
      <extensions>
        <extension name="usernameOverTransportSecurity" type="Microsoft.Web.Services3.Design.UsernameOverTransportAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <extension name="requireActionHeader" type="Microsoft.Web.Services3.Design.RequireActionHeaderAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </extensions>
      <policy name="SimplePolicy">
        <usernameOverTransportSecurity />
        <requireActionHeader />
      </policy>
    </policies>

     

    thanks

    DK

    Friday, November 5, 2010 12:44 PM

Answers

  • you need to add WS-Addressing headers to the request. See below. This should be under the <soap:Header> element. The bolded parts should be replaced with values specific to this service. 

     

      <wsa:Action wsu:Id="Id-aae4134e-e927-4077-828b-d09648a41d76" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://tempuri.org/HelloWorld</wsa:Action>

        <wsa:MessageID wsu:Id="Id-08baf284-dfea-45b3-b680-cd44b7db569f" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:9822d47c-81a4-4842-a4c1-2d462b602a37</wsa:MessageID>

        <wsa:ReplyTo wsu:Id="Id-ad444a9e-bca4-4473-bce1-dd5d99e5cf08" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">

          <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>

        </wsa:ReplyTo>

        <wsa:To wsu:Id="Id-975955d7-feb0-4983-aab9-e40dd4430024" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:8889/</wsa:To>


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    • Marked as answer by DK-007 Friday, November 5, 2010 4:16 PM
    Friday, November 5, 2010 1:57 PM