19

I am reading the documentation for php class SoapServer but found nothing about description of options which will be passed in SoapServer constructor:

There is also a features option which can be set to

SOAP_WAIT_ONE_WAY_CALLS, 
SOAP_SINGLE_ELEMENT_ARRAYS, 
SOAP_USE_XSI_ARRAY_TYPE.

What is the difference between this option values?

SirPilan
  • 4,649
  • 2
  • 13
  • 26
itnelo
  • 1,053
  • 2
  • 18
  • 29

1 Answers1

32

SOAP_WAIT_ONE_WAY_CALLS

Without this, SOAP will not wait for a response on one way calls. It will just continue on and assume that all is well in the world. A one way call is anything that does not have a response in the WSDL.

SOAP_SINGLE_ELEMENT_ARRAYS

Your SOAP call may return a single value, or it may return an array of values. However, if you enable this flag, then it will force that single value to be an array with just the single value. You'll know what your data looks like without having to check it.

SOAP_USE_XSI_ARRAY_TYPE

This sets the deserialization type. If an error like this comes up "No deserializer defined for array type {http://www.w3.org/2001/XMLSchema}", then look to enable this feature.

darkhorizon
  • 530
  • 6
  • 12
  • 7
    It was so hard to find `SOAP_SINGLE_ELEMENT_ARRAYS` anywhere, thanks for posting this answer on the Internet so I could find it through Google. – marijnz0r Mar 24 '17 at 10:42
  • I use the option SOAP_USE_XSI_ARRAY_TYPE but still receive the message "No deserializer defined for array type" any ideas? – Honsa Stunna Apr 23 '18 at 09:04
  • Also: Not sure why they're documented under SoapServer when they only apply to SoapClient – Brad Kent Dec 20 '18 at 21:20