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

Similar Messages

  • 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

  • What is best practice for calling XI Services with Web Dynpro-Java?

    We are trying to expose XI services to Web Dynpro via "Web Services".  Our XI developers have successfully generated the WSDL file(s) for their XI services and handed off to the Web Dynpro developers.
    The Java developers put the WSDL file to their local PC's and import as "Adaptive Web Services" data models.  When the application is constructed and deployed to our development box, the application abends because the J2EE server on that box cannot locate the WSDL file at runtime (it was on the developers box at, say, "C:\temp\" and that directory does not exist on the dev server).
    Since XI does not have a way of directly associating the generated WSDL file to the XI service, where is the best place to put the WSDL so it is readable at design time and at run time?  Also, how do we reconcile that we'll have 3 WSDL files for each service (one for Dev, one for QA and one for Prod) and how is the model in Web Dynpro configured so it gets the right ome?
    Does anyone have any good guide on how to do this?  Have found plenty of "how to consume a Web Service in Web Dynpro" docs on SDN, but these XI services are not really traditional Web Services so the instructions break down when it comes time to deploy.

    HI Bob,
    As sometimes when you create a model using a local wsdl file then instead of refering to URL mentioned in wsdl file it refers to say, "C:\temp" folder from where you picked up that file. you can check target address of logical port. Due to this when you deploy application on server it try to search it in "c:\temp" path instead of it path specified at soap:address location in wsdl file.
    Best way is  re-import your Adaptive Web Services model using the URL specified in wsdl file as soap:address location.
    like http://<IP>:<PORT>/XISOAPAdapter/MessageServlet?channel<xirequest>
    or you can ask you XI developer to give url for webservice and username password of server

  • 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

  • Update Entity Service using Web Dynpro

    Hi,
    I am pretty new to Web Dynpro. I have defined an Entity Service which is working. With Web Dynpro I can create new entities using:
    ASomething newSomething = SomethingServiceProxy.create();
    newSomething.setX(x);
    newSomething.getAspect().sendChanges();
    Now I would like to update this entity and tried:
    ... wdContext.currentSomethingElement().modelOject();
    mySomething.setX(y);
    newSomething.getAspect().sendChanges();
    unfortunately this is not working. The database is not updated. How to solve this problem?
    Thanks in advance!
    Felix

    Hi
    thanks for the answer, but I think you do not have to call serviceFacade.save() and unfortunately it did not help.
    I found a solution, but I think it is more a work around. There should be a better option...
    ASomething something = wdContext.currentSomethingElement().modelOject();
    ASomething something2 = SomethingServiceProxy.read(something.getGuid());
    something2.setX(y);
    something2.getAspect().sendChanges();
    using this coding the DB is updated.
    Why is it not possible to call directly:
    somethin.getAspect().sendChanges()
    Thanks,
    Felix
    Message was edited by:
            Felix Japs

  • Entity Services and Web Dynpro

    Hi,
    I want to implement a Web Dynpro with relation to a database (Entity Service and Application Services modeled with NWDS).
    I used the following tutorial
    , but when I want to add a "Used model", the selection list is empty and so its not possible to do that.
    Why is it empty, I implemented exactly after the tutorial?
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8b7059da-0c01-0010-e09c-9ecabaf58864">Example Tutorial (Page 16)</a>
    I really need help for that, because I want to implement a Info Callable Object, which shows Entries from the tables. The table should be filled within the actions, and so I need a relation to entity level.
    Thanks in advance
    Steve

    Hi Steve,
    In order to search the SDN forums effectively I suggest to:
    - Select 'Forums' (top menu bar)
    - Select topic of interest (in this case 'SAP NetWeaver > Developing Composites with CAF')
    - Enter your search keywords not in the upper left but in the upper middle search box 'Forum Search'
    This way the search is more likely to meet your expectations.
    Regards,
    Axel

  • 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

  • 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

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

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

  • Generate Entity Service from External Service / Web Service (CAF)

    Hi,
    is it possible to generate an Entity Service from an External Service in the CAF-IDE? Or do I need to create each attribute manually which the External Service provides?
    (in worst case by using an api?)
    regards
    Christian

    Hi,
    Unfortunately there is no possibility to create Entity Service based on another service. You have to do this manually for each attribute and method. Sorry ...
    Regards,
      Jan

  • CAF DB update 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. 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("contactRef",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

    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

  • Beginner:an issue of generating code for an entity service

    Hi All,
      I have downloaded Sap Netweaver of sneak preview version which contains netweaver studio 7.0.07. And my jdk version is 1.4.09.
      I created a CAF project and added an entity service named Person(just by clicking mouse,not did anything else).But when I tried to generate code,the compiler told me "The type abstractStringbuilder is not visible" and thus it caused the failure of building the project.I have googled this issue and found that this is a existing bug in eclipse.
      Now here is the question: will it take effect if I upgrade my jdk to 1.5? Or can anyone give me any suggestions?
      Thank you very much.
    Message was edited by: Yuhui Liu
    Message was edited by: Yuhui Liu

    Hi,
    I suspect that you are using Java5 sinse the AbstractStringBulder is not present in 1.4.
    Please check the Java version used by the IDE by opening "Help -> About.. -> Configuration Details".
    Java 5 is not supported by NetWeaver 7.
    Anyway, an upgrade to Java 5 won't solve the issue.
    Best Regards,
    Tsvetan

  • Have the capability that  let Entity Objects from Web Services Datasources?

    Have the capability that let Entity Objects from Web Services Datasources? or
    where can we found the example about implement Entity Objects from Web Services Datasources ?

    I'm not sure what are you asking for. If you are looking to create a data-control based on a web service then this online demo might help:
    http://www.oracle.com/technology/products/jdev/viewlets/1013/WebServicesAndADF_viewlet_swf.html
    Or are you asking how to expose an ADF Business Component as a Web service?

  • Calling Batch input from Web Dynpro - any alternatives for table updates?

    Hi!
    I am asked to create a screen in Web Dynpro for the GJ30 transaction (JV Cutback mapping of WBS' elements). I created a remote enabled function module which call batch input for GJ30 . Testing the Function modules direclty goes fine, but not calling the function module from WD. then I get the same error message as when I once tried to call SAP GUI from Web Dynpro ( Call transaction /submit program).
    My next step is to try to create a batch input session (instead of call transaction) and run it using rsbdcsub, and then check the result of the run. But maybe this will fail of the same reason as well, and I suppose this will make the user waiting longer for the response .
    I read somewhere that Web Dynpro does not support batch Input. But what can you do when there are no standard BAPI's for the update you want to do in SAP ?  We are not supposed to do direct table updates.  
    Anyone who have struggled with the same issues and found a solution??
    regards, Tine

    Hi,
    as BDC is calling screens and in Webdynpro ABAP you cannot use SAP GUI sceeen, you are getting short dump.
    Refer CNTL_SYSTEM_ERROR in webservices from r/3 system
    Thanks,
    Chandra

Maybe you are looking for