|
[
Permlink
| « Hide
]
John Busfield added a comment - 30/May/06 09:21 PM
AXIS-2473 and AXIS-2449 describe the same issue and are also unresolved.
I have attached a patch (and a patched lib) compatible with 1.4.0 release/branch.
The problem we had was when using document/literal wrapped complex types were not serialized correctly (missing namespaces). I have also included a fix for using arrays. them "item" tag is now used (to match the xml schema in the WSDL file), and with the correct namespace. The array-fix is taken more or less from another bugreport that was reported here at JIRA. Please let me know if it works for you to. Here is how we have used it: 1. Write the java classes that should represent the web service interface - including your java beans. 2. generate deploy/undeploy wsdd's using ant task "axis-wsdl2java" (DOCUMENT/LITERAL WRAPPED) 3. startup the server and publish the services. The patch has only been used/tested with axis on the serverside, on the client side we have used 2 other client implementations to test/verify. I'm very grateful for the patch that was supplied! I'm not familiar enough with the Axis source code to fix the issue myself. However, the patch had a couple of issues, so I attached a patch that should be applied after the first one to fix those issues.
1. Bean property names were not always capitalized correctly. See the Javadoc for java.beans.Introspector.decapitalize(String). I modified the code to use org.apache.axis.utils.BeanUtils instead of doing it manually. 2. There was a line in org.apache.axis.encoding.SerializationContext.serializeActual that was using == to compare strings. I changed it to "".equals(blah). I didn't see a bug caused by this, but I wanted to be proactive. We ran into an issue with the patch breaking deserialization of beans with properties that are arrays of beans in doc/lit. This new patch (axis-patch3.txt) appears to fix the issue, but I don't really understand all of the mechanics behind Axis. I commented out a section of code that may be necessary in some situations (maybe the difference is wrapped vs. unwrapped documents?).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||