Access Application Services from Web Dynpro DC

Hi Experts,
We created a CAF DC which has an application service called ClientAppService, with a method findClientsById. We also created another DC, a Web Dynpro DC, which makes use of the model generated by the CAF DC. We have programmatic access to the application service through
ClientAppServiceProxy.findClientsById()
, but when running the DC which makes this call we receive the following error:
com.sap.caf.rt.exception.CAFBaseRuntimeException: Query with name findClientsById does not exist
We've managed to call Application Services before, but that was when the Web Dynpro was in the same DC as the CAF services. Any ideas on how to fix this?
Thanks,
JP

Hi Smith,
One of the possible reasons of this error is may be your CAF project is not properly deployed in the Server in which you have deployed your WebDynpro project. So during the execution of the WebDynpro project while it tries to invoke this findby from the Application Service of your CAF project it fails to find a match. May be by mistake you have deployed your CAF Application Service first and added the findBy method later. So if your properly deploy your total CAF project in the same server in which you have deployed your WebDynpro project it may resolve your problem.
Thanks and Regards
Avijit

Similar Messages

  • Accessing Portal Service from web dynpro : NoClassDefFoundError

    Hello Experts,
    I tried to develop a portal service (EquiService) and a web dynpro application (wdequset) which accesses the portal service. I put my web dynpro in an IView to show it in the portal. The service is running but when I try to open the IView I always get an error. I debugged my web dynpro application and found out that I didn’t get a reference to the service (portalEquiService is always null). See the following code and have a look to my comments.
    public void wdDoInit()
        //@@begin wdDoInit()
        String key = IEquiService.KEY;
         * Here I get the right key. That’s OK so far.
    //    IEquiService portalEquiService = (IEquiService)PortalRuntime.getRuntimeResources().getService(key);
         * When I use this line to get an instance of the service, I get the following error:
         * java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
         * The package "com.sapportals.portal.prt.runtime.*" is imported
         IEquiService portalEquiService = (IEquiService) WDPortalUtils.getServiceReference(key);
          * I found this in the "How to Access a Portal Service Within a WebDynpro Java Application" document.
          * When I use this line, I get the following error:
          * java.lang.NoClassDefFoundError: com/company/service/equi/IEquiService
          * The package "com.company.service.equi.IEquiService" is also imported.
        wdContext.currentContextElement().setEquinummer(portalEquiService.getEquiData().getEquiNr());
        //@@end
    When I have a look to the service in the portal I see that the service is running and the following additional lines under “Dependents”:
    service: psequinr|EquiService
    SAPJ2EE::company.com/wdequset
    So the service seems to know my web dynpro application (after debugging for the first time).
    Detailed error information 1 (when I try to get the reference by PortalRuntime.getRuntimeResources().getService(key) ):
    java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
         at com.company.service.ServiceCust.wdDoInit(ServiceCust.java:107)
         at com.company.service.wdp.InternalServiceCust.wdDoInit(InternalServiceCust.java:112)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:319)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:278)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:659)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:539)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
         at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Detailed error information 2 (when I tryto get reference by WDPortalUtils.getServiceReference(key) ):
    java.lang.NoClassDefFoundError: com/company/service/equi/IEquiService
         at com.company.service.ServiceCust.wdDoInit(ServiceCust.java:123)
         at com.company.service.wdp.InternalServiceCust.wdDoInit(InternalServiceCust.java:112)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:319)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:278)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:659)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:539)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
         at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Hope that anybody knows what could be wrong here.
    Thanks a lot.
    Rene

    The prtapi.jar is set in the classpath:
    <classpathentry kind="lib" path="C:/Programme/SAP/JDT/eclipse/plugins/com.sap.tc.ap/comp/SAP_JTECHS/DCs/sap.com/epbc.prtapi._api/_comp/gen/default/public/default/lib/java/prtapi.jar"/>
    and when I look in the portal (System Administration -> Support -> Portal Runtime -> Application Console), select my service and press the "show" Button, I see that the service has a dependency to my web dynpro application.
    service: psequinr|EquiService
    SAPJ2EE::company.com/wdequset
    So I think that the sharing reference of the web Dynpro should be ok. Or not?

  • Cannot access Portal Service from Web dynpro DC

    Hi all,
    I cannot access the portal service from my web dynpro dc.
    1. I created a Portal Service (say xxxservice) in a DC (say the DC name is testservice and the vendor is xx.com)
    2. Created a public part under the testservice DC and added my classes to it.
    3. Built and deployed the testservice DC.
    Now,
    4. I created a web dynpro DC.
    5. In the used DC section added the public part of the testservice DC and also the epbc.prtapi._api.jar for build time and runtime with strong qualifier.
    6. In the web dynpro "Sharing Reference", I added PORTAL:xx.com/testservice
    7. In the component controller, I am calling a method from the Portal Service.
    8. Built the web dynpro DC and deployed it.
    9. But at the run time it gives, NoClassDefFoundError on the xxxservice.
    I looked at many forum threads and tried everything. For eg: changed the Sharing Reference to PORTAL:sap.com/testservice but nothing works.
    Please do suggest me if I am missing something
    Thanks

    Hi Laxmi,
    I am sure something wrong at Portal Service DC creation. On webdynpro part you done fine .. by putting PORTAL:sap.com/testservice
    Check the below steps:
    1. Create DC Portal Applicaiton Stand alone (SDA)
    2. Add portal Service for the newly created portal service dc
    3. build and activate
    4. by default you should be get public part by name API which is compilation dependency
    5. here you dont need to do anything else
    6. on webdynpro just add the used dc to this API public part of portal service dc
    7. add PORTAL:sap.com/testservice  sharing reference
    If u go by this you shouldnt get any error..
    Now, u are saying something like ur own classes .. i think u are trying to put u r own classes to service.. but remeber portal service is to have only IYourService class and YourService class.. other classes should be made to be jar.. and add that jar to External library DC and create PPs compile & Assemble and add that DC to current service dc.
    Hope it is clear.. if not pls let me know..
    Thanks,
    Raags

  • CE 7.1 - How to call CAF services from Web Dynpro

    Hi,
    whats the suggested way to call caf services from web dynpro?
    Of course I can use the Web Service model. But can I call caf directly?
    I read something about caf web dynpro model, but I cannot find it in nwds 7.1. On some older tutorial it was in context menu of caf project, but it seems to be removed.
    best regards
    tom

    Hi ,
    The standard way is to use the web service model.
    You have to expose the the services as web service and then you can use the wsdl url in the Adaptive web service model option.
    The above option will be available when you click the Model in the webdynpro application and the click create new model.
    Hope it helps you.
    Regards,
    Srinivasan Subbiah

  • CAF DB Update for CAF Entity Service from Web Dynpro

    Hi all,
    I have created an entity service in CAF called “Contacts’ which contains the following attributes.
    phoneNo
    cellNo
    emailID.
    Another entity service called "Person" is created. This contains the following attributes.
    personId
    personName
    personAddr
    contactsRef. (Cardinality -> 0..n , Relational Type -> Composition)
    That means Contacts entity service is used within Person entity service. Now it is working fine within CAF service browser. Now the Web Dynpro DC of CAF application is used within another custom Web Dynpro DC project. I want to store data from Web Dynpro.
    Within the context of component controller of  Web Dynpro the structure is like
    APerson
         |_ personId
         |_ personName
         |_ personAddr
         |_ contactsRef       
                    |_ phoneNo (Under contactsRef)
                    |_ cellNo (Under contactsRef)
                    |_ emailID (Under contactsRef)
    So I have written the following code within web dynpro custom method.
    APerson person = PersonServiceProxy.create();
    java.util.List ls = new ArrayList();
    for(int i=0; i<4;i++)
    AContacts contact = ContactsServiceProxy.create();
    contact.setCellNo("9092130156");
    contact.setEmailID("[email protected]");
    contact.setPhoneNo("432258");
    contact.getAspect().sendChanges();
    ls.add(contact);
    person.setRelatedModelObjects("contactsRef",ls);
    person.setPersonID("9999");
    person.setPersonName("xyz");
    person.setPersonAddr("ABC, KOL");
    wdContext.nodeAPerson().bind(person);
    person.getAspect().sendChanges();
    CAFServiceFactory.getServiceFacade(idendityDefinition.class);
    After saving the data from Web Dynpro I am trying to test it from CAF service browser. But I am getting only the parent row. I mean only the value of personId, personName and personAddr fields which I have stored from Web Dynpro. But no value is coming within the table for Contacts entity service for composition relation.
    Could anybody help me how can I solve my problem?
    Thanks & Regards
    Chandan
    Message was edited by:
            Chandan Jash

    Hi Chandan,
    Can you do person.getRelatedModelObjects() and get the contact object, to check whether it is null, also check in the CAF DB whether the data you entered is present.
      I am not sure the code is actually adding the contact model object to person.
    Go thru this SDN Blog on usage of the CMI API's, there is a link for CMI documentation in it which might help you get the right code for adding the contact object.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115.
    award points if  info is helpful
    Regards,
    Anish

  • Authorization error calling a XI web service from Web Dynpro

    Hi all,
    I'm trying to communicate to XI from a Web Dynpro application but I get an Unauthorization error (401).
    I've generated a WSDL in XI and import it to web dynpro as a new Model. But when a I call the web service, the exception "Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized." appears.
    I don't know how to pass the right user and password from Web Dynpro, I've tried the web service from SOAP client tools and it works fine.
    I'll apreciate any help.
    Regards,
    Diego.

    Hola mi  nombre es Luis,
    Creyendo que eres español te escribo en tal idioma.
    He visto que a ti también te devolvía un error de autentificación 401, y que lo subsanaste, pero a mi con la solución que te dieron no me vale, ya que implemento el código que te ofrecieron para arreglarlo y ahora me da un fallo de "Server Error" poniendo en usuario y password, los correspondientes a XI.
    +Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay req=new Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay();
    wdContext.nodeRequest_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay().bind(req);
    req._setUser("username");
    req._setPassword("password");+
    No sé si es que ese usuario y contraseña son otros distintos.
    Si pudieras ayudarme, te lo agradecería.
    Un saludo, Luis

  • Access Portal Services within Web Dynpro

    Hi,
    I created a portal service and would like that some values of the same have to be set by a Web Dynpro application, but i have a problem to access this
    service. Always that a i try to get a reference of this service the object isn't instantiated and i get a null instantiated.
    What i`m trying to do is the broadcast message described in [/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1 |/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1]with a variation that need of some
    more Attributes and that the same will be pass by the Web Dynpro, like the broadcast message i`ll just use the alert concept and don't the publication.
    Follow below the describe of executed actions.
    1 - I did all the process as the [Weblog|/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1].
    2 - I generated the Jar and insert the same in a DC.
    3 - I generated the Web Dynpro application, in the used DCs and added the DC with the Jar, and i inserted the reference in a Sharing References. 
    4 - Did the deploy and insert the Web Dynpro in a Portal Iview.
    But always that i execute, i can't capture the reference of the service.
    Note: The reference in Sharing References was executed for several diferents forms of test, like for exemple:
    PORTAL:<vendor>/com.teste.broadcast
    PORTAL:com.teste.broadcast
    PORTAL:<vendor>/com.teste.broadcast.alertreceiver
    PORTAL:com.teste.broadcast.alertreceiver
    But always adding one at a time.
    Until put the saller like sap.com i already try.
    The creation of the service as described in the weblog can be accessed for a Web Dynpro? What the problem to access the Service??
    The codes follow Bellow.
    portalapp.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.portal.runtime.system.notification"/>
        <property name="ServicesReference" value="com.teste.broadcast"/>
      </application-config>
      <services>
        <service name="alertreceiver">
          <service-config>
            <property name="className" value="com.teste.broadcast.alertreceiver"/>
          </service-config>
        </service>
      </services>
    </application>
         BroadcastAppView.java
    import com.sap.security.api.IUser;
    import com.sap.tc.webdynpro.clientserver.portal.WDPortalUtils;
    import com.sap.tc.webdynpro.clientserver.portal.sf.WDPortalServiceType;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
    import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
    import com.sapportals.portal.prt.service.notification.INotificationService;
    import com.sapportals.portal.prt.service.notification.NotificationStringBufferPool;
    import com.sapportals.portal.prt.service.notification.StreamData;
    import com.sapportals.portal.prt.service.notification.TopicData;
    import com.sapportals.portal.prt.service.notification.TopicDataContainer;
    import com.teste.broadcast.Ialertreceiver;
    public void onActionSendMessage(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSendMessage(ServerEvent)
            IWDMessageManager msgManager = wdComponentAPI.getMessageManager();
            INotificationService notService = null;
            try {
                    notService =    (INotificationService)
                            WDPortalUtils.getServiceReference("com.teste.broadcast");
                    //notService =  (INotificationService)
                    //      WDPortalUtils.getServiceReference("com.teste.broadcast.alertreceiver");
                    //notService =  (INotificationService)
                    //      WDPortalUtils.getServiceReference(IAlertreceiver.KEY);
            } catch (Exception ex) {
                    msgManager.reportWarning("2-" + ex.getMessage());
            TopicDataContainer container = new TopicDataContainer(TOPIC_NAME);
            StreamData  messageStream = new StreamData(new ByteArrayInputStream(textMessage.getBytes()));
            TopicData durationdata =
                    new TopicData(TopicDataContainer.STRING, "60");
            TopicData userdata =
                    new TopicData(TopicDataContainer.STRING, user.getUniqueName());
            container.addTopicData("message", messageStream);
            container.addTopicData("duration", durationdata);
            container.addTopicData("user", userdata);
            container.addTopicData("group", "GROUP_ACCESS");
            //notService.publish(TOPIC_NAME, container);
            msgManager.reportWarning("-" + notService);
        //@@end
       * The following code section can be used for any Java code that is
       * not to be visible to other controllers/views or that contains constructs
       * currently not supported directly by Web Dynpro (such as inner classes or
       * member variables etc.). </p>
       * Note: The content of this section is in no way managed/controlled
       * by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      private final static String SERVICE_NOTIFICATION = "com.sap.portal.runtime.system.notification.notification";
      private final static String TOPIC_NAME = "USTBroadCastAlerts";
      //@@end
    Thank.
    Luciano Feletti Aponte

    Hi Luciano,
    Take a look at for your answer:
    /thread/833576
    Regards,
    Rogério

  • Accessing UWL API from Web Dynpro Java

    Hi experts,
    I need to retrieve the data from UWL into Web Dynpro java, I have gone through many blogs and solutions but since I am new to portal I am unable to a get hang of it. Can anyone provide me step by step solution including codes for my problem?
    Thanks & Regards,
    Amit Sinha.
    P.S. Points will rewarded.

    Hi Amit,
    just gothrough this below link... here they given the coding also.....
    Accessing UWL-API out of Web Dynpro Java
    it may be helpful to you.... pls comeback if you are struck any where......
    Regards,
    Srinivas.

  • Sending paramters from Web dynpro to web services

    Hi,
    I need to send extra objects or paramters to my web service from web dynpro which are not part of user inputs. How can i achieve it? Iam new to web dynpro. pls help me with sample code.
    Thanks a lot in advance

    hello Sujesh,
    in webdynpro we import a webservice model. it contains all the necessary input parameters and u can pass value through it. i think u cannot pass extra objects or parameter other than these input parameters.
    can u make ur requirement much more clear.
    regards,
    Piyush.

  • Web Dynpro access Application Services directly?

    We're looking at implementing some processes using Guide Procedures, and I have a question about design 'style'.
    I'm creating a data layer using Entity Services.  The entity services will be utilized by the Application Services to create a business layer.  How to do this is clear, and straightforward.
    However, where I have a question is how the automatically generated Web Dynpro application (or any other Web Dynpro application, for that matter) can interact with Application Services.  I've seen sample applications where the Web Dynpro application interacts with application services via mapping from the Web Dynpro interface layer through the GP Runtime - from my perspective, this looks like a good way to deal with a small amount of data being passed between the steps in the GP.
    The primary Web Dynpro application will let the user interact with the data, massaging it until it's in a form where the next person needs to deal with it.  I was thinking of having the Web Dynpro application interact with the Application Services layer directly to move data from the database to the web dynpro application, and back again.  The only thing that would be passed between the steps in the GP would be the guid of the primary data structure.  I would also expose a method of the Application Service as a CO which would take the guid and return the entire business object, so viewing screens could be constructed - as well, PDF's could be generated, and so on.
    Is this considered bad form in a GP, specifically accessing Application Services directly, instead of through a step in the GP?  I understand that what I want to do ties the Web Dynpro application directly to the Application Services layer, but my thinking is that the CO that encompasses the Web Dynpro should be 'atomic', in that all operations related to that specific step should be contained in a single CO.  In other words, the action of creating the business object, fiddling with it, an then submitting it upstream should be contained in one CO.
    Comments, suggestions?

    Hi,
          In the Composite Application Framework scenario, you first create the Business Entities. These act as data holder. To fill the data within these entities the Application services are created. These application services are later exposed as a webservice and deployed.
                   These webservices can contain different methods along with the CRUD operations depending on the Process Flow and Design implemented. We can import the webservices as a model in the WebDynPro Component. The UI elements of the Views can be binded to the Model. So when we execute the model methods the data gets entered into the Business objects.
                   This WebDynPro component should be a callable object ( It requires some Dependencies to be added to the WebDynPro Component ). So that you can have Input/Output parameters and ResultStates. These parameters are useful if you have to pass some parameters from one view to other within the same component. So this WebDynPro Callable object includes the Application service calls and also the passing of data through the GP Input/Output Structures.
                   These callable objects are then included within the Process.
      This is how I think a Composite Application must be designed.

  • 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 Service access from WEB Dynpro

    Hi,
    I have requirement to pass the values from web dynpro to .NET cross application can any body guide me?
    Regards
    Srini.

    hi
    Check for the methods like setuser and set password for your webservice
    Request_<webservicename> request=new Request_<webservicename>();
        wdContext.nodeRequest_<webservicename>().bind(request);
        wdContext.currentRequest_<webservicename>Element().modelObject()._setUser("sdnuser");
         wdContext.currentRequest_<webservicename>Element().modelObject()._setPassword("sdnuser");
         wdContext.node<webservicename>Request().current<webservicename>RequestElement().setRequest(company);
         try
                   wdContext.currentRequest_<webservicename>Element().modelObject().execute();
         catch (Exception e) {
              wdComponentAPI.getMessageManager().reportWarning("Exception:"+e);
    Hope this helps,
    Regards,
    Arun

  • Consume XI web service in web dynpro application

    HI All,
    I have scenario access web service in web dynpro java, which is created by XI ..Now I have WSDL file. Using that WSDL file I have imported web service model(Adaptive web service method)  in my web dynpro java.
    By following  the PDF document  = https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7 
    I have created a Model as mentioned in the PDF.
    Once model is created I have done the mapping from model to component controller, after that  I need to execute the Web service model .For the execution I need to write a code in component controller :- 
    model class name = XIModel
    XIModel obj = new XIModel();
    Once I am done with the above coding , and when I try to run the application I get the following error :-
    com.sap.engine.services.webservices.espbase.discovery.BaseIOException: Invalid Response Code 200 while accessing URL:http://atind037:50000/WSDL/GetPOPDF.wsdl. Response Message: OK. Content Type: content/unknown
    Could you please help me with this at the earliest , as it is a urgent issue.
    Regards,
    Boopathi M.

    Hi boopathi,
    It seems your wsdl url is not correct. Put the http://atind037:50000/WSDL/GetPOPDF.wsdl
    in your browser and check whether you are getting the WSDLDefinitions in xml format or not ?
    In wsdl url put ? instead of .
    URL : http://atind037:50000/WSDL/GetPOPDF?wsdl
    call adaptive web services mit Parameter
    Regards,
    Mithu

  • Passing parameters to Transactions from Web dynpro Application through ITS

    Hi,
    i need to call a transaction from Web dynpro through ITS. On action from web dynpro application, i am concatenating the respective parameters mentioned below along with URL. The problem is one parameter(VARIANT) is being passed to the t-code CAT3 correctly. The next mandatory parameter(PERNR) is not passed to the respective field.Here is the URL Code:
    CONCATENATE 'http'
    '://' host ':' port
    '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'CAT3'
    '%20TCATST-VARIANT=' lv_name2 '&CATSFIELDS-PERNR=' lv_name1 INTO url.
    Called T-Code CAT3
    Passing Parameters are:
    Data Profile TCATST-VARIANT
    Pernr: CATSFIELDS-PERNR

    Pradeep,
    iam trying to pass values from webdynpro application to SAP GUI Transaction
    here is the sample code which iam using
    CONCATENATE  'http://s0164dep01.adta.uae:50000/irj/portal/interop?NavigationTarget=pcd:portal_content/Testing/trn_iw33?'
    '%20CAUFVD-AUFNR='
                 'ApplicationParameter=CAUFVD-AUFNR='
                  lv_workorder';'
              'DYNP_OKCODE=SHOW'
             INTO lv_url.
    i could'nt able to succed as its displaying page not found exception.
    Help me on this to proceed further
    Regards
    Jaipal.E

  • Trigger File Generation to a Server from Web Dynpro Application

    Hi Everybody! Hope you had a good new years eve
    Is it possible to generate a File on a Server outgoing from Web Dynpro?
    I tried to use GUI_DOWNLOAD. But as I couldn't use the GUI_DOWNLOAD from the Web Dynpro, I wrote a Report "ZCMI_EXPORT_FILE" that generates a Text-File. When I start the Report by myself, the file gets generated. All fine.
    To be able to generate the File from Web Dynpro, I created a Batch Input Function Module, that I call in the Web Dynpro. The File is not created and it does not show any errors.
    Do you have any idea how i can get this working? I'd also be happy with a different approach.
    Best Regards and Thanks,
    Steffen
    REPORT that is called with Batch Input from Web Dynpro:
    call function 'ZFM_GENERATE_EXPORT'
      exporting
        it_detail_record     = lt_records
        is_export            = gs_export
      importing
        ev_string            = gs_export-document
        et_dataset           = data_tab
      exceptions
        parameter_is_initial = 1
        others               = 2.
    if sy-subrc <> 0.
    endif.
    concatenate '\\SERVER\EXPORT\' gs_export-filename into lv_filename.
    call function 'GUI_DOWNLOAD'
      exporting
        filename                = lv_filename
      tables
        data_tab                = data_tab
      exceptions
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        others                  = 5.
    if sy-subrc <> 0.
      exit.
    endif.

    HI,
    GUI_DOWNLOAD does not get's executed in the Backgroud.
    there is no way to do it as a background job.. create the folder.. transfer the file to the application server in the backgorund using OPEN DATASET... use the tcode CG3Y to download the file from the app server to your folder..

Maybe you are looking for

  • How to add a time characterstic(date) to already loaded cube??

    Hi All, We have a cube loaded(by daily deltas) for more than two years now, how can we add a date to this cube, what are the possibilities?? 1. do we need to delete all data,add that date ,reload??( quite tedious time consuming ,out of option for now

  • Transferring a DVD to the Desk top and then downloading to Kindle Fire

    I want to transfer some of my DVD films to my Kindle Fire; can I do this by using the DeskTop DVD Drive first to copy to a store on the computer and then downlaodng to a Kindle, I am not technically dexterous so would like a detailed guide p[lease if

  • Best Connection VGA or HDMI???

    Ok people...i have read all these stories about plugging in DVI to HDMI on LCD's but my question is which connection is the best?? I have a Vizio 32in LCD with both VGA and HDMI. I'm currently using the VGA setup and it automatically went to 1366 x 7

  • Photoshop is not listed in my Adobe Extension Manager-- How do I fix this??

    Photoshop is not listed in my Adobe Extension Manager-- How do I fix this??

  • Restore wiped out previous data

    I have just restored data from a previous backup on my iphone. So what? Restore deleted my previous messages and images on the phone. Without a warning, an alert, a question. Congrats Apple for building the best phones in the world I hate you