cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP POST from ECC 6.0 to XI

tony_raimo2
Explorer
0 Kudos

On ECC 6.0, I have an XMLstring that I need to post to an external URL. I need this to go through XI. It is actually an HTTPS post. How can this be accomplished? Can anyone point me in the right direction as far as how this would work in XI? Here is a smippet of code on ECC

CALL METHOD cl_http_client=>create

EXPORTING

host = POST_HOST

service = '443'

scheme = '2'

ssl_id = 'ANONYM'

  • proxy_host = wf_proxy

  • proxy_service = wf_port

IMPORTING

client = http_client.

http_client->propertytype_logon_popup = http_client->co_disabled.

wf_user = '' .

wf_password = '' .

  • proxy server authentication

CALL METHOD http_client->authenticate

EXPORTING

proxy_authentication = 'X'

username = wf_user

password = wf_password.

CALL METHOD http_client->request->set_header_field

EXPORTING

name = '~request_method'

value = 'POST'.

CALL METHOD http_client->request->set_header_field

EXPORTING

name = '~request_protocol'

value = 'HTTPS/1.0'.

CALL METHOD http_client->request->set_header_field

EXPORTING

name = 'HOST'

value = POST_HOST.

CALL METHOD http_client->request->set_header_field

EXPORTING

name = '~request_uri'

value = L_POST_URI.

CALL METHOD http_client->request->set_header_field

EXPORTING

name = 'Content-Type'

value = 'text/xml; charset=utf-8'.

CALL METHOD http_client->request->set_header_field

EXPORTING

name = 'Content-Length'

value = txlen.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can send your data via proxies

Check this link for information how to do that /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy

At the receiver end you just use a HTTP adapter instead of the mentioned File Adapter

tony_raimo2
Explorer
0 Kudos

Please forgive me for this stupid question. But, how do you create a proxy class without a WSDL file? We use proxy classes for web services(WSDL) with no problem. However, this is using HTTP POST method. Can you create a generic proxy class for HTTP POST?

Thank you,

Former Member
0 Kudos

The prequisite to generate a proxy (and it's corresponding class) from a PI perspective is the existence of a structure that is encapsulated in a Service Interface in PI. This structure can very well built using the data types of PI and assgin them to the message type which makes up for the service interface. You should probably check some of SAP's how to guides for guidance.

abhay_rajhans2
Contributor
0 Kudos

Hi Tony,

You need to go through multiple steps.

1) Creation of Scenario in XI ( Integration Repository)

First create datatype which will represent the data that is to be passed to URL. Then message type, message interface, message mapping, Interface mapping.

2) Creation of Directory scenario ( Integration Directory)

Need to create Communication channel using either SOAP adapter or HTTP adapter as you need to pass the data to url.

3) Proxy:

Once you create first step then structure will be available in proxy ( SPROXY transaction) . There you will need to call method for outbound proxy.

For above mentioned steps you can search in SDN which will guide you to multiple helping thread.