<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Consuming Web service in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917167#M1598350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chen for your reply.&lt;/P&gt;&lt;P&gt;When I run my report I get the following output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;######&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&amp;gt;##&amp;lt;html&amp;gt;##&amp;lt;head&amp;gt;##    &amp;lt;title&amp;gt;Error&amp;lt;/title&amp;gt;##    &lt;/P&gt;&lt;P&gt;&amp;lt;link rel="stylesheet" href="/dummy_sap/css/productstyle.css" type="text/css" /&amp;gt;##&amp;lt;/head&amp;gt;##&amp;lt;body&amp;gt;####&amp;lt;/body&amp;gt;##&amp;lt;/html&amp;gt;######&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find there is some error in the output. Also there is no data that is transferred. What could be wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jun 2011 10:17:30 GMT</pubDate>
    <dc:creator>anub</dc:creator>
    <dc:date>2011-06-24T10:17:30Z</dc:date>
    <item>
      <title>Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917158#M1598341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem while consuming the Web Service in ABAP. My requirement is that I have a Web Service in Java that I need to consume in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used CALL TRANSFORMATION to convert the data in SAP to xml output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{CALL TRANSFORMATION ZHR_TM_SYNC}&lt;/P&gt;&lt;P&gt;{SOURCE interfacefm = t_interface}&lt;/P&gt;&lt;P&gt;{RESULT XML  xml_result.}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here t_interface is the SAP structure and xml_result is my xml output.&lt;/P&gt;&lt;P&gt;Next I call the method cl_http_client=&amp;gt;create_by_url.&lt;/P&gt;&lt;P&gt;I have declared the Java portal WS URL in w_string.&lt;/P&gt;&lt;P&gt;My question is should I pass w_string or xml_result to the method cl_http_client=&amp;gt;create_by_url.&lt;/P&gt;&lt;P&gt;How will I pass my sap data, which is in xml_result, to the Java portal?&lt;/P&gt;&lt;P&gt;When I pass xml_result, I do not get any output when I run the report. But when I put the WS URL I get some output, without any data that I want to pass to the Java Portal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searched in sdn and in google but everywhere I found that the Transformation is called after the method call, and the transformation is from xml to abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 12:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917158#M1598341</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2011-06-21T12:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917159#M1598342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the web service is from a 3rd party system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have SAP netweaver PI in your project?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;roi grosfeld&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 12:39:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917159#M1598342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-21T12:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917160#M1598343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Webservice is from the Java side and we are not using PI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 12:51:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917160#M1598343</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2011-06-21T12:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917161#M1598344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need to convert your data in XML format. You just need to pass the data to method as you pass to a normal method in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do standalone testing of webservice from SE80 for your method. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramnivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 14:39:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917161#M1598344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-21T14:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917162#M1598345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To consume an external WS in SAP, you need to get the WSDL (Web Service Definition Language) from your external JAVA WS.  That WSDL defines the methods, attributes, etc of the JAVA WS to SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP needs that WSDL to build a Proxy Class that will be used as the interface technology between SAP and the JAVA WS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a starting point for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/81/845f3c31727d59e10000000a114084/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/81/845f3c31727d59e10000000a114084/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 15:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917162#M1598345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-21T15:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917163#M1598346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to achieve the same through ABAP coding?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 11:15:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917163#M1598346</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2011-06-23T11:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917164#M1598347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's possible but difficult. Get the WSDL, generate a consumer proxy from it, start programming. It's easy and standard. Why would you want to do it any other way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 11:53:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917164#M1598347</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2011-06-23T11:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917165#M1598348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in my project the client is providing a simple http post Web Service and not SOAP based one.&lt;/P&gt;&lt;P&gt;So there is no WSDL file for it.&lt;/P&gt;&lt;P&gt;How can I consume the Web Service in this case?&lt;/P&gt;&lt;P&gt;Any alternative?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 12:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917165#M1598348</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2011-06-23T12:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917166#M1598349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the below thread you should be able to accomplish what you are looking for, in case you have any specific question update the post with your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="108946"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 12:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917166#M1598349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-23T12:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917167#M1598350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chen for your reply.&lt;/P&gt;&lt;P&gt;When I run my report I get the following output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;######&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&amp;gt;##&amp;lt;html&amp;gt;##&amp;lt;head&amp;gt;##    &amp;lt;title&amp;gt;Error&amp;lt;/title&amp;gt;##    &lt;/P&gt;&lt;P&gt;&amp;lt;link rel="stylesheet" href="/dummy_sap/css/productstyle.css" type="text/css" /&amp;gt;##&amp;lt;/head&amp;gt;##&amp;lt;body&amp;gt;####&amp;lt;/body&amp;gt;##&amp;lt;/html&amp;gt;######&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find there is some error in the output. Also there is no data that is transferred. What could be wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 10:17:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917167#M1598350</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2011-06-24T10:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917168#M1598351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I debug the program I found after the send method the program flow goes to if_abap_runtime method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{CALL METHOD http_client-&amp;gt;send}&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="EXCEPTIONS"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{     http_communication_failure = 1}&lt;/P&gt;&lt;P&gt;{     http_invalid_state         = 2.}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{method if_abap_runtime~get_runtime by kernel module ab_kmGetRuntimeHR.}&lt;/P&gt;&lt;P&gt;{endmethod.}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide what would be the reason for getting if_abap_runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 09:50:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917168#M1598351</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2011-06-29T09:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917169#M1598352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find there is some error in the output. Also there is no data that is transferred. What could be wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good news is that it is able to invoke the HTTP service on the remote system. Possibly, the input might be wrong, make sure that the input you are sending from SAP is as the HTTP Service is expecting it...say for example if you are sending the date, is it as the Service is expecting(YYYYMMDD or MMDDYYYY)...does the input need to be in lower/upper case etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD http_client-&amp;gt;send}&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="EXCEPTIONS"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{ http_communication_failure = 1}&lt;/P&gt;&lt;P&gt;{ http_invalid_state = 2.}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{method if_abap_runtime~get_runtime by kernel module ab_kmGetRuntimeHR.}&lt;/P&gt;&lt;P&gt;{endmethod.}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide what would be the reason for getting if_abap_runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does HTTP_CLIENT-&amp;gt;SEND throw an exception?, if not then i guess it is ok as the call to "GET_RUNTIME" could be part of the standard code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post your code, if it is throwing an exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 10:07:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917169#M1598352</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-29T10:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917170#M1598353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the output of the transformation at the call transformation statement in the debugging mode and see everything is as required or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sandeep S on Jun 29, 2011 4:51 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 11:21:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917170#M1598353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-29T11:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917171#M1598354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chen for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that the file I needed to upload should be a multipart/form-data.&lt;/P&gt;&lt;P&gt;I have made the changes accordingly as shown below and now my report is able to consume the WS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: xml_result TYPE string, &lt;/P&gt;&lt;P&gt;           w_string TYPE string.&lt;/P&gt;&lt;P&gt;DATA: CONTENT TYPE  STRING.&lt;/P&gt;&lt;P&gt;DATA: rlength TYPE i.&lt;/P&gt;&lt;P&gt;Data: part type ref to if_http_entity.&lt;/P&gt;&lt;P&gt;DATA: X1 TYPE STRING, X2 TYPE STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Call transformation, ls_interface contains SAP data and xml_result is the xml output&lt;/P&gt;&lt;P&gt;  CALL TRANSFORMATION ZHR_REP&lt;/P&gt;&lt;P&gt;   SOURCE employees = lS_interface&lt;/P&gt;&lt;P&gt;   RESULT XML  xml_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// URL&lt;/P&gt;&lt;P&gt;  w_string = 'http://xxx.com/xx_sap/createCandidate'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// UTF-16 replaced by UTF-8&lt;/P&gt;&lt;P&gt;  SPLIT XML_RESULT AT 'utf-16' INTO X1 X2.&lt;/P&gt;&lt;P&gt;  CLEAR XML_RESULT.&lt;/P&gt;&lt;P&gt;  CONCATENATE X1 'utf-8' X2 INTO XML_RESULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR :rlength .&lt;/P&gt;&lt;P&gt;  rlength = STRLEN( xml_result ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_http_client=&amp;gt;create_by_url&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      url                = w_string&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      client             = http_client&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      argument_not_found = 1&lt;/P&gt;&lt;P&gt;      plugin_not_active  = 2&lt;/P&gt;&lt;P&gt;      internal_error     = 3&lt;/P&gt;&lt;P&gt;      OTHERS             = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set http method POST&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call method http_client-&amp;gt;request-&amp;gt;set_method(&lt;/P&gt;&lt;P&gt;      if_http_request=&amp;gt;CO_REQUEST_METHOD_POST ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set protocol version&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    http_client-&amp;gt;request-&amp;gt;set_version(&lt;/P&gt;&lt;P&gt;         if_http_request=&amp;gt;co_protocol_version_1_0 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;content type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL METHOD HTTP_CLIENT-&amp;gt;REQUEST-&amp;gt;IF_HTTP_ENTITY~SET_CONTENT_TYPE&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        CONTENT_TYPE = 'multipart/form-data'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD HTTP_CLIENT-&amp;gt;REQUEST-&amp;gt;SET_HEADER_FIELD&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;    NAME = 'Accept'&lt;/P&gt;&lt;P&gt;    VALUE = 'text/html,application/xhtml+xml,application/xml;q=0.9,&lt;STRONG&gt;/&lt;/STRONG&gt;;q=0.8'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD HTTP_CLIENT-&amp;gt;REQUEST-&amp;gt;SET_HEADER_FIELD&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;    NAME = 'Accept-Language'&lt;/P&gt;&lt;P&gt;    VALUE = 'en-gb,en;q=0.5'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD HTTP_CLIENT-&amp;gt;REQUEST-&amp;gt;SET_HEADER_FIELD&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;    NAME = 'Accept-Charset'&lt;/P&gt;&lt;P&gt;    VALUE = 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD HTTP_CLIENT-&amp;gt;REQUEST-&amp;gt;IF_HTTP_ENTITY~SET_FORMFIELD_ENCODING&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;    FORMFIELD_ENCODING = CL_HTTP_REQUEST=&amp;gt;IF_HTTP_ENTITY~CO_ENCODING_RAW .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    part =  HTTP_CLIENT-&amp;gt;REQUEST-&amp;gt;IF_HTTP_ENTITY~ADD_MULTIPART( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD part-&amp;gt;set_header_field&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            name  = 'content-disposition'&lt;/P&gt;&lt;P&gt;            value = 'form-data; name="File"; filename="candidate_v1.xml";'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD part-&amp;gt;set_content_type&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        content_type = 'text/xml'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD part-&amp;gt;set_cdata&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        data   = xml_result&lt;/P&gt;&lt;P&gt;        offset = 0&lt;/P&gt;&lt;P&gt;        length = rlength.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     call method http_client-&amp;gt;send&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       timeout  = 8&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       http_communication_failure = 1&lt;/P&gt;&lt;P&gt;       http_invalid_state         = 2&lt;/P&gt;&lt;P&gt;       http_processing_failed     = 3&lt;/P&gt;&lt;P&gt;       others                     = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD http_client-&amp;gt;receive&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;    http_communication_failure = 1&lt;/P&gt;&lt;P&gt;    http_invalid_state = 2&lt;/P&gt;&lt;P&gt;    http_processing_failed = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    content = http_client-&amp;gt;response-&amp;gt;get_cdata( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  http_client-&amp;gt;close( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anu Abraham on Jul 7, 2011 10:48 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 05:17:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917171#M1598354</guid>
      <dc:creator>anub</dc:creator>
      <dc:date>2011-07-07T05:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917172#M1598355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anu,&lt;/P&gt;&lt;P&gt;I have same requirement but in this i need to pass json string to webservice .i have connected to webservice through test mail but i failed in sending input&amp;nbsp; to that.i got the error stating that request is syntactically incorrect.i didn't use multipart/form data.what is the purpose of it .i just send the required json string to if_http_client~request-&amp;gt;set_cdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me how to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/consuming-web-service/m-p/7917172#M1598355</guid>
      <dc:creator>former_member273217</dc:creator>
      <dc:date>2015-03-18T13:00:30Z</dc:date>
    </item>
  </channel>
</rss>

