Web Service in ABAP

All
I have created a Web Service in our Development environment
and we have given the WSDL to our consumer and he can consume
this service without issue.
We have saved the Devlopment work against the Transport Request.
Q: We will be transporting this development to our
next Test System and then production. Will the WDSL URL change?
I understand that URL will change since the Server will be different.
but to confirm my understanding, this question is.
Q: since we are transporting this Service from Dev to Test/Prod,
how do we find the new WDSL and URL for test/Prod system.
Please advice on the steps.
Cheers
RJ

Hi Kerim,
first of all, thank you for giving my a good path to analyze this issue. Finally I found a new error information inside the SRT_UTIL:
-ERROR_CONTEXT        
--ERROR_INFO
---EXCEPTION_INFO             
----TYPE CX_SOAP_CORE  
----ERROR_TEXT SRT: Plain SOAP: Reliable messaging (RM) configured, but no Message
ID and no WSRM assertion provided.
----CX_SOAP_CORE              
-----E_LOCATION
------CLASS     CL_SOAP_PLAIN_PROTOCOL
------METHOD   
CHECK_FOR_QOS 
-----E_TEXT    SRT: Plain SOAP: Reliable messaging (RM) configured, but no Message
ID and no WSRM assertion provided.
-----E_ID       1222  
-----E_FAULT_LOCATION  
1     
-----E_AREA           
-----E_HOST     1     
-----E_PROCESS_CONTROL 
--PROVIDER_INFO       
---INTERFACE_NAME       Z_BW_WSDLTEST 
---INTERFACE_NAMESPACE urn:sap-com:document:sap:rfc:functions
---PROVIDER_INTERFACE  
Z_BW_WSDLTEST 
---OPERATION_NAME       Z_WSDLTEST    
---OPERATION_NAMESPACE urn:sap-com:document:sap:rfc:functions
---PROCESSING_UNIT     
Sector 4: WS-Provider 
---PROCESSING_MODE      Synchronous   
---COMMUNICATION_TYPE  
REMOTE
---WORK_PROCESS_NUMBER  30    
---WORK_PROCESS_PID    
606248
--REQUEST_INFO        
---PROTOCOL     HTTP/1.1      
---REQUEST_URI 
/sap/bc/srt/rfc/sap/z_bw_wsdltest/100/zbwwsdltest/zbwwsdltest 
Then I followed this description:
-ERROR_CONTEXT        
--ERROR_INFO
---EXCEPTION_INFO             
----TYPE CX_SOAP_CORE  
----ERROR_TEXT SRT: Plain SOAP: Reliable messaging (RM) configured, but no Message
ID and no WSRM assertion provided.
----CX_SOAP_CORE              
-----E_LOCATION
------CLASS     CL_SOAP_PLAIN_PROTOCOL
------METHOD   
CHECK_FOR_QOS 
-----E_TEXT    SRT: Plain SOAP: Reliable messaging (RM) configured, but no Message
ID and no WSRM assertion provided.
-----E_ID       1222  
-----E_FAULT_LOCATION  
1     
-----E_AREA           
-----E_HOST     1     
-----E_PROCESS_CONTROL 
--PROVIDER_INFO       
---INTERFACE_NAME       Z_BW_WSDLTEST 
---INTERFACE_NAMESPACE urn:sap-com:document:sap:rfc:functions
---PROVIDER_INTERFACE  
Z_BW_WSDLTEST 
---OPERATION_NAME       Z_WSDLTEST    
---OPERATION_NAMESPACE urn:sap-com:document:sap:rfc:functions
---PROCESSING_UNIT     
Sector 4: WS-Provider 
---PROCESSING_MODE      Synchronous   
---COMMUNICATION_TYPE  
REMOTE
---WORK_PROCESS_NUMBER  30    
---WORK_PROCESS_PID    
606248
--REQUEST_INFO        
---PROTOCOL     HTTP/1.1      
---REQUEST_URI 
/sap/bc/srt/rfc/sap/z_bw_wsdltest/100/zbwwsdltest/zbwwsdltest
Then I followed this description: http://scn.sap.com/thread/3278733
So I checked the Web Service operatioprofil where I changed the profil setting to asynchronously and the reliability message transport automatically switched to false. Unfortunately without success, means the error from SRT_UTIL persists!

Similar Messages

  • Calling a web service in ABAP

    Hello Experts!
    After I am assuming the SOAP Experts at the SOAP Forum
    are being already on christmas vacation
    I saw no other possiblitiy to post my question right here.
    I have created a web service through:
    Open the affected  function Module  .
    Choose Utilities  -> More Utilities  -> Creating a Web Service  -> From Function Module.
    Later you can test it with SOAMANAGER etc.
    The goal is now (requirement)
    Calling a web service in ABAP.
    How can I generally call a (eg .above created by me ) webservice with abap which is existing on the sap system (Web Services which are generated from Function Modules)
    Has really nobody such a problem ever before ?
    Regards
    ertas ilhan

    Michael thank you very much.
    You are saying:
    The easiest way to do it is with the WSDL file that you'll get from the existing Web Service. In your proxy class it will generate a method which you can then call within your program to consume that web service.
    I understand the first part with the WSDL file but the second part it is unclear to me with
    In your proxy class it will generate a method which you can then call within your program to consume that web service
    Can you please explain me this more detailed.
    Thanks
    ertas

  • Error while consuming CAF Web Service in ABAP

    Hi experts,
    I need to consume a CAF Web Service in ABAP 7.0. While trying to generate the Proxy Object in SE80 it is thowing an error "Proxy generation terminated: WSDL error. (<extension> not supported)" and terminating the Proxy generation.
    Can anyone please help me out with the solution for this?
    Thanks in Advance.
    Vaishali.

    Hi,
    waiting for reply.....

  • Calling web service from ABAP - version 4.6C

    Hi,
    I would like to know how to call a web service from ABAP. Version is 4.6C. Any help would be greatly appreciated.
    Thank you,
    Rekha

    Hi Rekha,
    Please go through these..
    call web service using ABAP
    http://help.sap.com/saphelp_nw04/helpdata/en/a0/da0710b6560a4e80fb94f3f712dfc0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/ae1b9a5d2cef4ea4b579f19d902871/frameset.htm
    Hope these help you!
    cheers,
    Prashanth

  • Unallowed RFC-XML Tag (SOAP_EINVALDOC) - Web Service using ABAP Proxy

    Hi there
    I am trying to consume a Web Service using ABAP Proxies.  I have done the following in the system:
    I configured the HTTP and HTTPS Proxy settings. 
    I created a package with package interfaces SAI_TOOLS and SAPPINT included under the Use Access tab.
    I created the proxy classes by using the WSDL provided by the system I'm trying to interface with. 
    I created my HTTP destination RFC via SM59. 
    I configured a logical port for the proxy. 
    I developed the ABAP code for calling the proxy. 
    In the code the exception CX_AI_SYSTEM_FAULT gets raised with error message <b>"Unallowed RFC-XML Tag (SOAP_EINVALDOC)"</b> when I call the method for passing data to the destination system in the proxy class.
    I had a look at SM21 and the following message was written in the log:
    <b>"SOAP Runtime: SOAP Runtime exception: 111 occurred in method XP_READ_TAG of class CL_SOAP_XP at position 1
    SOAP Runtime: Exception message: Unallowed RFC-XML Tag (SOAP_EINVALDOC)"</b>.  I also looked at SAP Note 919886 which states that it can be dumps in the system, missing configuration or the path prefix of the RFC destination that is incorrect.  I cannot find any ST22 entries.  The trace file looks as follows:
    SAP System ID: DGH
    Client: 009
    User: COLESKG
    System time: 072910
    System date: 20070531
    SAP Release: 700
    Host: hd307c
    Operating system: AIX
    DB System: ORACLE
    Program: ZUK_IPA00003
    Processing State: 0
    Location: Client
    Transport Binding: http://schemas.xmlsoap.org/soap/http
    SOAP Application: urn:sap-com:soap:runtime:application:client
    SOAP Runtime Protocol: http://www.sap.com/webas/630/soap
    /runtime/protocol
    SOAP Protocols: <initial>
    Request Message: <initial>
    Response Message: <initial>
    Fault: <initial>
    Registry: <initial>
    SOAP Roles: <initial>
    Trace Level: 3
    Logging Level: 2
    Monitoring Level: 0
    Security Profile: <initial>
    WS Security Protocol: <initial>
    INFO 07:29:10: SOAP LP Registry CL_SRT_LP_MAINTENANCE->CREATE_CLIENT_APPL() Try to create client application for Proxyclass:
    ZES_CO_PROCESS_EMPLOYEE_BATCH LP name: DEFAULT
    INFO 07:29:10: SOAP LP Registry CL_SRT_LP_MAINTENANCE->CREATE_CLIENT_APPL() Client application created
    INFO 07:29:10: SOAP LP Registry CL_SRT_LP_MAINTENANCE->CREATE_CLIENT_APPL() Try to initialize client application
    INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->IF_SOAP_APPLICATION_CS~INIT() Try to initialize application
    urn:sap-com:soap:runtime:application:client
    INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->INTERNAL_CLIENT_INIT() Create new runtime CL_SOAP_RUNTIME_CLIENT
    INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->REGISTER_APPLICATION() Try to register application
    INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->REGISTER_APPLICATION() Application registered
    INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->INTERNAL_CLIENT_INIT() Read type of transport binding from
    configuration
    INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->INTERNAL_CLIENT_INIT() Create new transport binding type
    http://schemas.xmlsoap.org/soap/http
    INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~INIT() Try to initialize
    http://schemas.xmlsoap.org/soap/http
    INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~INIT() http://schemas.xmlsoap
    .org/soap/http initialized
    INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~REQUEST() Try to create request message
    INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~REQUEST() Request message created
    INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~RESPONSE() Try to create response message
    INFO 07:29:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING_ROOT->IF_SOAP_TRANSPORT_BINDING~RESPONSE() Response message
    created
    INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->INIT() Try to initialize
    INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->INIT() Check transport binding
    INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->INIT() Create runtime protocol
    INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->IF_SOAP_PROTOCOL~INIT() Try to initialize SOAP Runtime-intrinsic
    Protocol as SENDER with Priority 5
    INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->INIT_MODULES() Try to create trace header/part
    INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->INIT_MODULES() Trace header/part created
    INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->INIT_MODULES() Try to create logging header/part
    INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->INIT_MODULES() Logging header/part created
    INFO 07:29:10: SOAP Runtime Protocol CL_SOAP_RUNTIME_PROTOCOL->IF_SOAP_PROTOCOL~INIT() Protocol initialized
    INFO 07:29:10: SOAP Runtime CL_SOAP_RUNTIME_CLIENT->INIT()
    Initialized
    INFO 07:29:10: SOAP Protocol CL_SOAP_PROTOCOL_FACTORY->CREATE()
    Try to create instance for http://www.sap.com/webas/630/soap
    /runtime/session/protocol::http://www.sap.com/webas/630/soap
    /runtime/session/protocol/srt640_impl
    INFO 07:29:10: SOAP Protocol CL_SOAP_PROTOCOL_FACTORY->CREATE()
    Instance of CL_SOAP_SESSION_PROTOCOL created for http://www.sap.com/webas/630/soap/runtime/session/protocol::http://www.sap.com/webas/630/soap/runtime/session/protocol/srt640_impl
    INFO 07:29:10: SOAP SESSION Protocol CL_SOAP_SESSION_PROTOCOL->IF_SOAP_PROTOCOL~INIT() Try to initialize SOAP Session Protocol
    as SENDER with Priority 5
    INFO 07:29:10: SOAP SESSION Protocol CL_SOAP_SESSION_PROTOCOL->IF_SOAP_PROTOCOL~INIT() Protocol initialized
    INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT_GEN->CONFIGURE_FEATURES() Try to configure features
    INFO 07:29:10: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->IF_SOAP_HTTP_TRANSPORT_BINDING~SET_CLIENT_BY_DESTINATION() Try to
    create ICF Client for DESTINATION = ALSB
    INFO 07:29:10: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->IF_SOAP_HTTP_TRANSPORT_BINDING~SET_CLIENT_BY_DESTINATION() ICF
    Client created by DESTINATION
    INFO 07:29:10: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->IF_SOAP_HTTP_TRANSPORT_BINDING~SET_DESTINATION_URL_PATH() Set
    DESTINATION PATH = /SapHRSmartIntegrationWeb/processes/ProcessEmployeeBatch.jpd
    INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT_GEN->CONFIGURE_FEATURES() Features configured
    INFO 07:29:10: SOAP Application CL_SOAP_APPLICATION_CLIENT->IF_SOAP_APPLICATION_CS~INIT() Application urn:sap-com:soap
    :runtime:application:client initialized
    INFO 07:29:10: SOAP LP Registry CL_SRT_LP_MAINTENANCE->CREATE_CLIENT_APPL() Client application initialized
    Trace file opened at 20070531 073030 GMT SAP-REL 700,0,95
    Error in module XMLParserGetNextElement:773
    Id @(#) $Id: //bas/700_REL/src/krn/rfc/xrfcpars.c#2 $
    Unallowed RFC-XML Tag
    Error in module XMLConverterReadTag:3061
    Id @(#) $Id: //bas/700_REL/src/krn/rfc/xrfccnvrt.c#5 $
    Unallowed RFC-XML Tag(24)
    Error in module ab_soap:4392
    Id @(#) $Id: //bas/700_REL/src/krn/rfc/abxrfccal.c#2 $
    failed with return code 1
    It then must be something in the config.  Has anyone got any idea why this message is encountered?
    Kind Regards
    Gustav Coleske
    Message was edited by:
            Gustav Coleske

    Hi,
    I have the same problem as described.
    Can you give me a little more information about the error you have solved in the proxy.
    Thanks for help
    John

  • 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

  • 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.

  • Is it possible to call web service from ABAP SAP 4.6 c..If yes how

    Hi Friends,
    Is it possible to call web service from ABAP-SAP 4.6 c..If yes Could you please let me know how.
    Thanks in Advance.
    Murali Krishna K
    Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:09 PM
    Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:11 PM

    Olivier CHRETIEN wrote:>
    > Hi Terry,
    >
    > So these function modules must use the SAPHTTPA RFC destination which uses the exe saphttp.exe ?
    >
    > How much abap code lines do you have for a web service call ?
    > Do you have to code the call specifically for each different web service ?
    > Are you able to use the WSDL ?
    >
    > Nice job if you have coded your own private SOAP runtime !
    >
    > But I don't think this is an easy solution for everybody...
    >
    > Regards,
    >
    > Olivier
    Yes, SAPHTTPA (runs on application server) and/or SAPHTTP (runs on front-end pc), one of which, is required for HTTP communication.  So far, nothing too elaborate as far as SOAP goes, but the logic is simplistic.  Here's some sample code:
      DEST = 'SAPHTTPA'.
      TRANSLATE HOST TO LOWER CASE.
      MYURL = 'wssrvTest/Service.asmx/GetByOrderItem'.
      CONCATENATE HOST MYURL INTO MYURL.
      REQUEST_HEADERS-DATA = 
                  'Content-type: application/x-www-form-urlencoded'.
      APPEND REQUEST_HEADERS.
      CLEAR REQUEST_HEADERS.
    *........Convert Order Number to External Format........................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ORDER
           IMPORTING
                OUTPUT = ORDER.
    *........Convert Item Number to External Format.........................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ITEM
           IMPORTING
                OUTPUT = ITEM.
    *........Convert Material Number to External Format.....................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = MATERIAL
           IMPORTING
                OUTPUT = MATERIAL.
      CONCATENATE 'sOrder=' ORDER
                   INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CONCATENATE '&sItem=' ITEM
                   INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CONCATENATE '&sMaterial=' MATERIAL
                  INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CALL FUNCTION 'HTTP_POST'
           EXPORTING
                ABSOLUTE_URI          = MYURL
                RFC_DESTINATION       = DEST
                BLANKSTOCRLF          = 'X'
           TABLES
                RESPONSE_ENTITY_BODY  = RESPONSE_BODY
                REQUEST_ENTITY_BODY   = REQUEST_BODY
                RESPONSE_HEADERS      = RESPONSE_HEADERS
                REQUEST_HEADERS       = REQUEST_HEADERS
           EXCEPTIONS
                CONNECT_FAILED        = 1
                TIMEOUT               = 2
                INTERNAL_ERROR        = 3
                TCPIP_ERROR           = 4
                DATA_ERROR            = 5
                SYSTEM_FAILURE        = 6
                COMMUNICATION_FAILURE = 7
                OTHERS                = 8.
      CHECK SY-SUBRC = 0.  "more appropriate msg goes here
      LOOP AT RESPONSE_BODY.
        IF RESPONSE_BODY+0(7) <> '<string' AND
           RESPONSE_BODY+0(8) <> '</string' AND
           RESPONSE_BODY+0(5) <> '<?xml'.
          SPLIT RESPONSE_BODY-DATA AT '=' INTO FIELD_NAME FIELD_VALUE.
          TRANSLATE FIELD_NAME TO UPPER CASE.
          CASE FIELD_NAME.
            WHEN 'HEIGHT'.
              HEIGHT = FIELD_VALUE.
            WHEN 'WIDTH'.
              WIDTH = FIELD_VALUE.
            WHEN 'LENGTH'.
              LENGTH = FIELD_VALUE.
            WHEN 'WEIGHT'.
              WEIGHT = FIELD_VALUE.
            WHEN 'QTY'.
              QTY = FIELD_VALUE.
          ENDCASE.
        ENDIF.
      ENDLOOP.
    Hope this helps...
    Terry
    Edited by: Terry West on Feb 4, 2008 3:08 PM

  • 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.

  • Error when calling Java Web Services from ABAP.

    Hello experts:
        In my project, I will call Java Web Services with ABAP coding. With WSDL, I generated a proxy class and created a HTTP connection (t-code: SM59) and a logical port (t-code:lpconfig) for this proxy class. But when running, I would receive the folllowing errors:
       SOAP:1.023 SRT: Processing error in Internet Communication Framework: ("ICF Error when receiving the response: HTTP COMMUNICATION FAILURE")
       If I used HTTPS, there is no problem.
    Regards
    Bob

    Hi Bob,
    It might be the possibility that your java web server is configured to listen only on HTTPS.
    If your HTTPS is working fine, then first check with your JAVA server for HTTP connectivity, then try it calling through ABAP.
    Regards,
    Piyush

  • Call a web service in ABAP - how to do LPCONFIG?

    I have searched through OSS, SAP help and SDN - and I see the answer if I call a web service from Java - but I cannot find the answer if I call a web service through normal ABAP in R/3.
    I apologize if I am asking the same question again or if it is already there and I am just overlooking it.
    I am creating a client proxy in R/3 to call an outside web service through ABAP.
    I create the client proxy in our test system using SE80.
    I create a logical port using LPCONFIG to point at the test web service on the other system.
    I code the ABAP program - and everything works great.
    I transport the client proxy - and I transport the LPCONFIG information.
    Now I get into production - when I do transaction LPCONFIG to change the URL of the web service to be their production web service URL instead of their test web service URL - it asks for the system to be opened.
    Like it wants to create a transport. The basis people would have to open the system to be modified.  Which at least in our shop is not something we do.
    Here is the error:
      Message no. TK430
      The system administrator has set your logon client to the 'not modifiable' status.
      Client-specific objects can not be changed in this client.
      Contact the system administrator.
      For more information, see the SAP Library under Change and Transport System.
    For an ABAP program in R/3 using a client proxy - how do I call a test service in our test r/3 system and a production web service in production R/3 system without changing my ABAP code?
    Should this be done through LPCONFIG?
    Or what am I missing?
    Thanks for your help.
    Scott Overmeyer

    Hi Scott,
    Please refer to following URL
    http://help.sap.com/saphelp_nw04/helpdata/en/16/285d32996b25428dc2eedf2b0eadd8/content.htm
    I think you are using the second of the following 3 approaches mentioned in above documentation and so credential configuration is not available at run-time.
    Please check if this is helpful to you. If you have already looked at this then please ignore this message.
    There are three ways of configuring the call address of the Web service:
    ●     As HTTP destination: Select an RFC destination of type G (HTTP connection to an external server) or type H (HTTP connection to the SAP System) from transaction SM59. The HTTP destination approves the configuration of the logon procedure, encryption, and state management. This is the preferred access procedure.
    ●     As URL: The URL of the Web service is written to the corresponding input field when you create the logical port. The disadvantage of this procedure is that, with the exception of the URL, no other parameters for logging on, encryption, or state management can be configured. This is possible only for Web services that do not require a logon procedure, encryption, or state management.
    ●     As local path prefix: This access procedure is only intended for accessing your own system. Here you call the default RFC destination NONE to address your own server. The specified local path prefix is used to identify the called Web service.
    Regards,
    Vandana.

  • How to use web service with ABAP Web Dynpro

    Hi.
         do you know, how to web service with ABAP Web Dynpro?

    Hi,
    If you have a webservice ready with you then you can generate a proxy from SE80 and you can use that. You just have to create a port and assign to that generated proxy(CLASS) and you are good to go.
    Let me know if you need more information.
    Thank You,
    Gajendra.

  • 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.

  • Problems consuming a web service in ABAP

    We wish to consume an external web service from ABAP but the provided WSDL file contains syntax not supported by SAP - namely "mixed content".  A response from Roman Glushkov      in forum thread [Call Sharepoint Web Service; seemed to offer a solution. 
    The WSDL file was edited as suggested by Roman and the Service Consumer proxy was successfully created from this edited version.  However, in our SAP release (Basis release 700 support pack SAPKB70018) the "untyped mapping" indicator is not shown anywhere so we are unable to set that for those elements that were set edited in the WSDL.
    The problem now is that when calling a method where the return parameters include one of these edited elements we get the error "SOAP:1,001 CX_ST_MATCH_TYPE:XSLT exception.System expected a value for the type g" presumably because SAP is trying to de-serialise the response rather than just return the data as an XML string.
    Does anyone know how to get this "untyped mapping" indicator or can anyone suggest another way to solve this mixed content issue?
    TIA
    Gareth

    Hi Tim
    I've sort of got further in that I I can now call the web service method without error but structure returned is empty even though I know the SOAP response has data. 
    What I did was to go back to the WSDL and re-write the type declaration bit to fully describe the response message.
    The appropriate portion of the original WSDL was;
          <s:element name="getActionListResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="getActionListResult">
                  <s:complexType mixed="true">
                    <s:sequence>
                      <s:any />
                    </s:sequence>
                  </s:complexType>
                </s:element>
              </s:sequence>
            </s:complexType>
          </s:element>
    The response SOAP message was;
    <getActionListResponse xmlns="http://webcominc.com/">
         <getActionListResult>
              <RESULT xmlns="">
                   <RESULT>
                        OK
                   </RESULT>
                   <REASON />
                   <ACTION>
                        View
                   </ACTION>
                   <ACTION>
                        Change Status
                   </ACTION>
              </RESULT>
         </getActionListResult>
    </getActionListResponse>
    So I re-wrote the WSDL as follows;
    <s:element name="getActionListResponse">
       <s:complexType>
          <s:sequence>       
             <s:element minOccurs="0" maxOccurs="1" name="getActionListResult">
                 <s:complexType>
                   <s:sequence>
                      <s:element minOccurs="0" maxOccurs="1" name="RESULT">
                         <s:complexType>
                            <s:sequence>
                               <s:element name="RESULT" type="s:string" minOccurs="1" maxOccurs="1" />
                               <s:element name="REASON" type="s:string" minOccurs="1" maxOccurs="1" />
                               <s:element maxOccurs="unbounded" name="ACTION" type="s:string" minOccurs="0" />
                            </s:sequence>
                         </s:complexType>
                      </s:element>
                   </s:sequence>
                </s:complexType>
             </s:element>
          </s:sequence>
       </s:complexType>
    </s:element>
    Using this new version of the WSDL I recreated the ABAP Proxy but as I said this now returns an ABAP structure that is empty.  I'm new to WSDL so its very probable that my attempt at defining the response message is incorrect or maybe it is something to do with the fact that the response message has two elements called RESULT - one being the child of the other?
    Regards
    Gareth

  • 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

Maybe you are looking for

  • Sy-ucomm value for print preview

    Hi friends, Can any one tell me the sy-ucomm value for the print preview..?

  • Ipod Nano USB driver fails continuosly

    Initial problem: Device not found; located error in USB driver, uninstalled driver, rebooted sytem, found new driver - installed properly able to sync. (No hidden drivers listed in que) unconnect/reconnect ipod and USB driver error returns.(Each time

  • Problem after hide the "Alternate File" field

    Hi all, Before I hide the "Alternate File" field in check-in form. I created a content item with a customize Content Type and then viewed it's content information. At the Web Location property like that:        Web Location:      http://tuyennt-lapto

  • Aspect ratio issue when movie burnt to DVD

    I've filmed some holiday footed on my iPhone 4 and created an iMovie, exported it to iDVD and burnt a PAL 16:9 DVD. However the aspect ratio is too wide on my TV and I'm missing a lot of the picture and text which is off screen, especially in the men

  • Motion 5 - I have 12gb of ram so why are you so slow?

    Been using motion 4 a ton at the office and it has been slowing down my computer to a crawl and I am not sure why: 1. I have a pretty new mac with 12gb of RAM 2.  Even though I constantly need to jump into Bridge and Photoshop, I bite the bullet and