As far as I can tell, there is a mechanism for altering the WSDL, but it isn't documented at all. Is there a small example somewhere about how to define a return object for a given function in my service? I'm having problems getting a .Net client to consume anonymous objects nicely.

Comments

marcus_clements’s picture

Status: Active » Closed (fixed)

You need to create your own resource.
http://drupal.org/node/783460

fuzzy76’s picture

Status: Closed (fixed) » Active

There is nothing in the resource definitions about return types as far as I can tell. Which really isn't surprising, since the services module is very XML-RPC/REST centric. SOAP on the other hand, works much better across platforms if you define your returned objects explicitly.

I have my own resource as it is, but the WSDL insists I only return "struct".

marcus_clements’s picture

Status: Active » Closed (fixed)

If you want to define return types other than xsd:struct then you need to override the wsdl using hook_soap_server_wsdl and return the wsdl in your implementation of the hook.

See soap_server.module line 126