You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Anne Thomas Manes <at...@gmail.com> on 2005/02/21 16:03:15 UTC
Re: Help about Document-Literal WS
Please send all messages associated with Axis to the axis-user list
and not to me directly.
If Axis process two SOAP body elements as parameters for a single
invocation, then Axis is not behaving according to the specification,
and it is a bug. It needs to be fixed.
What should happen is that java2wsdl should generate an error (or at
least a warning) that it is illegal to generate a document/literal
service from an interface that takes multiple parameters. A
document/literal service can accept at most one parameter (typically a
JavaBean).
Anne
On Sat, 19 Feb 2005 23:44:23 -0300 (BRT), accm2@cin.ufpe.br
<ac...@cin.ufpe.br> wrote:
> Hi Anne,
>
> I read your mail in the list of the axis-user about "Can't invoke method
> with multiple arguments" and you afirm that:
>
> "The child element of the SOAP body indicates to the SOAP processor how to
> handle the request. This child element must provide a unique signature so
> that the SOAP processor can figure it out. The SOAP specification doesn't
> specify how to process more than one child element in the SOAP body. The
> WS-I Basic Profile has clarified this point and specified a rule that says
> that the SOAP body must contain at most one child element."
>
> I made the following test:
>
> 1) I generated the WSDL from the interface
>
> java org.apache.axis.wsdl.Java2WSDL
> -l"http://localhost:8080/doc_literal/services/Server" --style=document
> --use=literal cin.ufpe.br.ws.Server
>
> public interface Srever {
> public void setValues(int id, String name);
> }
>
> 2) I generated the classes
>
> java org.apache.axis.wsdl.WSDL2Java -s Server.wsdl
>
> 3) Deploy the service
>
> <service name="Server" provider="java:RPC" style="document" use="literal">
> <parameter name="wsdlTargetNamespace" value="http://ws.br.ufpe.cin"/>
> <parameter name="wsdlServiceElement" value="ServerService"/>
> <parameter name="wsdlServicePort" value="Server"/>
> <parameter name="className"
> value="cin.ufpe.br.ws.ServerSoapBindingImpl"/>
> <parameter name="wsdlPortType" value="Server"/>
> <operation name="setValues" qname="setValues" soapAction="" >
> <parameter qname="pns:in1" xmlns:pns="http://ws.br.ufpe.cin"
> type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
> <parameter qname="pns:in2" xmlns:pns="http://ws.br.ufpe.cin"
> type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
> </operation>
> </service>
>
> 4) I execute the service and I obteve the follow SOAP message of request
> using TCPMON
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/
> XMLSchema-instance">
> <soapenv:Body>
> <in1 xmlns="http://ws.br.ufpe.cin">1</in1>
> <in2 xmlns="http://ws.br.ufpe.cin">name</in2>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The request of client functioned perfectly!!!!!!
> I did not understand because it functioned :(
> Exists some error in my process to generate class?
>
> ** The client and the server use Axis RC 1.2 (last version).
>
> thanks your attention,
> Carol
>
>