On 03/15/13 10:36, Charlie Benton wrote:
Why are these inputs being wrapped in a complexType? This forces me to consume the web service in .NET using the following statement:

SayHelloResponse response = client.SayHello(new SayHello() { name = "Dave", times = "5" });

As opposed to:

SayHelloResponse response = client.SayHello("Dave", "5");

Is there a way to stop Spyne from wrapping the inputs? Am I doing something wrong in either python or .NE that's forcing me to use the longer more cludgey .NET statement to consume the web service?


Hi,

Clients that I'm familiar with (which don't include ms-only stuff) run some heuristics to recognize a wrapped function and make it work like the second code snippet above.

You can pass _body_style='bare' to @rpc decorator to prevent that wrapping. But you'll most likely get:

Exception: body_style='bare' can handle at most one function argument.

If you can fix this in a way that doesn't break other tests, I can merge your patch.

Best regards,
Burak

_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to