• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Java Web services - Getting WSDLs

scooby

Contractor Among Contractors
Thanks received
3
I'm being told by my "plenty quickness, much cheapness" Java Web Service contractor that the only way to connect from our java web service to an external web service and get the WSDL is to use TELNET.

This is causing the client infrastructure team issues as they wont open telnet.

Are there other ways to get the WSDL and the end points when using Java? I'm not convinced he is telling me the truth!
 
Telnet can use any port. Try the following at a command prompt (stuff you type is in bold):

prompt$ telnet forums.contractoruk.com 80
Trying 89.16.161.127...
Connected to forums.contractoruk.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: forums.contractoruk.com



(N.B. there's an extra blank line after the "Host:" line - hit Enter twice.)

At that point you will be served the source of the CUK forums home page.

Basically, you can use anything that can connect using HTTP, as the endpoint should be accessible over HTTP. It may be on a non-standard port rather than 80, but that's a different matter; the W in WSDL stands for "Web", and HTTP is how the web works.

If it's on something like 8080, just change the "80" in the above (and the URL, obviously) for the same result.

Java has had support for HTTP since version 1 back in the 90s, so I don't know why he thinks telnet is a good idea :freaky:

EDIT: ask your "Web Service Contractor" if he's ever heard of java.net.HttpURLConnection - I seem to remember using it around 1998, and it's still there in Java 6.
 
Last edited: 11:44
I'm being told by my "plenty quickness, much cheapness" Java Web Service contractor that the only way to connect from our java web service to an external web service and get the WSDL is to use TELNET.

This is causing the client infrastructure team issues as they wont open telnet.

Are there other ways to get the WSDL and the end points when using Java? I'm not convinced he is telling me the truth!

It will be HTTP so using a browser through your proxy as per any other web page should work fine.
 
That is exactly what I was thinking. Don't you need the WSDL to write the client?

If you want to use one of the web service frameworks to generate a client and data objects based on the schema / WSDL then you need WSDL, but it's also possible to use a client that just shovels soap encrusted XML payload back and forth in which case you can get by without it, although you still need most of the information contained therein.
 
The WSDLs would be something you would want at development time, not something you would be intersted in at runtime.

Unless you were writing some kind of uber client that can dynamically change to deal with any new webservice that it somes across. Do you work for Skynet? At least if you are employing bobs it will not become self aware for a long time.

If this is what this guy is peddling I would ask him to put what his plans are down in an email then post it here so we can have a laugh.
 
Kind of.

Your guy needs to create a client for the web service you wish to call, and to do so he needs the wsdl. If he has the URL for the wsdl but can't retrieve it using a browser then possibly your proxy is doing some sort of filtering and preventing him from accessing it.

Or he might be useless.

A simple way to test this is to put the url into your browser and see what you get. If it's wsdl then he's useless*, if not you have a problem.

* you might need to "save page as" to see what you actually get.
 
He is still insisting it has to be Telnet... There is no other way, it has to use wsimport...

He is creating the client and needs the WSDL to create the objects (this is what he is saying...). I've can he not do this part manually as we have an offline copy of the WSDL, but alas no. This is all Java 5.

These problems keep appearing in the last 5 days which seems to co-incide with him asking for an extension as contract is up next Tuesday.
 

Advertisers

Back
Top