Help, Exception using Web Service with Web Dynpro

Hello All,
Can someone please help me with this exception:
com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(path=CalculatorComp/CalculatorCompView, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo): cannot modify Number1 because it is mapped and there is no active NodeElement to take the value.
I created a WebService based on Session Bean that exposes few functions.
One of them receives two int numbers and returns a sum them.
I've created A WebDynPro project with this structure:
In order to do that I've created a model based on this WebService and made the following mapping:
1. I've mapped the model context into the component global context - this mapping contains both the two numbers and the result.
My context in my Controller was like this:
Request_node * (Father Node)
                      Add * (Children Node)
                              Number1 -
                              Number2 -
                      Response* (Children Node)
                              AddResponse* (Children Node)
                                            Return -
PS:  "*" is Node and "-" is Attribute
2. I've mapped the context values the global context into the context of the view, like this.
Number1 -
Number2 -
Response*
               AddResponse*
                             Return -
3. I add the following code in init() method:
Calculator model = new Calculator();
wdContext.nodeRequest_Add().bind(new Request_Add(model));
4. I also add the following code in method to execute the WS.
public void executeAdd( )  {
    //@@begin executeAdd()
    //$$begin Service Controller(-1063927033)
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
    try
      wdContext.currentRequest_AddElement().modelObject().execute();
      wdContext.nodeResponse().invalidate();
    catch(Exception e)
      manager.reportException(e.getMessage());
    //$$end
    //@@end
When I add values in fields and execute the method to call WS to happen the exception.
com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(path=CalculatorComp/CalculatorCompView, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo): cannot modify Number1 because it is mapped and there is no active NodeElement to take the value.
Do Anyone has any idea?
Thanks regards
Eduardo
Edited by: Eduardo Luiz De Angeli on Mar 3, 2009 6:16 AM

Hi Murali,
thanks for awnser, but I'd already seen the post and this don't helped me.
Hi Satish,
thanks for awnser!
I'd already fill the context nodes in init() method, but don't worked.
I tried to fill the context nodes of several ways, for example:
wdDoInit() Method
Calculator model = new Calculator();
Add add = new Add(model);
add.setNumber1(1);
add.setNumber2(2);
wdContext.nodeAdd().createAddElement(add);
Response_Add response = new Response_Add(model);
wdContext.nodeResponse().createResponseElement(response);
AddResponse addResponse = new AddResponse(model);
wdContext.nodeAddResponse().createAddResponseElement(addResponse);
wdContext.nodeRequest_Add().bind(new Request_Add(model));
Do you have any Idea?
Thanks
Eduardo

Similar Messages

  • Search Help exits using Web Dynpro abap

    Hi,
    Before returning the values selected by the user to the input field, i have to set a column of the F4 result list based on some computation. How can i do that?
    i.e to set a field value dynamically using search help exit
    plz reply.
    Thanks & Regards,
    Raji.

    Hi Raji,
    The blog mentioned by micheal is written by me.
    Go through the blog and let me know your queries.Lets see if i can help you

  • Can I Design a Forum with using web dynpro for java?

    Hi All:
        Can i design a forum with using web dynpro for java?
        I want to design an application like a simple forum which maybe has many replies.So if i use
    the UI technology "web dynpro for java", i will to create UI elements dynamically.How can i control this
    dynamical UI elements to keep layout ?

    Hi,
    yes you can do that....
    for exaple if you observe SDN...
    you can imagine like....
    A big Transparent Container(TC)....
    Inside that number of other TCs(depending upon the question nd its replies...)....
    In side each TC, again around 9 UIElements....
    one for menioning what is the question/reply?
    other for your description of question/reply...
    other for your name,
    displaing your fourm point... etc...
    So it will be
    for(loop till your (Question+No of replies))
    Create Transparent Container....
    Add Childs to the Container...
    Decide your layout....
    In case if you want to know how to create UIElements dynamically....
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/07cf3dd28b5610e10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/dynamic%2bui%2bgeneration
    Regards,
    Srinivas.
    Regards,
    Srinivas.

  • How to use web dynpro's web service to import XML file

    Hi
    I have an xml file and I want to use a web dynpro's web service to cosume this file which is existing on my local drive. Can anyone help me which steps I have to do to use this file as a web service using web dynpro.
    Thanks

    Hi
    You can refer below Wiki Article on SDN. I hope that will help you out.
    [https://www.sdn.sap.com/irj/sdn/wiki?path=/display/emtech/consuming%2babap%2bweb%2bservices%2busing%2bflex]
    Thanks.

  • Generic Object Services using Web Dynpro

    I am using Web Dynpro for ABAP and would like to access Generic Object Services (GOS) to view attachments to an SAP Business Object.  Using the cl_gos* classes does not work when running WebDynpro as it uses the controls framework. 
    How can I access the functionality of GOS from a Web Dynpro application?
    Regards,
    Bob

    Hi,
    I assume that you wantted to have the attachements in a mail.
    Please check out the Adobe Forms(ie PDF attachements) and Office Control UI elements in WDA.
    Regards
    Lekha

  • Can I use Web Dynpro to provide Web Services

    I know I can use Adative web services model to consume existing web services.  But I have not seen any example to use Web Dynpro as the web service provider.  Can this be done?  If yes, how?
    Thanks.

    Hi,
    WebDynPro Java/ABAP are primarily User Interface technologies. Webservices are faceless (without UI ) components that provide certain functionality. Using UI technologies like WebDynPro Java/ABAP etc, we can build a face( UI ) to the webservices.
    DnyPro itself means a screen & WebDynPro is for building web based applciations.
    Hope this resolves your question.
    Well, if you still want to use it as provider & if you have an existing web-service, the way to do it is, Right click on your WebDynPro ABAP component & select CREATE->Service Call. Build a Custom Controller or use the Component Controller to get the service using service type = Webservice proxy for your webservice. You can use this Component as a Used component in any other webdynpro components & use this to access webservices.
    Thanks,
    Phani
    Edited by: Phani Rajesh Mullapudi on Oct 8, 2009 10:41 PM

  • Doubts while doing  example on WDJ-Using Web Dynpro Component Interface

    Hi
    I am doing the example mentioned in the PDF file WDJ - Using Web Dynpro Component Interface Definition.
    In the PDF file its mentioned the following code inside onActionCreateDC1:
    g_Usage.createComponent("com.sap.wd.childdc1comp.ChldDC1Comp");
    wdThis.wdGetWDCompInterfInstInterface().passInfo(
    "Created Child DC 1");
    I have one query that what is com.sap.wd.childdc1comp.ChldDC1Comp?Is it the component name of DC or the package name of DC?
    I have deployed the application.When i click on button Create Child DC1 i am getting follwing exception:
    com.sap.tc.webdynpro.services.sal.deployment.api.WDDeploymentException: Failed to load deployable object part 'com.wartsila.test.ChileDC1Comp', type 'Component' of deployable object 'wartsila.com/DP_TutWDInterfaces'.
    When i click on Create Child DC2 i am getting follwing exception:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException:Failed to create delegate for custom controller com.wartsila.test1.ChildDC2CompInterfaceCfg. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
    Can anybody tell how can i solve it?
    Is it required to deploy the two child component also that is ChildDC1Comp and ChildDC2Comp?If yes then how to deploy these two child DC as when i am tryng to create application for these two component then default plug is showing blank thats why i am unable to deploy these child Dcs.
    Thanks
    Susmita

    Hi Susmita,
                      Is it required to deploy the two child component also that is ChildDC1Comp and ChildDC2Comp?
    Yes , u have to deploy both the components.
    when i am tryng to create application for these two component then default plug is showing blank thats why i am unable to deploy these child Dcs.
    U need not create an Application for deploying the component .Right Click on ur project --> Deploy.
    The problem is with ur Component, while creating a Component u should have created a Interface view and default StartUp plug.
    Just check whether u have Created the startup plug for ur interface view.
    Open the controller editor of ur interface view --> Select Plugs Tab .
    and in the plug tab , check whether u have Default Start plug (in Inbound Plugs Table).
    if there is no Default Start Plug , then click the Button New to create a Default Plug .
    in the pop up window -- select Stsrt Up and Give the name of the plug as "Default".
    After doing this , select the default plug and Right click on the plug -->copy  and Open the window Controller editor -- > select Plugs Tab --> check whether u have default plug (in Inbound plugs) in the Window controller .
    if the plug is not there , then paste the plug in the Window's Inbound Plug Table .
    Hope it helps
    Thanks and Regards

  • Call a external vendor catalog - OCI In ECC using web dynpro

    Hello Everyone,
    We have a requirement to call a OCI External Catalog in ME51n Transaction in ECC, that is working fine.
    Now we need to create a Web dynpro ABAP Application which performs the Task of ME51n Transaction along with OCI Integration.
    So far i have create a small Web dynpro ABAP application to check does OCI Catalog can be integrated in ECC using web dynpro ABAP.
    My Screen Consit of a single Button UI, on click of the button i am calling the External Catalog, from the catalog i select all the materials and click on submit finally we need to bring all the selected materials to get displayed ina table.
    Half of the Development is done i.e i am able to call the catalog but not able to receive the selected materials.
    following are the details-
    1. I check in SRM first how the Ctalogs are been called, i found 2 Services responsible for the same in SICF transaction -
    Inbound HLDR and Outbound HLDR which uses handler class as SAPSRM_CL_CH_WD_INBOUND_HDLR and SAPSRM_CL_CH_WD_OUTBOUND_HDL, so i copied the same classes into ECC and created the same SICF Service.
    Contn. in next post

    2.In my Web Dynpro ABAP application i have a Inbound plug in my window in the  handler method of the inbound plug i fill a table lt_parameters of  TYPE tihttpnvp, it has 2 columns name and value
    In this table i fill following entries-
    Name-CATALOG_URL
    Value-https://XXXXXXXX.com/invoke/BVProcess.SAPOCI/processCatalogRequest
    Name-USERNAME
    Value-XXXXXXXX
    Name-PASSWORD
    Value-XXXXXXXX
    NAME  = 'HOOK_URL'.
    VALUE = 'http:/XXXXX.hostederp.local:8000/sap/ZOTC_CAT/Zinbound_hdlr'."?TARGET_URL= {Appdress of the WDA Apllication}
    NAME  = 'OCI_VERSION'.
    VALUE = '4.0'.
    NAME  = 'OPI_VERSION'.
    VALUE = '1.0'.
    NAME  = 'returntarget'.
    VALUE = _top
    also in this inbound plug handler method i fill a lv_url variable of type string with-
    lv_url = 'http://XXXXXX.hostederp.local:8000/sap/ZOTC_CAT/Zoutbound_hdlr?sap-client=100&sap-language=E'.
    3. finally from the handler method of the inbound plug i call a Suspend plug p[assing the above two variables i.e
    lt_parameters and  lv_url.
    wd_this->fire_zw_suspend_plg( url =    lv_url   i_parameter_tab = lt_parameters ).
    4. Using above i cam able to call the catalog and select the materials.
    5. Now if i Finally clcik on submit on the catalog it should return the materials to the WDA Application.
    For WDA Application to accept the Materials i have created a resume plug in which i am using -
    wdr_task=>server->request->get_form_fields( CHANGING fields = lt_fields ). to get all the selected materials into lt_fields.
    6. But unfortunately i am unable to receive the selected materials in lt_fields.
    I think i am missing something in Hook URL or some other parameter.
    Please help, ur comments and suggestions are welcome.
    Regards,
    Akash Rana

  • Creating a report in EP portal using Web Dynpro

    Hi all,
            Can anyone guide me how to create a Report in EP portal using Web Dynpro.
    Regards,
    R.V.Easter

    Hi,
    You should read the documentation ([Web Dynpro ABAP: Development in Detail|http://help.sap.com/saphelp_nw70/helpdata/en/03/0048413e466e24e10000000a155106/frameset.htm]) and study the tutorials : [Go and Create First Application with Web Dynpro ABAP|http://help.sap.com/saphelp_nw70/helpdata/en/e6/2c4b29dc87c6409d6469ec390e8f3d/frameset.htm] and [Creating a Simple Flight Info Application|http://help.sap.com/saphelp_nw70/helpdata/en/e6/2c4b29dc87c6409d6469ec390e8f3d/frameset.htm].
    Regards,
    Pierre

  • Overwriting a File in the KM using web dynpro

    Hello,
    im using the createresource method to upload files into the km using web dynpro.
    (using the following tutorial: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70a60afe-d576-2a10-68bf-9ce3988dc39e )
    however, if i try to upload a file which is already there, it doesnt overwrite it, instead it throws an exception without any additiona info.
    is there any way of doing this?
    many thanks,
    Eli.
    Edited by: Eli Eren on Nov 24, 2008 11:22 PM

    Hi,
    first check, if the resource exists, then decide to create or update content:
        IResource resource = (ResourceFactory.getInstance().getResource(rid, ctx));
        ICollection aCollection=(ICollection)resource;
        // get new resource RID
        RID newResRid = RID.getRID(repository+RID.PATH_SEPARATOR+resourceName);
        // try to find the resource
        IResource newResource = (ResourceFactory.getInstance().getResource(newResRid, ctx));
        if(newResource!=null)  {
          // does exist - update content
          newResource.updateContent(content);
        else  {
          // does not exist - create
          newResource = aCollection.createResource(resourceName, null, content);
    Hope that helps,
    Romano

  • How to save file in km using web dynpro abap

    Hi Experts,
    We have a requirement that file should be saved in a folder in km, the name of the folder should be the employee number.
    Could you please tell me how to create folder with employee number in KM and store file in it using web dynpro abap.
    Thanks and Regards,
    Santhoshi.

    Thanks Naga Raju Meesala.
    How come all these methods are deprecated...getEP5User
    Also, since I am building a weddynpro DC, what is the proper way to include these jar files as Used DCs?
    Now proceed in the same way with the variable PORTAL_HOME and add the following .jar files:
    u2022 \lib\prtapi.jar The portal runtime APIs
    u2022 \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.ep5.jar The user management APIs of the Enterprise Portal 5.0 are deprecated, but still in use in SAP NetWeaver 04
    u2022 \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar KM Repository Framework APIs
    u2022 \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar Repository Framework Utility: URL Generator
    u2022 \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar Repository Framework: Repository Services
    u2022 \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar Repository Framework Utilities

  • Getting and Printing A PDF Document From R/3 Using Web Dynpro

    I would like specific information on getting and printing a document residing R/3 using web dynpro.  My environment is Netweaver 04s SR2, an it will not include ITS or the ABAP stack. It connects to remote R/3.  I will not be using Adobe Interactive Forms.       I only need get/render/print the doc.  My question is in 3 parts.
    1) Getting the PDF from R/3
         a) In terms of the RFC ABAP module, how should it return the pdf (a table?)
         b) How should the document be stored within the Component Controller context
             for display.
    2) Converting the R/3 returned binary into a form that is renderable within
        Web Dynpro.  (Does the Form UI Element Require it to be converting and if so
                              what is the best way to do this)
    3) Printing the PDF from the corresponding iView in the portal. (If I am using the
        form ui element to display it, how can printing be initiated in the portal)
    Thanks

    Hi,
    In webdynpro there s a fecility to convert the general data to PDF by uisng th InterativeForm UI Element.
    This for u need to do the following things.
    1. Need to configure the ADS(Adobe document services) in your VA(Visual Admin).
    2. Once ADS is configured we  can utilize the UI element Interactiveform It has contain the Adobedesigner by using this we can design the PDF and binding with the model nodes.
    3. Develop the Function module in the r/3 side and import into WD side and those are created as Model nodes and we canutilize in the 2 step.
    4.When u run the application u can display the pdf with how u design ur PDF form.
    This is generally doing the PDF by using PDF.
    Or do u think any other way post ur issues.
    Thanks,
    Lohi.

  • Reading HTML Content using Web Dynpro ABAP

    Hello,
    I was wondering if it is possible to read the content (HTML) behind a given URL using Web Dynpro ABAP.  If so, are there any functions available to parse the HTML ?   I have been asked to develop an application that requires going to a URL, reading the content, and formatting a table from that content for presentaion within Web Dynpro ABAP.  The HTML of the URL is nothing more than a "Table of Contents" to existing documentation ( Word Documents )
    Thank you for any help / advice you can provide
    Larry

    You can get the HTML returned in a table using fm RSFO_HTML_REQUEST2.
    Once you have that, you can convert it to a string using any number of methods. CL_RSR_WWW_RENDERER=>TABLE_TO_STRING should work fine.
    One option for parsing it would be to get it converted into an iXML object, but you might have to do quite a bit of manipulation first depending on what the html looks like. You can see more info here on iXML classes: [http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm]
    Otherwise I would just make use of find statements with regex patterns to sort through the html.

  • Using Web Dynpro WDUrlGenerator from within J2EE Application deployed on NW

    I have two applications deployed on a NetWeaver Application Server 2004s.
    1. A Web Dynpro application.
    2. A J2EE Application
    What I want to do is to be able to build a url to the Web Dynpro application from within the J2EE application. Obviously the problem is using Web Dynpro classes within the J2EE application.
    So I edited the Java Build Path of the J2EE application to include the werbdynproservices.jar file and exception.jar files by extending ECLIPSE_HOME variable in the libraries section. I also checked them in Order and Export. I verified the built .war file and it does contain the two .jar files.
    This was sufficient to get my project build and deployed, however the servlet in my J2EE application shows NoClassDefFoundException when I run it. My guess is there's more I need to do to get the WDUrlGenerator to run in my J2EE class.
    Is this possible or is there a better way? I am trying to avoid the client having to modify a web.xml for each depployment.
    Thanks in Advance.

    This looks like what I want, but I am unable to test it.
    I found the application-j2ee-engine.xml file under the <project-root>/gen_wdp folder. I then attempted to open it with the SAP EARDD editor. It opens with the Source tab selected. If I try to click the General tab I get an error saying:
    "The source page has errors. Other pages cannot be used until these erros are corrected."
    I see nothing wrong with the XML document. It's source is here:
    <?xml version="1.0" encoding="UTF-8"?>
    <application-j2ee-engine>
        <provider-name>local</provider-name> 
        <modules-additional>
        <module>
          <entry-name>EVENTS_WorkflowNotification.wda</entry-name>
          <container-type>webdynpro</container-type>
        </module>
      </modules-additional>
    </application-j2ee-engine>
    When I deploy the application, everything works fine. I was going to edit the XML document by hand, but of course there is no DTD listed so I don't know what's supposed to go in there without the Editor doing it for me.
    Getting closer. Thanks so much.

  • R/3 search helps in java web dynpro

    Hello,
    A customer of ours has some Z transactions in its R/3 system, which basically present a very simplyfied version of MIGO. This Z transaction makes extencive use of Search Helps, which in some cases have been extended.
    A ABAP developer with some  Web Dynpro experience showed me that it was easy to integrate these search helps into his web dynpro application.
    I cannot find how to do this in java web dynpro with the developer studio. Is this possible and if yes, how?
    Greetings, Walter.

    Hi Walter,
                  You can use search helps in Web Dynpro for Java also. The feilds with check table in R/3 automatically give search helps. To provide explicit search help you need use EVS or OVS.
    These are the tutorials
    OVS https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/web%20dynpro%20valuehelp%20using%20object%20value%20selector.pdf
    Value help
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/value%20help%20in%20web%20dynpro%20applications.pdf
    EVS
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0e57440-ec1c-2a10-36b1-fe92341f98c4
    regards,
    Siva

Maybe you are looking for

  • Create a materialized view :-

    How do I create a materialized view on a view ,so that it will refresh automatically on every commit in base table where the view having more that 9 function ?

  • How to create a servlet  in PAR Application

    Hi Experts, I want to create a servlet in PAR application. This servlet should be capable of accessing the functions of other java files included in PAR Application. Servlet should be capable of accessing the functions say doContent(req, resp) of any

  • Column alias error in a query of views

    Hi I was trying to workout this query create view dept_sal as select d.department_name,sum(e.salary) from departments d left outer join employees e on d.department_id= e.department_id group by d.department_name; and i recieved this error message ....

  • Why does this prpgram keeps crashing? this is unacceptable

    I am using firefox 35, it says beta channel. This program freezes 10 times a day, i have to relaunch. What is wrong here??

  • OA Page and AK region .... urgent ....

    Hi All, I have an issue involving the AK regions. We are customising a SSHR OA navigation process. At the backstage a workflow is driving the OA page navigation ( Each wf activity being a page and with the next and previous branches). Some activities