Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-681

WS complex Types Problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.0-M4
    • 1.0-M5
    • Tomcat
    • None

    Description

      The following Web Service (with a complex type causes problems:

      Service Interface
      -----------------------------------------------------------------
      public interface PetShop extends Remote
      {
      public Category[] getCategories() throws RemoteException;
      public Product[] getProductsByCategoryId(String catId) throws RemoteException;
      }
      --------------------------------------------------------------------

      wsdl (extract)
      -----------------------------------------------------------------
      <types>
      <schema targetNamespace="urn:http://ejb.reallybigpet.dw.ibm.com"
      xmlns:tns="urn:http://ejb.reallybigpet.dw.ibm.com"
      xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns="http://www.w3.org/2001/XMLSchema">
      <import
      namespace="urn:http://arrays/com/ibm/dw/reallybigpet/ejb" />
      <complexType name="Category">
      <sequence>
      <element name="id" type="xsd:string" nillable="true" />
      <element name="name" type="xsd:string" nillable="true" />
      </sequence>
      </complexType>
      <complexType name="Product">
      <sequence>
      <element name="catId" type="xsd:string" nillable="true" />
      <element name="desc" type="xsd:string" nillable="true" />
      <element name="name" type="xsd:string" nillable="true" />
      <element name="price" type="xsd:long" />
      <element name="sku" type="xsd:string" nillable="true" />
      </sequence>
      </complexType>
      </schema>
      <schema
      targetNamespace="urn:http://arrays/com/ibm/dw/reallybigpet/ejb"
      xmlns:tns="urn:http://arrays/com/ibm/dw/reallybigpet/ejb"
      xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns2="urn:http://ejb.reallybigpet.dw.ibm.com"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="urn:http://ejb.reallybigpet.dw.ibm.com" />
      <complexType name="CategoryArray">
      <sequence>
      <element name="value" type="ns2:Category"
      nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
      </complexType>
      <complexType name="ProductArray">
      <sequence>
      <element name="value" type="ns2:Product"
      nillable="true" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
      </complexType>
      </schema>
      </types>
      ---------------------------------------------------------------------------------------------

      mapping.xml (extract)
      --------------------------------------------------------------------------------------------
      java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
      xmlns:tns="urn:http://ejb.reallybigpet.dw.ibm.com"
      xmlns:ns2="urn:http://arrays/com/ibm/dw/reallybigpet/ejb">
      <package-mapping>
      <package-type>com.ibm.dw.reallybigpet.ejb</package-type>
      <namespaceURI>
      urn:http://ejb.reallybigpet.dw.ibm.com
      </namespaceURI>
      </package-mapping>
      <package-mapping>
      <package-type>
      com.ibm.dw.reallybigpet.ejb._arrays.com.ibm.dw.reallybigpet.ejb
      </package-type>
      <namespaceURI>
      urn:http://arrays/com/ibm/dw/reallybigpet/ejb
      </namespaceURI>
      </package-mapping>

      <java-xml-type-mapping>
      <java-type>com.ibm.dw.reallybigpet.ejb.Category</java-type>
      <root-type-qname>tns:Category</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>id</java-variable-name>
      <xml-element-name>id</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>name</java-variable-name>
      <xml-element-name>name</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>

      <java-xml-type-mapping>
      <java-type>com.ibm.dw.reallybigpet.ejb.Category[]</java-type>
      <root-type-qname>ns2:CategoryArray</root-type-qname>
      <qname-scope>complexType</qname-scope>
      </java-xml-type-mapping>

      <java-xml-type-mapping>
      <java-type>com.ibm.dw.reallybigpet.ejb.Product</java-type>
      <root-type-qname>tns:Product</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>catId</java-variable-name>
      <xml-element-name>catId</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>name</java-variable-name>
      <xml-element-name>name</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>desc</java-variable-name>
      <xml-element-name>desc</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>price</java-variable-name>
      <xml-element-name>price</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>sku</java-variable-name>
      <xml-element-name>sku</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>

      <java-xml-type-mapping>
      <java-type>com.ibm.dw.reallybigpet.ejb.Product[]</java-type>
      <root-type-qname>ns2:ProductArray</root-type-qname>
      <qname-scope>complexType</qname-scope>
      </java-xml-type-mapping>
      --------------------------------------------------------------------

      causes the following error (geronimo.log)
      --------------------------------------------------------------------
      DEBUG [BaseSerializerFactory] Exception:
      java.lang.NoSuchMethodException: org.apache.axis.encoding.ser.ArraySerializerFactory.create(java.lang.Class, javax.xml.namespace.QName)
      at java.lang.Class.getMethod(Unknown Source)
      at org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:254)
      at org.apache.geronimo.axis.client.TypeInfo.register(TypeInfo.java:92)
      at org.apache.geronimo.axis.client.TypeInfo.register(TypeInfo.java:47)
      at org.apache.geronimo.axis.builder.AxisServiceBuilder.createServiceDesc(AxisServiceBuilder.java:173)
      at org.apache.geronimo.axis.builder.AxisServiceBuilder.createServiceInfo(AxisServiceBuilder.java:97)
      at org.apache.geronimo.axis.builder.AxisBuilder.configurePOJO(AxisBuilder.java:114)
      at org.apache.geronimo.axis.builder.AxisBuilder$$FastClassByCGLIB$$16a52a9a.invoke(<generated>)
      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:719)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:94)
      at org.apache.geronimo.j2ee.deployment.WebServiceBuilder$$EnhancerByCGLIB$$fc7adbe.configurePOJO(<generated>)
      at org.apache.geronimo.jetty.deployment.JettyModuleBuilder.addServlet(JettyModuleBuilder.java:806)
      at org.apache.geronimo.jetty.deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:697)
      at org.apache.geronimo.jetty.deployment.JettyModuleBuilder$$FastClassByCGLIB$$b30bba8a.invoke(<generated>)
      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:719)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:94)
      at org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9e74b9e5.addGBeans(<generated>)
      at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:377)
      at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:719)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:94)
      at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$65304bdb.buildConfiguration(<generated>)
      at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:156)
      at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:80)
      at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:754)
      at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:177)
      at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:124)
      at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(<generated>)
      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:754)
      at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:177)
      at org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(MBeanServerDelegate.java:117)
      at mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java:219)
      at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:34)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjectInvoker.java:99)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionSubjectInvoker.java:31)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjectInvoker.java:90)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
      at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnectionSubjectInvoker.java:86)
      at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubjectInvoker.java:80)
      at $Proxy0.invoke(Unknown Source)
      at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:221)
      at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
      at sun.rmi.transport.Transport$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      ------------------------------------------------------------------------------------------------

      :Stefan Schmidt

      Attachments

        Activity

          People

            Unassigned Unassigned
            stsmedia Stefan Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: