Consuming web service from ecc6.0:using webservice proxy -service call

Hi,
<u> On SYSTEM A</u>  
AS POC we have generated web service from BAPI_FLIGHT_GETLIST from ECC6.0.
0.we tested using web browser it was working fine.Then saved the WSDL to local pc
<u>On SYSTEM B</u>
1.I have created proxy using wsdl saved on local pc,
2. Created RFC Destination Type "H" giving the web service path
path : /sap/bc/srt/rfc/sap/ZBAPI_FLIGHT_GETLIST_WSD host & http port number.
3. created Logical port using LPCONFIG adn provided the RFC destination.
4. created service call from abap dynpro by using third option "web service proxy"
then selected the proxy generated above.
when i go to component controller context and see,
   exporting
      output
        FLIGHT_LIST
Under FLIGHT_LIST i dont see the node Item then list of elements under that.
How to use this in view as such i dont see output individual parameters??
If i use function module and create service call
then i could see properly like and could use it in view.
          CHANGING
               FLIGHT_LIST
                    AIRLINEID
Pointers will be suitable rewarded.
Regards
shekar chandra

closed

Similar Messages

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

  • 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

  • How to consume Web Service with Password digest from PLSQL

    We have Oracle 10g (10.2.0.3.0) 64 bit. We have a situation where we need to consume web service whose security header looks like as follow,
    <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:UsernameToken wsu:Id="UsernameToken-50">
    <wsse:Username>weblogic</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">d2enK45chjBPVvvukbYU6OX56kI=</wsse:Password>
    <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">YAhEtLJfp4lzycLd3hZYjQ==</wsse:Nonce>
    <wsu:Created>2013-01-22T06:28:38.897Z</wsu:Created>
    </wsse:UsernameToken>
    </wsse:Security>
    </soapenv:Header>
    Here we need passowrd digest, Nonce and Timestamp.
    How to create password digest from PLSQL? or if any other alternatives available please response soon.

    I do not see why it will not be possible to do digest authentication with a web server using PL/SQL.
    As for the digest password - the web server supplies a token (a nonce) which you need to use for creating the hashed authentication token (the digest password). The URL I posted explains this authentication process.
    As for the technical how-to in PL/SQL - as I mentioned, never had to do this (only dealt with Basic and NTLM authentication thus far). But as other auth methods (such as Microsoft's NTLM) can be implemented, I do not see why digest authentication could not.
    Suggest you spend some time googling for technical articles/sample code on the subject - and try to find specific PL/SQL related sample code too.

  • 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

  • Can i use flex to consume web services?

    I am not a Flex developer and before delving into it I want
    to be sure that it satisfies my project requirements. Mainly,
    consuming web services. the other part of the project are a bunch
    of buttons and graphs that constitute any GUI. so I think Flex can
    handle this part as good as Flash.
    Currently, I am using flash but my current client insists on
    using flex. so my question is: can I develop in Flex whatever I can
    develop in flash? or are there limitations?

    If you are developing applications in Flash, then you will
    love Flex. Flex will make you much more productive than Flash for
    producing applications of any complexity. You can do at least
    "most" of what you can do in Flash, and more. There might be a few
    things you can do only in Flash, or more easily in Flex, but your
    client has it right. They want Flex and they should want it. Check
    out the FB3 help for the WebService, RemoteObject, and HTTPService
    components.

  • Error consuming Web service from an ABAP Program

    Hello guys,
    I'm trying to consume a Web Service that is exposed in the internet. The conecction to the Web Service its via SSL.
    I'm having a problem at the moment I call the web service from my abap program.  But I'm able to test the same web service, from the SE80 tx with out trouble.
    I have identify that there is a difference in the SOAP envelope, that its received in the Web service, when I call it from the test enviorment and when I call it from the program. 
    This is how it is received from the TEST tool (a succesfull call of th WS) :
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Header><n0:Trace xmlns:n0="http://www.sap.com/webas/630/soap/features/runtime/tracing/"><TraceLevel xmlns="http://www.sap.com/webas/630/soap/features/runtime/tracing/">Error</TraceLevel></n0:Trace></soap-env:Header><soap-env:Body><nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"><body>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;Mensaje&gt;&lt;RutEmpresa&gt;&lt;Numero&gt;76555400&lt;/Numero&gt;&lt;Digito&gt;4&lt;/Digito&gt;&lt;/RutEmpresa&gt;&lt;RutUsuario&gt;&lt;Numero&gt;12307972&lt;/Numero&gt;&lt;Digito&gt;8&lt;/Digito&gt;&lt;/RutUsuario&gt;&lt;Convenio&gt;58422&lt;/Convenio&gt;&lt;Pin&gt;aro79728&lt;/Pin&gt;&lt;Archivo&gt;&lt;Tipo&gt;PPR&lt;/Tipo&gt;&lt;Plantilla&gt;2142970592&lt;/Plantilla&gt;&lt;Nombre&gt;cargatest174.txt&lt;/Nombre&gt;&lt;Cuerpo&gt;&lt;![CDATA[G126919727     JORGE CRISTIAN VARGAS ROMERO                                                     0000VVC01600000000000000000000245FAC0000000089900032000021030000010000000000190000   2910200714082008Boletas honorarios|]]&gt;&lt;/Cuerpo&gt;&lt;/Archivo&gt;&lt;Fecha&gt;20080814&lt;/Fecha&gt;&lt;/Mensaje&gt;</body></nr1:putXMLDocument></soap-env:Body></soap-env:Envelope>
    And this is how  it is received when I consume the web service from the ABAP program.
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Header><n0:Trace xmlns:n0="http://www.sap.com/webas/630/soap/features/runtime/tracing/"><TraceLevel xmlns="http://www.sap.com/webas/630/soap/features/runtime/tracing/">Error</TraceLevel></n0:Trace></soap-env:Header><soap-env:Body><nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"><body>&lt;?xml version="1.0" encoding="utf-8" ?&gt;&lt;nr1:putXMLDocument xmlns:nr1="http://bel.bci.cl/WsBEL/services/Carga"&gt;&lt;body&gt;&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;Mensaje&gt;&lt;RutEmpresa&gt;&lt;Numero&gt;76555400&lt;/Numero&gt;&lt;Digito&gt;4&lt;/Digito&gt;&lt;/RutEmpresa&gt;&lt;RutUsuario&gt;&lt;Numero&gt;12307972&lt;/Numero&gt;&lt;Digito&gt;8&lt;/Digito&gt;&lt;/RutUsuario&gt;&lt;Convenio&gt;58422&lt;/Convenio&gt;&lt;Pin&gt;aro79728&lt;/Pin&gt;&lt;Archivo&gt;&lt;Tipo&gt;PPR&lt;/Tipo&gt;&lt;Plantilla&gt;2142970592&lt;/Plantilla&gt;&lt;Nombre&gt;cargatest174.txt&lt;/Nombre&gt;&lt;Cuerpo&gt;&lt;![CDATA[G126919727 JORGE CRISTIAN VARGAS ROMERO 0000VVC01600000000000000000000245FAC0000000089900032000021030000010000000000190000 2910200714082008Boletas honorarios|]]&gt;&lt;/Cuerpo&gt;&lt;/Archivo&gt;&lt;Fecha&gt;20080814&lt;/Fecha&gt;&lt;/Mensaje&gt;&lt;/body&gt;&lt;/nr1:putXMLDocument&gt;</body></nr1:putXMLDocument></soap-env:Body></soap-env:Envelope>
    As you can see, it is generating a nr1:putXMLDocument tag, that it should not go there.
    Why do you think that this situation is happening? Please guys, this is very important, and need your help.  Thanks in advance.
    Samuel.

    BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
    Calling WebServices from ABAP via HTTPS
    Consuming Web Service from ABAP by Durairaj Athavan Raja
    Search on SDN wiki, and you will find above mentioned links.

  • Consume web service from a PAR file

    Hi All,
    Is it possible to consume web service from a PAR file? If yes, can you please give me an example / link.
    Appreciate your help.
    Thanks,
    Vimukta

    << Do not post the same question across a number of forums >>

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

  • Consuming web service in PI 7.3 and creating file

    Hi,
    I need to consume web service in PI 7.3 and create file from response. I have WSDL for the web service. Now confused about datatype/message type. Is there any document/note to follow?
    thanks,
    7Z

    I need to consume web service in PI 7.3 and create file from response. I have WSDL for the web service. Now confused about datatype/message type. Is there any document/note to follow?
    ==>
    Hi,
    There are 2 ways you can do this :-
    If your sender is a file and receiver is a webservice and you want to map the response back to the file then :-
    Sol 1 :- Async-Sync Bridge using RequesResponse Oneway bean
    Sender File channel ---> Soap Receiver Channel
    Soap Receiver Channel brings the response back to the File Receiver Channel.
    Now this File Receiver Channel should be called inside the Sender File Channel using the above bean.
    Data Type :
    Src - File struc to SOAP request (WSDL used as an external definition)(mapping 1)
    SOAP response(WSDL used as an external definition) to Tgt File Struc (mapping 2)
    Sol 2 :- Async Scenario
    Make a Sender File Channel --> use SOAP lookup channel (pass the request payload through the SOAP receiver channel) --> Map the response back to the File using File Receiver Channel.
    Data Type:
    Src - File struc to Tgt File Struc (mapping 1). Since you are passing the request payload through SOAP lookup in the UDF itself.
    ======================================================================

  • 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

  • Consuming Web Services in 11.2 does not work (UTL_DBWS)

    Hello
    i read some documents for consuming web services on the internet , but i get an error when i call add_numbers function as follows:
    i connected on WSUSER , then
    SQL> select add_numbers(1,3) from dual;
    The Error message is:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.IllegalAccessException: java.lang.ExceptionInInitializerError
    ORA-06512: at "WSUSER.UTL_DBWS", line 193
    ORA-06512: at "WSUSER.UTL_DBWS", line 190
    ORA-06512: at "WSUSER.ADD_NUMBERS", line 25"
    I use the following steps to setup the UTL_DBWS :
    1-     Create new user 'WSUSER'
    2-     Run the UTL_DBWS scripts ( utl_dbws_decl.sql , utl_dbws_body.sql) on WSUSER.
    3-     Execute this command
    loadjava -u scott/tiger -r -v -f -genmissing dbwsclientws.jar dbwsclientdb11.jar
    4-     Log in as sys and grant these privileges to our new user:
    execute dbms_java.grant_permission('WSUSER','SYS:java.util.PropertyPermission','http.proxySet','write');
    execute dbms_java.grant_permission('WSUSER','SYS:java.util.PropertyPermission','http.proxyHost', 'write');
    execute dbms_java.grant_permission('WSUSER','SYS:java.util.PropertyPermission','http.proxyPort', 'write');
    execute dbms_java.grant_permission('WSUSER','SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar','');
    execute dbms_java.grant_permission('WSUSER','SYS:java.lang.RuntimePermission','getClassLoader','');
    execute dbms_java.grant_permission('WSUSER','SYS:java.net.SocketPermission','*','connect,resolve');
    execute dbms_java.grant_permission('WSUSER','SYS:java.util.PropertyPermission','*','read,write');
    execute dbms_java.grant_permission('WSUSER','SYS:java.lang.RuntimePermission','setFactory','');
    execute dbms_java.grant_permission('WSUSER','SYS:java.lang.RuntimePermission', 'createClassLoader', '' )
    5-     Create add_numbers function on wsuser to test utl_dbws:
    CREATE OR REPLACE FUNCTION add_numbers (p_int_1 IN NUMBER,
    p_int_2 IN NUMBER)
    RETURN NUMBER
    AS
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.call;
    l_wsdl_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_service_qname UTL_DBWS.qname;
    l_port_qname UTL_DBWS.qname;
    l_operation_qname UTL_DBWS.qname;
    l_xmltype_in SYS.XMLTYPE;
    l_xmltype_out SYS.XMLTYPE;
    l_return NUMBER;
    BEGIN
    l_wsdl_url := 'http://www.oracle-base.com/webservices/server.php?wsdl';
    l_namespace := 'http://www.oracle-base.com/webservices/';
    l_service_qname := UTL_DBWS.to_qname(l_namespace, 'Calculator');
    l_port_qname := UTL_DBWS.to_qname(l_namespace, 'CalculatorPort');
    l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'ws_add');
    l_service := UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
    service_name => l_service_qname);
    l_call := UTL_DBWS.create_call (
    service_handle => l_service,
    port_name => l_port_qname,
    operation_name => l_operation_qname);
    l_xmltype_in := SYS.XMLTYPE('<?xml version="1.0" encoding="utf-8"?>
    <ws_add xmlns="' || l_namespace || '">
    <int1>' || p_int_1 || '</int1>
    <int2>' || p_int_2 || '</int2>
    </ws_add>');
    l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
    request => l_xmltype_in);
    UTL_DBWS.release_call (call_handle => l_call);
    UTL_DBWS.release_service (service_handle => l_service);
    l_return := l_xmltype_out.extract('//return/text()').getNumberVal();
    RETURN l_return;
    END;
    6-     Test the function
    Select add_numbers(1,2) from dual
    on the test i get the error message :
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.IllegalAccessException: java.lang.ExceptionInInitializerError
    ORA-06512: at "WSUSER.UTL_DBWS", line 193
    ORA-06512: at "WSUSER.UTL_DBWS", line 190
    ORA-06512: at "WSUSER.ADD_NUMBERS", line 25
    anyone have an idea to resolve this error .
    thanks alot

    Hi.
    Looking at the code, it seems it is my article you are asking about.
    http://www.oracle-base.com/articles/10g/utl_dbws10g.php
    I've just run through it on an 11.2 instance and it works fine for me.
    Make sure your server has access to the Internet and make sure the java classes are loaded successfully.
    Cheers
    Tim...

  • 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

  • How to consume web service in Agentry in SMP 3.0

    Dear All , I am using web service in Agentry to retrive data but could not able to fetch it . I have made connection with HTTP-XML for consuming webservices. and also give proper information in Agentry.ini files Ex : [HTTPXML-2] name=HTTP-XML Back End authenticationCertificateStore=MY authenticationCertificateStorePassword= authenticationCertificateStorePasswordEncoded=false autoDequote=true ;baseURL=http://localhost:81 baseURL=http://sapes1.sapdevcenter.com:8080/sap/opu/odata/iwbep/gwdemo/ basicAuthenticationPassword=123456 basicAuthenticationPasswordEncoded=false basicAuthenticationUserID=P1466405733 constantsFile=httpxml_sd.ini enableAuthentication=false enablePreviousUserAuthentication=false httpConnectTimeout=300 httpReceiveTimeout=300 httpResolveTimeout=300 httpSendTimeout=300 listenOn= timeout=300 timeZoneName= useSSL=false xmlAllowXSLTScript=true xmlNamespaces= xmlResolveExternals=true xmlValidateOnParse=true for more information i have attached agentry XML screen shot as well . Can you please guide me how to consume web services in Agentry correct way ? Note : Currently i am using standard netweaver demo web services . Thanks & Regards ,   Kunal Varaiya
    Tags edited by: Michael Appleby

    The XML Steps URL will be added to the Agentry.ini BaseURL.  So you dont' need the full URL on the step.
    So when Agentry Runs the step to call the backend it will go:
    <BaseURL>/<Step's URL>
    This way if you need to change the base URL, IE, going from Dev to QA to Production Server you only need to change the Base, and not go into every step and update it.
    URL: This attribute contains the URL to which the Agentry Server will make a request. This value will be appended to the value configured as the base URL for the HTTP-XML system connection. This base URL is configured within the HTTP-XML system connection configuration options for the Agentry Server. Proper use of both this base URL option and the URL entered in the requests of the step definitions can support portability for the application, with the base URL being the implementation-specific portion and the step’s URL being the portion not likely to change for the same back end system from one implementation to the next.
    http://help.sap.com/saphelp_smp303sdk/helpdata/en/7c/143d5d70061014b323be16eb0b0a77/frameset.htm 
    Stephen

  • Using Web Dynpro authentication for a Web Service call

    Hi all,
    I want to develop a Web Dynpro that calls a Web Service running on the same Web AS (7.0). The Web Dynpro will be integrated in a Portal. The web service that has to be called is automatically generated when we create a guided procedure :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/44c59fd7c72e84e10000000a155369/frameset.htm
    In my Web Dynpro, I imported the WSDL of this WS and created a model.
    The first time I tried to call the WS in my Web Dynpro I got an authentication error :
    Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://<myHostName>:50100/GPRuntimeFacadeWS/GPProcessExposing?style=document&pid=CA544E9B629A11DB91480017A48D672A&pver=0.5"
    So I hard-coded an HTTP authentication :
         model._setUser("myWASuser");
         model._setPassword("myPassword");
    And the Web Service call now works.
    Now the next step is that the WS call is made by the user that runs the Web Dynpro. So I found this documentation :
    http://help.sap.com/saphelp_nw04/helpdata/en/59/e8e95d1eba48dfa86ae91ad8816f5d/frameset.htm
    It would resolve my authentication problem, AND the transport issue : at the moment the Web Service URL is stored in the Logical Port of the WD model, and at transport time, a rebuild of the WD project will be needed.
    So I applied what is said in the doc : from the point of view of the Web Service consumer, I just had to add :
        model._setHTTPDestinationName("STARTGP");
    (where STARTGP is the name of the destination I created in the Visual Administrator with a "Logon Ticket" authentication.)
    before the execute(), and I removed my hardcoded authentication.
    Unfortunately, nothing changes... I still get a 401 authentication error.
    Does anyone have an idea about this ? Or maybe a workaround ?
    Thanks in advance for any suggestion.
    Regards,
    Julien

    Hello Julien,
    I have a scenario similar to yours. A client webdynpro application accessing a EJB methods exposed as web service. Those EJB's methods calls R3 RFC's. The client requirements' was to allow SSO through all the layers (Webdynpro -> EJB WS -> RFC). The Webdynpro and EJB's are deployed on the same WAS.
    Solution:
    1 - Create a RFC Destination on Visual Administration provide the R3 connection parameters and set the Authentication for "Current User (Logon Ticket)". Save your Destination;
    2 - In your EJB Project open your Web Service Configuration, on the Security page, set:
        Authentication Mechanism: HTTP Authentication
        Basic (username/password)
        Use SAP Logon Ticket
    3 - In your EJB, implement the following code to create JCO Client for the RFC invocations:
    Object obj = ctx.lookup(DestinationService.JNDI_KEY);
        DestinationService dstService = (DestinationService) obj;
        RFCDestination dst = (RFCDestination) dstService.getDestination("RFC", "<YOUR_RFC_DESTINATION_NAME>");
        Properties jcoProperties = dst.getJCoProperties();
        JCO.Client jcoClient = JCO.createClient(jcoProperties);
    4 - In your EAR Project, open your "application-j2ee-engine.xml" and add the References:
         "tc/sec/destinations/service" as Service
         "tc/sec/destinations/interface" as Interface.
    5 - Create your EAR File and Deploy;
    6 - Check if the web service now requires Authentication: go to http://<host>:<port>/index.html and click on Web Services Navigator. Test your Web Service. Your Web Service should requiere you to log in before execute the test;
    7 - Go back to your Visual Administrator and create a HTTP Destination. Provide your WS URL (should be something like "http://<host>:<port>/<WS_NAME>/Config1?style=document"). Choose Authentication: Logon Ticket. Save your Destination;
    8 - Go to your webdynpro project, import your WS Model. (If you have already created it, you have to delete it and import it again, refer to this blog on how to reimport WS Models: /people/bertram.ganz/blog/2005/10/10/how-to-reimport-web-service-models-in-web-dynpro-for-java  How To Reimport Web Service Models in Web Dynpro for Java );
    9 - Open your model's Logical Ports node, go to the Security tab, and choose "Use SAP Logon Ticket";
    10 - In your webdynpro code, before you call the ws invocation (should be something like that: <YOUR_NODE_DEFINITION>.modelObject().execute();), include the following line:
    <YOUR_NODE_DEFINITION>.modelObject()._setHTTPDestinationName("<YOUR_HTTP_DESTINATION_NAME>");
    11 - Save All Metadata and deploy your Webdynpro App. Test your results.
    I hope it helps you, as the documentation on how to implement this scenario is scattered through the SDN and all the SAP help portal.
    Best regards,
    Paulo.

Maybe you are looking for

  • Date Format in Zreport similar to the default date format set using su01.

    Dear All,             I have a requirement as to change the date format in Zreport as the one which is set in default date format for the user in Su01 tcode. Ex.. If the user has set the default date format in SU01 as ' YYYY-MM-DD' , in report also,

  • Generate MF_password for a JCOP applet to access mifare ?

    Where can I download any tools to generate MF_Password? I find nothing in the Philips website. Or I should implement a generation function within the applet? Great thanks! ^_^

  • TutWD_FlightList_Init .project file missing

    Hello, I am trying the TutWD_FlightList_Init tutorial.  I have downloaded the project. For the first time I could successfully import this project into my workspace , however while creating model i was getting jjava.lang.NullPointerException. So also

  • Mac Book Pro 2011, i need help!!!

    Hello!! After upgrade system to Mountain Lion, my battery life stay so short! 100%= 90 minuts! Why so happend? What can i do for long life my battery? Best regads, Alexey

  • Preview fails to resize Photoshop JPEGs

    I have a 2013 Retina MBP on Yosemite, with a licensed copy of Photoshop CC. My problem is, Preview cannot deal with JPEGs I am creating in Photoshop. Preview is really sluggish when it loads the images, and is unable to resize them. It appears to do