User login

WSO2 -> .NET: Action for ultimate recipient is required but not present in the message

Forums :

Hi!

I'm trying to use WSO2 to connect to a .NET WSE3 web services but no matter what I do I always get the following error:

Security: Microsoft.Web.Services3.Security.SecurityFault: Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message.
at Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion.RequireSoapHeaderFilter.ProcessMessage(SoapEnvelope envelope)
at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope envelope)
at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope requestEnvelope)
at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage message)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

My code is the below:
$reqMessage = new WSMessage($reqPayloadString, array("to" => $url, "action" => $action));
$security_options = array("useUsernameToken" => TRUE );
$policy = new WSPolicy(array("security" => $security_options));
$security_token = new WSSecurityToken(array("user" => $username, "password" => $password, "passwordType" => "Digest"));
$client = new WSClient(array("useWSA" => TRUE, "policy" => $policy, "securityToken" => $security_token));
$resMessage = $client->request($reqMessage);

 

Does anybody knows whats may be happening?

Thank you!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re:WSO2 -> .NET: Action for ultimate recipient is required...

Hi, Is the addressing action same as the it is defined in WSDL in your .NET service.Could you check whether the addressing action is correct as the service expect.You can capture the out going message in WSF-PHP by using getLastRequest() function. Thanks Buddhika

I am having this same

I am having this same issue.

Buddhika, when I try to use the getLastRequest() function after the client request runs, the SOAP fault occurs and execution stops. If I use that function before the request, it returns '%s'.

Any ideas?

Got the request

Sorry, wasn't thinking on my last post. Here is the output from 'getLastRequest()' function:

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">

    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">

        <wsa:To>https://service.example.com/FPPrgReportingWS/FPPrgReporting.asmx</wsa:To>

        <wsa:Action>LookupValueProvider_OnlinePrgReportingbyOrgID</wsa:Action>

        <wsa:MessageID>f8b73176-c22f-4857-8af4-c0b15a52fed5</wsa:MessageID>

    </soapenv:Header>

    <soapenv:Body>

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

            <soapenv:Header/>

            <soapenv:Body>

                <ns1:LookupValueProvider_OnlinePrgReportingbyOrgID xmlns:ns1="http://tempuri.org/">

                    <ns1:start xmlns:ns1="http://tempuri.org/">0</ns1:start>

                    <ns1:pageLength xmlns:ns1="http://tempuri.org/">1</ns1:pageLength>

                    <ns1:organizationId xmlns:ns1="http://tempuri.org/">10055</ns1:organizationId>

                </ns1:LookupValueProvider_OnlinePrgReportingbyOrgID>

            </soapenv:Body>

        </soapenv:Envelope

    </soapenv:Body>

</soapenv:Envelope>

The is all what I would expect - it's straight from my request message.

 

set "useWSA" => "submission"

Hi bitGrok,

Since .NET expect addressing version to be "submission" you have to set the "useWSA" option to "submission" to get it working. So your WSClient creation will be like,

$client = new WSClient(array("useWSA" => "submission", "policy" => $policy, "securityToken" => $security_token));

 

Thanks

Dimuthu

Using useWSA => submission

I tried that and an exception is triggered again. The message is:

Message = Error , NO Response Received

Since I have a working .Net client, I can confirm that the service is up and working as expected. Is there some way to get more error information?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.