Hi,
I've obtained .java source using jaxb from the .xsd of OTA: http://www.opentravel.org/Specifications/ReleaseNotes.aspx?spec=2007A with the command: xjc -nv OTA_HotelAvailRQ.xsd -p OTA_jaxb OTA_HotelAvailRQ.xsd OTA_HotelAvailRS.xsd OTA_HotelSearchRQ.xsd OTA_HotelSearchRS.xsd OTA_HotelResRQ.xsd OTA_HotelResRS.xsd I've compiled the sources in a Eclipse project and used them to write a method to be published as a web service with axis 1.4 on tomcat 5.5 ... public OTAHotelSearchRS interrogazioneHotelSearch_ADV ( String usr, String psw, OTAHotelSearchRQ hotelSearchRQ ) ... The problem is in the above .xsd there are structures like: <xsd:complexType name="Items"> <xsd:sequence> <xsd:element name="item" minOccurs="1" maxOccurs="unbounded"> Items.java <xsd:complexType> <xsd:sequence> <xsd:element name="productName" type="xsd:string"/> <xsd:element name="quantity"> <xsd:simpleType> <xsd:restriction base="xsd:positiveInteger"> <xsd:maxExclusive value="100"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="USPrice" type="xsd:decimal"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/> </xsd:sequence> <xsd:attribute name="partNum" type="SKU" use="required"/> </xsd:complexType> Items.ItemType </xsd:element> </xsd:sequence> </xsd:complexType> which are translated by jaxb (and also xmlbeans) in: public interface Items { ItemType[] getItem(); public interface ItemType { String getPartNum(); void setPartNum(String value); java.lang.String getComment(); void setComment(java.lang.String value); java.math.BigDecimal getUSPrice(); void setUSPrice(java.math.BigDecimal value); String getProductName(); void setProductName(String value); java.util.Calendar getShipDate(); void setShipDate(java.util.Calendar value); java.math.BigInteger getQuantity(); void setQuantity(java.math.BigInteger value); } } https://java.sun.com/webservices/docs/2.0/tutorial/doc/JAXBUsing2.html#wp99731 PROBLEMS: 1) in the deploy.wsdd I got (using eclipse create web service wizard): <typeMapping xmlns:ns="http://OTA_jaxb" qname="ns:Items_ItemType" type="java:OTA_jaxb.Items_ItemType" <---------------------with _ !!! serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 2) I've changed it to <typeMapping xmlns:ns="http://OTA_jaxb" qname="ns:Items_ItemType" type="java:OTA_jaxb.Items_ItemType" <---------------------with . !!! serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> But when I try to deploy the web service ... java -cp $AXISCLASSPATH org.apache.axis.client.AdminClient -lhttp://localhost:8080/dynamic-packaging/services/AdminService deploy.wsdd ... i got in catalina.out: GRAVE: Unable to deploy typemapping: {http://OTA_jaxb}BasicPropertyInfoType_Position java.lang.ClassNotFoundException: OTA_jaxb.BasicPropertyInfoType.Position at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187) at java.security.AccessController.doPrivileged(Native Method) at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160) at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100) at org.apache.axis.deployment.wsdd.WSDDTypeMapping.getLanguageSpecificType(WSDDTypeMapping.java:183) at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542) at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253) at org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:233) at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:192) at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:78) at org.apache.axis.utils.Admin.processWSDD(Admin.java:111) at org.apache.axis.utils.Admin.process(Admin.java:158) at org.apache.axis.utils.Admin.AdminService(Admin.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.java:126) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:619) 3) So I tried to work around this writing classes class Items_ItemType extends Items.ItemType{ } and leaving in deploy.wsdd: <typeMapping xmlns:ns="http://OTA_jaxb" qname="ns:Items_ItemType" type="java:OTA_jaxb.Items_ItemType" <---------------------with _ !!! serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> this worked fine and the service was deployed and seebed to work, but ... 4) when i call the service: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No serializer found for class OTA_jaxb.BasicPropertyInfoType$Award in registry [EMAIL PROTECTED] faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class OTA_jaxb.BasicPropertyInfoType$Award in registry [EMAIL PROTECTED] at Some one may help me? Thanks a lot. Bartolomeo Nicolotti --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
