Hi Jaakko,
Yes, you should pass _body_style='bare' to the @rpc decorator. Note that
this won't work with Spyne 2.8.2, but the first stable release of
Spyne-2.9, due in October the 29th will contain this fix.
Best Regards,
Burak
On 10/20/12 03:57, Jaakko Rytkönen wrote:
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
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap