cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP/HTTP to Proxy: How to Forward whole SOAP Envelope as Payload to ABAP-Proxy

0 Kudos

Hello PI-Experts,

I am getting a SOAP-Request in my PI System. But I dont have a webservice to consume it.

My Partner System is sending me the SOAP call using a somple plain-http-Request to my PI. I am getting the whole SOAP request as HTTP-payload. 

Is there a simple way to forward the whole payload as a string to ABAP-Proxy? An ABAP program should scan the payload and use the Content.

Thanks

Armin

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Armin,

Yes there is a way, please take a look at this blog:

http://scn.sap.com/people/jyothi.anagani/blog/2010/06/17/convert-the-input-xml-to-string-in-pi-71-us...

Now that you have converted it or the xml is inside a tag in a proxy field, enclose it in CDATA e.g <![CDATA[yourXMLHere]]> (just use concat) so that you do not encounter serialization issues in ABAP.

Hope this helps,

Mark

0 Kudos

Hello Mark,

Thank you for your response. The main problem I have here is, that I dont know the exact structure of the Payload I am getting from my partner into my XI system! (I only know that I will receive an envelope with header and body).

So I need to receicve the whole payload (Body) into a string, before the mapping step! In my abap backend system I can scan it and find out more about the content.

best regards

Armin

former_member184720
Active Contributor
0 Kudos

Hi Armin -

The below blog should address your needs

http://wiki.scn.sap.com/wiki/display/XI/Whole+Payload+to+a+XML+field

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Armin,

You can use the blog provided by Hareesh. It will be more flexible because it uses Java mapping.

Regards,

Mark

0 Kudos

Hello Everybody,

Thank you for all your postings.

I have a SOAP call to my PI, which I receive with over the plan-http adapter.

The problem I have here is how to put my incomming Message (which is a whole envelope) into a Service-Interface, to be able to define "the left side of mapping". Once I have the incomming message in a "suitable" Service nterface with correct namespaces,... I will be able to map it to a simple string on the "right side of mapping" using the blog given above.

I am getting this envelope:

<?xml version="1.0" encoding="UTF-8" ?>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

   <S:Header>

     <dummy xmlns="http://at.gv.brz.erb/dummy" />

   </S:Header>

   <S:Body>

     <deliverInvoiceCallbackInvoiceInput xmlns="http://erb.eproc.brz.gv.at/ws/invoicedeliverycallback/201305/" overallsuccess="true" version="1.0.0">

       <DocumentID>webservice120-te90</DocumentID>

       <SupplierInvoiceNumber>7600000790</SupplierInvoiceNumber>

       <GovernmentDocumentNumber>X2HCLNT620288</GovernmentDocumentNumber>

       <PrintableInvoice creation="2014-01-10T09:07:25.389+01:00" hashalgo="SHA-512" hashvalue="90ab86613" mimetype="application/pdf" originalsize="7485">JVDcyNSswMSc</PrintableInvoice>

     </deliverInvoiceCallbackInvoiceInput>

   </S:Body>

  </S:Envelope>

I Need to define a SI with a suitable Messagetype to be able to receive this envelope including the payload. Once I have this I will map it into the targetstring-Structure.

One Approach is that I upload the XML which I receive to my mapping and then map it into a string in my message mapping:

But in my Service Interface I cannot use this Option: I can not upload that XML to define my SI. So I have a self defined Message Type in it. I think the namespaces are not exactly the same.

The mapping works good, Buta later I get an error

Mapping was ok here. I have the result I am looking for.

But now I get the error about no mapping Programm found in Cache :

I think I get this error because I am not using the same structure in MM and SI/OM  ?

Now the question I have is:

I want to use a Kind of dummy structure to receive my whole envelope. I want to use this in my Message mapping (left side), Service Interface and Operation mapping. In my message mapping I will map the whole content into one string.

Thanks

Armin

I

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Armin,

It looks like your scenario is synchronous and that you did not have a mapping program for the response (e.g SOAP Fault being returned by server).

Regards,

Mark

former_member184720
Active Contributor
0 Kudos

Not sure if you can define some dummy structure for a webservice call but one option i see is

-  Check if webservice can send the payload as an attachment.

Then you can use either payload swapbean or in side your mapping make use of the attachment to send everything as one string to proxy.

http://scn.sap.com/thread/370078

0 Kudos

Hi Mark,

Yes you are right. It seems that the mapping is being processed and my Proxy is called.

I defined asynchronous Service Interfaces. And my Operation Mapping doesnt contain have any response mapping.  But the Scenario is running as a synchronous one! Maybe because it is initiated by a SOAP-Envelope ?

I must check this.

Thank You

Armin


former_member184720
Active Contributor
0 Kudos

Hi Armin - In your soap sender channel, what did you select for the quality of service?

You can set it to Exactly once to make it Async.

0 Kudos

I need to offer this interface as HTTPS  to my partner, and the partner is going to use it without any kind of client certificates or user/password Parameters in URL!

Can anybody tell me how I can do it?

-Can I keep using HTTP_Plain_Adapter with https on Sender side? Are there any User/Password-Options to use in Adapter? Can I provide user/password in a Sender-http-Adapter ?

-Should I change my scenario to a SOAP to Proxy one? Is it possible with a SOAP-Sender Adapter to connect to our PI without User/Password and certificates?

-Maybe It is possible with AXIS Adapter? And use the wssec-Parameters ?

Thanks and Best Regards

Armin

former_member184720
Active Contributor
0 Kudos

Hi Armin - Did you try HTTPS without client authentication option?

Also can you check for for William li's reply in the below thread

http://scn.sap.com/thread/236507

0 Kudos

Hi Hareesh,

Thank you for your response.

Li's solution would change the behavior of the soap adapter for all interfaces. I am not sure about this solution. I need a solution only for this single interface.

I will try it with soap https as you suggested, if I cannot make my http-plain-adapter run as asynchronous interface. (I defined in my scenario http_plain to Proxy with asynchronous SIs. But as soon as I receive the http-request it is marked as best effort!!!!!! and it expects a response to be mapped!

There is a simple solution for the user/pw issue:

I can define a reference to Plain_Adapter in SICF and add user credentials to it.  So I wont have to send user/pw in url.

Thanks again

Armin

former_member184720
Active Contributor
0 Kudos

Hi Armin - May i know the URL your party is using to send the messages?

It should have the quality of service in it at the end.

Like

https://host:port/sap/xi/adapter_plain?service=<<CommunicationComponent>>&namespace=<<NameSpace>>&in...&qos=EO


Also i never tested but even the plain HTTP adapter does have https without client authentication option.

Configuring the Sender Plain HTTP Adapter (SAP Library - SAP Exchange Infrastructure)

0 Kudos

Hi Hareesh,

With the qos option at the end I receive it as asynchronous http. Thank you very much.

Armin

Answers (0)