04-26-2011 5:57 AM
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
04-26-2011 8:05 AM
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
04-26-2011 8:05 AM
1. No.
2. Try reading some of the blogs, whitepapers and SAP help.
04-26-2011 8:05 AM
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
04-26-2011 8:10 AM
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
04-26-2011 8:33 AM
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