cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Data with Tags in Web Service Field - Consuming WS

Former Member
0 Kudos

We have a requirement to call an external third party web service from ABAP. The web service has only a single field in it that is <text> </text>.

After creating consumer proxy and now when testing the web service through SAP with the following data :

<text>This is a test message</text>

success response is received.

Now our requirement is to send data like this :

<text>

<SalesOrderID>10005</SalesOrderID>

<DistributionChannel>10</DistributionChannel>

<Division>11</Division>

</text>

Now sending data like this result in an error and the external server is not called at all.

Suggest ways on how to send data with tags inside a web service.

Accepted Solutions (1)

Accepted Solutions (1)

jitendra_it
Active Contributor
0 Kudos

Hello Rohit,

It looks like use of CDATA in XML.

Check these links CodingForums.com

                            Extensible Markup Language (XML) 1.0 (Fifth Edition)

Hope this helps.

Former Member
0 Kudos

Hi Jitendra

Thanks for the reply, will find out how to use cdata concept in abap.
I have another question :

In an internal table i have a field with technical name lets say VBELN, now my requirement is when i call transformation to convert it into xml I want the conversion as <SalesOrderID>value</SalesOrderID>.

Please suggest some approaches. One way is to manually concatenate into string but that will be too cumbersome.

Rohit

manigram
Active Participant
0 Kudos

HI,

CDATA  is same like comment line in another programming language, so u can use cdata or ask target team to share the updated wsdl with new fields. SO u can send the data with additional fields.

Regards,

Manigandan

jitendra_it
Active Contributor
0 Kudos

Hello Rohit,

Check this thread  . It uses custom description instead on field name.

Answers (0)