• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do we get the CurrentURL ??

 
Ameya Thakur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to call a webservice for which i require the currentURL,how do we get the currentURL

I was trying java.net.InetAddress Package.

Thanks in Advance,
Ameya
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the "currentURL" of a Web service?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean with the "currentURL"? If you want to call a webservice, then you must know the address of the webservice beforehand. Just like you have to know somebody's phone number if you want to call them. Didn't the provider of the webservice tell you what the address of it is?

Or do you mean something else? In that case please explain in more detail what you're looking for.
 
Ameya Thakur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Webservice expects an Current URL as a parameter...ie from where the request was made to the webservice...I hope i cleared your doubt

-Ameya
 
Ameya Thakur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
What is the "currentURL" of a Web service?


The webservice expects the CurrentURL as a parameter.ie from where the Service has been invoked.

-Ameya
 
Henry Wong
author
Marshal
Pie
Posts: 21021
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ameya Thakur:


The webservice expects the CurrentURL as a parameter.ie from where the Service has been invoked.

-Ameya


Do you mean something like the client's IP address, or hostname? Because, generally, the client that calls a webservice, doesn't have a URL.

Henry
 
Ameya Thakur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Henry Wong:


Do you mean something like the client's IP address, or hostname? Because, generally, the client that calls a webservice, doesn't have a URL.

Henry


The WebService is expecting the following params

String test = obj.getUrl(serviceID,sourceID,clientID,contractID,sourcePID,getCurrentURL(),userHostName,userHostAddress);

I have all other information except for the CurrentURL()

I hope i cleared your doubt.

-Ameya
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shouldn't the documentation for the service tell you which parameters it expects?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, that looks like the client is sending its own url as a parameter to the service. See if InetAddress.getLocalHost() does what you need.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic