• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do we get the CurrentURL ??

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the "currentURL" of a Web service?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shouldn't the documentation for the service tell you which parameters it expects?
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic