Hi,

I have problems producing a service against pre-made simple wsdl, where types section:

  <types>
<xsd:schema elementFormDefault="qualified" targetNamespace="Blah.Orders">
      <xsd:element name="OrderString" type="xsd:string" />
      <xsd:element name="OrderStringResponse" type="xsd:boolean" />
    </xsd:schema>
  </types>

Sample soap request(which works fine with soapui mockservice):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:bl="Blah.Orders">
   <soapenv:Header/>
   <soapenv:Body>
<bl:OrderString>ORDER_IN_ONE_BUNCH_OF_STRINGS</bl:OrderString>
   </soapenv:Body>
</soapenv:Envelope>

Since the service OrderString is the first element of the soap-body
I should use a method named OrderString, but if I add theordersting parameter,
Spyne insists on requiring an element with the same name

So following:
class OrderWebService(ServiceBase):

@rpc(String, _returns=Boolean) # This is probably also wrong, how to return OrderStringResponse of Boolean Type?
    def OrderString(ctx, theorderstrig):
        # Do stuff
        return True

Becomes:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:bl="Blah.Orders">
   <soapenv:Header/>
   <soapenv:Body>
      <bl:OrderString>
            <!--Optional:-->
<bl:theordersting>ORDER_IN_ONE_BUNCH_OF_STRINGS</bl:theordersting>
      </bl:OrderString>
   </soapenv:Body>
</soapenv:Envelope>


Is there a way to work around this?
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to