SOAP RPC operation problems (longish with code)

Discussion in 'XML' started by Default User, Oct 9, 2008.

  1. Default User

    Default User Guest

    I work on creating test cases for a SOAP-based set of servers, using
    soapUI. I received and updated set of WSDL and schema files, and when I
    made new tests and mock server operations, all of the ones that had
    been working now returned a SOAP fault. The faults look something like:


    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Body>
    <soap:Fault>
    <soap:Code>
    <soap:Value>Server</soap:Value>
    </soap:Code>
    <soap:Reason>
    <!--1 or more repetitions:-->
    <soap:Text xml:lang="en">Missing operation for soapAction
    [http://www.mycompany.com/rpc/] and body element
    [{http://www.mycompany.com/rpc/wsdl}RPC] with SOAP Version [SOAP
    1.2]</soap:Text>
    </soap:Reason>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>


    I also tried to process it with gSOAP wsdl2h and got:

    Reading file 'rpc.wsdl'
    Reading schema file 'RPC_Messages.xsd'
    Warning: no SOAP RPC operation namespace, operations will be ignored


    The big difference between the new and the old is that all the
    operations are RPC now, instead of document style.

    The two error reports above reference a small, generic version I made
    that contains just one simplified operation, that I think is small
    enough to post. Any thoughts would be greatly appreciated.



    Brian


    ========================= RPC.wsdl ===========================

    <?xml version="1.0" encoding="UTF-8"?>

    <definitions targetNamespace="http://www.mycompany.com/rpc/wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://www.mycompany.com/rpc/wsdl"
    xmlns:msg="http://www.mycompany.com/rpc/messages"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

    <types>
    <xsd:schema targetNamespace="http://www.mycompany.com/rpc/wsdl"
    xmlns:tns="http://www.mycompany.com/rpc/wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:msg="http://www.mycompany.com/rpc/messages">

    <xsd:import namespace="http://www.w3.org/2001/XMLSchema"/>

    <xsd:import
    namespace="http://www.mycompany.com/rpc/messages"
    schemaLocation="RPC_Messages.xsd"/>
    </xsd:schema>
    </types>

    <message name="msgRPCReq">
    <part name="parameters" element="msg:RPCReq"/>
    </message>

    <message name="msgRPCResp">
    <part name="parameters" element="msg:RPCResp"/>
    </message>

    <portType name="RPCPort">

    <operation name="RPC">
    <xsd:annotation>
    <xsd:documentation>Client Request</xsd:documentation>
    </xsd:annotation>
    <input message="tns:msgRPCReq"/>
    <output message="tns:msgRPCResp"/>
    </operation>

    </portType>

    <binding name="RPCBinding" type="tns:RPCPort">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="RPC">
    <soap:eek:peration soapAction="http://www.mycompany.com/rpc/"/>
    <input>
    <soap:body parts="parameters" use="literal"/>
    </input>
    <output>
    <soap:body parts="parameters" use="literal"/>
    </output>
    </operation>

    </binding>

    <service name="RPCService">
    <port name="RPCPort" binding="tns:RPCBinding">
    <soap:address location="http:/localhost:8080/rpc"/>
    </port>
    </service>
    </definitions>


    ===================== RPC_Messages.wsdl ========================

    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
    xmlns:tns="http://www.mycompany.com/rpc/messages"
    targetNamespace="http://www.mycompany.com/rpc/messages">
    <xsd:import namespace="http://www.w3.org/2001/XMLSchema"/>
    <xsd:element name="RPCReq">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Session" type="xsd:long"/>
    <xsd:element name="TransactionID" type="xsd:long"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="RPCResp">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="OperationStatus" type="xsd:long"/>
    <xsd:element name="TransactionID" type="xsd:long"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>

    </xsd:schema>
    Default User, Oct 9, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pere Montolio

    XML RPC to ONC XDR RPC

    Pere Montolio, Aug 11, 2004, in forum: XML
    Replies:
    0
    Views:
    711
    Pere Montolio
    Aug 11, 2004
  2. Nick Keighley
    Replies:
    5
    Views:
    298
    Andre Kostur
    Aug 4, 2005
  3. Ymtrader
    Replies:
    1
    Views:
    579
    Adam Tauno Williams
    Mar 15, 2011
  4. Shirish Joshi

    Ruby and Sun-RPC or ONC-RPC ?

    Shirish Joshi, Apr 7, 2004, in forum: Ruby
    Replies:
    0
    Views:
    186
    Shirish Joshi
    Apr 7, 2004
  5. Mark Probert
    Replies:
    4
    Views:
    124
    Ville Mattila
    Feb 15, 2005
Loading...

Share This Page