Hi, I developed a web service using Axis 1.3 final. Since I already had a WSDL for the service interface, I decided to create the types using XmlBeans 2.1.0. So I have a simple interface for the service:
public SearchResultDocument search( QueryDocument query ); I created a server-config.wsdd containing a definition for the service and a <typeMapping> tag for each xmlbean I have (although I think I need only a mapping for SearchResultDocument and QueryDocument, do I?). When I deploy the service and try accessing the wsdl (http://localhost/axis/services/myService?wsdl) I receive a NullPointerException thrown by XmlBeanSerializer: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.NullPointerException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException at org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.getTypeNode(XmlBeanSerializer.java:276) at org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.writeSchemaForDocType(XmlBeanSerializer.java:134) at org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.writeSchema(XmlBeanSerializer.java:120) at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1849) at org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:421) at org.apache.axis.wsdl.fromJava.Types.writeWrappedParameter(Types.java:612) at org.apache.axis.wsdl.fromJava.Emitter.writeWrapperPart(Emitter.java:1680) at org.apache.axis.wsdl.fromJava.Emitter.writeRequestMessage(Emitter.java:1467) at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1106) at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1075) at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:484) at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:331) at org.apache.axis.providers.BasicProvider.generateWSDL(BasicProvider.java:242) at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104) at org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:319) at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:482) at org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68) ... Since I created the beans from WSDL, I expect Axis to generate an equivalent WSDL using the XmlBeans themselves. If I try to set a mapping using the concrete XmlBeans implementations (SearchResultDocumentImpl), Axis doesn't seem to ever invoke writeSchema() on the serializer, that is what I expect. I'm in doubt if I really need a typemapping *also* for the concrete implementations because I suspect that when from the service I return a SearchResultImpl Axis can't find a serializer for that... I tried to use the ser/deser provided at http://issues.apache.org/jira/browse/AXIS-1764 with no luck. I found problems integrating it with my actual installation, seems it cannot find org.w3.x2001.xmlSchema.SchemaDocument$Schema... Since it looks like importing a XmlBeans of the XSchema schema, I tried to create it but then I had a ClassCastException org.apache.xmlbeans.impl.xb.xsdschema.impl.Sc hemaDocumentImpl$SchemaImpl at XmlBeanSerializer.java:151. I'm a bit frustrated, so I didn't investigated the problem anymore... Someone could help? Bye, Davide Romanini