aspose file tools*
The moose likes Web Services and the fly likes Virtual Earth Web Services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Virtual Earth Web Services" Watch "Virtual Earth Web Services" New topic
Author

Virtual Earth Web Services

Ramesh Sahu
Ranch Hand

Joined: Jul 14, 2008
Posts: 32
Hi,

I am trying to generate proxy files for the microsoft virtual earth web service using WSDL2Java api .

java org.apache.axis.wsdl.WSDL2Java -W -s -S true -o src http://staging.dev.virtualearth.net/webservices/v1/metadata/sear
chservice/searchservice.wsdl

I get the following exception.....
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
...
....
.....
........

I am able to access the wsdl file from IE . What could be the possible reason ?
Is there any other way to access Micrsoft virtual Earth webservices from any Java Application?
Nitin Pathak
Ranch Hand

Joined: Sep 25, 2006
Posts: 70
You must be behind a Proxy and hence you might be receiving this exception. I tried it on my PC and got all the 62 emitted files from WSDL2Java utility. You may also try and write a small piece of code invoking WSDL2Java with the �Proxy-Authorization� param set for the proxy.
Ramesh Sahu
Ranch Hand

Joined: Jul 14, 2008
Posts: 32
thank you .
Can you please elaborate on how to set �Proxy-Authorization� param for the proxy & where do I need to add this?

[ December 17, 2008: Message edited by: Ramesh Sahu ]
[ December 17, 2008: Message edited by: Ramesh Sahu ]
Nitin Pathak
Ranch Hand

Joined: Sep 25, 2006
Posts: 70
Originally posted by Ramesh Sahu:

Can you please elaborate on how to set �Proxy-Authorization� param for the proxy & where do I need to add this?


Maybe this post would prove to be useful for your cause.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Basically you have to set the proxy properties to get through

Client Side Axis: Standard Properties


Otherwise download all the WSDL and XML Schema files with a browser and save them at a local file location:

http://staging.dev.virtualearth.net/webservices/v1/metadata/searchservice/searchservice.wsdl
http://staging.dev.virtualearth.net/webservices/v1/metadata/searchservice/searchservice1.wsdl
http://staging.dev.virtualearth.net/webservices/v1/metadata/searchservice/searchservice.xsd
http://staging.dev.virtualearth.net/webservices/v1/metadata/searchservice/searchservice1.xsd
http://staging.dev.virtualearth.net/webservices/v1/metadata/searchservice/searchservice3.xsd
http://staging.dev.virtualearth.net/webservices/v1/metadata/searchservice/searchservice2.xsd
http://staging.dev.virtualearth.net/webservices/v1/metadata/searchservice/searchservice4.xsd

And supply them all to WSDL2Java


The ellipsis (...) is simply a placeholder for other commandline options that I do not show.

The schemaLocation attribute is only a suggestion - so hopefully WSDL2Java will take the files that you supply instead.
[ December 17, 2008: Message edited by: Peer Reynders ]
 
wood burning stoves
 
subject: Virtual Earth Web Services