cancel
Showing results for 
Search instead for 
Did you mean: 

WD Application URL to send by Email

Former Member
0 Kudos

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

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

Accepted Solutions (1)

Accepted Solutions (1)

roberto_tagliento
Active Contributor
0 Kudos

	strURL = 
		WDURLGenerator.getAbsoluteWebResourceURL(
			"path",//Development Component NAME
			"appliication_name").replaceAll("resources", "dispatcher") ; 

Message was edited by:

Roberto Tagliento

roberto_tagliento
Active Contributor
0 Kudos

To me works, but i know that is a deprecated method.

An alternative could be nice to know

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

roberto_tagliento
Active Contributor
0 Kudos

I know

Some SAP man can help?

Former Member
0 Kudos

hai,

String url=URLGeneratorInternal.getAbsoluteApplicationURL(wdComponentAPI.getDeployableObjectPart());

by using this you can get the complete url of ur wdp app

regards,

naga raju

Former Member
0 Kudos

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.