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 Luca Manganelli <ma...@itc.it> on 2004/11/15 11:07:30 UTC

WSDL2Java produces source with incorrect parameter names

I have the WSDL (at the end of this message). I think there's a WSDL2Java bug: when I invoke the "Ciao" operation, my ActiveBPEL server (with its Axis server) returns me an error:

  AxisFault
  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
  faultSubcode:
  faultString: Missing parameter for service request: doc

the problem is in this SOAP message (sent from client):

<?xml version="1.0" encoding="UTF-8"?>
<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>
  <ns1:ciao soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://Ciao">
   <ns1:documento href="#id0"/>
   <key xsi:type="xsd:string">ciao</key>
  </ns1:ciao>
  <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">D1</multiRef>
 </soapenv:Body>
</soapenv:Envelope>

as you see,  the tag "<ns1:documento href="#id0"/>" is wrong: it should be "<ns1:doc ... />"


WSDL is following:

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Ciao" targetNamespace="http://Ciao" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:tns="http://Ciao" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <types>
      <schema targetNamespace="http://Ciao" xmlns="http://www.w3.org/2001/XMLSchema">
           <element name="documento">
                <simpleType>
                     <restriction base="string">
                          <enumeration value="D1"/>
                          <enumeration value="D2"/>
                     </restriction>
                </simpleType>
           </element>
      </schema>
   </types>
   <message name="CiaoOUTMsg">
      <part name="key" type="xsd:string"/>
      <part name="protN" type="xsd:string"/>
   </message>
   <message name="CiaoINMsg">
      <part element="tns:documento" name="doc"/>
      <part name="key" type="xsd:string"/>
   </message>
   <portType name="Ciao_PT">
      <operation name="ciao">
         <input message="tns:CiaoINMsg"/>
         <output message="tns:CiaoOUTMsg"/>
      </operation>
   </portType>
   <binding name="Ciao_PLTServiceBinding" type="tns:Ciao_PT">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
      <operation name="ciao">
       <soap:operation soapAction="" style="rpc" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
         <input>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
         </input>
         <output>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
         </output>
      </operation>
   </binding>
   <service name="Ciao_PLTService">
      <port binding="tns:Ciao_PLTServiceBinding" name="Ciao_PLTServicePort">
       <soap:address location="http://localhost:8080/active-bpel/services/Ciao_PLTService" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
      </port>
   </service>
</definitions>