Connect Web Dynpro Application to a Web service

Hi experts,
I am trying to connect a Web Dynpro application to a SOAP Web service.
I have downloaded the WDSL code and save it to a file in my hard disk.
I used the create model wizard (Import adaptive web service model) and created a model in my Web Dynpro application.
I have connected the component controller with the model and the view of the application to the controller.
All content node elements that have created automatically in the model, have in cardinality property the value 0..1.
I created input elements in the view but they are gray and not available (disabled).
The read only properity of the input elements has the value "false".
I tried to initiate the input element by putting the following code in wdDoInit() but with no luck.
wdContext.nodeRequest_ProcessTransaction().nodeProcessTransaction().nodeTransactionRequest().nodeHeader().nodeMerchantInfo().currentMerchantInfoElement().setAcquirerID("xxxx");
Can someone help with this?
Thanks in Advanced.

Hi,
After importing the model, you need to create the instance for the model. Instantiate the Request object and then set the input parameters. Then you have to call the execute function, then the model will be executed and you will get  the data.
Also instead of putting the code which you have wriiten in init, you can use:
wdContext.nodeMerchantInfo().currentMerchantInfoElement().setAcquirerID("xxxx");
You can directly access the node, no need to traverse the whole hierarchy.
Regards,
Manoj

Similar Messages

  • HOW TO: Connect web service (remote application module) to existing model

    Hello.
    I have J2EE application which displays some data in an applet, which reads them by a web service. I'd like to use persistence and connect with a web service called by applet to my current model set within a session. I tried to pass a session id to web service (to a function of an application module implementation). I wanted to create a new SessionCookie instance with such a session id and application id which are used for web application session (by ApplicationPoolImpl.createSessionCookie() or with custom session cookie factory). But I don't know how to pass a session and application ids to a sessioncookie creation process (ApplicationPool environment). I tried to use custom EnvInfoProvider, which set my properties, but it passes the params after a SessionCookie instance is created.
    Samples ... AppModuleServer - file generated to provide ws functionality. I changed code to use EnvInfoProvider:
    public class AppModuleServer extends Object{
      public AppModuleServer(){}
      public SomeObject[] myCustomFunction(String sessionId){
        AppModuleImpl _am = null;
        String appId="someValue";
        CustomEnvInfoProvider envProvider=new CustomEnvInfoProvider(appId, sessionId);
        try{
          _am=(AppModuleImpl)Configuration.createRootApplicationModule("data.AppModule", "AppModuleLocal", envProvider);
          return _am.myCustomFunction(sSessionId);
        finally{
          if (_am != null)Configuration.releaseRootApplicationModule(_am, false);
    }CustomEnvInfoProvider:
    public class CustomEnvInfoProvider implements EnvInfoProvider{
      private String applicationId;
      private String sessionId;
      public CustomEnvInfoProvider(String applicationId, String sessionId){
        this.applicationId=applicationId;
        this.sessionId=aessionId;
      public Object getInfo(String info, Object environment){
        if(info==null)return null;
        return ((Hashtable)environment).get(info);
      public void modifyInitialContext(Object environment){
        if(applicationId!=null)((Hashtable)environment).put("CookieApplicationId", applicationId);
        if(sessionId!=null)((Hashtable)environment).put("SessionId", sessionId);
      public int getNumOfRetries(){
        return 2;
    }Does anybody knows how to pass information from custom EnvInfoProvider just before a SessionCookie is created (e.g. how to run modifyInitialContext() function). Or another way how to pass these information from a web service base function into ApplicationPoolImpl instance. E.g., there is parameter "properties" whithin a createSessionCookie method of ApplicationPoolImpl, which is null during calling. Is it possible to pass there some additional information?
    Thanks for any suggestions.

    Use the Web Service Proxy wizard in JDeveloper to create a class that calls your Web service, and then call this class from code in your AM.
    http://docs.oracle.com/cd/E16340_01/web.1111/b31974/web_services.htm#CJAHGIEF

  • Database connection Web Service state

    If a Web Service conntects to a database, when should I connect and when should I disconnect? I want to hold the same connection during multiple Web service calls. I use JWSDP 1.0.

    Have your service implementation class implement javax.xml.rpc.server.ServiceLifecycle. Create the connection in the init() method and close it in the destroy() method.
    Mike

  • Connect web service to ERP

    Hi,
    We have created a Web service from a java class using SAP Neatweaver developer studio. The web service works fine. It takes some inputs and makes changes to a java table stored on our SAP Enterprise Portal.
    We would like to add the following functionality to the web service. We want the web service to connect to our ERP system and store some values there. Our ERP has an abap function module that can accept values and make the necessary changes.
    Is there a way to do so?
    Thanks in advanced

    Hi,
    We import the com.sap.jco packages and we wrote the following code in our class (web service) :
    Client client = JCO.createClient("200", "user", "password", "EL", "servername", "01");
    client.connect();
    Repository repository = new JCO.Repository("SAP", client);
    IFunctionTemplate functionTemplate = repository.getFunctionTemplate("function_module");
    Function function = functionTemplate.getFunction();
    ParameterList parameterList = function.getImportParameterList();
    parameterList.setValue("Value1", "Variable1");
    parameterList.setValue("Value2", "Variable2");
    parameterList.setValue("Value3", "Variable3");
    parameterList.setValue("Value4", "Variable4");
    client.execute(function);
    The problem now is that we get the following message when we test the web service:
    "An error has occurred. Maybe the request is not accepted by the server:
    com/sap/mw/jco/JCO$BasicRepository"
    Can anyone help us find the problem?
    Thnaks in advanced.

  • UD Connect, DB Connect, Web Services

    Hi Guys,
    I am preparing for BI 7.0 Certification. I am reading help.sap.com. Can anyone send any simpler documentation basically beginner level documentation on the following topics:
    1. Web Service DataSources and SAP NetWeaver XI / SAP NetWeaver BI Integration
    2. Database Connect
    3. Universal Data Connect and Universal Data Integration

    Hi,
    check the link :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/frameset.htm

  • ADOBE Connect Web Service Transaction ID

    Hi All,
    Hope I can make my question clear, but here goes.
    We are integrating an LMS into ADOBE Connect , so far so good. Managed to write all our intergration classes and all is working great. My question is as follows, If we launch a URL (SCO Content) the content launches and we can see the "attempt" via the report-user-training-transcripts webservice. This works well if we assume that all attempts are going to be logged and the users internet is working correctly etc.
    Is there a way when we launch to uniquely identify what the "transaction-id" will be. This means on our LMS side we know we launched with this transaction-id and when we read the transcript we can just filter for that specifictransaction-id. If there is no transaction-id this could be that the user closed before the content launched or there was a network issue.
    In short I want to know what SCO I am launching from the LMS to match the attempt with the transaction-id. I have tried to send through a custom field, but it does not pull through on the report..
    Any suggestions would help?
    Regards,
    Gavin

    Hi All,
    Hope I can make my question clear, but here goes.
    We are integrating an LMS into ADOBE Connect , so far so good. Managed to write all our intergration classes and all is working great. My question is as follows, If we launch a URL (SCO Content) the content launches and we can see the "attempt" via the report-user-training-transcripts webservice. This works well if we assume that all attempts are going to be logged and the users internet is working correctly etc.
    Is there a way when we launch to uniquely identify what the "transaction-id" will be. This means on our LMS side we know we launched with this transaction-id and when we read the transcript we can just filter for that specifictransaction-id. If there is no transaction-id this could be that the user closed before the content launched or there was a network issue.
    In short I want to know what SCO I am launching from the LMS to match the attempt with the transaction-id. I have tried to send through a custom field, but it does not pull through on the report..
    Any suggestions would help?
    Regards,
    Gavin

  • "Unable to log URL" error when importing WSDL into Web Service connection

    Hello Experts
    I'm using Xcelsius Engage and I'd like to use Web Service connection.
    I've developed my own Web service (that is using 2 other web service inside it).
    and now I'm trying to import it into the Xcelsius (connection --> Web service connection).
    And I get the follwoing error:
    "Unable to log URL"
    When I browse to my wsdl file in IE the file is loaded with no problem.
    When trying to import other URLs it also works fine (for example: http://www.xignite.com/xFinancials.asmx?wsdl)
    Any idea?
    Thanks,
    Miki

    Hi Matt
    Thanks a lot!!!
    Indeed the solution was in the follwoing thread:
    VB.net code to create XML
    Parsing the query result fixed the problem.
    For others who might have the same problem:
    Here's a working web service (C# code, for vb code follow the link to the thread above):
    public Service () {
        public struct QueryResult
          public string SlpName;
          public string Commission;
        [WebMethod]
      public QueryResult[] RunQuery()
          // Open Connection - Query Data from DB table - Close connection
          SqlConnection connection = new SqlConnection("Data Source=(local);Integrated Security=SSPI;Initial Catalog=SBODemoUS");
          SqlDataAdapter adapter = new SqlDataAdapter(
            "SELECT SlpName, Commission FROM OSLP", connection);
          DataTable DT_QryResult = new DataTable();
          adapter.Fill(DT_QryResult);
          connection.Close();
          // Parse data to be forward to Xcelsius
          QueryResult[] QryRes = null;
          QryRes = new QueryResult[DT_QryResult.Rows.Count];
          int i=0;
          foreach (DataRow row in DT_QryResult.Rows)
            QryRes<i>.SlpName = row["SlpName"].ToString();
            QryRes<i>.Commission = row["commission"].ToString();
            i++;
          return QryRes;
    Best regards,
    Miki

  • Problem with XI web service,

    Create webDynpro DC try to connect web service in XI side, I have created Adaptive web service, set up username and password in Visual Administrator, point url to a uddi wsdl, but when i try to run the application , I got error says "InvocationException occurred invoking method" when i try to new the model class.
    the other thing is that the some wsdl files with location field like "http://server:port/sap/xi/engine?type=entry&version=3.0&Sender.Service=BS_ESALES_PORTAL&"
    and other wsdl files with location field like ""http://server:port/XISOAPAdapter/MessageServlet?Version=3.0&Channel=:"
    which wsdl format is the correct way in order to let webDynpro application to call it. Please help me if you have an idea, thanks a lot!

    Hao fan,
    If you are using SOAP as your sender adapter then your second one is good. Also please check this document on how to post it to XI using SOAP:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40611dd6-e66e-2910-f383-e80fb44f9cd4
    The first one we will use when you post directly to integration engine instead of uisng SOAP adapter. Check this weblog by stefan on this:
    /people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
    So first you make sure how you are sending data to XI. Then create a WSDL according to that and then test your webservice.
    ---Satish

  • Web service authorization problem

    Hi everyone,
    I am trying to call a web service that is located in SAP/R3 using XI.
    I do success calling this WS using C#.
    Now I want to use WebDynpro and having some dificulties.
    When I execute the application,I get the following error :
    Service call exception; nested exception is: java.net.ConnectException: Connection refused: connect
    Can someone help with that issue ?
    Thanks in advance.

    Hi David,
    Please check this thread...
    java.net.ConnectException: Connection refused: connect - Web Service
    Hope it helps!
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Web Services - Quiz Takers scores are zero for Meetings

    Hello,
    I am using the Adobe Acrobat Connect Web Services to read data from a Connect Pro Hosted account.
    I have a piece of content (a SCORM quiz) which I am able to get scores from if I query the piece of content directly (using the "report-quiz-takers" action). Anyone who has taken the quiz by opening the content directly (via the direct URL) have scores I can get at.
    However, if that same quiz is shared while inside a meeting, I can't get the scores or max-scores of the quiz attempts. They all come up as "0" (zero). Actually, max-score is blank, and score is always zero. The best I can get is "Status" which will be "Completed" or "Incomplete".
    Any idea why the score always comes up "0" if a person takes the quiz while inside a meeting?
    Any help greatly appreciated!
    -Jeff

    Hello Jawahar
    If you run your (RFC-enabled) function modules using the SAP-GUI (i.e. in dialog) then the GUI automatically replaces leading zero when the function module returns any data. However, calling the same function module remotely you will always see these leading zeros.
    These so-called conversion exits are defined as attribute of domains in the ABAP dictionary. If the function module used for the WebService is a standard fm then you have little chances to get rid of the leading zero. Perhaps the WebService has some attribute to suppress conversion exits or activate them when retrieving the data.
    Regards, 
       Uwe

  • Adobe Connect Web Sevices - CMS Integration

    Hello,
    our company would like to intrgrate Adobe Connect Pro with e-learning solution using Adobe Connect Web Services API.
    It seems possible http://www.adobe.com/devnet-archive/acrobatconnect/articles/firstapp.html
    Here are our questions:
    Q1: If we buy license for Adobe Connect Pro eg: 5 hosts 100 users, can we already use Adobe Connect Web Services API? Or do we need to host Adobe Connect Server ourselves to use it? It seems logical, that its possible in both cases hosted and SAS (software as service from adobe). But we need to be sure.
    Q2: 1 host is 1 person than can manage 1 conference at a time. Is this 1 host bound to 1 adobe id account?
    Q3: we want to be able to have up to 20 simultaneous conferences in each 20 participants. Analog to 20 classrooms 20 students each. What kind of license must we buy?
    I called adobe support, no clear answer, called resellers, the same, Hope hiere someone will know.
    thanks,
    Sylwester

    Muse itself publishes all the html pages to the same folder and hence assumes that there is no multi-level folder structure for html pages. Please note that Muse uses document-relative referencing in menus i.e. href="index.html" and not root-relative referncing i.e. href="/index.html". Now if you add some third party content/link that leads to a page/content inside a directory or URL referring to a subdirectory, then a menu link referring to "index.html" would actually be referring to an index.html page in the current subdirectory and hence breaking the original intended reference.
    To get around this, a simple workaround is to use the Manual mode of menu creation and explicitly specify /index.html or /about.html, etc for the menu item hyperlinks. This would help you create a menu with links using root-relative referencing that will not break even when you go deeper into subdirectories.
    Hope this helps.
    Cheers,
    Vikas

  • Error while implementing a web service in web dynpro application

    HI All,
    I am trying to use a webservice in a web dynpro application.
    Web service description:- This is a very simple application which takes two String inputs and when submitted displays the string in the concatenated form.
    Web dynpro:- I used this web service in the web dynpro as an adaptive web service model.
    The Layout design consists of two input fields which are mapped to the request fields
    ex : - Request_Add.Add.S1 and Request_Add.Add.S2
    A text area to display the response:- Request_Add.Response.AddResponse.Response
    And a button which invokes the execute method
    public void onActionWebserviceCall(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionWebserviceCall(ServerEvent)
        wdThis.wdGetWebserviceCompController().executeRequest_Add();
        //@@end
    When I am trying to run the application I am getting error:-
    Exception on execution of web service with WSDL URL 'http://<Host>:<Port>/EjbWebservice/Config1?wsdl' with operation 'add' in interface 'EjbWebserviceVi_Document'
    Kindly reply.
    Thanks
    Neha

    Hi,
    Yes I have tested the web service in Navigator . The WSDL is also properly generated.
    I have not publish the web service in UDDI but as per my understanding this is not necessary. please correct me if I am wrong.
    Thanks
    Neha

  • Connection refused While Calling a Web Service from WebDynpro Application.

    Hi all,
    I've created a Webdynpro application by importing a WSDL file which is created from a
    Web Service from XI.
    While I run this Application, and while it tries to connect to XI, I am getting following
    error.
    <b>Service call exception; nested exception is: java.net.ConnectException: Connection refused</b>
    Can Someone please help me out on this issue?
    Thanks in advance,
    Tejas.

    Hi,
    In my WebDynpro Application which is created by Importing a WSDL file from XI Web
    Service is giving error : <b>Service call exception; nested exception is: java.net.ConnectException: Connection </b>
    In NWDS-> Windows Menu-> Preferances -> Wrokbench -> Proxy Settings
    Use Proxy Settings is <b>Checked</b>.
    My Settings in Model's Logical Port is
    <b>Use HTTP Port</b> is <b>Checked</b>.
    In Securities-> <b>Authentication</b> is set to '<b>None</b>'
    With this While I Execute the Application and when it tries to connect to XI..it throws
    an error :
    Service call exception; nested exception is: java.net.ConnectException: Connection
    refused
    Kindly help me on this issue.
    Thanks in advance,
    Tejas.

  • Unable to consume secured Web service from a Dynpro application

    Hello,
    I have followed <a href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/bac36a469e4c75aba646077e71516d/frameset.htm">this tutorial</a>
    in order to protect and consume a secured Web service from a Dynpro application using SAP logon ticket.
    The problem is that after implementing everything needed I  receive 401 Unauthorized when I am trying to consume it from the web dynpro side.
    If I manually transfer the request the credentials, before the execute i.e:
    modObj._setUser
    modObj._setPassword
    modObj.execute();
    I am able to call it, meaning the dynpro application doesn't transfer these credentials to the Webservice even though it's authentication property is set to true.
    Any idea how to solve it?
    Roy
    Message was edited by:
            Roy Cohen

    Try below steps
    • Add jars
    o security.class
    o tc/sec/destinations/interface
    • Setting WebDynpro project property
    o Project>Properties>Web Dynpro References-->Interface references
    &#61607; Name=tcsecdestinations~interface
    o Project>Properties>Web Dynpro References-->Service reference
    &#61607; Name=webservices
    &#61607; Name=tcsecdestinations~service
    • Dynamically Set httpdestination and Call web service
    final InitialContext ctx = new InitialContext();
    final DestinationService dstService = (DestinationService)ctx.lookup(DestinationService.JNDI_KEY);
    if (dstService== null)
    throw new NamingException ("Destination service not available");
    final Destination destination = dstService.getDestination("HTTP"," DestinationName");
    // getting user name
    Properties destprop = destination.getDestinationProperties();
    String username = destprop.getProperty("USERNAME");
    String password = destprop.getProperty("PASSWORD");
    final HTTPDestination httpDestination = (HTTPDestination) destination;
    HttpURLConnection httpConnection = httpDestination.getURLConnection();
    String httpURL = String.valueOf(httpConnection.getURL());
    Request_AdvLocationVer1ViDocument_getLocation obj=wdContext.currentRequest_AdvLocationVer1ViDocument_getLocationElement().modelObject();
    obj._setUser( user );
    obj._setPassword(pass);
    obj._setEndPoint(httpURL);
    obj.execute();
    Rahul

  • Web-dynpro application -ERROR: ICF service node "/sap/bc/webdynpro/sap/zqm_cto_arr_general1" does not exist (see SAP Note 1109215) (termination: ERROR_MESSAGE_STATE)

    i have created my web-dynpro application in development. and sent to quality . whenever i will execute my dynpro in quality  i got one message
    ERROR: ICF service node "/sap/bc/webdynpro/sap/zqm_cto_arr_general1" does not exist (see SAP Note 1109215) (termination: ERROR_MESSAGE_STATE)
    whenever i saw  sicf  transaction my web-dynpro is not seen . my dynpro application name is more then 15 character. what i will do . please give me valuable suggestion.....

    Hi Ashok,
                   for your requirement the application is not exist in particular place. It means, the webdynpro application is saved at different package or different location.
                  Please change the webdynpro component name and save it in particular request in package, then transport it to quality ..(development server )
    then go to SICF  t.code .. sap->bc->webdynpro->sap->find  out your application and activate the service of your webdynpro application.
    Now test it ... this solution might helpful to you .
    Regards,
    Naveen M

Maybe you are looking for

  • Issue of Excise Duties in Foreign Currency in J1IIN

    Dear All, As one of my user has created Export Excise Invoice on 31st of May.  Unfortunately Exchange Rate was not maintained by him for currency Euro in OB08 and While creating the Excise Invoice all the duties came in EURO but the document currency

  • Why My Screen goes BLACK after gaming????

    *My Screen goes BLACK after gaming, or exiting Full Screen Mode*. The music keeps playing, but doesnt do anythin! It only shows the mouse pointer so i have to force shutdown. how can i see my desktop and windows??? And it isnt the batteries. Help me

  • Execute set of ddl scripts in pl/sql

    Hello, If I use DBMS_METADATA.GET_DDL and DBMS_METADATA.GET_GRANTED_DDL for a particular user I can get something like this: CREATE USER "USERB" IDENTIFIED BY VALUES 'B6C9E444D14CDE5B' DEFAULT TABLESPACE "PROD_TBSP_03" TEMPORARY TABLESPACE "TEMP"; GR

  • ORA-00480: LCK* process terminated with error

    RA-00480: LCK* process terminated with error very frequently getting this said error in our oracle 10g RAC database. We have Node1 / Node2, Node1 : we have scheduled jobs running & in addition to that end user access the database. Node2: 24*7 applica

  • Burning DVD RW's

    I have a Power Book 1.67 G4. I want to take a DVD+RW and be able to put it into my mac, write some data on it, eject it, and to be able to go back at a later date and be able add and remove data (but not nessisarely all the data that was on it) Can a