Get error "SoapFaultCode:1"Consume web service in ABAP proxy

Hi All,
I created a proxy and logical port to consume a BOBJ Data Service' webservice, when I tested the proxy I get exception:
SoapFaultCode:1 without further more information.
the wsdl is @ http://nspad372.dmzpal.sap.corp:8080/DataServices/servlet/webservices?ver=2.1&wsdlxml
and the endpoint of that webservice is@ http://cnst50052835:8080/DataServices/servlet/webservices?ver=2.1
By using SOAPUI I can successful call that webservice, but with ABAP proxy not. Can someone give me a help?
thanks& bst regards,
Bin

Hi
1.- check adding the host of the Service to your etc\hosts file unix case, or your DNS in case you have one.
2.- Add the SOAP Action in the Logical Port Config (Obtain it from the WSDL info).
Hope this help,
Greetings.

Similar Messages

  • SoapFaultCode:1"Consume web service in ABAP proxy

    Hi,
    All while trying to execute the web service in ABAP i am getting the following error: SoapFaultCode:1".
    When i used tcode ST11, i found it is giving the following error trace:
    XRFC>
    XRFC> E HTTP_TRANSPORT_BINDING 20091202120425.2099810 : CL_SOAP_HTTP
    XRFC> TPBNDROOT ->HANDLE_STATUS_CODE Received return code 500 (
    XRFC>
    XRFC>
    XRFC> E SOAP_RUNTIME 20091202120425.2897590 : CL_SOAP_RUNTIME_CLIENT
    XRFC> ->EXEC_PROCESSING SOAP Fault Exception caught: : System.Web
    XRFC> .Services.Protocols.SoapHeaderException: SOAP header To was not
    XRFC> understood.#
    Can anyone please help with this?

    Hi
    1.- check adding the host of the Service to your etc\hosts file unix case, or your DNS in case you have one.
    2.- Add the SOAP Action in the Logical Port Config (Obtain it from the WSDL info).
    Hope this help,
    Greetings.

  • Consume web service in ABAP proxy with SOAP header

    Hi Thomas ,
    I am trying to consume web service in  ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
    I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
    Please see below code and please give some direction to fix the issue.
    1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
    2.Create Logical port
    3.Create following program to call proxy
    REPORT  zproxy.
    DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
          ws_header TYPE REF TO if_wsprotocol_ws_header,
          name TYPE string,
          namespace TYPE string.
    TRY.
        CREATE OBJECT ref_stock
      get WS_HEADER protocol
        ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
      set somehow header as iXML-DOM tree
        DATA: ixml TYPE REF TO if_ixml,
              xml_document TYPE REF TO if_ixml_document,
              xml_root TYPE REF TO if_ixml_element,
              xml_element TYPE REF TO if_ixml_element,
              xml_node TYPE REF TO if_ixml_node.
        DATA l_xstring        TYPE xstring.
        DATA l_string         TYPE string.
        FIELD-SYMBOLS <fs_xstring> TYPE xstring.
      Additional Header:
        CONCATENATE
    '<soap:Header>'
    '<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
    '<s1:RegisteredUser>'
    '<s1:UserID>[email protected]</s1:UserID>'
    '<s1:Password>aaaaaaaa</s1:Password>'
    '</s1:RegisteredUser></s1:LicenseInfo>'
    '</soap:Header>' INTO l_string.
      convert to xstring
        l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
        IF NOT l_string IS INITIAL.
        create iXML DOM document from XML xstring
          CALL FUNCTION 'SDIXML_XML_TO_DOM'
            EXPORTING
              xml           = l_xstring
            IMPORTING
              document      = xml_document
            EXCEPTIONS
              invalid_input = 1
              OTHERS        = 2.
          IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
            xml_root = xml_document->get_root_element( ).
            xml_element ?= xml_root->get_first_child( ).
          add header element by element to SOAP header
            WHILE NOT xml_element IS INITIAL.
              name = xml_element->get_name( ).
              namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
              IF NOT xml_element IS INITIAL.
              ENDIF.
              ws_header->set_request_header(
                          name = name
                          namespace = namespace
                          dom = xml_element ).
              xml_element ?= xml_element->get_next( ).
            ENDWHILE.
          ENDIF.
        ENDIF.
      CATCH cx_ai_system_fault .
    ENDTRY.
    *Call soap body using abap proxy class.
    DATA: get_quotes TYPE zzget_quotes_soap_out .
    DATA: get_quotes1 TYPE zzget_quotes_soap_in .
    get_quotes1-quote_ticker = 'GE'.
    TRY.
        CALL METHOD ref_stock->get_stock_quotes
          EXPORTING
            get_quotes1 = get_quotes1
          IMPORTING
            get_quotes  = get_quotes.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    4.It is throwing cx_ai_system_fault error.
    SOAP details:
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
    <soap:Header>
    <s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
    <s1:RegisteredUser>
    <s1:UserID>[email protected]</s1:UserID>
    <s1:Password>aaaaaaaa</s1:Password>
    </s1:RegisteredUser>
    </s1:LicenseInfo>
    </soap:Header>
    <soap:Body>
    <tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
    <tns:QuoteTicker>GE</tns:QuoteTicker>
    </tns:GetQuotes>
    </soap:Body>
    </soap:Envelope>
    Thanks,
    Kavitha.

    Hi ,
    Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
    <a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
    Thanks,
    Kavitha.

  • How to consume WEB SERVICES from ABAP ??

    Q: How to consume WEB SERVICES from ABAP program??
         the point here is i am using SAP release 620 and the creation of proxy is out of scenario
         and also no XI.    Its only through ABAP program i need to consume one web service (its a HTTPS one ),
        Using cl_http_client... i tried it but i am totally confused of whats happening ???
    Req some senior ppl advice on the same/approach.
    any hints will suffice my way of approach...!!!
    Please do put in your valuable advices..!!
    Thanks in advance..!!!!

    Hello Srinivas,
    Following is the code for calling web service:
    data: client type ref to if_http_client,
          host   type string value 'server url',
          service type string value '8080',
          path type string value '/sap/public/ping',
          errortext type string,
          proxy_service type string,
          scheme type i value 1.
    call method cl_http_client=>create
    exporting host  = host
            service  = service
         proxy_host  = host
       proxy_service = service
       scheme        = scheme
    importing client  = client
    exceptions
        argument_not_found = 1
        internal_error     = 2
        plugin_not_active  = 3
        others             = 4.
    case sy-subrc.
      when 0.
         write 'Server reached successfully'.
      when others.
         write: 'sy-subrc =', sy-subrc.
    endcase.
    Once you got the client object you can call following methods:
    "Set the requrie URL for the web service you want to call. This is not WSDL anyway!!
    cl_http_utility=>set_request_uri( request = client->request
    uri =' url 2 be called ').
    *Then you can call send method with proper inputs for sending request to WS
    CALL METHOD client->send
    Then you can use receive method for getting the response
    CALL METHOD client->receive
    *You can get last error in case of exceptions
    CALL METHOD cl_http_client=>get_last_error
    *Close the client object
    CALL METHOD client->close
    For more information on full code refer my link in previous replay.
    Thanks,
    Augustin.
    Edited by: Augustarian on Aug 18, 2009 1:49 PM

  • Code for consuming web services in ABAP

    *& Report  ZVM_GET_CITY_TIME
    REPORT  zvm_get_city_time.
    PARAMETERS:
      p_city TYPE zget_city_time_soap_in-city.
    DATA:
      cl_proxy TYPE REF TO zco_time_service_soap,
      input    TYPE zget_city_time_soap_in,
      output   TYPE zget_city_time_soap_out,
      systerr  TYPE REF TO cx_ai_system_fault,
      w_error  TYPE c.
    TRY.
        CREATE OBJECT cl_proxy
          EXPORTING
            logical_port_name = 'ZCO_TIME_SERVICE_SOAP'.
      CATCH cx_ai_system_fault.
        CREATE OBJECT systerr.
        WRITE:/ 'Error in creating object - ', systerr->errortext.
    ENDTRY.
    TRY.
        input-city = p_city.
        CALL METHOD cl_proxy->get_city_time
          EXPORTING
            input  = input
          IMPORTING
            output = output.
      CATCH cx_ai_system_fault.
        CREATE OBJECT systerr.
        WRITE:/ 'Error in calling the method - ', systerr->errortext.
        w_error = 'X'.
    ENDTRY.
    CHECK w_error NE 'X'.
    SKIP.
    WRITE:/ 'The current time in ', p_city, ' is ',
            output-get_city_time_result.

    <i> is there any other way to consume web services in ABAP</i>
    you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
    Regards
    Raja

  • Windows authentification while consuming web service from ABAP

    Hi All,
    We are consuming web service from ABAP, we have created client proxy in SE80 and configured logical port in LPCONFIG.
    This one was working fine. Now we have added  windows user authentification to access this service.
    Now when I'm trying to regenerate this proxy in R/3 it is asking for user and password. When I enter these details this one is not working.
    If I access this service direcly from internet explorer and I enter same user and password then I would able to access this service.
    Could you please let me know how to handle this.
    Regards
    Vikram

    The dialog that is produced by HTTP Destination object of the logical port is designed only for use within Classic Dynpro applications.  There is no prompt produced when running in Web Dynpro.  If possible assign a generic user within the logical port definition and this will be used automatically by all users.

  • Consuming Web Services with ABAP - WSDL

    Hi All,
    I Want to consume web service in abap, i found lot of documents,Here i am having data in the internal table i need to pass
    it to wsdl file, The Web Service or Proxy generates a WSDL file. So this WSDL file can be consumed on ABAP Front and Encrypt the Data that is to be sent to the Banks.
    I found the input and output, Where i can find the method generated or we need to create it
    CALL METHOD io_clientproxy->XXXXXXXXXXXX
    please let me have your valuable ideas
    Thanks in advance,
    Arun.

    Hi Miguel,
    I have not heared about SPROXY, Here i found some code,which calls a web service method and where it is from.
    when i double click on my proxy it shows me some method.IF_PROXY_BASIS_INTERNAL~CREATE_FRAMEWORK
    this is the one web service method. and i meed to pass the internal table data to WSDL file.
    *-- create web service proxy class instance
    TRY.
        CREATE OBJECT io_clientproxy
          EXPORTING
            logical_port_name = 'LP4'.
      CATCH cx_ai_system_fault.
    ENDTRY.
    *-- call web service methods
    TRY.
        CALL METHOD io_clientproxy->get_airport_information_by_is
          EXPORTING
            input  = input
          IMPORTING
            output = output.
      CATCH cx_ai_system_fault.
      CATCH cx_ai_application_fault.
    ENDTRY.
    *-- text processing
    output_string = output-get_airport_information_by_is.
    REPLACE ALL OCCURRENCES OF
        '<' IN output_string WITH '<' .
    REPLACE ALL OCCURRENCES OF
    '>' IN output_string WITH '>' .
    REPLACE ALL OCCURRENCES OF
    'xmlns=' IN output_string WITH 'xmlns:xsl=' .
    *-- parsing
    TRY .
        CALL TRANSFORMATION ('Y_AIRPORT_XML2ABAP')
                SOURCE XML output_string
                RESULT     outtab = outtab.
      CATCH cx_xslt_exception INTO xslt_err.
        DATA: s TYPE string.
        s = xslt_err->get_text( ).
        WRITE: ': ', s.
        STOP.
    ENDTRY .
    Regards,
    Arun.

  • How to consume Web Services form ABAP ?

    Hi,
    Please advise how to consume web services from ABAP Code ? is there any automatic generating proxy class in order to consume web services ?
    I am using NW 7.0 SP15
    Thank You and Best Regards
    Fernand Lesmana

    Hi Fernand,
    chk out for this link
    Consume an ABAP Webservice (WAS 620) from .Net
    Send SMS to India from ABAP
    working web service from ABAP
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a4433436-0301-0010-f2a9-9281ad574054
    Regards
    Sampath

  • Pros & Cons for consuming web services in ABAP using ABAP PROXY

    Hi,
    Other then performence  is there any other disadvantages like security,etc for consuming web services in ABAP using ABAP proxy?
    I really appreciate if some one provide the more details(Pros & Cons ) regarding cosuming web services and I also want to know is there any other way to consume web services in ABAP.
    Thanks.

    <i> is there any other way to consume web services in ABAP</i>
    you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
    Regards
    Raja

  • To consume web service in ABAP is it required that server should be XI.

    Hi ,
    I am trying to connect to a webservice from netweaver 7.0 systemand it gives an error " Not configured as integration engine". Is it required to have integration engine to consume web service.
    Sanjay

    Hi Sanjay
    You can consume webservices in ABAP but its better to use XI in mid to avoid point to point communication. Using XI you can have a central hub for all services you consume or publish
    Check this link as well
    BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
    Thanks
    Gaurav

  • Problem at Consume WEB Service in ABAP

    hello!!
    I tell them my problem, is to create a web service from the SE80,  which could be used properly.
    Then there was a change of server, which migrated to the developments and the web service is recreation, but this can not be consumed.
    now I need help, is where do I indicate that the basis so that they can return to consume web services, what services or settings should be activated.
    any suggestion or help are welcome.
    The ECC system is a 5 AS ABAP only.
    from now, I appreciate any help or guidance I can get.

    What is the problem? Are all the services active in SICF for web services and how is the web service being consumed is it through a wsdl file ?

  • Consume web service in ABAP with SOAP header

    I'm trying to call a SalesForce Web Service from ABAP.
    After the login I use the WS_HEADER to pass header information.
      TRY.
    Additional Header:
          CONCATENATE
          '<soap:Header>'
          '<s1:SessionHeader>'
          '<s1:sessionId>' login_output-result-session_id '</s1:sessionId>'
          '</s1:SessionHeader>'
          '</soap:Header>' INTO l_string.
    convert to xstring
          l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
          ws_header ?= obj_add->get_protocol('IF_WSPROTOCOL_WS_HEADER').
          IF NOT l_string IS INITIAL.
    create iXML DOM document from XML xstring
            CALL FUNCTION 'SDIXML_XML_TO_DOM'
              EXPORTING
                xml           = l_xstring
              IMPORTING
                document      = xml_document
              EXCEPTIONS
                invalid_input = 1
                OTHERS        = 2.
            IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
              xml_root = xml_document->get_root_element( ).
              xml_element ?= xml_root->get_first_child( ).
    add header element by element to SOAP header
              WHILE NOT xml_element IS INITIAL.
                name = xml_element->get_name( ).
                namespace = xml_element->get_namespace_uri( ).
                namespace = 'urn:partner.soap.sforce.com'."xml_element->get_namespace_uri( ).
                IF NOT xml_element IS INITIAL.
                ENDIF.
    get WS_HEADER protocol
                ws_header->set_request_header(
                name = name
                namespace = namespace
                dom = xml_element ).
                xml_element ?= xml_element->get_next( ).
              ENDWHILE.
            ENDIF.
          ENDIF.
        CATCH cx_ai_system_fault .
      ENDTRY.
    I get the following exception: CX_SXML_PARSE_ERROR
    I guess the error has to do with the wrong description of the additional header.
    In soapUI the header looks like that:
       <soapenv:Header>
          <urn:SessionHeader>
             <urn:sessionId>1234567890</urn:sessionId>
          </urn:SessionHeader>
       </soapenv:Header>
    Is there somebody who knows how I should "translate" this to ABAP?
    Thanks,
    Daniel

    Hi Jelena
    Thanks for your answer.
    I've already created the proxy.
    The question is how or where I get the correct format for the header of this string in ABAP:
    CONCATENATE
    '<soap:Header>'
    '<s1:SessionHeader>'
    '<s1:sessionId>' login_output-result-session_id '</s1:sessionId>'
    '</s1:SessionHeader>'
    '</soap:Header>' INTO l_string.
    This example is wrong. I get the following error: CX_SXML_PARSE_ERROR
    As I mentioned before in soapUI the header looks like that:
    <soapenv:Header>
    <urn:SessionHeader>
    <urn:sessionId>1234567890</urn:sessionId>
    </urn:SessionHeader>
    </soapenv:Header>
    Daniel

  • Consuming Web Service from ABAP: ERROR_WEBSERVICE_RUNTIME_INIT

    Hi fellows,
    I have to make a call from SAP (CRM) to external system (via webservice) for this purpose I've setup a new Proxy-Object, uploaded the WSDL file (locally) and Created a Logical port.
    In the Logical Port under the tab Call Parameter I've defined the URL of the web-service. I am also not able to upload the WSDL by selecting the option URL/HTTP due to error message "HTTP error (return code 400, message "ICM_HTTP_CONNECTION_FAILED")
    Message no. SPRX090" so uploaded the file locally.
    However, when testing the service, I didn't received a sucess message but:
    <CX_AI_SYSTEM_FAULT>
      <CODECONTEXT>Local</CODECONTEXT>
      <CODE> ERROR_WEBSERVICE_RUNTIME_INIT </CODE>
      <ERRORTEXT> Error when instantiating the Web service runtime (Error when initializing SOAP client application: ' error_text' ) </ERRORTEXT>
      <LANGUAGE />
      </CX_AI_SYSTEM_FAULT>
      </cls:CX_AI_SYSTEM_FAULT>
    What might be the Problem ?
    /Manik

    Vijay,
    I've to make a call to External (non-sap) system --> pass some values --> (and then) get the returning parameters/values from the exernal system. The webservice is created in external system and here SAP will act as a client.
    The system is SRM5.0, is it possible to use the RFC - XI soap approach in SRM 5.0 by maintaining the necessay configuration w/o involving XI system exclusively ? or XI is a MUST  for this type of scenario ?

  • Consuming Web Service in ABAP

    Hi,
    We have a Web Service URL on PI. Run time of this Web Service in a Portal Server.
    We need to access the Same URL from ECC using ABAP Programming?
    Can any one tell me how we can call the same Web Service?
    I need to pass few values to the web service using ABAP Code and I need to get back the result into some variables.
    any code available for verify?
    Thanks,
    Sekhar.J

    Hi Sekhar,
    Please see below link. It will be helpful.
    Regards,
    Sudha

  • Error during creation of web service from abap rfc

    Hi,
    I'm creating a web service from abap rfc (SE37), but at the end  of Creation Wizard I have this error:
    "web service object already exist".
    This is my first web service creation. Into WSADMIN there are not web services with the same name.
    How can I solve this problem?
    Thanks!

    Hi,
    What system/release/SP do you use ?
    Beginning with Netweaver 7.0 SP14, you configure Web services with SOAMANAGER and you don't see them with WSADMIN...
    Regards,
    Olivier

Maybe you are looking for

  • Upgrade release note doubt

    Hi, I have a doubt in refering the release notes. We are doing technical upgrade from 4.6C to ECC 6.0 (Enhancement Pack 3). DO we need to refer all the release notes from 4.7 till ECC SP1, SP2, and SP3 etc to get to know the delta changes? Or referin

  • How to run App server applications in Client systems

    Hi all, I m new to Oracle Devsuite 10g and App server. I configured the app server and i m able to run in my local machine (server) but i m not able to run in some others machines. even though i have given same path. its displaying page cannot be dis

  • Saving podcasts as non-podcasts

    I have collected numerous podcasts that are good enough to keep indefinitely. When I listen to them they reappear under the Podcast library heading, along with the Podcast title and a new "subscribe" button. What I want is for them to appear in a pla

  • Mp4 won't trasfer to ipod

    I have converted 4 video's with ImToo that have worked. But the last three I have converted will not go on my ipod, it says that the ipod doesn't support the video format, but the video icon says its MP4. I have also given it to friends to try and it

  • Goal Setting/Planning Templates for Numbers?

    been scouring online and have found mostly only hosted solutions for personal goal setting and planning. its the start of new year and would like to get my goals organized. does anyone know of a personal goal setting/planning/tracking template that h