6 Replies Latest reply: Jun 20, 2013 8:18 AM by Lalit Branched from an earlier discussion. RSS

    Re: Spot the error in the WSDL document

    GosalGurpreet


      Hi,

      Im facing a similar problem,

      Im trying to create a WSDL for a simple operation (May be add)

      it is giving me Invalid wsdl:operation "performOperation": its a document-literal operation,  message part must refer to a schema element declaration

      error. Please suggest. Below is code from the WSDL:

       

      message name="operationRequest">

      <part name="parameters" type="fs:operationRequest" />

      </message>

      <message name="operationResponse">

      <part name="parameters" type="fs:operationResponse" />

      </message>

      <portType name="OperationServicePort">

      <operation name="performOperation">

      <input message="fs:operationRequest" />

      <output message="fs:operationResponse" />

      </operation>


      </portType>

      <binding name="OperationServiceBinding" type="fs:OperationServicePort">

      <soap:binding style="document"

      transport="http://schemas.xmlsoap.org/soap/http" />

      <operation name="performOperation">

      <soap:operation soapAction="performOperation" />

      <input>

      <soap:body use="literal" />

      </input>

      <output>

      <soap:body use="literal" />

      </output>

      </operation>

      </binding>

      <service name="OperationService">

      <port name="OperationServicePort" binding="fs:OperationServiceBinding">

      <soap:address location=" " />

      </port>

      </service>

       

       

      Below is the XSD:

       

      <xs:complexType name="operationRequest">      

      <xs:sequence>

      <xs:element minOccurs="0" name="input1" type="xs:positiveInteger">              

      </xs:element>

      <xs:element minOccurs="0" name="input2" type="xs:positiveInteger">              

      </xs:element>           


      <xs:element minOccurs="0" name="operation" type="xs:string">              

      </xs:element>

      </xs:sequence>

      </xs:complexType>

      <xs:complexType name="operationResponse">      

      <xs:sequence>

      <xs:element minOccurs="0" name="result" type="xs:string">              

      </xs:element>          

      </xs:sequence>

      </xs:complexType>