Dynamic Web Service Invocation RPC/encoded invocation failed with Element 
parameter
-----------------------------------------------------------------------------------

                 Key: AXIS-2528
                 URL: http://issues.apache.org/jira/browse/AXIS-2528
             Project: Apache Axis
          Issue Type: Bug
          Components: Serialization/Deserialization
    Affects Versions: 1.4
            Reporter: Arnaud MERGEY


I try to invoke an RPC/Encoded web service with dynamic invocation

My input param is defined like this in the WSDL:

<wsdl:message name="rechercherVoiesRequest">
      <wsdl:part name="in0" type="impl:Adresse"/>
   </wsdl:message>

 <complexType name="Adresse">
            <sequence>
               <element name="codeInsee" nillable="true" type="soapenc:string"/>
               <element name="codePostal" nillable="true" 
type="soapenc:string"/>
               <element name="libelleLocalite" nillable="true" 
type="soapenc:string"/>
               <element name="libelleVoie" nillable="true" 
type="soapenc:string"/>
               <element name="numeroVoie" type="xsd:int"/>
               <element name="typeVoie" nillable="true" type="soapenc:string"/>
            </sequence>
         </complexType>


I use ElementSerializer in order to represent my input param in Element

org.w3c.dom.Element element =... //  dom representation of 
:<in0><codeInsee>t</codeInsee><codePostal>t</codePostal><libelleLocalite>t</libelleLocalite><libelleVoie>t</libelleVoie><numeroVoie>1</numeroVoie><typeVoie>t</typeVoie></in0>

org.apache.axis.client.Call call=....

I register ElementSerializer:
call.registerTypeMapping(Element.class, type.getQName(), new 
ElementSerializerFactory(), new ElementDeserializerFactory());

call.invoke(new Object[] {element});  failed, and with logs, I can see than 
this soap body is send by Axis:
<soapenv:Body><ns1:rechercherVoies 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns1="urn:gestionterritoriale"><in0><in0><codeInsee>t</codeInsee><codePostal>t</codePostal><libelleLocalite>t</libelleLocalite><libelleVoie>t</libelleVoie><numeroVoie>1</numeroVoie><typeVoie>t</typeVoie></in0></in0></ns1:rechercherVoies></soapenv:Body>

So in0 is serialized twice.
I have checked than toString method of new RPCParam("in0","",element) return 
"<in0><in0><codeInsee>t</codeInsee><codePostal>t</codePostal><libelleLocalite>t</libelleLocalite><libelleVoie>t</libelleVoie><numeroVoie>1</numeroVoie><typeVoie>t</typeVoie></in0></in0>"
So the problem is here.

indeed it is impossible to represent input param in org.w3c.dom.Element without 
"in0" tag 
(<codeInsee>t</codeInsee><codePostal>t</codePostal><libelleLocalite>t</libelleLocalite><libelleVoie>t</libelleVoie><numeroVoie>1</numeroVoie><typeVoie>t</typeVoie>)



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to