cancel
Showing results for 
Search instead for 
Did you mean: 

Receiving and mapping multiple child nodes from SOAP response to OData

Former Member
0 Kudos

Hi Experts,

We have a SOAP Web service which provides multiple nodes in the response.

We are using READ method and successfully we are able to get the data, but the issue is we are getting only one set of value:

I have referred the link:

and tried applying splitByValue() to code, value, and list

but still we are able to get same response.

Software used:

Eclipse Kepler Service Release 2

SMP 3.0 SP 7

Please suggest if the approach is correct, or we need to apply it to other fields as well?

Requesting experts 

to share their views

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Experts,

I know this could be an easy case, but I am not able to identify the gap.

Thanks for your response, this is another way of approach I have used other than mentioned in

There, I have not used any custom scripting not sure if i need to use one.

Please find the below for the association based mappings:

Request Mapping:

Response Mapping:

If i need to write a custom script, how should I, please suggest

0 Kudos

Hi,

This can be achieved via partial mapping.

Map the simple properties via mapping editor.
< code>0</code>
< errorDetails></errorDetails>
< inputRequest></inputRequest>
< message>Success</message>
< key>STA</key>

Map the complex structure using script.
< list>
   <code>New </code>
   <value>New </value>
< /list>

In processResponseXML, the entire web service response can be obtained. Parse the result, fetch the list complex property and create a hashmap for every list object and set it to message header.

In processResponseData function fetch the output from mapping editor. Message body gets the list of simple properties. Fetch the list structure obtained in previous function from message header and add that to existing message body.

Please refer the below blog for achieving partial mapping
http://scn.sap.com/community/developer-center/mobility-platform/blog/2014/10/30/mapping-partially-vi...

If you are not concerned with obtaining simple properties, list objects can be fetched directly from mapping editor.

Map codeValues -> getCodesTableSet
Map list -> getCodesTable
Add a constant node to list node
Map code -> code
Map value -> value

Add splitByValue function to code and value nodes.
Also code can be a key element.

Regards,

Ramya