|
|
|
Thanks for the TestCase. Scheduling this for 1.2 as it seems critical and investigating it now.
Thanks Dan, it's a show-stopper for WSDL first development. Further evidence that the schema targetNamespace is the right thing to use comes from the WS-I Basic Profile:
""" R2712 A document-literal binding MUST be serialized as an ENVELOPE with """ http://www.ws-i.org/Profiles/BasicProfile-1.1.html#Namespaces_for_soapbind_Elements OK, I found the bug. Working on determing the correct fix. I'll think I can get a fix in tonight and push out some new snapshots.
A fix is now in SVN. I'll post a SNAPSHOT build later tonight and send you a link.
Better late then never I suppose. Here it is:
Dan,
I have tried out this new jar file with only partial success. 1 The generated WSDL now has only one schema which is good, but the schema targetNamespace is not the same as the original WSDL. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> Notice that the makeCallResponse element is still in the WSDL namespace rather than the schema namespace. The sample .NET client still fails to deserialise correctly. Regards, Adrian Just wanted to give you a heads up I'm still on this. Sorry for the delay. It requires a change to our generator module. The issue is that JSR181 annotations don't carry the necessary metadata for this wsdl. However, JAX-WS does, so that is one option. There might be a non-jax-ws option as well. I'm looking into it.
OK, I've fixed this - and I even wrote the test correctly this time!
The new build is here: You'll need to use the JAXWS profile to generate your client like so: <wsgen outputDirectory="${basedir}/target/test-services" If you're writing a server implementation of the service, you'll need to use the JAXWSServiceFactory to create your service, instead of the AnnotationServiceFactory. Does this prevent an annotated webservice from functioning then?
No, JAXWSServiceFactory just extends AnnotationServiceFactory. It supports some additional (necessary) JAX-WS annotations that the JSR181 people didn't think to include. Think of it as JSR181+MoreAnnotations
So I've tried this on my wsdl and get NullPointerExceptions on webservice calls that have no parameters.
So for this example, if you change makeCall request to: <xs:element name="makeCall"> You get a stack trace that looks like this: Can you have a look at this and re-open if you can reproduce? Thanks Hiya, I added a test for this to SVN and I can't reproduce it. Its really weird that you're getting an NPE right there. At the very least it doesn't have anything to do with the targetNamespace. I would check to make sure that your client is generated using the latest WSDL.
If you're still having problems, please open a new issue. Also, a test WSDL & test case would help greatly. I have managed to generate the code for this using wsgen but still have issues:
1. The original problem still exists, see above (way up there!) Please re-open this case. This issue is really a show stopper for WSDL-first development. Hi Adrian,
I'm sorry you're still experiencing issues. Regarding #1: I'm a bit confused though as I have a unit test with the wsdl you've provided showing that it works. Your wsdl: The test input message: The test (see line 57 which sends the message and then asserts that the correct response has been received: So I'm not sure why you're getting back the wrong response. Are you per chance using the AnnotationServiceFactory instead of the JAXWSServiceFactory? Regarding #2: XFireNamespaceProblemServiceService stub = new XFireNamespaceProblemServiceService(); Client xfireClient = Client.getInstance(client); client.makeCall() #3 Yes, you're absolutely right. Which is why in the next version, JSR181 by itself will be completely deprecated. When XFire started, JAX-WS wasn't finalized, so we had to use JSR181. It wasn't until 1.1 that JAX-WS was finalized. Dan,
Thanks for the tips. I have now changed by services.xml to include <serviceFactory>org.codehaus.xfire.jaxws.JAXWSServiceFactory</serviceFactory> Is this change in the current release 1.2 ? Regards, Adrian It should be. There are a few JAX-WS fixes coming out in 1.2.1 very soon though. Mostly around fault generation compliance. 1.2.1 should be out possibly tonight or otherwise tomorrow morning. I'm waiting to hear back about a specific fix from a build before its released.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"""
If use is literal, then each part references a concrete schema
definition using either the element or type attribute. In the first
case, the element referenced by the part will appear directly
under the Body element (for document style bindings)...
"""
for concrete, we read "the qname specified by the schema",
this is how other toolkits work.
Paul