I'm having trouble getting Java2WSDL to generate a wsdl-file which suits my needs, and I'm probably doing something very wrong (or the Java2WSDL-task has bugs making it emit illegal wsdl...).
I have a complex java-class I need to communicate, but it has a very simple serialization. Some background: the class is used for representing codes, such as address-types, different kinds of categories etc. The java-representation has quite a few features enabling the application to retrieve a list of available codes, mapping back and forth etc with extensive use of custom serialization, singleton-pattern and flyweight-pattern. Think of it as a typesafe-enum initialized from a database. (Maybe I should have used a simple typesafe-enum-pattern and tried to integrate this with soap-enums instead, but I didn't...). What the whole thing boils down to is: How do I configure a custom serialization, and how do I make sure the generated wsdl is consistent with my custom (de)serialization-classes? What I have done is: - created (de)serializer(factory) classes for the code-object - set up the (de)serialization in server-config.wsdl - created a separate .wsdl-file (included-types.wsdl) which defines the xml-structure for this class. This is very simple: only a code and a text, both strings. (Additional semantics are looked up in the local code-registry). However, Java2WSDL doesn't seem to grok the included wsdl correctly. The generated wsdl seems to include the xmlns-declarations from the <definitions> tag in the included wsdl directly with little or no interpretation of this information. I have observed that if i provide no xmlns-declarations, or with other prefixes than tns[1-9] (such as xmlns:somens="http://..." which might be easier to interpret by a human than "tns1"), there is simply no appllicable namespace-declarations put into the generated wsdl. The other thing I've tried is to put declarations with prefix tns[1-9] into included-types.wsdl. In this case it is inserted into the generated wsdl, but it seems to be ignored. The references to these namespaces doesn't correspond to where the classes actually reside. Has anyone else gotten this to work, or am I just doing the wrong thing here? -- tlf: +47 92820227 (c) 2002 Rolf Rander N�ss http://www.pvv.org/~rolfn/ In a world without fences, there's no need for Gates.
