I am working on an Axis avalon component. I have pretty much everything working now. I can expose a class with *one* method call :)
The part I'm struggling with yet is the WSDL/schema generation. I found out earlier today about the "setDoAutoTypes" feature, which solved most of my issues. I am now able to serialize/deserialize correctly. But, my schema isn't formed how I want it. For example, in one of my unit tests (http://cvs.werken.com/viewcvs.cgi/plexus-components/axis/src/test/org/codehaus/plexus/axis/?cvsroot=plexus) this is generated as my schema:
<schema targetNamespace="http://xml.apache.org/axis/java" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="org.codehaus.plexus.axis.SparePart"> <sequence> <element name="SKU" nillable="true" type="xsd:string"/> </sequence> </complexType> </schema>
but, I think it should be something like this:
<schema targetNamespace="http://axis.plexus.codehaus.org/" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="SparePart"> <sequence> <element name="SKU" nillable="true" type="xsd:string"/> </sequence> </complexType> </schema>
The method getTypeQName in TypeMappingImpl sets this namespace:
if (xmlType == null && doAutoTypes) {
xmlType = new QName(Constants.NS_URI_JAVA,
javaType.getName());
}What is the reasoning is behind this? Why not do a Namespaces.makeNamespace() call instead of using http://xml.apache.org/axis/java (aka NS_URI_JAVA). In addition the name of the complexTypes is the full class name, which creates quite wierd output when generating stubs! :) I am no XML expert so I may be missing something.
Cheers,
Dan Diephouse
