Skip to Content
author's profile photo Former Member
Former Member

WD Application URL to send by Email

Hello,

I have searched through many posts in thsi forum but I can't find any usable solution. I checked the Inter-Application-Navigation Tutorial as well which came up with the getApplicationURL method.

What I want to do is: Generate an <u>absolute</u> URL to another Web Dynpro Application...

Send this link by Email from my Application...

So the user can click on the Link in the Email and go directly to the second application - easy job you may think. In fact sending Email and getting URL Parameters was the easy part, but getting the URL gets complicated.

What I tried already in some variants:

wdComponentAPI.getURLService().getGeneralService().getApplicationURL("local/AppWD", "AppName");

-> I get a <b>relative</b> URL which is totally useless... Also if i do that with DeployableObjectPart as argument

String deployableObjectName = wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
WDDeployableObjectPart deployableObjectPart = WDDeployableObject.getDeployableObjectPart(deployableObjectName, "AppName", WDDeployableObjectPartType.APPLICATION);

String url = WDURLGenerator.getAbsoluteWebResourceURL(deployableObjectPart);

I get an URL like that:

http://SERVER:PORT/webdynpro/resources/local/AppWD/Applications/com.sap.coe.servprod.webdynpro.apps.AppName

which is not usable as well and those getAbsolute* methods are deprecated.

<b>Is there no way to create an <u>absolute</u> URL to a WD Application running on the same server programmatically?</b>. I mean building it by hand is not a problem, but not what I want...

Best regards,

Frank

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 09, 2007 at 05:08 PM
    	strURL = 
    		WDURLGenerator.getAbsoluteWebResourceURL(
    			"path",//Development Component NAME
    			"appliication_name").replaceAll("resources", "dispatcher") ; 
    

    Message was edited by:

    Roberto Tagliento

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 05:17 PM

    Yes would be... What I did so far is to put what I get from the Absolute method in java.net.URL...

    Get Protocol, Host and port from the URL and build it together with getStaticURL() (for '/webdynpro/dispatcher' part) and Name of deployable Object to the correct URL myself... It works... but I think its not the way it should work...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      URLGeneratorInternal is an internal WD framework class and you are not supposed to use it.

      To answer the original question, there is no direct API available that will give the WD application URL. You can build it manually, ofcourse, through

      WDURLGenerator.getDynamicApplicationURL

      and

      WDURLGenerator.getStaticApplicationURL()

      .

      Regards,

      Satyajit.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 09:52 AM

    This looks like an undocumented feature? Because I can't find this class in WD documentation?

    As long as there is no official way I keep my workaraound... But thanks for your efforts 😊

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.