cancel
Showing results for 
Search instead for 
Did you mean: 

Consume a local webservice (localhost)

0 Kudos

Hi experts,

I have a .NET application on my local PC that provides a webservice that I want to consume. I can call the WSDL definition on http://localhost:8888/SapSoapCallListener?wsdl. But when I try to create the proxy I get an error message that the connection to localhost failed. I downloaded the WSDL and replaced all localhost entries with the hostname of my local machine. That change allowed me to create the proxy and even the logical port in SOAMANAGER, where the computer name of access URL is now my hostname. I even could sucessfully call the webservice.

This application runs locally on the PC of every user. So it doesn't help to have only my machine as logical port. Is it possible to have a generic computer name or is the another solution to call local webservices.

Any help appreciated.

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

jitendra_it
Active Contributor
0 Kudos

Hello Stefan,

did u get error by option : file downloaded + without replacing localhost ???

0 Kudos

Hi Jitendra

Yes, I received the error message when I didn't replace localhost in the WSDL definition. After replacing it with the name of my PC it worked.

Do you have ideas?

Regards,

Stefan

Former Member
0 Kudos

Stefan,

You may have already figured this out, but incase you were still looking for an answer...

The issue could be because 'localhost' in the context of creating a proxy or in SOAMANAGER ==> SAP system rather than your PC.

You were able to access the WSDL because the browser you used is local to your PC, but when you launch the SOAMANAGER, it is in the context of the SAP system.

does this make sense!?

Thank you,

Vijay

0 Kudos

Hi Vijay

This makes partly sense. When I replace "localhost" in SOAMANAGER with my PC name it works. But this service then would call the web service on my local PC for all other users. So if I would create a web service for each user my problem would have been solved.

On this client we decided to choose another way without web service. But I was thinking afterwards that maybe I could have solve this issue with the class method CL_HTTP_CLIENT=>CREATE_BY_URL where URL would have been the localhost address. If time (and budget) allows I'm going to try that some time.

Thanks and regards,

Stefan