Question
· Jul 30, 2018

SOAP-Services with Caché OS - ignore order of elements

Hi,

is there a way to tell Caché to ignore the order of elements when hosting a SOAP-based webservice?

At the moment I keep getting the Error-Code #6237 (Unexpected tag in XML input) when the request is not in the exact same order as defined.

Looking forward for your answers.

Regards,

Thomas

Discussion (4)1
Log in or sign up to continue

Hi Thomas,

If you generate your webservice from a WSDL  you should check your classes
for correct hierarchical structure AND for properties flagged as required in WSDL.
Typical situation: 
an address is optional but inside the address, the street is required.  
This can cause the whole address to be interpreted as required.
You may either remove the required in properties or before generating the classes you edit the WSDL ( often easier).

 

If you want to try to disable checking of the order of elements in XML, you can also change parameter XMLSEQUENCE in given class

Parameter XMLSEQUENCE = 0;

But it can have another side effects - like the one from XMLSEQUENCE parameter description:

If the XMLSEQUENCE = 1, then the order of the XML elements must match the order of the class properties. This allows us to deal with XML where the same field appears multiple times and is distinguished by the order.

So I would prefer to check if XML of given SOAP request comply to  WSDL of your web service and change it if not.