[ 
https://issues.apache.org/jira/browse/AXIS2-3704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585609#action_12585609
 ] 

David Illsley commented on AXIS2-3704:
--------------------------------------

After a quick offline discussion with Brian, I think that the correct fix for 
this is to add a line to make it: 

                    if (isServerSide) {
                        
axisBindingOperation.getAxisOperation().setSoapAction(soapActionURI);
                    }
                    else {
                        
axisBindingOperation.getAxisOperation().setOutputAction(soapActionURI);
                        
axisBindingOperation.getAxisOperation().setSoapAction(soapActionURI);
                    } 

This ensures that the transport picks up the soap action and the WS-A out 
handler can continue to use the output action (and remain unaware of the 
direction of the message). Also, the input actions are never used in the client 
because dispatch is done on the RelatesTo or by association with the http 
backchannel. Both the transport and the WS-A handler check the same place in 
the message context first, so if anyone is overriding the value, the values 
used will be the same in compliance with the WS-A SOAP Binding spec.

I'd appreciate a sanity check on this by someone else!

> SOAP Action is not set by service Client when its invoked via a WSDL
> --------------------------------------------------------------------
>
>                 Key: AXIS2-3704
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3704
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Keith Godwin Chapman
>            Priority: Critical
>             Fix For: 1.4
>
>
> I was trying accessing an external webservice using service client as follows,
>         ServiceClient serviceClient = new ServiceClient(null, new 
> URL("http://www.webservicex.net/CurrencyConvertor.asmx?wsdl";), new 
> QName("http://www.webserviceX.NET/","CurrencyConvertor";), 
> "CurrencyConvertorSoap");
>         StAXOMBuilder stAXOMBuilder = new StAXOMBuilder(new 
> ByteArrayInputStream(
>         
> "<ConversionRate><FromCurrency>USD</FromCurrency><ToCurrency>LKR</ToCurrency></ConversionRate>".getBytes()));
>         OMElement omElement = serviceClient.sendReceive(
>                 new QName("http://www.webserviceX.NET/";, "ConversionRate"), 
> stAXOMBuilder.getDocumentElement());
>         System.out.println(omElement.toString());
> But this call was failing with the exception 
> "System.Web.Services.Protocols.SoapException: Server did not recognize the 
> value of HTTP Header SOAPAction: ."
> The request sent by the client had the header SOAPAction: "" whereas the WSDL 
> had <soap:operation soapAction="http://www.webserviceX.NET/ConversionRate"; 
> style="document"/>
> debugging through I noticed the following lines in WSDL11ToAxisServiceBuilder 
> (Line 2340)
>                     if (isServerSide) {
>                         
> axisBindingOperation.getAxisOperation().setSoapAction(soapActionURI);         
>               
>                     }
>                     else {
>                         
> axisBindingOperation.getAxisOperation().setOutputAction(soapActionURI);
>                     }
> and CommonsHTTPTransportSender has the following in line 200
> soapActionString = messageContext.getAxisOperation()
>                             .getSoapAction();
> Now this looks like a bug to me. Does anybody have a clue as to why we dont 
> set the soapAction on the axisoperation when the axisService is on the client 
> side?
> Thanks,
> Keith.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to