Using a Deployable Proxy in a Web Dynpro Application

Hi,
We have a Web Dynrpo application whose model is built from a set of Java business objects (POJOs.)  These Java business objects currently make calls to a back-end R/3 system using JCo.  We would like to provide the ability to allow the calls to be made over Web Services to the back-end system. 
To call the RFMs as web services we have created a Deployable Proxy project, added the proxy as a public part, then referenced that public part in the web dynpro application.  At this point we can write code to call the web service that looks something like:
InitialContext ctx = new InitialContext();
Object serviceObject = ctx.lookup("wsclients/proxies/meridium.com/rcmo~proxies/com.meridium.rcmo.ws.proxies.plants.PlantProxy");                                        
Z_MRDM_GET_PLANTSService service = (Z_MRDM_GET_PLANTSService)ctx.lookup("wsclients/proxies/meridium.com/rcmo~proxies/com.meridium.rcmo.ws.proxies.plants.PlantProxy");
Z_MRDM_GET_PLANTSPortType port = service.getLogicalPort();
Z_MRDM_GET_PLANTS plantParameter = new Z_MRDM_GET_PLANTS();
plantParameter.setI_PLANTID(id);
plantParameter.setI_PLANTNAME(name);
Z_MRDM_GET_PLANTSResponse response = port.z_MRDM_GET_PLANTS(plantParameter);
MT001W[] plantArray = response.getET_PLANTS();
The problem is that when I call looup to retrieve the service implementation I get a ClassCastException. 
The tutorials for using a proxy in web dynpro all assume that the web service is what the model is based upon but that's not possbile for our scenario we need to call the proxy from the business objects which are the basis for our model.
According to the help documentation for consuming a deployable proxy in a JSP page:
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm</a>
It discusses adding JNDI mappings.  Is this what's needed for the reference to work in a Web Dypro application too?  If so, how would one add the JNDI mappings references to a Web Dynpro application?
Many thanks!

Hi Dheeram,
I'm not certain about JSPDynpage specifically, but in a general J2EE Enterprise Application project you can add a reference to the application-j2ee-engine.xml file.  For example here's the content of an application-j2ee-engine.xml file that references a proxy:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
<application-j2ee-engine>
     <reference
          reference-type="hard">
          <reference-target
               provider-name="sap.com"
               target-type="library">com.sap.mw.jco</reference-target>
     </reference>
     <reference
          reference-type="hard">
          <reference-target
               provider-name="sap.com"
               target-type="library">com.sap.aii.proxy.framework</reference-target>
     </reference>
     <reference
          reference-type="hard">
          <reference-target
               provider-name="sap.com"
               target-type="library">com.sap.aii.util.misc</reference-target>
     </reference>
     <reference
          reference-type="hard">
          <reference-target
               provider-name="sap.com"
               target-type="interface">tc/sec/destinations/interface</reference-target>
     </reference>
     <reference
          reference-type="hard">
          <reference-target
               provider-name="sap.com"
               target-type="library">security.class</reference-target>
     </reference>
     <reference
          reference-type="weak">
          <reference-target
               provider-name="sap.com"
               target-type="service">tc~sec~destinations~service</reference-target>
     </reference>
     <reference
          reference-type="weak">
          <reference-target
               provider-name="sap.com"
               target-type="interface">tc~sec~destinations~interface</reference-target>
     </reference>
     <reference
          reference-type="weak">
          <reference-target
               provider-name="engine.sap.com"
               target-type="service">webdynpro</reference-target>
     </reference>
     <reference
          reference-type="weak">
          <reference-target
               provider-name="meridium.com"
               target-type="application">rcmo~proxies</reference-target>
     </reference>
     <provider-name>sap.com</provider-name>
     <fail-over-enable
          mode="disable"/>
</application-j2ee-engine>

Similar Messages

  • How to make use of Portal service in the web dynpro application

    hi
    I have some portal service and how to use that in the web dynpro application.
    and also what is the main diff between Portal Component and web dynpro application.
    do we required portal to run web dynpro application.
    thanks
    mmukesh

    Hi,
    >> I have some portal service and how to use that in the web dynpro application.
    Yes. U can use Portal service in webdynpro. Check the link given by subathra.
    >> and also what is the main diff between Portal Component and web dynpro application
    Portal Components are components designed to run in portal server while webdynpro application can run in J2EE WebAS.
    >> do we required portal to run web dynpro application.
    No for general cases. Just WebAS is sufficient to run webdynpro appl. But if u use portal service in ur webdynpro appl, then make sure both (portal service and webdynpro appl) run on same J2EE engine. That is mandatory.
    Regards,
    Vijai

  • How i use nwdi to modify existing standard web dynpro application

    Hi,
    I need  to change some existing application of web dynpro Java. I found solution nwdi would help in that. But how i use it can any one explain me in detail. Nwdi has already installed over here. So can i use it can explain me step by step.
    Regards,
    Gurprit Bhatia

    Hi,
    First you need to import the WD application to your NWDS and then you need to checkout the code for making any changes after making the chanhes you have to checkin the code.
    First you need to setup the portal path in
    1. WIndow->Preferences->Java Development Infrastructure->development Configurations.
    2. You have to create a client in DTR by going into DTR Perspective.
    3. Import the configuration from the track (this is your standard WD application) in Development Configurations Perspective.
    4. Create the project from Inactive DCs tab.
    5. Navigate to WD Perspective and build the project.
    6. Check out the code to make chnages
    7. Checkin the code after making the changes
    8. Test the application in Portal
    Regards,
    Lakshmi.

  • ABAP Web Dynpro Application changes in Administation mode

    Hi,
    I Made changes to a webdynpro application using Administrator mode in se80 ie Web Dynpro Application->Test->Test in Administation mode.
    I made one element 'invisible' and ticked 'Final' check box. This element disappeared from my application. Now I want to revert back this and make that UI element visible. I cant see that UI element even in invisible elements list to change attributes back to 'Visible' and uncheck 'Final'. How can I do it. How do I revert back all changes done in Administrative mode for a ABAP webdynpro application.
    Rgds,
    Harish

    Hi,
    Is that  a config issue.
    Please check out this link -
    Undo user personalization
    Regards,
    Lekha.

  • How to use a deployable proxy to consume a web service?

    HI Gurus,
    I am following this article below which helpfully explains how to create a proxy. So far so good. I have been able to create a proxy. However, the article only describes how to build a proxy.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c7d0f7-153d-2a10-5d96-d334b67cd771
    In the concluding part of the document the author says "In my next article I will tell you how to use this deployable proxy to consume the web service in web application."
    I have looked around the SDN but have not been able to get the next part of this document.
    I have a JSPDynpage application which is required to consume a webservice. I want to use this proxt to consume the webservice.
    Any help or any other document that explains how to use a deployable proxy to consume a web service will be helpful.
    Thanks,
    SB

    Hi,
    Here is an example how to consume the deployable proxy in web application:
    http://help.sap.com/saphelp_nw70/helpdata/EN/ca/c8efe3e8a64163b01924ad4ccd706d/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/5c/971740198d8f5ce10000000a155106/frameset.htm
    Regards,
    Praveen Gudapati

  • Error using tabs in Web Dynpro application

    Hi all,
    I am working on a web Dynpro application where I want to use "tabs" to display different vendor details, basically I need two tabs one for header data, one for address data. What I did is I created a group and there created the element for the user to enter the vendor number and also created a button and binded it with the BAPI, now I created a tab using tabstrip and then inserting the tab and adding the element to the tab (in my case i m using the table type), once I finish this and try to do the syntax chek i am getting this error:  "ACC: Element "TAB" does not have a header"
    Can you please help me with this?
    Thanks,
    Rajat

    Looks like i was missing some step... I deleted everything and then re created and this time it works.

  • Problem with HowTo guide - Use the BI Java SDK in a Web Dynpro Application

    Hello,
    I am following the HowTo guide - Use the BI Java SDK in a Web Dynpro Application
    at <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e49be590-0201-0010-0c83-fc20e5da124f">this link</a>.
    I have configured the connector on the WAS as needed.
    The problem is that when I run the application I receive an Unauthorized error on the connector URL.
    If I open this URL on a browser I receive a pop-up for UID and PWD and when I enter the same UID and PWD I used to configure the connector I am able to login and see the WSDL.
    Any ideas?

    I've never tried using BI in WebDynpro !!!
    But i foond one posting on the connection problem https://forums.sdn.sap.com/click.jspa?searchID=955524&messageID=2133396
    Regards,Anilkumar

  • How to change the Portal Password using a link from Web dynpro application

    Hello Everybody,
    I have a requirement to change the user password from a web dynpro application which is available on a mobile device. Firstly User will log into the portal through a mobile device and after getting authenticated user will be redirected to the mobile application. Within this mobile application there will be a link to change the login password(Portal login). Can somebody tell me how can i change the portal login password from a link available within the mobile application. Looking forward for a suitable reply.
    Thanks to all,
    Regards,
    Saby.

    Hi Maksim,
    Thanks for your reply..but i would also like to know can we directly use the Change Password Iview "persoUserPassword" from the portal. Can i directly Pass the URL of this iview from the portal to a "Change Password" link in the web dynpro application, so that when the user click this link he should be able to see this Iview on his/her mobile device and should be able to change the password from there. But i dont know whether this iview will appear properly on the mobile device or we have to have a custom web dynpro application for this purpose...Please reply with a suitable answer.
    Thanks in advance.
    Regards,
    Sarabjeet Singh.

  • Web dynpro application using workflow

    Hi all,
    I have developed a web dynpro application and attached that to the portal, so the user will login into the portal and will access the application. We have a new requirement now, when a user enters the data and hit save button on the web dynpro application, the workflow should trigger and should send the filled out (everything filled in) web dynpro application to his superior, the supervisor should be able to click on a link (which he should get through workflow) and should get the web dynpro application filled in. I am not sure how can I do this, so can you please guide me through.
    Thanks,
    Raj

    Hi Raj,
    could I suggest perhaps that you have a good search of SCN - there have been multiple posts about this sort of thing in the past.
    for example : the wiki article
    [Integrating WebDynpro ABAP applications with UWL for workflow in Portal|http://wiki.sdn.sap.com/wiki/display/WDABAP/IntegratingWebDynproABAPapplicationswithUWLforworkflowin+Portal]
    is it perhaps that you do not use the UWL at your site? Or do you want to to send an email to the manager with a link directly to the approval application? The last case is one that I've come across many times before - it just means that you'll need to generate an approval task that is ended by a wf event and send an email to the manager with a URL parameter in the launch of the WDA application so that the app can pick up the details required to display and raise the WF event to complete the approval wf task.
    There are all sorts of ways of persisting the information in the form so that the manager can see it in the approval. You can use the workflow container, you can use a db table, you could even use a shared memory area (not that I'd recommend this for this usage). But this is more a case of how to persist information in a workflow and probably a better question (search first, it's probably been answered already) for the WF forum and not the WDA forum.
    Good luck in designing and building your application. Perhaps when you are done you could write a blog about your experience and further share how to do this with others.
    Cheers,
    Chris

  • Use of multiple components in ABAP WEB DYNPRO

    Hi,
    Am  new to  abap web dynpro and I just want to know whether  we  can  use  multiple components for an application in web dynpro.
    Thanks ,
    Dhaya.G
    Edited by: Dhayalinie Ganesh on Feb 22, 2012 12:06 PM

    Hi,
    depending requirement of application we can use multiple components.
    for example if we want to display table data into alv grid for that we can use the existing(standard component) ie: SALV_WD_TABLE  .Like such a way we can use the components as per our requirements.
    For importing components:
    --> Go to properties tab of view of your web dynpro application
    --> There you can find one button create controller usage ,click on it then import the components
    Thanks&Regards
    Sreenivas Pachva
    Edited by: sreenivas.p on Feb 22, 2012 1:11 PM

  • Using EJBs in Web Dynpro Applications

    I have recently started to develop Web applications using the Web Dynpro framework. Coming from a pure J2EE world, I must admit that Web Dynpro has a few innovative features that I find interesting for user interface development. The use of component & view contexts, for example, is not unlike the ActionForms that one may find in a Struts application, but pushed a bit further. No complaints here.
    What I do have some problems with is the whole CommandBean paradigm that is put forth by SAP (refer to the document <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20ejbs%20in%20web%20dynpro%20applications.pdf">Using EJBs in Web Dynpro Applications</a>).
    I do understand the usefulness of defining a model that will be used to generate and eventually bind to Context data structures. That's fine. What I do object to is the use of a so-called CommandBean to play that role. Again, coming from a J2EE world, I am familiar with the BusinessDelegate pattern - which would typically be used by a client application to invoke business logic on the server side. I would propose that a better, cleaner way of integrating EJBs with the Web Dynpro framework would be to use a BusinessDelegate for invoking business logic, and importing a separate and distinct ModelBean (instead of a CommandBean) to be used for defining and binding to Context data.
    I have built one Web Dynpro application thus far. Instead of using a CommandBean, I created a ModelBean that extends my business object DTO (Data Transfer Object) (which is quite appropriate for that role, given that it implements all the get & set methods that are required for the business data that I need to model). My Web Dynpro application also makes use of an independant BusinessDelegate that is packaged with my EJB DC - this is a standard best practice on J2EE projects. I have been asked by the people working with me to modify this architecture to bring it more in line with the SAP way of doing things. I am open-minded and willing to learn and accept new ways of thinking and doing things. However, I fail to understand the usefulness of merging structure and behaviour by resorting to CommandBeans:
    - <b>It violates the MVC paradigm</b> by having one object (the CommandBean) serve as both model AND controller as far as the Web Dynpro application is concerned. The CommandBean is obviously a model - since it is literally imported as such into the Web Dynpro application. It is ALSO a controller from the Web Dynpro's application perspective, since all calls to the back-end go thru the CommandBean via one or more of its execute_xxx methods. In contrast, the use of a business delegate by the Web Dynpro application clearly separates the model (the CommandBean... or rather, a more suitably named ModelBean) from the controller (BusinessDelegate).
    - <b>Doesn't carry its own weight</b>. In other words, I haven't yet been provided with any valid justification for going thru the extra effort of coding the CommandBean's execute methods. It's been proposed to me that it somehow serves as an abstraction layer between the Web Dynpro application and the business logic. I would argue that it is the BusinessDelegate's role to abstract away the back-end logic from clients. If one does have a BusinessDelegate available, I would argue there's no need to code execute methods in a separate CommandBean. To prove my point, I would simply point out that all of the CommandBean examples that I have seen so far, either in How-To documents, or in production code, all follow the same pattern....
    CommandBean.execute_doSomething() calls BusinessDelegate.doSomething()
    Not a heck of an "abstraction" layer... I would in fact argue that it is worse than useless. If some major change occurs in the business logic that requires changing the doSomething() operation, we expect of course to modify the BusinessDelegate. The Web Dynpro client will also presumably need to be modified - that's to be expected, and unavoidable. But then, we'll also need to go about and change the CommandBean's execute_doSomething() method - again, extra work for no apparent benefit. Adding and removing business methods has the same implication. All this for an layer that simply adds the prefix execute_ in front of all business method calls... Is this "abstraction layer" worth the cost of creating and maintaining it ??
    - <b>Unnecessarily complicates error handling</b>. I have been told that for technical reasons, it is recommended that all exceptions thrown by the CommandBean be of type WDException or WDRuntimException. But what if the client application needs to react differently to different failure scenarios ? When I create a business object, I might wish to provide the user with an error messages if connection is lost to the backend, and with a different error message if an object already exists in the database with the same attributes. In order to do that, I will have to catch the WDException, extract the cause, and continue processing from there... possible, yes, but clearly less standard and more labor intensive than the classical try/catch mechanism.
    To say nothing about the fact that SAP's own API documentation clearly states that applications using Web Dynpro can reference and catch WDExceptions, but THEY MUST NOT THROW OR EXTEND IT !
    - <b>Produces unnecessary DCs</b>. Page 6 of the aforementioned document presents an architectural view of a Web Dynpro project that uses a CommandBean. Why an extra DC for the CommandBean ?? I created my ModelBean class right inside the Web Dynpro project (in the Package view). That, to me, is where this class should reside, because it is created for no other reason that to be used by this particular Web Dynpro application. What is the benefit of placing it in its own independant DC ?
    - <b>Not a typical application of the Command pattern</b>. The well-documented command pattern (Design Patterns - Gang of Four) has been devised mainly to enable encapsulation of request as objects, thereby making it possible to:
    - specify, queue and execute requests at different times
    - decouple execution of a command from its invoker
    - support undo operations
    - support logging changes so that they can be reapplied in case of system crash making it possible to assemble commands into composite commands (macros), thereby structuring a system around high-level operations built on primitive operations.
    None of this applies to the way the SAP CommandBeans are being used. Not that much of an issue to people new to J2EE and/or OO development... but quite confusing for those already familiar with the classic Command pattern.
    At this point, I fail to understand the advantage of merging structure (model) and behaviour (execute methods) through the use of a unique CommandBean object. Am I missing something ?

    Hi Romeo,
    You would be disappointed, this reply ain't anywhere nearby to what you are talking about...
    I wanted to mail you, but you have not mentioned your email in your profile.
    I am really impressed by your flair for writing. It would be far better had you written a blog on this topic. Believe me, it would really be better. There is a much wider audience waiting out there to read your views rather than on the forums. This is what I believe. To top it, you would be rewarded for writing something like this from SDN. On the blogs too, people can comment and all, difference being there you would be rewarded by SDN, here people who reply to you would be rewarded by you. Doesn't make  much a difference.
    Anyways the ball is still in your court
    As far as I am concerned, it has still not been much time since I have started working on Web Dynpro. So can't really comment on the issue...
    Bye
    Ankur

  • Using an exsiting BI query in Web Dynpro

    I am interested in using an existing BI query in Web Dynpro.  The NetWeaver Developer Studio 7.0.06 contains some good documentation about how to create and execute an MDX statement on a BI cube.  However, I find this approach both complicated and impractical and I'd like to maintain my queries solely in the BI Query Designer.  I cannot find any documentation on importing an existing BI Query and using it within Web Dynpro.  I find this odd since the BI Java SDK Developers Guide specifically recommends this.  Is it the case that a BI Query can be treated as a cube within the Java code and found through IBIOlap?  Further, I cannot find any examples that show me how to construct a graph from the data as portrayed in the "BI Java SDK: A Business Scenario" portion of the NetWeaver documentation, or, place the result set on a table that can be used in an IView.  Also, all of the examples in the documentation are Servlet based.  I'm looking to create IViews for Portal deployment.  In summary, I'd like to create a table and graph combination, based on a BI Query, that I can deploy to the Portal using Web Dynpro.  Can you provide some insight on these questions and point me to some concrete examples of how to do these things?

    Vitaliano,
    You make a very good point.  And it is probably the way that we will go.  However, my task is to evaluate Web Dynpro and Visual Composer for our needs.  Especially since the graphing capabilities in Web App Designer are limited for our needs.  We will, at some point, have a need to combine warehoused information in BI with real-time data in R/3.  I'm anticipating that this is where Web Dynpro will be useful for us.  Therefore, my questions as stated regarding Web Dynpro.  I just find it strange that none of the SAP documentation elaborates on the topics that I am concerned with, even though tantalizing capability summaries are dangled throughout.
    Thank you.

  • Using CSS for Web dynpro application in EP

    Hi,
    I have some CSS (Style sheets) which I need to apply to the portal, so that all the web dynpro applications can have the same look and feel.
    I read something about Theme Editor in EP. Can I somehow use that to import the CSS contents into the EP theme?
    Any pointer to using CSS for Web Dynpro applications will be appreciated.
    Thanks.
    Puneet

    Hi,
    Go thorugh the follwing Web Dynpro Java
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/business_packages/a1-8-4/nw04stack09themes.zip
    To know how to use it and for the steps to be followed please follow the tutorial here
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to edit web dynpro themes.pdf
    the last url gives you a step by step procedure with wizards..
    Regards,
    RK

  • Problems using remote debugging for Web Dynpro applications

    Hello All,
      Have anyone ever encounter the above mentioned problem ? I am not able to step through my codes nor break @ my breakpoints using the debugging features despite many attempts following the tutorial on "Debuggng Web Dynpro applications". The problem always occur when I click on the Run -> Debug -> "Click on Debug". The debug perspective will show the threads running but my application window dows not appear. Should attempts  be made to "Terminate All" threads and relaunch my apllication again, I will get an error message   saying "Deployment of archive file already running : XXX.ear" Then I will need to wait some 15 mnutes or so before I can try again. Any suggestions ? Thank you.
    The status of my J2EE engine is as stated in the tutorial:
    1) State = "Debugging"
    2) Debug Mode = "On"
    3) Restricted Load Balancing = "Yes"
    4) Productive Use = "No"
      I have posted similar queries under "JDI" and "Web AS General" but did not receive and sugestions.
    from
    Kwok Wei

    Hi
    You should Create and Deploy if you want to reflect the code changes that you just did. However if you just want debug to an existing code then you need not Create and Deploy.
    This can also be done as a two step process where you first deploy from NDS and launch Debug without create and deploy.
    Is the issue that after you launch debug that it does not launch the application window.
    Regards
    Pran

  • Using IGS in Abap web dynpro application

    Hi ,
    I would like to develop an Abap web dynpro application with complex graphs.
    There is an installation of IGS services.
    In the layout screen I see only graphic basic options.
    In thr internet I saw much more options in the graphic label. ( WD applic-> view-> layout ).
    Does anyone know how to add this options to the view layout?
    Thenks,

    עיחיחןלכלןעל

Maybe you are looking for

  • How to hide some folders in a woprkspace from some external users?

    Hi We manage a workspace that has both Internal external users. We have a requirements in a way that external users can only see some folders they have access to. What is the best way to accomplish. I reviewed an article in "How to" section which des

  • How to find out javascript application pathname?

    Hi all, I need to find out the javascript(.js) fileName and pathName via scripting. For example if i run the script from the outside of the illustrator location (c:\script\sample.js).  I need to find out the location of the scripting file(application

  • PDF in PDF/A konvertieren

    Wenn ich ein PDF in ein PDF/A umwandeln möchte, dann gibt mir das Acrobat XI nicht die Wahl "PDF/A" auszuwählen, da es dieses gar nicht anzeigt. Was tun?

  • Can't update my Shuffle

    I'm having trouble with my Shuffle.. this started happening a few weeks ago. iTunes can't detect it. when i try opening it in My Computer, it freezes, and i can't get the latest iPod updater to work for it. it says "iPod Service Error" or something l

  • Nokia please do something for c6-00

    nokia please do something for c6-00 as c6-00 phone performance are really bad compared to other s60v5. nokia market is currently getting down day by day, so kindly support for s60v5 like c6-00 and 5800 for further improvements, so that customers of t