cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture URL of Webdynpro application.

Former Member
0 Kudos

Hi,

I need to capture URL of the webdynpro application for hostname and port and then use it in my application.

Please advise me in this regard.

Thanks

Prasad

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hai,

If you want to get the host name and port of your app simply use

String hostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();

int port = TaskBinder.getCurrentTask().getProtocolAdapter().getServerPort();

Regards,

Naga

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

You can get the application url like this.

String deployableObjectName = wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();

String part = wdComponentAPI.getApplication().getDeployableObjectPart().getName();

try {

WDDeployableObjectPart deployableObjectPart =WDDeployableObject.getDeployableObjectPart( deployableObjectName, part,WDDeployableObjectPartType.APPLICATION);

String applicationURL1 = WDURLGenerator.getAbsoluteWebResourceURL(deployableObjectPart) ;

wdComponentAPI.getMessageManager().reportSuccess("urlToTargetApp"+applicationURL1);

} catch (WDURLException e)

{

wdComponentAPI.getMessageManager().reportException("Exception:"+e,true);

}

catch (WDDeploymentException ex)

{

wdComponentAPI.getMessageManager().reportException("Exception:"+ex,true); }

Also check this thread for getting the server name

https://forums.sdn.sap.com/click.jspa?searchID=2783356&messageID=329724

Regards,

Vijai

former_member189631
Active Contributor
0 Kudos

Prasad,

Please go through this link,

Regards,

<b>Ramganesan K</b>

rajendrengovend
Participant
0 Kudos

Hi Prasad,

did you find the URL for your Web Dynpro app? If not, just right click on the app and that will give you the host name and port and parameteres passed etc.

Regards,

Raj

Former Member
0 Kudos

Hi Prasad,

Please check followin link to get URL of your webdynpro application:

Let me know If you need more info.

regards,

Bhavik