views:

2147

answers:

3

Hey guys,

I'm trying to get a Java Client to communicate with a WCF wshttpbinding WebService. But I am unable to do so. The call either hangs, or I get "musunderstoodheader expcetions".

My Web Service is just the default Visual Studio generated "WCF Service Library Template".

My Web Service Client is just a blank IntelliJ project, with the corresponding stub generated using "Add Web Service Client" (the webservice platform specified is JAX-WS 2.X).

When I change my binding to BasicHttpBinding everything works flawlessly.

I've tried playing with the WsHttpBinding configuration, including turning off security, but I've had no success.

Suggestions ? Thoughts ? Is the WsHttpBinding only partially supported by JAX-WS 2.0?

A: 

As an experiment, I suggest you try the reverse: create a simple WS-Security service in Java, then try to consume it in WCF.

John Saunders
Downvoters: at least say what the problem is. You don't help others who may read this answer by just saying "-1".
John Saunders
A: 

I would carefully examine your WCF config and remove all authenitcation, authoraization etc., properties. Remember, by default, WCF will expose your service securely when using a secure transport/binding. Therefore, unless you configure your Java client to honor those security demands, it will most likely fail to authenticate and you won't see the two converse.

Once you have the two talking, gradually work through adding each security element until you have your Java client cofigured correctly.

As stated, I've already turned off ALL security.
vicjugador
+2  A: 

Your problem is that JAX-WS doesn't support the same WS protocols that are used in the wsHttpBinding. You need to use WSIT instead. WSIT is available as part of the Metro library, which is also available on Glassfish.

I recommend using wsHttpBinding or ws2007HttpBinding where possible, but you can still do a fairly secure service with basicHttpBinding over SSL/Transport Auth.

Randolpho