cancel
Showing results for 
Search instead for 
Did you mean: 

call Internet service from different server

Former Member
0 Kudos

Hi all ,

Assume we have 2 servers ser1 and ser2, We have created the Internet service zdemo_2 using se80 in server ser1 and the same is maintained in tcode SICF.

When I test the service from Ser1 it is working fine.

My requirement is to call the same service from server ser2 using the ABAP program

I tried to call using the URL by CALL METHOD cl_http_client=>create_by_url

But i am getting http_communication_failure during send and receive.

Note: gc_proxy_host = 'AD_MDE' -


here I pass my RFC destination.

gc_proxy_service = Blank value . -


Please help me to create proxy if we need to pass.

code:

-


concatenate 'http://splhrd398.baplc.com:8005/sap/bc/'

'gui/sap/its/zdemo_1/?'

'sap-client=100&sap-language=EN'

into lv_url .

condense lv_url no-gaps.

CALL METHOD cl_http_client=>create_by_url

EXPORTING

url = lv_url

proxy_host = gc_proxy_host

proxy_service = gc_proxy_service

  • ssl_id =

  • sap_username =

  • sap_client =

IMPORTING

client = lo_client

EXCEPTIONS

argument_not_found = 1

plugin_not_active = 2

internal_error = 3

OTHERS = 4

.

Edited by: deepak chandar on Jun 16, 2009 5:19 PM

Edited by: deepak chandar on Jun 16, 2009 5:21 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Have you published completely your second service? Use SIAC_PUBLISH_ALL_INTERNAL transaction before run your ABAP program.

Hope this helps,

Iván.

Former Member
0 Kudos

The service is published completely, thats y it is working fine from server ser1

former_member316351
Active Contributor
0 Kudos

Hello Deepak,

It shouldn't matter what server you're on. As long as your network allows a connection to the URL:

http://splhrd398.baplc.com:8005/sap/bc/gui/sap/its/zdemo_1/?sap-client=100&sap-language=EN

So you should test to make sure that this URL is accessible from the rest of your network or wherever server2 is.

Edgar