cancel
Showing results for 
Search instead for 
Did you mean: 

Add attributes to an existing element

Former Member
0 Kudos

Hi everyone,

I want to integrate SAP TM with the third party via web service in order to determine the distance and duration for a shipment.

I generated the service consumer in SAP from the wsdl of the third party.


My operations are well created and I was able to call some of them and I had a response from the third party.


My problem is on a specific operation, where the element type is not defined in the wsdl.

I have to specify the type to call the service, but it's dynamic.

I have the choice between 3 types that I can use, and the responses from the third party is different, depending on which type I called.


Here is the xml generated by SAP :

<v1:ReportTypes>

     <v1:ReportType/>

</v1:ReportTypes>

Here is the xml I need to build to call the service :

<v1:ReportTypes>

     <v1:ReportType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="v1:DetailReportType"/>

</v1:ReportTypes>

My first guess is to use a transformation program and XSLT to transform the xml.

I already created an XSL that is doing what I want, but I don't know how or where to use is in SAP.

In fact, I don't even know if it's the right technical choice.

Do I have to use the already existing transformation programs associated with my ReportType object ?

or

Do I have to created a new transformation program using XSLT_TOOL transaction ?

or

Do I have to use ABAP ?

Is there anyone that could help me ?

Thanks a lot !


Accepted Solutions (0)

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Maxime,

I am assuming that you are not using PI here. In generating an ABAP proxy by importing the WSDL, the same restrictions apply as if you are using an external definition and generating a proxy via PI Service Interfaces.


Here is the xml I need to build to call the service :

<v1:ReportTypes>

     <v1:ReportType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="v1:DetailReportType"/>

</v1:ReportTypes>

This request can be easily built using CL_HTTP_CLIENT.

Regards,

Mark