cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Request with two XML embedded

Former Member
0 Kudos

Dear all,

I have a not very usual scenario that I've never been gone trough so I would be delighted if I could get some feedback from you.

I need to send a HTTP request but the content of this request is two different XML embedded in the same call. The request should look something like this.

<?xml version="1.0" ?>

<RequestA>

     <Field1>XXXXXX</Field1>

</RequestA>

<?xml version="1.0”?>

<RequestB>

     <Field2>XXXXXX</Field2>

</RequestB>

The only feasible option I can see is implementing a custom module adapter in a receiver HTTP adapter (or SOAP without envelope).

Any suggestions? Does somebody dealt with this kind of scenario?

Many thanks for your time.

Kind regards.

Phileas.

Accepted Solutions (0)

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,


The only feasible option I can see is implementing a custom module adapter in a receiver HTTP adapter (or SOAP without envelope).

There is no need to use an adapter module for this. Just build the HTTP body via Java mapping and that's it. The XML that you will be sending is not valid though, so you won't be able to display it in sxi_monitor or in a browser. If you still want it to be well-formed, you can use a CDATA approach:


<Root>

<xml1><![CDATA[<?xml version="1.0" ?><RequestA><Field1>XXXXXX</Field1>              </RequestA>]]>

</xml1>

<xml2><![CDATA[<?xml version="1.0”?><RequestB><Field2>XXXXXX</Field2>

     </RequestB>]]>

</xml2>

</Root>

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

Many thanks for your input. I had assumed that the java mapping would fail given you are not creating a valid XML. Anyway, I would try that approach and I will let you know.

Many thanks,

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Phileas,

The output of the java mapping would fail, that is true. You won't be able to display it in moni or in test tab, but if you use view source, it should be there.

Regards,

Mark