cancel
Showing results for 
Search instead for 
Did you mean: 

Send < and > symbols with soap receiver adapter

AntonioSanz
Active Participant
0 Kudos

I have a integration scenario (IDOC to WebService).

The web service has an action with receives 2 parameters

<MaterialNumber>

and

<MaterialList>

I have imported the wsdl file into Repository and I have define my interface.

But this webservice has a peculiarity:

The content of the second tag is also in xml format (but this is not defined in wsdl). For example

<MaterialList>

<Item>

<MaterialID>1</MaterialID>

<MaterialDescription>Example</MaterialDescription>

<CreationDate>10102007</CreationDate>

</Item>

</MaterialList>

A have tried to invoque the webservice with SAP SOAP Client. If i used < and > symbols for Item, MaterialID, MaterialDescription and CreationDate tags I get an xml error. So I have to use &amp;lt; and &amp;gt; instead and its works fine.

So in my message mapping I have done that. I have test it in integration repository and uses &amp;lt; and &amp;gt; in the generated xml. It does exactly what I want. I have a message in this form:

&amp;lt;MaterialList&amp;lt;

&amp;lt;Item&amp;lt;

&amp;lt;MaterialID&amp;lt;1&amp;lt;/MaterialID&amp;lt;

&amp;lt;MaterialDescription&amp;lt;Example&amp;lt;/MaterialDescription&amp;lt;

&amp;lt;CreationDate&amp;lt;10102007&amp;lt;/CreationDate&amp;lt;

&amp;lt;/Item&amp;lt;

&amp;lt;/MaterialList&amp;lt;

But once I execute my integration scenario, I do a communication channel monitoring and for my surprise i get the next message

& amp; &amp;lt;MaterialList& amp;&amp;gt;

& amp; &amp;lt;Item& amp; &amp;gt;

& amp; &amp;lt;MaterialID& &amp;gt;1& amp; &amp;lt;/MaterialID& amp; & amp;gt;

& amp; &amp;lt;MaterialDescription& &amp;gt;Example& &amp;lt;/MaterialDescription& &amp;gt;

& amp; &amp;lt;CreationDate& &amp;gt;10102007& amp; &amp;lt;/CreationDate & amp; &amp;gt;

& amp; &amp;lt;/Item& &amp;gt;

& amp; &amp;lt;/MaterialList& &amp;gt;

It seems that the soap adapter has changed &amp;&lt; to & amp;lt;

Is there any way to avoid this?

Thanks to all.

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor
0 Kudos

Use CDATA tag and you won't have those problems.

Check this blog: /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

Regards,

Henrique.

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

When you add < and > in the graphical mapping as constants, it replaces this by & lt ; and & lt ; by itself and you need not do this.

The reciever SOAP adapter does not replace anything, it has happend before.

Regards

Stefan