Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data through webservices.

Former Member
0 Kudos

Hi All,

I have two doubts.

1. Can we call a webservice without calling creating an ABAP Proxy?

2. If yes how can i pass my internal table through webservice.

any code snippet or wiki link regarding this will be very helpful.

TIA

Vikash Singh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Vikash,

It is not possible to invoke a web service without creating a proxy class.

The flow is that, you get the WSDL from the service provider. Now you need to consume this service and create components in your system, through which your system can speak to the service provider. The component here is invariably an ABAP Client proxy.

Alternatively, if the same service can be invoked as a "HTTP" call, then you can use use "HTTP_CLIENT*" class and invoke the same service, but here the communication is over HTTP, unlike SOAP incase of web service.

Regards,

Chen

4 REPLIES 4

matt
Active Contributor
0 Kudos

1. No.

2. Try reading some of the blogs, whitepapers and SAP help.

Former Member
0 Kudos

Hi Vikash,

It is not possible to invoke a web service without creating a proxy class.

The flow is that, you get the WSDL from the service provider. Now you need to consume this service and create components in your system, through which your system can speak to the service provider. The component here is invariably an ABAP Client proxy.

Alternatively, if the same service can be invoked as a "HTTP" call, then you can use use "HTTP_CLIENT*" class and invoke the same service, but here the communication is over HTTP, unlike SOAP incase of web service.

Regards,

Chen

0 Kudos

Thanks Chen for the explaination.

If I use "HTTP_CLIENT*" class and invoke the same service, can i pass an interanl table data through that. I was searching and found that the data can be passed in XML Format. But how can i do that i am unable to understand. Do you have any idea .

TIA.

Vikash

0 Kudos

Hi Vikash,

Go through the below link, it has a simple example which will help you,

just search for "Calling a web service in ABAP that validates an email id" and click on the link of saptechnicaldotcom

or try this

http://help.sap.com/saphelp_nw70ehp2/helpdata/EN/1f/93163f9959a808e10000000a114084/content.htm

Also, for transforming your internal table into XML, you can use the below piece of code

 CALL TRANSFORMATION ID   
   SOURCE root = ITAB 
   RESULT XML xml_string. 

And you can pass the XML_STRING as input to the "CREATE_BY_URL_METHOD".

But the XML_STRING will need to be in the format that the service can understand, you might have to modify it accordingly.

Regards,

Chen

Edited by: Chen K V on Apr 26, 2011 1:04 PM

Edited by: Chen K V on Apr 26, 2011 1:07 PM