I have a service I have created using the Services module and SOAP server module. The service needs to have a number of optional parameters. When I call the service from the admin UI, everything works fine. However, if I call the service (e.g., from nusoap PHP code or the SoapUI utility) and don't provide all the elements, the service appears to get them in positional order.

For example, assume my service takes a required ID field, then optional arguments first_name, last_name and email_address. If I create a SOAP request that only passes in the ID and email_address elements, I end up getting the email address in the first_name field.

Is this normal and desirable behavior? My understanding of the SOAP protocol is that the messages can be sparsely populated, and you don't need to pass every field defined in the WSDL. That would make for even more bloat to the protocol than it already has!

Any feedback on this would be very helpful.

Comments

marcingy’s picture

Project: Services » SOAP Server
Version: 5.x-0.92 » 5.x-1.x-dev

Moving to soap server queue.