aspose file tools*
The moose likes Java in General and the fly likes How do we get  the CurrentURL ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How do we get  the CurrentURL ??" Watch "How do we get  the CurrentURL ??" New topic
Author

How do we get the CurrentURL ??

Ameya Thakur
Ranch Hand

Joined: Feb 04, 2004
Posts: 43
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
Marshal

Joined: Mar 22, 2005
Posts: 42942
    
  68
What is the "currentURL" of a Web service?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14435
    
  23

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Ameya Thakur
Ranch Hand

Joined: Feb 04, 2004
Posts: 43
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

Joined: Feb 04, 2004
Posts: 43
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
Sheriff

Joined: Sep 28, 2004
Posts: 19073
    
  40

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Ameya Thakur
Ranch Hand

Joined: Feb 04, 2004
Posts: 43
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
Marshal

Joined: Mar 22, 2005
Posts: 42942
    
  68
Shouldn't the documentation for the service tell you which parameters it expects?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do we get the CurrentURL ??