Consuming a WCF WsHttpBinding WebService in Java
Asked Answered
S

2

11

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?

Swirsky answered 16/7, 2009 at 18:5 Comment(1)
Can you please share your code to use WCF service with wsHttpBinding in Java Client ? I am using Axis2 and facing issue like Security token validation and Binding mismatch. I think Axis2 doesn't allow interop between wcf with wsHttpBinding and Java client.Dash
G
14

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.

Genesa answered 29/1, 2010 at 17:26 Comment(0)
F
0

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.

Forta answered 16/7, 2009 at 23:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.