+ Start a Discussion
BugudeBugude 

Is there any way to control order of the tags in the custom webservice response XML?

In the custom webservice response, the tags are sorted alphabetically by salesforce automatically. Is there any way to control order of the tags in the custom webservice response?

More Details:
This is for Inbound service from another system to Salesforce. For this, we have writted a custom webservice in which the response tags are as below.

HEADER
PAYLOD
MESSAGE

In the response XML generated from salesforce, the above tags are rearranged as below.

HEADER
MESSAGE
PAYLOAD

which is causing the problem in the source system to process the response.

Is there anyway in salesforce to control the order/sequence of the tags in the response XML generated by Salesforce in the custom webservice.
shankswishankswi
Not that I'm aware of.