cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping data type to SOAP meta data

former_member190543
Participant
0 Kudos

Hi experts,

The requirement is to call a third party webservice (synchronous) and pass a request message that I get (xml) from ERP. The request data type has so many fields and the webservice only needs a few. So they have given me the wsdl with has their required fields and a metadata field. I have to map all the unwanted fields into the metadata. The webservice now will change the values of the required fields and and then gives out a response message  along with the metadata. Now my problem is that I have to read the meta data and split the packed fields so that I can reconstruct the original message and use it to send to different systems.

Now my question is:

1. How to pack these fields (in the request message) into the meta data? Should I just use concat function to put all the fields into one string in the meta data?

2. If I do the above mapping, how can I read the meta data (in the response message) and separate the fields again to re-construct my original message?

Many thanks in advance.

Regards,

Ramesh.

Message was edited by: Ramesh Naidu PS: We are on PI 7.0 by the way.

Accepted Solutions (1)

Accepted Solutions (1)

gagandeep_batra
Active Contributor
0 Kudos

Hi Ramesh,

You can use UDF for mapping as follow:

1. How to pack these fields (in the request message) into the meta data? Should I just use concat function to put all the fields into one string in the meta data?

You can write one UDF which combine whole message with single string.and add a special character as  such as (,) for start of field for each  field name. and one more spacial character for start of new value such as (#).

for ex:

#22220,EmpID#USA,EMP_CONTRY#GAGAN,EMP_NAME

here 2220 is value of EMPID field

2. If I do the above mapping, how can I read the meta data (in the response message) and separate the fields again to re-construct my original message?

so at respone time you can do reverse process for mapping

Regards

Gagandeep

former_member190543
Participant
0 Kudos

Many thanks Gagandeep for your response.

As I am new to java coding, could you help me with the UDF please? If you cannot, I will start a separate thread.

Kind regards,

Ramesh.

Answers (0)