You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Deepal Jayasinghe (JIRA)" <ji...@apache.org> on 2007/08/01 13:08:52 UTC

[jira] Commented: (AXIS2-3032) Anonymous WS operation invocation

    [ https://issues.apache.org/jira/browse/AXIS2-3032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516931 ] 

Deepal Jayasinghe commented on AXIS2-3032:
------------------------------------------

In the WSDL case (SOAP UI) case your service get dispatch using the SOAP action you have provided , otherwise there is no way to dispatch

In the second case you are sending a SOAP message with body first child being operation local name, so in that case dispatching will happen using SoapMessageBodyBasedDispatcher (as you have mentioned).  And the dispatcher does not have any idea whether the payload is meta-data or actual data so that guy can not and should not remove anything. 

Two invoke the service using service client you have two options
 - Generate the client stub using ADB or any other databinding tool
 - Send a message like below;
<soap:Envelope
   xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
   xmlns:ns="http://myNS.com">

   <soap:Header/>
   <soap:Body>
     <ns:getCapabilities/>
   </soap:Body>
</soap:Envelope> 
  


> Anonymous WS operation invocation
> ---------------------------------
>
>                 Key: AXIS2-3032
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3032
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2
>            Reporter: Severin Ecker
>            Priority: Minor
>
> I'm not 100% positive that this really is a bug, but since i got no reply neither in the users nor in the developers list i'm filing it here to raise attention.
> I have a webservice (using axis2 to handle the soap stuff) and I wanted to use this service with both, WSDL-based access (i was using SOAPui for this) and anonymous operation invocation (with the ServiceClient.sendReceive(OMElement elem) method).
> Using WSDL base access everything works as intended (e.g.: using the following SOAP envelope)
> <soap:Envelope
>    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
>    xmlns:ns="http://myNS.com">
>    <soap:Header/>
>    <soap:Body>
>      <ns:GetCapabilitiesRequest/>
>    </soap:Body>
> </soap:Envelope>
> At service implementation site within the method getCapabilities(OMElement e); (<-- this is the invoked method)
> the parameter e is
> <ns:GetCapabilitiesRequest/>
> So far so good.
> Now when trying to access anonymously I have to encode the operation somewhere so I have the following envelope
> <soap:Envelope
>    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
>    xmlns:ns="http://myNS.com">
>    <soap:Header/>
>    <soap:Body>
>      <ns:getCapabilities>
>        <in0>
>          <ns:GetCapabilitiesRequest/>
>        </in0>
>      </ns:getCapabilities>
>    </soap:Body>
> </soap:Envelope>
> The request gets resolved correcty by axis (using the
> SOAPMessageBodyBasedDispatcher) BUT here's the catch. Suddenly the parameter which the (correct!) service operation gets is
> <ns:getCapabilities>
>   <in0>
>     <ns:GetCapabilitiesRequest/>
>   </in0>
> </ns:getCapabilities>
> This is rather useless because in that case the service operation must be ready to handle all kinds of different parameters depending on the invocation method used!? Shouldn't the SOAPMessageBodyBasedDispatcher remove the 'meta-informational' stuff (in this case the getCapabilities (aka operation-name), and in0 (parameter direction)) and only send the real parameter to the operation?
> If I'm mistaken, how can I invoke an operation anonymously and does not have the problem of ending up with wrong parameters on the service side?

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org