I have a web-service, which uses Web Service Addressing. It is written in .NET platform, I’ve imported it into my application via wsimport, JAX-WS included in JDK 1.6.0_24. It works somehow, but some operations fail, in the .net client log I see the next error message:
Communication exception System.ServiceModel.ProtocolException: A reply
message was received for operation ‘UpdateMatchState’ with action
‘Mystuff:IQuoteReceiver:UpdateMatchStateResponse’. However, your
client code requires action
‘Mystuff/IQuoteReceiver/UpdateMatchStateResponse’.
Seems they use different standard, .net client expect slashes, but java client sends colons. Any ideas in which direction should I dig to make it work?
Update:
Ok, after investigation of a source code, I’ve found part which does it (W3CAddressingWSDLParserExtension):
protected static final String buildAction(String name, WSDLOperation o, boolean isFault) {
String tns = o.getName().getNamespaceURI();
String delim = SLASH_DELIMITER;
// TODO: is this the correct way to find the separator ?
if (!tns.startsWith("http"))
delim = COLON_DELIMITER;
...
}
So, if web service type namespace starts with http, it uses slashes as delimiter, otherwise it uses colons, meanwhile .NET uses slashes only. So much magic!
As said in my question, the problem is in JAX-WS implementation bundled in the JDK, either patch it (using endorsed) or just use Apache CFX, it works better.