cancel
Showing results for 
Search instead for 
Did you mean: 

XML parameter in SOAP requests?

Walter.Koller
Level 11

We have exposed a process as a web service an would like to receive a XML structure as input parameter by the calling system.

The XML structure should be dynamic so we cannot use collection as input data type. The structure of the collection as input parameter of a web service has to be defined, thus cannot be dynamic.

First we tried to use simple text/string and send the XML as text and parse/interpret it later in our process. Unfortunately something seems to strip all tags of all data, eg:

<inputPara xsi:type="xsd:string"><myTag>test_text</myTag></testText>

<myTag>test_text</myTag> would be the expected content but already even in the first line of the logs that show the input parameter values, the received text is: text_text without the <myTag> tag.

We tried to encapsulate the content of the parameter with CDATA and we tried to use a collection parameter with one field that should get the XML as text and then could be parsed in the process.

Eventually we could successfully run our tests however, the tests were all negative. The process completed but the text was without any tags.

Any ideas how we can achieve this are much appreciated.

Thanks!

 

2 REPLIES 2

mamichielsen
Level 3

Have you tried using Utility - Http Request

Hi, thanks for your reply.

We eventually found what is necessary to use XML parameters in SOAP by using CDATA tag. The trick was to have the parameter separated from CDATA keyword by new lines. eg:

<![CDATA[<xmlparameter>...</xmlparameter>]]>won't work
<![CDATA[
<xmlparameter>...</xmlparameter>
]]>
seems to do the trick

Regards