Forum Discussion

obducta's avatar
obducta
Senior Member
9 years ago

Missing operation for soapAction [Abc] and body element [null] with SOAP Version [SOAP 1.1]

I am trying to create a SOAP MockService from my WSDL. This WSDL has an empty request body which seems to cause trouble.

 

Once I generated and run the service and send a request, following SoapFault is received:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>Server</faultcode>
         <faultstring>Missing operation for soapAction [Abc] and body element [null] with SOAP Version [SOAP 1.1]</faultstring>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Why is no operation for the soapAction with an empty body found? The WSDL specifies, that the body should be empty.

 

 

This is my WSDL:

 

<?xml version="1.0"?>

<definitions name="Abc"
             targetNamespace="http://abc.de/abc/abc/v1"
             xmlns:tns="http://abc.de/abc/abc/v1"
             xmlns:sns="http://abc.de/def/v2"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
             xmlns="http://schemas.xmlsoap.org/wsdl/">


   <types>
      <schema targetNamespace="http://abc.de/abc/abc/v1"
              xmlns="http://www.w3.org/2001/XMLSchema"
              elementFormDefault="qualified">

         <import namespace="http://abc.de/def/v2"
                 schemaLocation="../../../def/v2/Types.xsd" />

         <element name="Abc">
            <complexType>
               <sequence>
                  <any processContents="skip" />
               </sequence>
            </complexType>
         </element>

         <element name="AbcResponse">
            <complexType>
               <sequence>
                  <any processContents="skip" />
               </sequence>
            </complexType>
         </element>

      </schema>
   </types>



   <message name="AbcReq">
      <part name="Log"     element="sns:LogIDs" />
      <part name="DataReq" element="tns:Abc" />
   </message>

   <message name="AbcRsp">
      <part name="DataRsp" element="tns:AbcResponse" />
   </message>

   <message name="AbcException">
      <part name="FaultDetail" element="sns:FaultInfo" />
   </message>



   <portType name="AbcPort">
      <operation name="Abc">
         <input  message="tns:AbcReq" />
         <output message="tns:AbcRsp" />
         <fault  message="tns:AbcException" name="AbcFault" />
      </operation>
   </portType>



   <binding name="AbcSoapBinding" type="tns:AbcPort">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />

      <operation name="Abc">
         <soap:operation soapAction="Abc" />
         <input>
            <mime:multipartRelated>
               <mime:part>
                  <soap:header message="tns:AbcReq" part="Log" use="literal" />
                  <soap:body parts="" />
               </mime:part>
               <mime:part>
                  <mime:content part="DataReq" type="text/xml" />
               </mime:part>
            </mime:multipartRelated>
         </input>
         <output>
            <mime:multipartRelated>
               <mime:part>
                  <soap:body parts="" />
               </mime:part>
               <mime:part>
                  <mime:content part="DataRsp" type="text/xml" />
               </mime:part>
            </mime:multipartRelated>
         </output>
         <fault name="AbcFault">
            <soap:fault name="AbcFault" />
         </fault>
      </operation>
   </binding>



   <service name="AbcService">
      <port name="AbcHttpSoapPort" binding="tns:AbcSoapBinding">
         <soap:address location="http://localhost:8090/abcservice/" />
      </port>
   </service>

</definitions>

 

No RepliesBe the first to reply