cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.11 - Sync HTTP receiver adapter with response XML file

michael_buchli
Participant
0 Kudos

Hi

We have a File to HTTP scenario in which we need a sync HTTP interface. We send a file to the HTTP address and receive a XML acknowledge. As I read in this forum: sync HTTP interfaces are not possible with the "standard" HTTP adapter. So I found an entry which recommended to use the SOAP adapter instead.

I configured it:

- Do Not Use SOAP envelope

- modules: RequestResponseBeans, CallSapAdapter, ResponseOneWayBean

If i use this scenario, i get following error in the RWB - Message Display Tool:

Delivering the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageId() of an object loaded from local variable 'message1'.

I testet this scenario using CURL and it worked properly. Should this kind of scenario work with the SOAP adapter or do I need to buy/develop an own adapter? Is in NW7.3 possible to configure sync HTTP scenarios?

Thanks in advance

Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

We have a File to HTTP scenario in which we need a sync HTTP interface. We send a file to the HTTP address and receive a XML acknowledge. As I read in this forum: sync HTTP interfaces are not possible with the "standard" HTTP adapter. So I found an entry which recommended to use the SOAP adapter instead.

Not sure what you meant by sync interfaces not possible with the standard HTTP adapter. The reasons why SOAP adapter with Do Not Use SOAP Envelope is used most of the time are because of adapter modules and dynamic URL config

Maybe this blog can help you, as your requirement looks very similar.

Regards,

Mark

Edited by: Mark Dihiansan on Mar 8, 2012 9:29 AM

michael_buchli
Participant
0 Kudos

Hi Mark

with sync HTTP interface i mean: send data using the HTTP adapter from PI to a webserver and get a response XML back.

Michael

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

with sync HTTP interface i mean: send data using the HTTP adapter from PI to a webserver and get a response XML back.

Yes, the HTTP Adapter support qos BE. So this is possible.

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/998ead2a86103ee10000000a422035/frameset.htm

Hope this helps,

Mark

Shabarish_Nair
Active Contributor
0 Kudos

To clarify further, is this

1. a HTTP sync scenario where you need to send some data in payload and you will receive back a XML payload or

2. is it data and XML files as part of HTTP attachments?

Option 1 - very much possible

Option 2 - a bit tricky but still should be possible

michael_buchli
Participant
0 Kudos

Hi

actually i use a simple HTTP receiver CC with the setting "XI Payload in HTTP Body" to send a XML datafile to a webpage (java servlet). This part works fine by now. But, this servlet would also send back a status information to the state of the received datafile, which I like to catch.

e.g. HTTP response from the servlet (catched using CURL):

HTTP/1.0 403 Forbidden
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA (build: SVNTag=JBPAPP_4_3_0_GA date=200801031548)/Tomcat-5.5
Set-Cookie: JSESSIONID=OALHMomjR9TVgIATi8SrPQ**.ajp13_ls_1; Path=/ls
Content-Type: text/xml
Date: Tue, 06 Mar 2012 16:19:56 GMT
X-Cache: MISS from proxy.xxxx.com
Via: 1.0 proxy.xxxx.com:xxxx (http_scan/4.0.2.6.19)
Proxy-Connection: close

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE transportordersfromls [ <!ELEMENT transportordersfromls (userid, clntid, msgid, (transportorderfromls+ | error))> <!ATTLIST transportordersfromls vers CDATA #REQUIRED> <!ELEMENT userid (#PCDATA)> <!ELEMENT clntid (#PCDATA)> <!ELEMENT msgid (#PCDATA)> <!ELEMENT transportorderfromls (refid, status)> <!ELEMENT refid (#PCDATA)> <!ELEMENT status (ok | error+)> <!ELEMENT ok EMPTY> <!ELEMENT error EMPTY> <!ATTLIST error reason (XMLError | SystemNotAvailable | ApplicationError | OTHER) #REQUIRED message CDATA #REQUIRED> ]>
<transportordersfromls vers="1.0">
    <userid/>
    <clntid>XXXXX</clntid>
    <msgid>0</msgid>
    <error reason="OTHER" message="Access denied"/>
</transportordersfromls>

Michael

SM
Participant
0 Kudos

Hi Michael,

Did you get a solution for your question?

I have the same scenario and would like to know if you have found a solution.

Thanks,

Sigfrid Murillo.

michael_buchli
Participant
0 Kudos

Hi Sigfrid

Unfortunately not. We solved this challenge using a Java Service instead of PI.

Best Regards

Michael