Hi Robin!
I'm interested in going down this road, but you're farther along then I.
Wierenga, R. - SPLXE wrote:
Steps i took so far are: * created a wsdl file including the schema for my complextypes
It sounds like you created the wsdl from hand? I went a different direction: I created a schema for each of my data types in an external schema, then attempted to import the schema by creating an <xsd:import> element using the writeSchema( ) method in the Serializer for that data type.
What I wanted to do originally was to extract the XML schema fragment used to create the JAXB object from the JAXB object itself, instead of having to reference a schema file. That way I can build my JAXB objects and reference their <complexType> elements right from the object without having to go to an external XSD to retrieve them. I was unable to do so.
In Suns reference implementation, each JAXB object has a private field "schemaFragment" which seems to contain the piece of schema used to create the object, but a. it is a private field b. I don't know how to get at it and c. it is encoded. So presumably there is a decoder which is a. public and b. can get at the private field and c. can decode it but I've not found such a thing.
* used axis wsdl2java tool to generate the skeleton, implementation and beans sources
I'm stuck on this step. I get an error about a referenced, but undefined data type. I'm not sure yet what the issue is but I'm going to do some heavy debugging this afternoon (hopefully).
* created a custom JAXB serializer based on Castor serializer example
I initially tried to use JAXB and ran into some issues. Do you have a code snippet I could take a look at? I'm using Sun's JAXB implementation. I can share as well (I have some code on a webpage).
* modified wsdd to use the new JAXB serializer for each compleyType and element defined in the schema
Not there yet.
* deployed stuff using adminclient
Yup, I'm doing that (over and over as I debug my service) :)
* tested results using WSAD 5.1 Webservice explorer
I've never used this tool. Is it freely available?
Problems which i encountered: * A call to the webservice results in a Soap fault (java.lang.reflect.InvocationTargetException) * The wsdl file generated by Axis after deployment is invalid, it does not contain the complexType definitions which were defined in the original wsdl. How could this happen? When I leave out the type mappings in my deploy.wsdd and redeploy it produces a valid wsdl file...strange.
Interesting. Do you get any wsdl at all when the typemapping is defined? If so, can you compare the two wsdl documents and look for differences?
Elliot
