Execute external WebService from abap

Hi Gurus!
Is it possible to execute an external WebService from an abap function/program without using the XI?
Best regards,
Adriano

you can do this.
if you are on WAS6.4 there is a tool available within ABAP work bench to generate client proxy.
if you are on WAS 6.20 then you have to use class cl_http_client to consume the webservice,
check out the following weblogs for code sample
Send SMS to India from ABAP
BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
Regards
Raja

Similar Messages

  • How to connect external webservice from ABAP

    Hi,
    Please see code pasted below and tell me what is wrong.
    We try to connect external webservice via https. Should I install certificate is SAP for this connection? (if YES, how can I do this?)
    Should I configure something else in SAP to connect external webservice via https?
      DATA: client type ref to if_http_client,
            lv_content type String,
            lv_xml_string type string,
            lv_length type I,
            lv_response type I,
            lv_node type ref to IF_IXML_NODE,
            lv_xml_doc type ref to cl_xml_document.
    ****Create the HTTP client
    call method cl_http_client=>create_by_url
       EXPORTING
         url    = 'http://services-demo.krd.pl/raina/1.0/KrdAPI.asmx'
       IMPORTING
         client = client
       EXCEPTIONS
         others = 1.
    CALL METHOD CL_HTTP_CLIENT=>CREATE
      EXPORTING
        HOST               = 'services-demo.krd.pl'
         SERVICE = '443'
        SCHEME  = '2'
       PROXY_HOST         =
       PROXY_SERVICE      =
       SCHEME             = SCHEMETYPE_HTTP
       SSL_ID             =
       SAP_USERNAME       =
       SAP_CLIENT         =
      IMPORTING
        CLIENT             = client.
    EXCEPTIONS
       ARGUMENT_NOT_FOUND = 1
       PLUGIN_NOT_ACTIVE  = 2
       INTERNAL_ERROR     = 3
       others             = 4
    CONCATENATE
    '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
    ' xmlns:xsd="http://www.w3.org/2001/XMLSchema" '
    'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rain="http://raina.krd.pl">'
    '<soapenv:Header/>'
    '<soapenv:Body>'
    '<rain:Login soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
    '<id xsi:type="xsd:string">B03EB34F02</id>'
    '<password xsi:type="xsd:string">Akquinet99</password>'
    '<appId xsi:type="xsd:string">test</appId>'
    '<appInstId xsi:type="xsd:string">test</appInstId>'
    '<custom xsi:type="xsd:string">test</custom>'
    '</rain:Login>'
    '</soapenv:Body>'
    '</soapenv:Envelope>'
    INTO lv_content.
    CALL METHOD client->request->set_header_field
        EXPORTING
          name  = '~request_method'
          value = 'POST'.
    CALL METHOD client->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = '~request_uri'
        VALUE = '/raina/1.0/KrdAPI.asmx?'.
      CALL METHOD client->request->set_header_field
        EXPORTING
          name  = 'Content-Type'
          value = 'text/xml; charset=utf-8'.
      call method client->request->set_header_field
        EXPORTING
          name  = 'SOAPAction'
          value = 'Login'.
      lv_length = STRLEN( lv_content ).
      call method client->request->set_cdata
        EXPORTING
          data   = lv_content
          offset = 0
          length = lv_length.
    ****Make the call
      client->send( ).
    ****Receive the Response Object
      call method client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3
          others                     = 4.
    *****Get the response content
      client->response->GET_STATUS( IMPORTING CODE = lv_response ).
      lv_xml_string = client->response->get_cdata( ).
    Regards,
    Michal

    HI ,
            Error in accessing External Web Service
    Calling a secured external web service from ABAP
    Edited by: A kumar on Aug 21, 2008 11:58 AM

  • Consume external webservice from ABAP

    Hello all,
      Can we consume external web service from ABAP??
      If yes please gimme a sample code to do that..
    Thanks in advance..
    Regards,
    Maya

    Can we consume external web service from ABAP in version 4.7??

  • Error Consuming a webservice from ABAP

    Hi all,
      I am consuming an external webservice from abap. I created teh proxy using WSDl file. While testing teh service its giving an exception like this-
    "JAXB unmarshalling exception: Unable to create an instance of de.*******v2.MeldungType; nested exception is javax.xml.bind.UnmarshalExcept
    ion: Unable to create an instance of de.****.MeldungType# - with linked exception:#[java.lang.InstantiationException]"
    With a soapfaultcode: 1..
    can any one help out in arriving at teh reason for this..
    Regards
    Sandeep

    I've seen lots of unmarshalling errors whilst trying to consume web services via Web Dynpro Java...  Usually, it was due to an inconsistency between the WSDL file being used and the underlying web service definition.  It might be worth checking the WSDL you are using is correct and up to date, in case the underlying service interface has changed.
    Also worth checking if you have any simple boolean type parameters defined as part of the service interface - they have to have a value assigned when you call the service and cannot be null.
    HTH.

  • Call more external webservice from apex

    How can call more external webservice from apex - consecutively one after another - one execute, than next used as a parameter of the previous webservice results

    Sandboxed solution server code can't call an external web service.  There are ways to write a sandboxed solution that calls a web service using client side code.  Here's a sample of a silverlight application deployed via the sandbox that can call
    an external web service.
    http://msdn.microsoft.com/en-us/library/gg615590(v=office.14).aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Calling webservices from ABAP via https/ssl with p12 certificates.

    Hi all,
    I have a problem with calling an external webservice via HTTPS.
    I configured my system as indicate in the blog /people/jens.gleichmann/blog/2008/10/31/calling-webservices-from-abap-via-httpsssl-with-pfx-certificates but when I check the RFC connection the result is: ICM_HTTP_SSL_ERROR.
    I check the ICM monitor and this is the result:
    [Thr 11] Thu May 26 16:02:57 2011                                                                               
    [Thr 11] *** ERROR during SecudeSSL_SessionStart() from SSL_connect()==SSL_ERROR_SSL                                           
    [Thr 11]    session uses PSE file "/usr/sap/SV5/DVEBMGS10/sec/SAPSSLHTTPS1.pse"                                                
    [Thr 11] SecudeSSL_SessionStart: SSL_connect() failed                                                                          
      secude_error 536875072 (0x20001040) = "received a fatal SSLv3 handshake failure alert message from the peer"                 
    [Thr 11] >>            Begin of Secude-SSL Errorstack            >>                                                            
    [Thr 11] WARNING in ssl3_read_bytes: (536875072/0x20001040) received a fatal SSLv3 handshake failure alert message from the peer
    WARNING in ssl3_output_cert_chain: (12354/0x3042) No hierarchy certificate in FCPath                                           
    WARNING in reduce_FCPath_by_Issuer: (12354/0x3042) No hierarchy certificate in FCPath                                          
    [Thr 11] <<            End of Secude-SSL Errorstack                                                                            
    [Thr 11]   SSL_get_state() returned 0x000021d0 "SSLv3 read finished A"                                                         
    [Thr 11]   Server's List of trusted CA DNames (from cert-request message):                                                     
    [Thr 11]     #1  " certificate 1
    [Thr 11]     #2  " certificate 2
    [Thr 11]   SSL NI-sock: local=ip  peer=ip2                                                       
    [Thr 11] <<- ERROR: SapSSLSessionStart(sssl_hdl=6000000000652010)==SSSLERR_SSL_CONNECT                                         
    [Thr 11] *** ERROR => IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT [icxxconn_mt.c 2012]
    SAP_ABA     700     0012     SAPKA70012     Componenti validi per tutte le applicazioni
    SAP_BASIS     700     0012     SAPKB70012     Componenti di base SAP
    PI_BASIS     2005_1_700     0012     SAPKIPYJ7C     PI_BASIS 2005_1_700
    ST-PI     2008_1_700     0001     SAPKITLRD1     SAP Solution Tools Plug-In
    SAP_BW     700     0013     SAPKW70013     SAP NetWeaver BI 7.0
    SAP_AP     700     0010     SAPKNA7010     Piatt. d'applicazione SAP
    CCM     200_700     0010     SAPK-27010INCCM     CCM 200_700 : Add-On Supplement
    SRM_PLUS     550     0010     SAPKIBK010     SRM_PLUS per mySAP SRM
    SRM_SERVER     550     0010     SAPKIBKT10     SRM_SERVER
    BI_CONT     703     0001     SAPKIBIIP1     Contenuto Business Intelligence
    ST-A/PI     01L_BCO700     0000          -     Servicetools for other App./Netweaver 04
    What do you think about it?
    Best regards,
    Norberto.

    Don´t forget to set your proxy settings! Be sure that the application server could establish a connection to the external server.
    From the BLog.
    Thr 11 WARNING in ssl3_read_bytes: (536875072/0x20001040) received a fatal SSLv3 handshake failure alert message from the peer
    From the Error.
    Have you looked into the above details?
    Thanks
    SM

  • How To : Call External Webservice from BPEL and pass SOAP Message to the WS

    Hello All-
    Greetings to all BPEL gurus. I am currently facing difficulties in calling an External Webservice from my BPEL Process and passing SOAP Message to it. The details are below:
    <strong>1. The BPEL process, using database polling feature of DB Adapter, will get the records from the database.</strong>
    <strong>2. Transform the message</strong>
    <strong>3. Call the External Webservice and pass the transformed message as the input to it. However the Webservice expects the BPEL process to send SOAP headers in the input message.</strong>
    I am struggling on how to put the transformed message within a SOAP envelope in the BPEL process.
    If anyone had similar requirements and have successfully been able to send SOAP messages from BPEL process to an external webservice, kindly let me know.
    Also if there is some kind of documentation or any link in the forum that I can refer, please let me know that as well.
    I am new to Webservice integration using BPEL and would really appreciate your help.
    Thanks In Advance
    Regards,
    Dibya

    Hi Dharmendra,
    I am trying to send a SOAP message from my BPEL process to a web service. I have a complete SOAP message in a complex variable defined in the wsdl for the partnerlink (web service). My problem is that when I invoke the partnerlink it fails even though the content shown in the BPEL console looks valid.
    I have set up obtunnel to see what I am actually sending out from BPEL. You mention that BPEL creates the SOAP envelope automatically.
    I think that my problem is a result of this automatic SOAP envelope that BPEL is creating. Do you know if there is a way to turn it off?
    This is what I see in the TCP monitor, please note the double SOAP env:Body:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <RCMR_IN000002NR01 xmlns="urn:hl7-org:v3" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <env:Header>
    <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://testhost/CCS/Service_Endpoint</wsa:To>
    <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address>http://localhost/CCS/Service_Endpoint</wsa:Address>
    <wsa:Metadata>
    <device xmlns:hl7="urn:hl7-org:v3">
    </device>
    </wsa:Metadata>
    </env:Header>
    <env:Body>
    <RCMR_IN000002NR01>
    </RCMR_IN000002NR01>
    </env:Body>
    </RCMR_IN000002NR01>
    </env:Body>
    </env:Envelope>
    Any help is appreciated.
    Regards,
    Aagaard
    Edited by: Aagaard on Oct 30, 2008 8:59 PM
    Should have mentioned. I am using BPEL 10.1.3.4
    Edited by: Aagaard on Oct 31, 2008 8:43 AM
    I have opened a new thread for this question so as to not confuse the issue more than necessary.
    How many SOAP envelopes do you really need?

  • How can we call a external webservice from sandboxed webpart?

    Hi,
    I need to call an external webservice from sandboxed visual webpart in 2013. And that webpart would be used in office-365 site. Please let me whether it is possible or not.
    Thanks,
    Arindam

    Sandboxed solution server code can't call an external web service.  There are ways to write a sandboxed solution that calls a web service using client side code.  Here's a sample of a silverlight application deployed via the sandbox that can call
    an external web service.
    http://msdn.microsoft.com/en-us/library/gg615590(v=office.14).aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Geeting exception while executing BPM webservice from webdynpro.

    I have created a webservice to start BPM process.
    If I am testing from webservice navigator it works fine and BPM task gets created in my UWL. But when I execute this webservice from webdynpro I get the below error
    Exception on execution of web service with WSDL URL 'http://pepu56:50000/bpm/demosapcom/lngtranslationprocess/StartService?wsdl' with operation 'NewOperation' in interface 'TranslateBPMWSDLFile'
    Please note that : I have deleted the output part from both binding and PortType section of this webservice.
    Edited by: pramod bagauly on Jan 17, 2012 10:16 PM
    Edited by: pramod bagauly on Jan 17, 2012 10:18 PM

    I was doing a silly mistake. I was not running my webdynpro application from portal. I was running my application through "Deploy new archive and run" option.
    I got this clue to run this app after login into portal from the fact that when I was running webservice from WSNavigator I was prompted to pass user credential to execute this service.  I had not given any authentication option while creating web service, so just guessed if I run it from portal my user credentials might be taken. And it worked for me.
    I really don't know why I was asked for user credentials in WSNavigator and how my user credentils would have taken when I ran this app from portal. But this is how I am not getting this error.
    Edited by: pramod bagauly on Jan 18, 2012 8:27 PM

  • Consume webservice from ABAP : SoapFaultCode:4

    Hi ,
        I need your valuable ideas in overcoming the problem mentioned below.
        This problem relates to consumption of a webservice from ABAP - Client Proxy without XI. The system is WAS 6.40.
    I had created a client proxy (along with the corresponding methods) using a WSDL file pasted below. I had also created a logical port for the proxy class generated.
    When I test the interface for one of the methods , I get the following error message.
    <u>Error Message</u>
    <?xml version="1.0" encoding="utf-8" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
      <SYSTEMFAULT href="#o103" />
      </asx:values>
    - <asx:heap xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:abap="http://www.sap.com/abapxml/types/built-in" xmlns:cls="http://www.sap.com/abapxml/classes/global" xmlns:dic="http://www.sap.com/abapxml/types/dictionary">
    - <cls:CX_AI_SYSTEM_FAULT id="o103">
    - <CX_ROOT>
      <TEXTID>F63AFF63DBE4BB4786A7F52CC4167145</TEXTID>
      <PREVIOUS />
      <KERNEL_ERRID />
    - <INTERNAL_SOURCE_POS>
      <PROGID>193</PROGID>
      <CONTID>1050</CONTID>
      </INTERNAL_SOURCE_POS>
      </CX_ROOT>
      <CX_STATIC_CHECK />
    - <CX_AI_SYSTEM_FAULT>
      <CODECONTEXT>http://www.sap.com/xml_errorcodes</CODECONTEXT>
      <CODE>SoapFaultCode:4</CODE>
      <ERRORTEXT>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: //10.136.129.245/PinnacleWebServices/DatabaseAvailable. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</ERRORTEXT>
      <LANGUAGE />
      </CX_AI_SYSTEM_FAULT>
      </cls:CX_AI_SYSTEM_FAULT>
      </asx:heap>
      </asx:abap>
    <u>WDSL file used for creating the Client Proxy</u>
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="//10.136.129.245/PinnacleWebServices" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="//10.136.129.245/PinnacleWebServices" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
       <wsdl:types>
          <s:schema elementFormDefault="qualified" targetNamespace="//10.136.129.245/PinnacleWebServices">
             <s:element name="DatabaseAvailable">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="DatabaseAvailableResponse">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="DatabaseAvailableResult" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddCustomers">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
                      <s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddCustomersResponse">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="AddCustomersResult" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddContracts">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
                      <s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddContractsResponse">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="AddContractsResult" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddInstalledEquipment">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
                      <s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddInstalledEquipmentResponse">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="AddInstalledEquipmentResult" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddProducts">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
                      <s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddProductsResponse">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="AddProductsResult" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddCreditAlerts">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
                      <s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
                      <s:element minOccurs="1" maxOccurs="1" name="bool_updatecustomers" type="s:boolean" />
                      <s:element minOccurs="1" maxOccurs="1" name="bool_updatecontracts" type="s:boolean" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddCreditAlertsResponse">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="AddCreditAlertsResult" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddStockFigures">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="s_dbalias" type="s:string" />
                      <s:element minOccurs="0" maxOccurs="1" name="s_xml" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="AddStockFiguresResponse">
                <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="AddStockFiguresResult" type="s:string" />
                   </s:sequence>
                </s:complexType>
             </s:element>
             <s:element name="string" nillable="true" type="s:string" />
          </s:schema>
       </wsdl:types>
       <wsdl:message name="DatabaseAvailableSoapIn">
          <wsdl:part name="parameters" element="tns:DatabaseAvailable" />
       </wsdl:message>
       <wsdl:message name="DatabaseAvailableSoapOut">
          <wsdl:part name="parameters" element="tns:DatabaseAvailableResponse" />
       </wsdl:message>
       <wsdl:message name="AddCustomersSoapIn">
          <wsdl:part name="parameters" element="tns:AddCustomers" />
       </wsdl:message>
       <wsdl:message name="AddCustomersSoapOut">
          <wsdl:part name="parameters" element="tns:AddCustomersResponse" />
       </wsdl:message>
       <wsdl:message name="AddContractsSoapIn">
          <wsdl:part name="parameters" element="tns:AddContracts" />
       </wsdl:message>
       <wsdl:message name="AddContractsSoapOut">
          <wsdl:part name="parameters" element="tns:AddContractsResponse" />
       </wsdl:message>
       <wsdl:message name="AddInstalledEquipmentSoapIn">
          <wsdl:part name="parameters" element="tns:AddInstalledEquipment" />
       </wsdl:message>
       <wsdl:message name="AddInstalledEquipmentSoapOut">
          <wsdl:part name="parameters" element="tns:AddInstalledEquipmentResponse" />
       </wsdl:message>
       <wsdl:message name="AddProductsSoapIn">
          <wsdl:part name="parameters" element="tns:AddProducts" />
       </wsdl:message>
       <wsdl:message name="AddProductsSoapOut">
          <wsdl:part name="parameters" element="tns:AddProductsResponse" />
       </wsdl:message>
       <wsdl:message name="AddCreditAlertsSoapIn">
          <wsdl:part name="parameters" element="tns:AddCreditAlerts" />
       </wsdl:message>
       <wsdl:message name="AddCreditAlertsSoapOut">
          <wsdl:part name="parameters" element="tns:AddCreditAlertsResponse" />
       </wsdl:message>
       <wsdl:message name="AddStockFiguresSoapIn">
          <wsdl:part name="parameters" element="tns:AddStockFigures" />
       </wsdl:message>
       <wsdl:message name="AddStockFiguresSoapOut">
          <wsdl:part name="parameters" element="tns:AddStockFiguresResponse" />
       </wsdl:message>
       <wsdl:message name="DatabaseAvailableHttpGetIn">
          <wsdl:part name="s_dbalias" type="s:string" />
       </wsdl:message>
       <wsdl:message name="DatabaseAvailableHttpGetOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddCustomersHttpGetIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddCustomersHttpGetOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddContractsHttpGetIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddContractsHttpGetOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddInstalledEquipmentHttpGetIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddInstalledEquipmentHttpGetOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddProductsHttpGetIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddProductsHttpGetOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddCreditAlertsHttpGetIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
          <wsdl:part name="bool_updatecustomers" type="s:string" />
          <wsdl:part name="bool_updatecontracts" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddCreditAlertsHttpGetOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddStockFiguresHttpGetIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddStockFiguresHttpGetOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="DatabaseAvailableHttpPostIn">
          <wsdl:part name="s_dbalias" type="s:string" />
       </wsdl:message>
       <wsdl:message name="DatabaseAvailableHttpPostOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddCustomersHttpPostIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddCustomersHttpPostOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddContractsHttpPostIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddContractsHttpPostOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddInstalledEquipmentHttpPostIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddInstalledEquipmentHttpPostOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddProductsHttpPostIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddProductsHttpPostOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddCreditAlertsHttpPostIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
          <wsdl:part name="bool_updatecustomers" type="s:string" />
          <wsdl:part name="bool_updatecontracts" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddCreditAlertsHttpPostOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:message name="AddStockFiguresHttpPostIn">
          <wsdl:part name="s_dbalias" type="s:string" />
          <wsdl:part name="s_xml" type="s:string" />
       </wsdl:message>
       <wsdl:message name="AddStockFiguresHttpPostOut">
          <wsdl:part name="Body" element="tns:string" />
       </wsdl:message>
       <wsdl:portType name="Pinnacle_x0020_Web_x0020_ServicesSoap">
          <wsdl:operation name="DatabaseAvailable">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Checks if a connection to the selected database is available.</documentation>
             <wsdl:input message="tns:DatabaseAvailableSoapIn" />
             <wsdl:output message="tns:DatabaseAvailableSoapOut" />
          </wsdl:operation>
          <wsdl:operation name="AddCustomers">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Customers within Service Director</documentation>
             <wsdl:input message="tns:AddCustomersSoapIn" />
             <wsdl:output message="tns:AddCustomersSoapOut" />
          </wsdl:operation>
          <wsdl:operation name="AddContracts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Contracts within Service Director</documentation>
             <wsdl:input message="tns:AddContractsSoapIn" />
             <wsdl:output message="tns:AddContractsSoapOut" />
          </wsdl:operation>
          <wsdl:operation name="AddInstalledEquipment">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Installed Equipment within Service Director</documentation>
             <wsdl:input message="tns:AddInstalledEquipmentSoapIn" />
             <wsdl:output message="tns:AddInstalledEquipmentSoapOut" />
          </wsdl:operation>
          <wsdl:operation name="AddProducts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Products within Service Director</documentation>
             <wsdl:input message="tns:AddProductsSoapIn" />
             <wsdl:output message="tns:AddProductsSoapOut" />
          </wsdl:operation>
          <wsdl:operation name="AddCreditAlerts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Credit Alerts to Customers and/or Contracts within Service Director. Warning - Will remove all credit alerts first as it assumes a full list is provided every time.</documentation>
             <wsdl:input message="tns:AddCreditAlertsSoapIn" />
             <wsdl:output message="tns:AddCreditAlertsSoapOut" />
          </wsdl:operation>
          <wsdl:operation name="AddStockFigures">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Stock Figures to mobile_data_connector within Service Director in order that the PDA get updated.</documentation>
             <wsdl:input message="tns:AddStockFiguresSoapIn" />
             <wsdl:output message="tns:AddStockFiguresSoapOut" />
          </wsdl:operation>
       </wsdl:portType>
       <wsdl:portType name="Pinnacle_x0020_Web_x0020_ServicesHttpGet">
          <wsdl:operation name="DatabaseAvailable">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Checks if a connection to the selected database is available.</documentation>
             <wsdl:input message="tns:DatabaseAvailableHttpGetIn" />
             <wsdl:output message="tns:DatabaseAvailableHttpGetOut" />
          </wsdl:operation>
          <wsdl:operation name="AddCustomers">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Customers within Service Director</documentation>
             <wsdl:input message="tns:AddCustomersHttpGetIn" />
             <wsdl:output message="tns:AddCustomersHttpGetOut" />
          </wsdl:operation>
          <wsdl:operation name="AddContracts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Contracts within Service Director</documentation>
             <wsdl:input message="tns:AddContractsHttpGetIn" />
             <wsdl:output message="tns:AddContractsHttpGetOut" />
          </wsdl:operation>
          <wsdl:operation name="AddInstalledEquipment">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Installed Equipment within Service Director</documentation>
             <wsdl:input message="tns:AddInstalledEquipmentHttpGetIn" />
             <wsdl:output message="tns:AddInstalledEquipmentHttpGetOut" />
          </wsdl:operation>
          <wsdl:operation name="AddProducts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Products within Service Director</documentation>
             <wsdl:input message="tns:AddProductsHttpGetIn" />
             <wsdl:output message="tns:AddProductsHttpGetOut" />
          </wsdl:operation>
          <wsdl:operation name="AddCreditAlerts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Credit Alerts to Customers and/or Contracts within Service Director. Warning - Will remove all credit alerts first as it assumes a full list is provided every time.</documentation>
             <wsdl:input message="tns:AddCreditAlertsHttpGetIn" />
             <wsdl:output message="tns:AddCreditAlertsHttpGetOut" />
          </wsdl:operation>
          <wsdl:operation name="AddStockFigures">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Stock Figures to mobile_data_connector within Service Director in order that the PDA get updated.</documentation>
             <wsdl:input message="tns:AddStockFiguresHttpGetIn" />
             <wsdl:output message="tns:AddStockFiguresHttpGetOut" />
          </wsdl:operation>
       </wsdl:portType>
       <wsdl:portType name="Pinnacle_x0020_Web_x0020_ServicesHttpPost">
          <wsdl:operation name="DatabaseAvailable">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Checks if a connection to the selected database is available.</documentation>
             <wsdl:input message="tns:DatabaseAvailableHttpPostIn" />
             <wsdl:output message="tns:DatabaseAvailableHttpPostOut" />
          </wsdl:operation>
          <wsdl:operation name="AddCustomers">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Customers within Service Director</documentation>
             <wsdl:input message="tns:AddCustomersHttpPostIn" />
             <wsdl:output message="tns:AddCustomersHttpPostOut" />
          </wsdl:operation>
          <wsdl:operation name="AddContracts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Contracts within Service Director</documentation>
             <wsdl:input message="tns:AddContractsHttpPostIn" />
             <wsdl:output message="tns:AddContractsHttpPostOut" />
          </wsdl:operation>
          <wsdl:operation name="AddInstalledEquipment">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Installed Equipment within Service Director</documentation>
             <wsdl:input message="tns:AddInstalledEquipmentHttpPostIn" />
             <wsdl:output message="tns:AddInstalledEquipmentHttpPostOut" />
          </wsdl:operation>
          <wsdl:operation name="AddProducts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add or Update Products within Service Director</documentation>
             <wsdl:input message="tns:AddProductsHttpPostIn" />
             <wsdl:output message="tns:AddProductsHttpPostOut" />
          </wsdl:operation>
          <wsdl:operation name="AddCreditAlerts">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Credit Alerts to Customers and/or Contracts within Service Director. Warning - Will remove all credit alerts first as it assumes a full list is provided every time.</documentation>
             <wsdl:input message="tns:AddCreditAlertsHttpPostIn" />
             <wsdl:output message="tns:AddCreditAlertsHttpPostOut" />
          </wsdl:operation>
          <wsdl:operation name="AddStockFigures">
             <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Add Stock Figures to mobile_data_connector within Service Director in order that the PDA get updated.</documentation>
             <wsdl:input message="tns:AddStockFiguresHttpPostIn" />
             <wsdl:output message="tns:AddStockFiguresHttpPostOut" />
          </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="Pinnacle_x0020_Web_x0020_ServicesSoap" type="tns:Pinnacle_x0020_Web_x0020_ServicesSoap">
          <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
          <wsdl:operation name="DatabaseAvailable">
             <soap:operation soapAction="//10.136.129.245/PinnacleWebServices/DatabaseAvailable" style="document" />
             <wsdl:input>
                <soap:body use="literal" />
             </wsdl:input>
             <wsdl:output>
                <soap:body use="literal" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddCustomers">
             <soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddCustomers" style="document" />
             <wsdl:input>
                <soap:body use="literal" />
             </wsdl:input>
             <wsdl:output>
                <soap:body use="literal" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddContracts">
             <soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddContracts" style="document" />
             <wsdl:input>
                <soap:body use="literal" />
             </wsdl:input>
             <wsdl:output>
                <soap:body use="literal" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddInstalledEquipment">
             <soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddInstalledEquipment" style="document" />
             <wsdl:input>
                <soap:body use="literal" />
             </wsdl:input>
             <wsdl:output>
                <soap:body use="literal" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddProducts">
             <soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddProducts" style="document" />
             <wsdl:input>
                <soap:body use="literal" />
             </wsdl:input>
             <wsdl:output>
                <soap:body use="literal" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddCreditAlerts">
             <soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddCreditAlerts" style="document" />
             <wsdl:input>
                <soap:body use="literal" />
             </wsdl:input>
             <wsdl:output>
                <soap:body use="literal" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddStockFigures">
             <soap:operation soapAction="//10.136.129.245/PinnacleWebServices/AddStockFigures" style="document" />
             <wsdl:input>
                <soap:body use="literal" />
             </wsdl:input>
             <wsdl:output>
                <soap:body use="literal" />
             </wsdl:output>
          </wsdl:operation>
       </wsdl:binding>
       <wsdl:binding name="Pinnacle_x0020_Web_x0020_ServicesHttpGet" type="tns:Pinnacle_x0020_Web_x0020_ServicesHttpGet">
          <http:binding verb="GET" />
          <wsdl:operation name="DatabaseAvailable">
             <http:operation location="/DatabaseAvailable" />
             <wsdl:input>
                <http:urlEncoded />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddCustomers">
             <http:operation location="/AddCustomers" />
             <wsdl:input>
                <http:urlEncoded />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddContracts">
             <http:operation location="/AddContracts" />
             <wsdl:input>
                <http:urlEncoded />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddInstalledEquipment">
             <http:operation location="/AddInstalledEquipment" />
             <wsdl:input>
                <http:urlEncoded />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddProducts">
             <http:operation location="/AddProducts" />
             <wsdl:input>
                <http:urlEncoded />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddCreditAlerts">
             <http:operation location="/AddCreditAlerts" />
             <wsdl:input>
                <http:urlEncoded />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddStockFigures">
             <http:operation location="/AddStockFigures" />
             <wsdl:input>
                <http:urlEncoded />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
       </wsdl:binding>
       <wsdl:binding name="Pinnacle_x0020_Web_x0020_ServicesHttpPost" type="tns:Pinnacle_x0020_Web_x0020_ServicesHttpPost">
          <http:binding verb="POST" />
          <wsdl:operation name="DatabaseAvailable">
             <http:operation location="/DatabaseAvailable" />
             <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded" />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddCustomers">
             <http:operation location="/AddCustomers" />
             <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded" />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddContracts">
             <http:operation location="/AddContracts" />
             <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded" />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddInstalledEquipment">
             <http:operation location="/AddInstalledEquipment" />
             <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded" />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddProducts">
             <http:operation location="/AddProducts" />
             <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded" />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddCreditAlerts">
             <http:operation location="/AddCreditAlerts" />
             <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded" />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
          <wsdl:operation name="AddStockFigures">
             <http:operation location="/AddStockFigures" />
             <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded" />
             </wsdl:input>
             <wsdl:output>
                <mime:mimeXml part="Body" />
             </wsdl:output>
          </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="Pinnacle_x0020_Web_x0020_Services">
          <wsdl:port name="Pinnacle_x0020_Web_x0020_ServicesSoap" binding="tns:Pinnacle_x0020_Web_x0020_ServicesSoap">
             <soap:address location="http://10.136.129.245/pinnaclewebservices/maintenance.asmx" />
          </wsdl:port>
          <wsdl:port name="Pinnacle_x0020_Web_x0020_ServicesHttpGet" binding="tns:Pinnacle_x0020_Web_x0020_ServicesHttpGet">
             <http:address location="http://10.136.129.245/pinnaclewebservices/maintenance.asmx" />
          </wsdl:port>
          <wsdl:port name="Pinnacle_x0020_Web_x0020_ServicesHttpPost" binding="tns:Pinnacle_x0020_Web_x0020_ServicesHttpPost">
             <http:address location="http://10.136.129.245/pinnaclewebservices/maintenance.asmx" />
          </wsdl:port>
       </wsdl:service>
    </wsdl:definitions>
    Thanks in advance.

    Hi Raja,
                  Thanks for your prompt reply. I tried changing in the WSDL file the SOAP action parameters (http) like you said and still I got the same error message while testing the interface.
                  I have corrected the problem by trying a different approach. Earlier I used file option for Client Proxy creation and I got the error message.
    Now I created the Client Proxy by using the option URL/HTTP destination ( which was also showing errors earlier but it is OK now after our Network Specialists opened the concerned port.)
                    Your reply was usefull as it helped me to check the  "Soap Action" in the "OPERATIONS" tab of the "LOGICAL PORT" for the client proxy. I have awarded the points for that.
                    I have seen your Blogs and the your replies to the questions in this form. I would like to thank you and all the like minded contributors of this forum. Keep up the good work.
    Regards.
    François

  • Calling an existing webservice from ABAP ?

    I am trying to call an existing webservice from abap and cannot seem to get it right.
    We are on 640.
    What are the steps I need to follow ?
    The address of the test wsdl is http://obcbox:50000/EMWSApp/DCCGen?wsdl
    and http://obcbox:50000/wsnavigator/jsps/explorer.jsp?localWS=RU1XU0FwcC9zYXAuY29tJTJGRU1XU0FwcEVhci9FTVdTYXBwLmphcg%3D%3D
    I need to be able to send data to the dccGenerator so it can do its work.
    Any help would be greatly appreciated.
    Cheers Steve.

    The following code will call the web service and fill the data into internal table which was received from the Web service. This code will send & Receive the data from ABAP to Webservice.
    Change the Header detail as per your Webservice.
    REPORT  ZWORKORDER.
    * Author : Raja T
    * Company :******
    TYPES: BEGIN OF OUTTAB1 ,
      JOBCODE(20),
      COMPONENTCODE(20),
      ACCURATEHOURS(20),
      ACCURATECOST(20),
      LENGTH TYPE I,
       END OF OUTTAB1 .
    DATA: OUTTAB TYPE  TABLE OF OUTTAB1.
    DATA: TAB TYPE OUTTAB1.
    DATA: WF_O LIKE LINE OF OUTTAB .
    DATA: XSLT_ERR TYPE REF TO CX_XSLT_EXCEPTION .
    DATA: RLENGTH TYPE I,
          TXLEN TYPE STRING  .
    DATA: HTTP_CLIENT TYPE REF TO IF_HTTP_CLIENT .
    DATA: WF_STRING TYPE STRING .
    DATA: WF_STRING1 TYPE STRING .
    DATA: WF_PROXY TYPE STRING ,
          WF_PORT TYPE STRING .
    CLEAR WF_STRING .
    * Form the input string to send the Input Data to Web service.
    CONCATENATE
    '<?xml version="1.0" encoding="utf-8"?>'
    '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
    '  <soap:Body>'
    '    <GetWorkOrder xmlns="http://*******erica.net/webservices/">'
    '      <nWorkOrder>2</nWorkOrder>'
    '      <nDistributorCode>4871</nDistributorCode>'
    '      <model>HM400</model>'
    '     <type>1 </type>'
    '    </GetWorkOrder>'
    '  </soap:Body>'
    '</soap:Envelope>'
    INTO WF_STRING .
    CLEAR :RLENGTH , TXLEN .
    RLENGTH = STRLEN( WF_STRING ) .
    MOVE: RLENGTH TO TXLEN .
    CLEAR: WF_PROXY, WF_PORT .
    CALL METHOD CL_HTTP_CLIENT=>CREATE
      EXPORTING
        HOST    = '192.168.1.41' "'http://****merica.net/webservices'
        SERVICE = '8080'
        SCHEME  = '1'
      IMPORTING
        CLIENT  = HTTP_CLIENT.
    HTTP_CLIENT->PROPERTYTYPE_LOGON_POPUP = HTTP_CLIENT->CO_DISABLED.
    CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = '~request_method'
        VALUE = 'POST'.
    CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = '~server_protocol'
        VALUE = 'HTTP/1.1'.
    CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = '~request_uri'
        VALUE = '/service/accurate/workorder.asmx?'.
    CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = 'Content-Type'
        VALUE = 'text/xml; charset=utf-8'.
    CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = 'Content-Length'
        VALUE = TXLEN.
    CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = 'SOAPAction'
        VALUE = 'http://********merica.net/webservices/GetWorkOrder'.
    CALL METHOD HTTP_CLIENT->REQUEST->SET_CDATA
      EXPORTING
        DATA   = WF_STRING
        OFFSET = 0
        LENGTH = RLENGTH.
    * Send the Input Data to Web service.
    CALL METHOD HTTP_CLIENT->SEND
      EXCEPTIONS
        HTTP_COMMUNICATION_FAILURE = 1
        HTTP_INVALID_STATE         = 2.
    * Receive the Input from Web Serice.
    CALL METHOD HTTP_CLIENT->RECEIVE
      EXCEPTIONS
        HTTP_COMMUNICATION_FAILURE = 1
        HTTP_INVALID_STATE         = 2
        HTTP_PROCESSING_FAILED     = 3.
    CLEAR WF_STRING1 .
    WF_STRING1 = HTTP_CLIENT->RESPONSE->GET_CDATA( ).
    DATA: LENGTH TYPE I.
    LENGTH = STRLEN( WF_STRING1 ).
    DATA: VALUE_FIELD TYPE NAME_KOMP.
    DATA: VALUE TYPE REF TO DATA.
    FIELD-SYMBOLS: <FS_CONVERTED_DATA>.
    DATA: TAB1 TYPE TABLE OF STRING.
    DATA: FROM_LENGTH TYPE I VALUE 1.
    DATA: TO_LENGTH TYPE I.
    DATA: DIFF TYPE I.
    DATA: START TYPE I VALUE 1.
    DO.
    * JOBCODE.
      SEARCH WF_STRING1 FOR 'JobCode=' . "STARTING AT START .
      IF SY-SUBRC <> 0.
        EXIT.
      ENDIF.
      FROM_LENGTH = SY-FDPOS .
      FROM_LENGTH = FROM_LENGTH  + 8.
      SEARCH WF_STRING1 FOR 'JobDescription=' ."STARTING AT START ..
      TO_LENGTH = SY-FDPOS .
      DIFF = TO_LENGTH - FROM_LENGTH .
      MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-JOBCODE.
      TO_LENGTH = DIFF + TO_LENGTH.
      SHIFT WF_STRING1 BY TO_LENGTH PLACES.
    * COMPONENT CODE
      SEARCH WF_STRING1 FOR 'ComponentCode=' .
      IF SY-SUBRC <> 0.
        EXIT.
      ENDIF.
      FROM_LENGTH = SY-FDPOS .
      FROM_LENGTH = FROM_LENGTH  + 14.
      SEARCH WF_STRING1 FOR 'ComponentDescription=' .
      TO_LENGTH = SY-FDPOS .
      DIFF = TO_LENGTH - FROM_LENGTH .
      MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-COMPONENTCODE.
      TO_LENGTH = DIFF + TO_LENGTH.
      SHIFT WF_STRING1 BY TO_LENGTH PLACES.
    * AccurateHours
      SEARCH WF_STRING1 FOR 'AccurateHours=' .
      IF SY-SUBRC <> 0.
        EXIT.
      ENDIF.
      FROM_LENGTH = SY-FDPOS .
      FROM_LENGTH = FROM_LENGTH  + 14.
      SEARCH WF_STRING1 FOR 'AccurateCost='.
      TO_LENGTH = SY-FDPOS .
      DIFF = TO_LENGTH - FROM_LENGTH .
      MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-ACCURATEHOURS.
      TO_LENGTH = DIFF + TO_LENGTH.
    *  AccurateCost
      SEARCH WF_STRING1 FOR 'AccurateCost='.
      FROM_LENGTH =  SY-FDPOS.
      FROM_LENGTH =  FROM_LENGTH + 13.
      SEARCH WF_STRING1 FOR '/>'.
      TO_LENGTH = SY-FDPOS.
      DIFF = TO_LENGTH - FROM_LENGTH .
      MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-ACCURATECOST.
      TO_LENGTH = DIFF + TO_LENGTH.
      SHIFT WF_STRING1 BY TO_LENGTH PLACES.
      APPEND TAB TO OUTTAB.
    ENDDO.
    WRITE: (10) 'JOBCODE'.
    WRITE (20) 'COMPONENTCODE'.
    WRITE (30) 'ACCURATEHOURS'.
    WRITE (40) 'ACCURATECOST'.
    LOOP AT OUTTAB INTO TAB.
      WRITE:/ TAB-JOBCODE .
      WRITE (20) TAB-COMPONENTCODE.
      WRITE (30) TAB-ACCURATEHOURS.
      WRITE (40) TAB-ACCURATECOST.
    ENDLOOP .
    Message was edited by:
            Raja T

  • How execute one DLL from ABAP

    Hi All,
    I have to execute one DLL from ABAP, I have pass one file txt to parameters and execute the DLL.
    Any could help me?

    Check this:
    Re: How to call a FrontEnd DLL in ABAP Program
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/vb-function-module-or-dll-in-abap-programming-1659211
    http://nonet.dyndns.org/b2e/blogs/index.php/2005/10/30/calling_dll_functions_within_sapgup_via?blog=5

  • Ping webservice from abap

    Hi Guru's,
    let me know how do we go along with pinging a webservice from ABAP.I have a requirement where in i have to ping and check weather the webservice exists or not. if it exits i have to proceed with the logic or else raise and exception.
    here iam not able to find how ro ping and check weather the webservice is avilable or not.
    thanks in advance,
    babu

    the best ping is a valid service call with a definitive negativ outcome, i.e. a purchase order for a non-existent product number or a material query for a non-existent material, etc...
    this way you ping the service at all possible levels, including networks, proxies and firewalls, webserver availability, soap runtime availability, application availability(!).
    anton

  • To send external email from ABAP

    How to send external email from ABAP Program and what are the settings to be done for the same ?

    Please check..
    Sending External email through SAP
    What is the FM for sending the external email through SAP by attaching layout set  to it?
    These are the FM for sending external email :-
    SO_DOCUMENT_SEND_API1 
    SAPoffice: Send new document with attachments via RFC 
    SO_NEW_DOCUMENT_ATT_SEND_API1
    (In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
    SAPoffice: Send new document with attachments via RFC 
    Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject. 
    SO_NEW_DOCUMENT_SEND_API1 
    SAPoffice: Send new document 
    How to send a report to an external mail-id?
    Try this sample code :-
    REPORT ZREPORT_TO_EMAIL NO STANDARD PAGE HEADING LINE-SIZE 200.
    DATA : BEGIN OF ITAB OCCURS 0,
    PERNR LIKE PA0001-PERNR,
    ENAME LIKE PA0001-ENAME,
    END OF ITAB.
    DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
    receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
    packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
    listobject LIKE abaplist OCCURS 10,
    compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
    w_object_hd_change LIKE sood1,
    compressed_size LIKE sy-index.
    START-OF-SELECTION.
    SELECT PERNR ENAME
    INTO CORRESPONDING FIELDS OF TABLE ITAB
    FROM PA0001
    WHERE PERNR < 50.
    LOOP AT ITAB.
    WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
    SY-VLINE.
    ENDLOOP.
    Receivers
    receiver_list-recextnam = '[email protected]'. "-->
    EMAIL ADDRESS
    RECEIVER_list-RECESC = 'E'. "<-
    RECEIVER_list-SNDART = 'INT'."<-
    RECEIVER_list-SNDPRI = '1'."<-
    APPEND receiver_list.
    General data
    w_object_hd_change-objla = sy-langu.
    w_object_hd_change-objnam = 'Object name'.
    w_object_hd_change-objsns = 'P'.
    Mail subject
    w_object_hd_change-objdes = 'Message subject'.
    Mail body
    APPEND 'Message content' TO message_content.
    Attachment
    CALL FUNCTION 'SAVE_LIST'
    EXPORTING
    list_index = '0'
    TABLES
    listobject = listobject.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    compressed_size = compressed_size
    TABLES
    in = listobject
    out = compressed_attachment.
    DESCRIBE TABLE compressed_attachment.
    CLEAR packing_list.
    packing_list-transf_bin = 'X'.
    packing_list-head_start = 0.
    packing_list-head_num = 0.
    packing_list-body_start = 1.
    packing_list-body_num = sy-tfill.
    packing_list-objtp = 'ALI'.
    packing_list-objnam = 'Object name'.
    packing_list-objdes = 'Attachment description'.
    packing_list-objlen = compressed_size.
    APPEND packing_list.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    object_hd_change = w_object_hd_change
    object_type = 'RAW'
    owner = sy-uname
    TABLES
    objcont = message_content
    receivers = receiver_list
    packing_list = packing_list
    att_cont = compressed_attachment.

  • Test external webservice from any ABAP transaction or ABAP workbench

    Hi,
    Is there any option/way from ABAP workbench (or any other SAP tCode)  to test an external webservice.
    Basically i used to use tools like XMLSPY or SoapUI to check any external webserivice e.g. http://www.webservicex.net/CurrencyConvertor.asmx?WSDL
    with this i could get confirmation that the webservice provider is indeed up and working.
    these tools allowed me to create a request soap message (request payload) and send it to the endpoint, and showed the response soap message.
    This kind of testing i would like to do from SAP ABAP workbench or any sap tCode.
    what is the easiest way to test quickly.
    thanks,
    madhu.

    Hi,
    SOAP UI is definitely the easier option but you could generate the proxy class in ABAP workbench and test that as described here: [http://www.netweavercentral.com/?p=272|http://www.netweavercentral.com/?p=272]
    Gregor

Maybe you are looking for

  • How To Use Family Sharing on one Apple ID ?

    OK....I like the new family sharing but I got around this in past in creative way. I have one AppleID that whole family uses.....no iCloud, only use ITunes to Sync, and on each iPhone or iPad for Text & Facetime I disable in settings all but that pho

  • Reports not matching

    Hi Group, The actuals standard line item report FMRP_RFFMEP1AX / program RFFMEPGAX does not have the same dollar value for purchase requisitions as the budget report FMRP_2FMB4002 / program RFMDUMON Any ideas or suggestions? Please let me know Thanks

  • Acrobat Plug-in Variable Refresh.

    Hi, I met a problem in local variable value refresh. I developed a plug-in based on the Basic Plug-in template in Samples from Acrobat. In the function which response to the click on user menu, I defined a local variable to record a user self defined

  • Is it possible to leave a field alone in an IF THEN formula?

    I'm not sure if I'm asking this right, but I will try as hard as I can to explain it concisely. B2 = $180.00 C2 = B2*.81 D2 = Checkbox How do I make an IF THEN telling B2=$0.00 when D2=TRUE without it affecting the value in B2 if D2=FALSE? Basically,

  • Role Profile in FICAX

    Hi, We are unto FICAX . I have 2 questions: 1. Business Process requires write off to be done using FPE1 transaction by posting document manually. They need to know whether authorisation to post documents for write off can be restricted amount wise.