tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r600745 [1/3] - in /openejb/trunk/openejb3: container/openejb-jee/src/main/java/org/apache/openejb/jee/ server/openejb-axis/ server/openejb-axis/src/main/java/org/apache/openejb/server/axis/ server/openejb-axis/src/main/java/org/apache/open...
Date Tue, 04 Dec 2007 00:35:47 GMT
Author: dain
Date: Mon Dec  3 16:35:45 2007
New Revision: 600745

URL: http://svn.apache.org/viewvc?rev=600745&view=rev
Log:
Added info tree and builder for jaxrpc

Added:
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/JavaServiceDescBuilder.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/BindingStyle.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/HeavyweightOperationInfoBuilder.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/HeavyweightTypeInfoBuilder.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/JaxRpcFaultInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/JaxRpcFieldInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/JaxRpcOperationInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/JaxRpcParameterInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/JaxRpcServiceInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/JaxRpcServiceInfoBuilder.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/JaxRpcTypeInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/LightweightOperationInfoBuilder.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/LightweightTypeInfoBuilder.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/SchemaInfoBuilder.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/SchemaTypeKey.java
Modified:
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ExceptionMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaWsdlMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaXmlTypeMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PackageMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceEndpointInterfaceMapping.java
    openejb/trunk/openejb3/server/openejb-axis/pom.xml
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisService.java

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ExceptionMapping.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ExceptionMapping.java?rev=600745&r1=600744&r2=600745&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ExceptionMapping.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ExceptionMapping.java Mon Dec  3 16:35:45 2007
@@ -44,7 +44,7 @@
     "wsdlMessagePartName",
     "constructorParameterOrder"
 })
-public class ExceptionMapping {
+public class ExceptionMapping implements Keyable<QName> {
     @XmlElement(name = "exception-type", required = true)
     protected String exceptionType;
     @XmlElement(name = "wsdl-message", required = true)
@@ -57,6 +57,10 @@
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
     @XmlID
     protected String id;
+
+    public QName getKey() {
+        return getWsdlMessage();
+    }
 
     public String getExceptionType() {
         return exceptionType;

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaWsdlMapping.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaWsdlMapping.java?rev=600745&r1=600744&r2=600745&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaWsdlMapping.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaWsdlMapping.java Mon Dec  3 16:35:45 2007
@@ -25,8 +25,11 @@
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.namespace.QName;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
+import java.util.Map;
 
 /**
  * The element describes the Java mapping to a known WSDL document.
@@ -46,15 +49,15 @@
 })
 public class JavaWsdlMapping {
     @XmlElement(name = "package-mapping", required = true)
-    protected List<PackageMapping> packageMapping;
+    protected KeyedCollection<String, PackageMapping> packageMapping;
     @XmlElement(name = "java-xml-type-mapping")
     protected List<JavaXmlTypeMapping> javaXmlTypeMapping;
     @XmlElement(name = "exception-mapping")
-    protected List<ExceptionMapping> exceptionMapping;
+    protected KeyedCollection<QName,ExceptionMapping> exceptionMapping;
     @XmlElement(name = "service-interface-mapping")
     protected List<ServiceInterfaceMapping> serviceInterfaceMapping;
     @XmlElement(name = "service-endpoint-interface-mapping")
-    protected List<ServiceEndpointInterfaceMapping> serviceEndpointInterfaceMapping;
+    protected KeyedCollection<String, ServiceEndpointInterfaceMapping> serviceEndpointInterfaceMapping;
     @XmlAttribute
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
     @XmlID
@@ -62,13 +65,20 @@
     @XmlAttribute(required = true)
     protected String version;
 
-    public List<PackageMapping> getPackageMapping() {
+    public Collection<PackageMapping> getPackageMapping() {
         if (packageMapping == null) {
-            packageMapping = new ArrayList<PackageMapping>();
+            packageMapping = new KeyedCollection<String, PackageMapping>();
         }
         return this.packageMapping;
     }
 
+    public Map<String, PackageMapping> getPackageMappingMap() {
+        if (packageMapping == null) {
+            packageMapping = new KeyedCollection<String, PackageMapping>();
+        }
+        return this.packageMapping.toMap();
+    }
+
     public List<JavaXmlTypeMapping> getJavaXmlTypeMapping() {
         if (javaXmlTypeMapping == null) {
             javaXmlTypeMapping = new ArrayList<JavaXmlTypeMapping>();
@@ -76,13 +86,20 @@
         return this.javaXmlTypeMapping;
     }
 
-    public List<ExceptionMapping> getExceptionMapping() {
+    public Collection<ExceptionMapping> getExceptionMapping() {
         if (exceptionMapping == null) {
-            exceptionMapping = new ArrayList<ExceptionMapping>();
+            exceptionMapping = new KeyedCollection<QName,ExceptionMapping>();
         }
         return this.exceptionMapping;
     }
 
+    public Map<QName,ExceptionMapping> getExceptionMappingMap() {
+        if (exceptionMapping == null) {
+            exceptionMapping = new KeyedCollection<QName,ExceptionMapping>();
+        }
+        return this.exceptionMapping.toMap();
+    }
+
     public List<ServiceInterfaceMapping> getServiceInterfaceMapping() {
         if (serviceInterfaceMapping == null) {
             serviceInterfaceMapping = new ArrayList<ServiceInterfaceMapping>();
@@ -90,11 +107,18 @@
         return this.serviceInterfaceMapping;
     }
 
-    public List<ServiceEndpointInterfaceMapping> getServiceEndpointInterfaceMapping() {
+    public Collection<ServiceEndpointInterfaceMapping> getServiceEndpointInterfaceMapping() {
         if (serviceEndpointInterfaceMapping == null) {
-            serviceEndpointInterfaceMapping = new ArrayList<ServiceEndpointInterfaceMapping>();
+            serviceEndpointInterfaceMapping = new KeyedCollection<String, ServiceEndpointInterfaceMapping>();
         }
         return this.serviceEndpointInterfaceMapping;
+    }
+
+    public Map<String, ServiceEndpointInterfaceMapping> getServiceEndpointInterfaceMappingMap() {
+        if (serviceEndpointInterfaceMapping == null) {
+            serviceEndpointInterfaceMapping = new KeyedCollection<String, ServiceEndpointInterfaceMapping>();
+        }
+        return this.serviceEndpointInterfaceMapping.toMap();
     }
 
     public String getId() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaXmlTypeMapping.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaXmlTypeMapping.java?rev=600745&r1=600744&r2=600745&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaXmlTypeMapping.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaXmlTypeMapping.java Mon Dec  3 16:35:45 2007
@@ -81,16 +81,33 @@
         return anonymousTypeQname;
     }
 
+    public QName getAnonymousTypeQnameQName() {
+        int pos = anonymousTypeQname.lastIndexOf(":");
+        if (pos == -1) {
+            throw new IllegalArgumentException("anon QName is invalid, no final ':' " + anonymousTypeQname);
+        }
+        QName qname = new QName(anonymousTypeQname.substring(0, pos), anonymousTypeQname.substring(pos + 1));
+        return qname;
+    }
+
     public void setAnonymousTypeQname(String value) {
         this.anonymousTypeQname = value;
     }
 
-    public String getQnameScope() {
+    public String getQNameScope() {
         return qnameScope;
     }
 
-    public void setQnameScope(String value) {
+    public void setQNameScope(String value) {
         this.qnameScope = value;
+    }
+
+    public boolean isElement() {
+        return "element".equals(qnameScope);
+    }
+
+    public boolean isSimpleType() {
+        return "simpleType".equals(qnameScope);
     }
 
     public List<VariableMapping> getVariableMapping() {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PackageMapping.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PackageMapping.java?rev=600745&r1=600744&r2=600745&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PackageMapping.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PackageMapping.java Mon Dec  3 16:35:45 2007
@@ -33,7 +33,7 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "package-mappingType", propOrder = {"packageType", "namespaceURI"})
-public class PackageMapping {
+public class PackageMapping implements Keyable<String> {
     @XmlElement(name = "package-type", required = true)
     protected String packageType;
     @XmlElement(required = true)
@@ -42,6 +42,10 @@
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
     @XmlID
     protected String id;
+
+    public String getKey() {
+        return namespaceURI;
+    }
 
     public String getPackageType() {
         return packageType;

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceEndpointInterfaceMapping.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceEndpointInterfaceMapping.java?rev=600745&r1=600744&r2=600745&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceEndpointInterfaceMapping.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceEndpointInterfaceMapping.java Mon Dec  3 16:35:45 2007
@@ -45,7 +45,7 @@
     "wsdlBinding",
     "serviceEndpointMethodMapping"
 })
-public class ServiceEndpointInterfaceMapping {
+public class ServiceEndpointInterfaceMapping implements Keyable<String> {
     @XmlElement(name = "service-endpoint-interface", required = true)
     protected String serviceEndpointInterface;
     @XmlElement(name = "wsdl-port-type", required = true)
@@ -58,6 +58,10 @@
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
     @XmlID
     protected String id;
+
+    public String getKey() {
+        return serviceEndpointInterface;
+    }
 
     public String getServiceEndpointInterface() {
         return serviceEndpointInterface;

Modified: openejb/trunk/openejb3/server/openejb-axis/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis/pom.xml?rev=600745&r1=600744&r2=600745&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis/pom.xml (original)
+++ openejb/trunk/openejb3/server/openejb-axis/pom.xml Mon Dec  3 16:35:45 2007
@@ -46,5 +46,12 @@
       <version>${version}</version>
       <scope>test</scope>
     </dependency>
+
+    <!-- For schema processing -->
+    <dependency>
+      <groupId>org.apache.xmlbeans</groupId>
+      <artifactId>xmlbeans</artifactId>
+      <version>2.3.0</version>
+    </dependency>
   </dependencies>
 </project>

Modified: openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisService.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisService.java?rev=600745&r1=600744&r2=600745&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisService.java (original)
+++ openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisService.java Mon Dec  3 16:35:45 2007
@@ -17,6 +17,7 @@
  */
 package org.apache.openejb.server.axis;
 
+import org.apache.axis.description.JavaServiceDesc;
 import org.apache.axis.handlers.HandlerInfoChainFactory;
 import org.apache.axis.handlers.soap.SOAPService;
 import org.apache.axis.providers.java.RPCProvider;
@@ -24,6 +25,8 @@
 import org.apache.openejb.core.webservices.HandlerChainData;
 import org.apache.openejb.core.webservices.HandlerData;
 import org.apache.openejb.core.webservices.PortData;
+import org.apache.openejb.server.axis.assembler.JaxRpcServiceInfo;
+import org.apache.openejb.server.axis.assembler.JaxRpcServiceInfoBuilder;
 import org.apache.openejb.server.httpd.HttpListener;
 import org.apache.openejb.server.webservices.WsService;
 
@@ -45,9 +48,27 @@
     }
 
     protected HttpListener createEjbWsContainer(URL moduleBaseUrl, PortData port, DeploymentInfo deploymentInfo) throws Exception {
+        ClassLoader classLoader = deploymentInfo.getClassLoader();
+
+        // todo build JaxRpcServiceInfo in assembler
+        JaxRpcServiceInfoBuilder serviceInfoBuilder = new JaxRpcServiceInfoBuilder(null, null, null, null, null, classLoader);
+        JaxRpcServiceInfo serviceInfo = serviceInfoBuilder.createServiceDesc();
+
+        // Build java service descriptor
+        JavaServiceDescBuilder javaServiceDescBuilder = new JavaServiceDescBuilder(serviceInfo, classLoader);
+        JavaServiceDesc serviceDesc = javaServiceDescBuilder.createServiceDesc();
+
+        // Create service
         RPCProvider provider = new EjbContainerProvider(deploymentInfo, createHandlerInfos(port.getHandlerChains()));
         SOAPService service = new SOAPService(null, provider, null);
-        AxisWsContainer container = new AxisWsContainer(port.getWsdlUrl(), service, null, deploymentInfo.getClassLoader());
+        service.setServiceDescription(serviceDesc);
+
+        // Set class name
+        service.setOption("className", deploymentInfo.getServiceEndpointInterface().getName());
+        serviceDesc.setImplClass(deploymentInfo.getServiceEndpointInterface());
+
+        // Create container
+        AxisWsContainer container = new AxisWsContainer(port.getWsdlUrl(), service, null, classLoader);
         wsContainers.put(deploymentInfo.getDeploymentID().toString(), container);
         return container;
     }
@@ -60,21 +81,31 @@
     }
 
     protected HttpListener createPojoWsContainer(URL moduleBaseUrl, PortData port, String serviceId, Class target, Context context, String contextRoot) throws Exception {
+        ClassLoader classLoader = target.getClassLoader();
+
+        // todo build JaxRpcServiceInfo in assembler
+        JaxRpcServiceInfoBuilder serviceInfoBuilder = new JaxRpcServiceInfoBuilder(null, null, null, null, null, classLoader);
+        JaxRpcServiceInfo serviceInfo = serviceInfoBuilder.createServiceDesc();
+
+        // Build java service descriptor
+        JavaServiceDescBuilder javaServiceDescBuilder = new JavaServiceDescBuilder(serviceInfo, classLoader);
+        JavaServiceDesc serviceDesc = javaServiceDescBuilder.createServiceDesc();
+
+        // Create service
         RPCProvider provider = new PojoProvider();
         SOAPService service = new SOAPService(null, provider, null);
+        service.setServiceDescription(serviceDesc);
 
-        // todo need to port this code
-        // ServiceInfo serviceInfo = createServiceInfo(portInfo, classLoader);
-        // JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();
-        // service.setServiceDescription(serviceDesc);
+        // Set class name
         service.setOption("className", target.getName());
 
+        // Add Handler Chain
         List<HandlerInfo> handlerInfos = createHandlerInfos(port.getHandlerChains());
         HandlerInfoChainFactory handlerInfoChainFactory = new HandlerInfoChainFactory(handlerInfos);
         service.setOption(org.apache.axis.Constants.ATTR_HANDLERINFOCHAIN, handlerInfoChainFactory);
 
-
-        AxisWsContainer container = new AxisWsContainer(port.getWsdlUrl(), service, null, target.getClassLoader());
+        // Create container
+        AxisWsContainer container = new AxisWsContainer(port.getWsdlUrl(), service, null, classLoader);
         wsContainers.put(serviceId, container);
         return container;
     }

Added: openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/JavaServiceDescBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/JavaServiceDescBuilder.java?rev=600745&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/JavaServiceDescBuilder.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/JavaServiceDescBuilder.java Mon Dec  3 16:35:45 2007
@@ -0,0 +1,303 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.server.axis;
+
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
+import org.apache.axis.description.FaultDesc;
+import org.apache.axis.description.JavaServiceDesc;
+import org.apache.axis.description.OperationDesc;
+import org.apache.axis.description.ParameterDesc;
+import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
+import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
+import org.apache.axis.encoding.TypeMapping;
+import org.apache.axis.encoding.TypeMappingImpl;
+import org.apache.axis.encoding.TypeMappingRegistryImpl;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.encoding.ser.ArrayDeserializerFactory;
+import org.apache.axis.encoding.ser.ArraySerializerFactory;
+import org.apache.axis.encoding.ser.BaseDeserializerFactory;
+import org.apache.axis.encoding.ser.BaseSerializerFactory;
+import org.apache.axis.encoding.ser.BeanDeserializerFactory;
+import org.apache.axis.encoding.ser.BeanSerializerFactory;
+import org.apache.axis.encoding.ser.EnumDeserializerFactory;
+import org.apache.axis.encoding.ser.EnumSerializerFactory;
+import org.apache.axis.encoding.ser.SimpleListDeserializerFactory;
+import org.apache.axis.encoding.ser.SimpleListSerializerFactory;
+import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.server.axis.assembler.BindingStyle;
+import org.apache.openejb.server.axis.assembler.JaxRpcFaultInfo;
+import org.apache.openejb.server.axis.assembler.JaxRpcOperationInfo;
+import org.apache.openejb.server.axis.assembler.JaxRpcParameterInfo;
+import org.apache.openejb.server.axis.assembler.JaxRpcServiceInfo;
+import org.apache.openejb.server.axis.assembler.JaxRpcTypeInfo;
+
+import javax.wsdl.OperationType;
+import javax.xml.rpc.encoding.DeserializerFactory;
+import javax.xml.rpc.encoding.SerializerFactory;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+
+public class JavaServiceDescBuilder {
+    private static final TypeMappingImpl SOAP_TYPE_MAPPING = DefaultSOAPEncodingTypeMappingImpl.getSingleton();
+    private static final TypeMappingImpl JAXRPC_TYPE_MAPPING = DefaultJAXRPC11TypeMappingImpl.getSingleton();
+
+    private final JaxRpcServiceInfo serviceInfo;
+    private final ClassLoader classLoader;
+
+    public JavaServiceDescBuilder(JaxRpcServiceInfo serviceInfo, ClassLoader classLoader) {
+        this.serviceInfo = serviceInfo;
+        this.classLoader = classLoader;
+    }
+
+    public JavaServiceDesc createServiceDesc() throws OpenEJBException {
+        Class serviceEndpointInterface;
+        try {
+            serviceEndpointInterface = classLoader.loadClass(serviceInfo.serviceEndpointInterface);
+        } catch (ClassNotFoundException e) {
+            throw new OpenEJBException("Unable to load the service endpoint interface " + serviceInfo.serviceEndpointInterface, e);
+        }
+
+        JavaServiceDesc serviceDesc = new JavaServiceDesc();
+        serviceDesc.setName(serviceInfo.name);
+        serviceDesc.setEndpointURL(serviceInfo.endpointURL);
+        serviceDesc.setWSDLFile(serviceInfo.wsdlFile);
+
+        BindingStyle bindingStyle = serviceInfo.defaultBindingStyle;
+        switch (bindingStyle) {
+            case RPC_ENCODED:
+                serviceDesc.setStyle(Style.RPC);
+                serviceDesc.setUse(Use.ENCODED);
+                break;
+            case RPC_LITERAL:
+                serviceDesc.setStyle(Style.RPC);
+                serviceDesc.setUse(Use.LITERAL);
+                break;
+            case DOCUMENT_ENCODED:
+                serviceDesc.setStyle(Style.DOCUMENT);
+                serviceDesc.setUse(Use.ENCODED);
+                break;
+            case DOCUMENT_LITERAL:
+                serviceDesc.setStyle(Style.DOCUMENT);
+                serviceDesc.setUse(Use.LITERAL);
+                break;
+            case DOCUMENT_LITERAL_WRAPPED:
+                serviceDesc.setStyle(Style.WRAPPED);
+                serviceDesc.setUse(Use.LITERAL);
+                break;
+        }
+
+        // Operations
+        for (JaxRpcOperationInfo operationInfo : serviceInfo.operations) {
+            OperationDesc operationDesc = buildOperationDesc(operationInfo, serviceEndpointInterface);
+            serviceDesc.addOperationDesc(operationDesc);
+        }
+
+        // Type mapping registry
+        TypeMappingRegistryImpl typeMappingRegistry = new TypeMappingRegistryImpl();
+        typeMappingRegistry.doRegisterFromVersion("1.3");
+        serviceDesc.setTypeMappingRegistry(typeMappingRegistry);
+
+        // Type mapping
+        TypeMapping typeMapping = typeMappingRegistry.getOrMakeTypeMapping(serviceDesc.getUse().getEncoding());
+        serviceDesc.setTypeMapping(typeMapping);
+
+        // Types
+        for (JaxRpcTypeInfo type : serviceInfo.types) {
+            registerType(type, typeMapping);
+        }
+
+        return new ReadOnlyServiceDesc(serviceDesc);
+    }
+
+    private OperationDesc buildOperationDesc(JaxRpcOperationInfo operationInfo, Class serviceEndpointInterface) throws OpenEJBException {
+        OperationDesc operationDesc = new OperationDesc();
+        operationDesc.setName(operationInfo.name);
+
+        // Binding type
+        switch (operationInfo.bindingStyle) {
+            case RPC_ENCODED:
+                operationDesc.setStyle(Style.RPC);
+                operationDesc.setUse(Use.ENCODED);
+                break;
+            case RPC_LITERAL:
+                operationDesc.setStyle(Style.RPC);
+                operationDesc.setUse(Use.LITERAL);
+                break;
+            case DOCUMENT_ENCODED:
+                operationDesc.setStyle(Style.DOCUMENT);
+                operationDesc.setUse(Use.ENCODED);
+                break;
+            case DOCUMENT_LITERAL:
+                operationDesc.setStyle(Style.DOCUMENT);
+                operationDesc.setUse(Use.LITERAL);
+                break;
+            case DOCUMENT_LITERAL_WRAPPED:
+                operationDesc.setStyle(Style.WRAPPED);
+                operationDesc.setUse(Use.LITERAL);
+                break;
+        }
+
+        // Operation style
+        switch (operationInfo.operationStyle) {
+            case NOTIFICATION:
+                operationDesc.setMep(OperationType.NOTIFICATION);
+                break;
+            case ONE_WAY:
+                operationDesc.setMep(OperationType.ONE_WAY);
+                break;
+            case REQUEST_RESPONSE:
+                operationDesc.setMep(OperationType.REQUEST_RESPONSE);
+                break;
+            case SOLICIT_RESPONSE:
+                operationDesc.setMep(OperationType.SOLICIT_RESPONSE);
+                break;
+        }
+
+        // Build parameters
+        Class[] paramTypes = new Class[operationInfo.parameters.size()];
+        int i = 0;
+        for (JaxRpcParameterInfo parameterInfo : operationInfo.parameters) {
+            ParameterDesc parameterDesc = buildParameterDesc(parameterInfo);
+            operationDesc.addParameter(parameterDesc);
+            paramTypes[i++] = parameterDesc.getJavaType();
+        }
+
+        // Java method
+        try {
+            Method method = serviceEndpointInterface.getMethod(operationInfo.javaMethodName, paramTypes);
+            operationDesc.setMethod(method);
+        } catch (NoSuchMethodException e) {
+            String args = "";
+            for (Class paramType : paramTypes) {
+                if (args.length() > 0) {
+                    args += ", ";
+                }
+                args += paramType.getName();
+            }
+            throw new OpenEJBException("Mapping references non-existent method in service-endpoint: " + operationInfo.javaMethodName + "(" + args + ")");
+        }
+
+        //
+        // Set return
+        //
+        if (operationInfo.returnQName != null) {
+            operationDesc.setReturnQName(operationInfo.returnQName);
+            operationDesc.setReturnType(operationInfo.returnXmlType);
+            try {
+                Class<?> returnClass = classLoader.loadClass(operationInfo.returnJavaType);
+                operationDesc.setReturnClass(returnClass);
+            } catch (ClassNotFoundException e) {
+                throw new OpenEJBException();
+            }
+        } else if (operationInfo.operationStyle == JaxRpcOperationInfo.OperationStyle.REQUEST_RESPONSE) {
+            operationDesc.setReturnQName(null);
+            operationDesc.setReturnType(XMLType.AXIS_VOID);
+            operationDesc.setReturnClass(void.class);
+        }
+
+        // Build faults
+        for (JaxRpcFaultInfo faultInfo : operationInfo.faults) {
+            FaultDesc faultDesc = buildFaultDesc(faultInfo);
+            operationDesc.addFault(faultDesc);
+        }
+
+        return operationDesc;
+    }
+
+    private ParameterDesc buildParameterDesc(JaxRpcParameterInfo parameterInfo) throws OpenEJBException {
+        byte mode = ParameterDesc.modeFromString(parameterInfo.mode.toString());
+
+        boolean inHeader = parameterInfo.soapHeader && parameterInfo.mode.isIn();
+        boolean outHeader = parameterInfo.soapHeader  && parameterInfo.mode.isOut();
+
+        Class<?> javaType;
+        try {
+            javaType = classLoader.loadClass(parameterInfo.javaType);
+        } catch (ClassNotFoundException e) {
+            throw new OpenEJBException("Unable to load parameter type " + parameterInfo.javaType);
+        }
+
+        ParameterDesc parameterDesc = new ParameterDesc(parameterInfo.qname, mode, parameterInfo.xmlType, javaType, inHeader, outHeader);
+        return parameterDesc;
+    }
+
+    private FaultDesc buildFaultDesc(JaxRpcFaultInfo faultInfo) throws OpenEJBException {
+        FaultDesc faultDesc = new FaultDesc(faultInfo.qname, faultInfo.javaType, faultInfo.xmlType, faultInfo.complex);
+
+        ArrayList<ParameterDesc> parameters = new ArrayList<ParameterDesc>();
+        for (JaxRpcParameterInfo parameterInfo : faultInfo.parameters) {
+            ParameterDesc parameterDesc = buildParameterDesc(parameterInfo);
+            parameters.add(parameterDesc);
+        }
+        faultDesc.setParameters(parameters);
+
+        return faultDesc;
+    }
+
+    private void registerType(JaxRpcTypeInfo type, TypeMapping typeMapping) throws OpenEJBException {
+        Class javaType;
+        try {
+            javaType = classLoader.loadClass(type.javaType);
+        } catch (ClassNotFoundException e) {
+            throw new OpenEJBException("Could not load class for JaxRpc mapping " + type.javaType);
+        }
+
+        Class serializerFactoryClass;
+        Class deserializerFactoryClass;
+        switch (type.serializerType) {
+            case ARRAY:
+                serializerFactoryClass = ArraySerializerFactory.class;
+                deserializerFactoryClass = ArrayDeserializerFactory.class;
+                break;
+            case ENUM:
+                serializerFactoryClass = EnumSerializerFactory.class;
+                deserializerFactoryClass = EnumDeserializerFactory.class;
+                break;
+            case LIST:
+                serializerFactoryClass = SimpleListSerializerFactory.class;
+                deserializerFactoryClass = SimpleListDeserializerFactory.class;
+                break;
+            default:
+
+                Class clazz = SOAP_TYPE_MAPPING.getClassForQName(type.xmlType, null, null);
+                if (null != clazz) {
+                    // Built in SOAP type
+                    serializerFactoryClass = SOAP_TYPE_MAPPING.getSerializer(clazz, type.xmlType).getClass();
+                    deserializerFactoryClass = SOAP_TYPE_MAPPING.getDeserializer(clazz, type.xmlType, null).getClass();
+                } else {
+                    clazz = JAXRPC_TYPE_MAPPING.getClassForQName(type.xmlType, null, null);
+                    if (null != clazz) {
+                        // Built in XML schema type
+                        serializerFactoryClass = JAXRPC_TYPE_MAPPING.getSerializer(clazz, type.xmlType).getClass();
+                        deserializerFactoryClass = JAXRPC_TYPE_MAPPING.getDeserializer(clazz, type.xmlType, null).getClass();
+                    } else {
+                        // Unknown type so use the generic Java Beans serializer
+                        serializerFactoryClass = BeanSerializerFactory.class;
+                        deserializerFactoryClass = BeanDeserializerFactory.class;
+                    }
+                }
+                break;
+        }
+
+        SerializerFactory serializerFactory = BaseSerializerFactory.createFactory(serializerFactoryClass, javaType, type.qname);
+        DeserializerFactory deserializerFactory = BaseDeserializerFactory.createFactory(deserializerFactoryClass, javaType, type.qname);
+
+        typeMapping.register(javaType, type.qname, serializerFactory, deserializerFactory);
+    }
+}

Added: openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/BindingStyle.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/BindingStyle.java?rev=600745&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/BindingStyle.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/BindingStyle.java Mon Dec  3 16:35:45 2007
@@ -0,0 +1,78 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.server.axis.assembler;
+
+public enum BindingStyle {
+    RPC_LITERAL(false, true, false),
+    RPC_ENCODED(false, false, false),
+    DOCUMENT_LITERAL(true, true, false),
+    DOCUMENT_ENCODED(true, false, false),
+    DOCUMENT_LITERAL_WRAPPED(true, true, true);
+
+    private final boolean document;
+    private final boolean literal;
+    private final boolean wrapped;
+
+    BindingStyle(boolean document, boolean literal, boolean wrapped) {
+        this.document = document;
+        this.literal = literal;
+        this.wrapped = wrapped;
+    }
+
+    public boolean isRpc() {
+        return !document;
+    }
+
+    public boolean isDocument() {
+        return document;
+    }
+
+    public boolean isEncoded() {
+        return !literal;
+    }
+
+    public boolean isLiteral() {
+        return literal;
+    }
+
+    public boolean isWrapped() {
+        return wrapped;
+    }
+
+    public static BindingStyle getBindingStyle(String style, String use) {
+        if ("rpc".equalsIgnoreCase(style)) {
+            if (use == null ||"encoded".equalsIgnoreCase(use)) {
+                return RPC_ENCODED;
+            } else if ("literal".equalsIgnoreCase(use)) {
+                return RPC_LITERAL;
+            } else {
+                throw new IllegalArgumentException("Use must be literal or encoded: " + use);
+            }
+        } else if ("document".equalsIgnoreCase(style)) {
+            if (use == null || "encoded".equalsIgnoreCase(use)) {
+                return DOCUMENT_ENCODED;
+            } else if ("literal".equalsIgnoreCase(use)) {
+                return DOCUMENT_LITERAL;
+            } else {
+                throw new IllegalArgumentException("Use must be literal or encoded: " + use);
+            }
+        } else {
+            throw new IllegalArgumentException("Style must rpc or document: " + style);
+        }
+    }
+}

Added: openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/HeavyweightOperationInfoBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/HeavyweightOperationInfoBuilder.java?rev=600745&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/HeavyweightOperationInfoBuilder.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/HeavyweightOperationInfoBuilder.java Mon Dec  3 16:35:45 2007
@@ -0,0 +1,780 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.server.axis.assembler;
+
+import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.jee.ConstructorParameterOrder;
+import org.apache.openejb.jee.ExceptionMapping;
+import org.apache.openejb.jee.JavaWsdlMapping;
+import org.apache.openejb.jee.JavaXmlTypeMapping;
+import org.apache.openejb.jee.MethodParamPartsMapping;
+import org.apache.openejb.jee.PackageMapping;
+import org.apache.openejb.jee.ServiceEndpointMethodMapping;
+import org.apache.openejb.jee.WsdlMessageMapping;
+import org.apache.openejb.jee.WsdlReturnValueMapping;
+import static org.apache.openejb.server.axis.assembler.JaxRpcParameterInfo.Mode;
+import org.apache.xmlbeans.SchemaParticle;
+import org.apache.xmlbeans.SchemaProperty;
+import org.apache.xmlbeans.SchemaType;
+
+import javax.wsdl.BindingInput;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.Fault;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.Part;
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap.SOAPBody;
+import javax.wsdl.extensions.soap.SOAPOperation;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.holders.BigDecimalHolder;
+import javax.xml.rpc.holders.BigIntegerHolder;
+import javax.xml.rpc.holders.BooleanHolder;
+import javax.xml.rpc.holders.BooleanWrapperHolder;
+import javax.xml.rpc.holders.ByteArrayHolder;
+import javax.xml.rpc.holders.ByteHolder;
+import javax.xml.rpc.holders.ByteWrapperHolder;
+import javax.xml.rpc.holders.CalendarHolder;
+import javax.xml.rpc.holders.DoubleHolder;
+import javax.xml.rpc.holders.DoubleWrapperHolder;
+import javax.xml.rpc.holders.FloatHolder;
+import javax.xml.rpc.holders.FloatWrapperHolder;
+import javax.xml.rpc.holders.IntHolder;
+import javax.xml.rpc.holders.IntegerWrapperHolder;
+import javax.xml.rpc.holders.LongHolder;
+import javax.xml.rpc.holders.LongWrapperHolder;
+import javax.xml.rpc.holders.ObjectHolder;
+import javax.xml.rpc.holders.QNameHolder;
+import javax.xml.rpc.holders.ShortHolder;
+import javax.xml.rpc.holders.ShortWrapperHolder;
+import javax.xml.rpc.holders.StringHolder;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class HeavyweightOperationInfoBuilder{
+    private final JavaWsdlMapping mapping;
+    private final ServiceEndpointMethodMapping methodMapping;
+
+    private final SchemaInfoBuilder schemaInfoBuilder;
+    private final BindingStyle bindingStyle;
+
+    //
+    // Used to map exception class constructor args
+    //
+    private final Map<QName, String> publicTypes = new HashMap<QName, String>();
+    private final Map<String, String> anonymousTypes = new HashMap<String, String>();
+
+    //
+    // Track in and out parameter names so we can verify that
+    // everything has been mapped and mapped correctly
+    //
+    private final Set<String> inParamNames = new HashSet<String>();
+    private final Set<String> outParamNames = new HashSet<String>();
+
+    //
+    // Track the wrapper elements - used by HeavyweightTypeInfoBuilder
+    //
+    private final Set<QName> wrapperElementQNames = new HashSet<QName>();
+
+    private final String operationName;
+    private final JaxRpcOperationInfo.OperationStyle operationStyle;
+    private final Message inputMessage;
+    private final Message outputMessage;
+    private final Collection<Fault> faults = new ArrayList<Fault>();
+
+    private JaxRpcOperationInfo operationInfo;
+
+    public HeavyweightOperationInfoBuilder(BindingOperation bindingOperation, ServiceEndpointMethodMapping methodMapping, JavaWsdlMapping mapping, SchemaInfoBuilder schemaInfoBuilder) throws OpenEJBException {
+        Operation operation = bindingOperation.getOperation();
+        this.operationName = operation.getName();
+        this.operationStyle = JaxRpcOperationInfo.OperationStyle.valueOf(operation.getStyle().toString());
+        this.outputMessage = operation.getOutput() == null ? null : operation.getOutput().getMessage();
+        this.inputMessage = operation.getInput().getMessage();
+
+        // faults
+        for (Object o : operation.getFaults().values()) {
+            faults.add((Fault) o);
+        }
+
+        this.mapping = mapping;
+        this.methodMapping = methodMapping;
+        this.schemaInfoBuilder = schemaInfoBuilder;
+
+        // index types - used to process build exception class constructor args
+        for (JavaXmlTypeMapping javaXmlTypeMapping : mapping.getJavaXmlTypeMapping()) {
+            String javaClassName = javaXmlTypeMapping.getJavaType();
+            if (javaXmlTypeMapping.getAnonymousTypeQname() != null) {
+                String anonymousTypeQName = javaXmlTypeMapping.getAnonymousTypeQname();
+                anonymousTypes.put(anonymousTypeQName, javaClassName);
+            } else if (javaXmlTypeMapping.getRootTypeQname() != null) {
+                QName qname = javaXmlTypeMapping.getRootTypeQname();
+                publicTypes.put(qname, javaClassName);
+            }
+        }
+
+        // BindingStyle
+        if (methodMapping.getWrappedElement() != null) {
+            bindingStyle = BindingStyle.DOCUMENT_LITERAL_WRAPPED;
+        } else {
+            BindingInput bindingInput = bindingOperation.getBindingInput();
+
+            SOAPOperation soapOperation = SchemaInfoBuilder.getExtensibilityElement(SOAPOperation.class, bindingOperation.getExtensibilityElements());
+            String styleString = soapOperation.getStyle();
+            if (styleString == null) {
+                SOAPBinding soapBinding = SchemaInfoBuilder.getExtensibilityElement(SOAPBinding.class, bindingInput.getExtensibilityElements());
+                styleString = soapBinding.getStyle();
+            }
+
+            SOAPBody soapBody = SchemaInfoBuilder.getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());
+            String useString = soapBody.getUse();
+
+            bindingStyle = BindingStyle.getBindingStyle(styleString, useString);
+        }
+    }
+
+    public Set<QName> getWrapperElementQNames() throws OpenEJBException {
+        buildOperationInfo();
+        return Collections.unmodifiableSet(wrapperElementQNames);
+    }
+
+    public JaxRpcOperationInfo buildOperationInfo() throws OpenEJBException {
+        if (operationInfo != null) {
+            return operationInfo;
+        }
+
+        operationInfo = new JaxRpcOperationInfo();
+        operationInfo.name = operationName;
+
+        // Binding style rpc/encoded, doc/lit, wrapped, etc.
+        operationInfo.bindingStyle = bindingStyle;
+
+        // Operation style one way, request response, etc/
+        operationInfo.operationStyle = operationStyle;
+
+        // Java method name
+        operationInfo.javaMethodName = methodMapping.getJavaMethodName();
+
+        //
+        // Map the parameters
+        //
+        mapParameters();
+
+        //
+        // Map return
+        //
+        if (methodMapping.getWsdlReturnValueMapping() != null) {
+            mapReturnType();
+        }
+
+        // Validate output mapping is complete
+        if (outputMessage != null && bindingStyle.isWrapped()) {
+            Part inputPart = getWrappedPart(outputMessage);
+            QName name = inputPart.getElementName();
+            SchemaType operationType = schemaInfoBuilder.getComplexTypesInWsdl().get(name);
+
+            Set<String> expectedOutParams = new HashSet<String>();
+
+            // schemaType should be complex using xsd:sequence compositor
+            SchemaParticle parametersType = operationType.getContentModel();
+            //again, no output can give null parametersType
+            if (parametersType != null) {
+                if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
+                    expectedOutParams.add(parametersType.getName().getLocalPart());
+                } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+                    SchemaParticle[] parameters = parametersType.getParticleChildren();
+                    for (SchemaParticle parameter : parameters) {
+                        expectedOutParams.add(parameter.getName().getLocalPart());
+                    }
+                }
+            }
+            if (!outParamNames.equals(expectedOutParams)) {
+                throw new OpenEJBException("Not all wrapper children were mapped to parameters or a return value for operation " + operationName);
+            }
+        } else if (null != outputMessage) {
+            if (!outParamNames.equals(outputMessage.getParts().keySet())) {
+                throw new OpenEJBException("Not all output message parts were mapped to parameters or a return value for operation " + operationName);
+            }
+        }
+
+        //
+        // Map faults (exception)
+        //
+        for (Fault fault : faults) {
+            JaxRpcFaultInfo faultInfo = mapFaults(fault);
+            operationInfo.faults.add(faultInfo);
+        }
+
+        return operationInfo;
+    }
+
+    private JaxRpcParameterInfo[] mapParameters() throws OpenEJBException {
+        List<MethodParamPartsMapping> paramMappings = methodMapping.getMethodParamPartsMapping();
+
+        //
+        // Map the ParameterDesc instance in an array so they can be ordered properly
+        // before they are added to the the OperationDesc.
+        //
+        JaxRpcParameterInfo[] parameterInfos = new JaxRpcParameterInfo[paramMappings.size()];
+        for (MethodParamPartsMapping paramMapping : paramMappings) {
+            JaxRpcParameterInfo parameterInfo = mapParameter(paramMapping);
+            parameterInfos[paramMapping.getParamPosition().intValue()] = parameterInfo;
+        }
+
+        //
+        // verify that all parameters were mapped and we don't have nulls in the parameter array
+        //
+        for (int i = 0; i < parameterInfos.length; i++) {
+            if (parameterInfos[i] == null) {
+                throw new OpenEJBException("There is no mapping for parameter number " + i + " for operation " + operationName);
+            }
+        }
+
+        //
+        // Verify that all parameter names were mapped
+        //
+        if (bindingStyle.isWrapped()) {
+            // verify that all child elements have a parameter mapping
+            Part inputPart = getWrappedPart(inputMessage);
+            QName name = inputPart.getElementName();
+            SchemaType operationType = schemaInfoBuilder.getComplexTypesInWsdl().get(name);
+
+            Set<String> expectedInParams = new HashSet<String>();
+
+            // schemaType should be complex using xsd:sequence compositor
+            SchemaParticle parametersType = operationType.getContentModel();
+
+            // parametersType can be null if the element has empty content such as
+            // <element name="getMarketSummary">
+            //   <complexType>
+            //     <sequence/>
+            //   </complexType>
+            // </element>
+            if (parametersType != null) {
+                if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
+                    expectedInParams.add(parametersType.getName().getLocalPart());
+                } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+                    SchemaParticle[] parameters = parametersType.getParticleChildren();
+                    for (SchemaParticle parameter : parameters) {
+                        expectedInParams.add(parameter.getName().getLocalPart());
+                    }
+                }
+            }
+            if (!inParamNames.equals(expectedInParams)) {
+                throw new OpenEJBException("Not all wrapper children were mapped for operation name" + operationName);
+            }
+        } else {
+            // verify all input message parts are mapped
+            if (!inParamNames.equals(inputMessage.getParts().keySet())) {
+                throw new OpenEJBException("Not all input message parts were mapped for operation name" + operationName);
+            }
+        }
+
+        return parameterInfos;
+    }
+
+    private JaxRpcParameterInfo mapParameter(MethodParamPartsMapping paramMapping) throws OpenEJBException {
+        WsdlMessageMapping wsdlMessageMappingType = paramMapping.getWsdlMessageMapping();
+        QName wsdlMessageQName = wsdlMessageMappingType.getWsdlMessage();
+        String wsdlMessagePartName = wsdlMessageMappingType.getWsdlMessagePartName();
+
+        Mode mode = Mode.valueOf(wsdlMessageMappingType.getParameterMode());
+        if ((mode == Mode.OUT || mode == Mode.INOUT) && outputMessage == null) {
+            throw new OpenEJBException("Mapping for output parameter " + wsdlMessagePartName + " found, but no output message for operation " + operationName);
+        }
+
+        //
+        // Determine the param qname and xml schema type
+        //
+        QName paramQName;
+        QName paramXmlType;
+        if (mode == Mode.IN || mode == Mode.INOUT) {
+            //
+            // IN or INOUT Parameter
+            //
+            if (!wsdlMessageQName.equals(inputMessage.getQName())) {
+                throw new OpenEJBException("QName of input message: " + inputMessage.getQName() +
+                        " does not match mapping message QName: " + wsdlMessageQName + " for operation " + operationName);
+            }
+
+            Part part = null;
+            SchemaParticle inParameter = null;
+            if (bindingStyle.isWrapped()) {
+                Part inPart = getWrappedPart(inputMessage);
+                // the local name of the global element refered by the part is equal to the operation name
+                QName name = inPart.getElementName();
+                if (!name.getLocalPart().equals(operationName)) {
+                    throw new OpenEJBException("message " + inputMessage.getQName() + " refers to a global element named " +
+                            name.getLocalPart() + ", which is not equal to the operation name " + operationName);
+                }
+                inParameter = getWrapperChild(inPart, wsdlMessagePartName);
+
+                paramQName = new QName("", inParameter.getName().getLocalPart());
+                paramXmlType = inParameter.getType().getName();
+            } else if (bindingStyle.isRpc()) {
+                part = inputMessage.getPart(wsdlMessagePartName);
+                if (part == null) {
+                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in input message for operation " + operationName);
+                }
+
+                paramQName = new QName("", part.getName());
+                paramXmlType = part.getTypeName();
+            } else {
+                part = inputMessage.getPart(wsdlMessagePartName);
+                if (part == null) {
+                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in input message for operation " + operationName);
+                }
+
+                paramQName = getPartName(part);
+                paramXmlType = paramQName;
+            }
+            inParamNames.add(wsdlMessagePartName);
+
+            //
+            // Verify INOUT parameter output message is consistent with input message
+            //
+            if (mode == Mode.INOUT) {
+                if (bindingStyle.isWrapped()) {
+                    // Verify output message supports this inout parameter
+                    Part outPart = getWrappedPart(outputMessage);
+                    SchemaParticle outParameter = getWrapperChild(outPart, wsdlMessagePartName);
+                    if (inParameter.getType() != outParameter.getType()) {
+                        throw new OpenEJBException("The wrapper children " + wsdlMessagePartName + " do not have the same type for operation " + operationName);
+                    }
+                } else if (bindingStyle.isRpc()) {
+                    // Verify output message supports this inout parameter
+                    Part outPart = outputMessage.getPart(wsdlMessagePartName);
+                    if (outPart == null) {
+                        throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for INOUT parameter of operation " + operationName);
+                    }
+                    // TODO this cannot happen.
+                    if (!part.getName().equals(outPart.getName())) {
+                        throw new OpenEJBException("Mismatched input part name: " + part.getName() + " and output part name: " + outPart.getName() + " for INOUT parameter for wsdlMessagePartName " + wsdlMessagePartName + " for operation " + operationName);
+                    }
+                    if (!(part.getElementName() == null ? outPart.getElementName() == null : part.getElementName().equals(outPart.getElementName()))) {
+                        throw new OpenEJBException("Mismatched input part element name: " + part.getElementName() + " and output part element name: " + outPart.getElementName() + " for INOUT parameter for wsdlMessagePartName " + wsdlMessagePartName + " for operation " + operationName);
+                    }
+                    if (!(part.getTypeName() == null ? outPart.getTypeName() == null : part.getTypeName().equals(outPart.getTypeName()))) {
+                        throw new OpenEJBException("Mismatched input part type name: " + part.getTypeName() + " and output part type name: " + outPart.getTypeName() + " for INOUT parameter for wsdlMessagePartName " + wsdlMessagePartName + " for operation " + operationName);
+                    }
+                } else {
+                    part = outputMessage.getPart(wsdlMessagePartName);
+                    if (part == null) {
+                        throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
+                    }
+                    // todo this seem strange... shouldn't the name and type be the same as the in binding above
+                    paramQName = getPartName(part);
+                    paramXmlType = paramQName;
+                }
+                outParamNames.add(wsdlMessagePartName);
+            }
+        } else {
+            //
+            // OUT only Parameter
+            //
+            if (!wsdlMessageQName.equals(outputMessage.getQName())) {
+                throw new OpenEJBException("QName of output message: " + outputMessage.getQName() +
+                        " does not match mapping message QName: " + wsdlMessageQName + " for operation " + operationName);
+            }
+
+            if (bindingStyle.isWrapped()) {
+                Part outPart = getWrappedPart(outputMessage);
+                SchemaParticle outParameter = getWrapperChild(outPart, wsdlMessagePartName);
+
+                paramQName = new QName("", outParameter.getName().getLocalPart());
+                paramXmlType = outParameter.getType().getName();
+            } else if (bindingStyle.isRpc()) {
+                Part part = outputMessage.getPart(wsdlMessagePartName);
+                if (part == null) {
+                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
+                }
+
+                paramQName = new QName("", part.getName());
+                paramXmlType = part.getTypeName();
+            } else {
+                Part part = outputMessage.getPart(wsdlMessagePartName);
+                if (part == null) {
+                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
+                }
+
+                paramQName = getPartName(part);
+                paramXmlType = paramQName;
+            }
+            outParamNames.add(wsdlMessagePartName);
+        }
+
+        //
+        // Determine the param java type
+        //
+        String paramJavaType;
+        if (mode == Mode.IN) {
+            // IN only prarmeters don't have holders
+            paramJavaType = paramMapping.getParamType();
+        } else if (rpcHolderClasses.containsKey(paramMapping.getParamType())) {
+            // This is a standard type with a built in holder class
+            paramJavaType = rpcHolderClasses.get(paramMapping.getParamType());
+        } else {
+            // holderClass == ${packageName}.holders.${typeName}Holder
+            String packageName;
+            String typeName;
+            if (schemaInfoBuilder.getComplexTypesInWsdl().containsKey(paramXmlType)) {
+                // This is a complex type, so package name is determined from namespace mapping
+                String namespace = paramXmlType.getNamespaceURI();
+                PackageMapping packageMapping = mapping.getPackageMappingMap().get(namespace);
+                if (packageMapping == null) {
+                    throw new OpenEJBException("Namespace " + namespace + " was not mapped in jaxrpc mapping file");
+                }
+                packageName = packageMapping.getPackageType();
+
+                // Type name is typeQName local part, but make sure it is capitalized correctly
+                typeName = paramXmlType.getLocalPart();
+                typeName = Character.toUpperCase(typeName.charAt(0)) + typeName.substring(1);
+            } else {
+                // a.b.foo.Bar >>> a.b.foo.holders.BarHolder
+                String paramJavaTypeName = paramMapping.getParamType();
+                int lastDot = paramJavaTypeName.lastIndexOf(".");
+                packageName = paramJavaTypeName.substring(0, lastDot);
+                typeName = paramJavaTypeName.substring(lastDot + 1);
+            }
+
+            paramJavaType = packageName + ".holders." + typeName + "Holder";
+        }
+
+        //
+        // Build JaxRpcParameterInfo
+        //
+        JaxRpcParameterInfo parameterInfo = new JaxRpcParameterInfo();
+        parameterInfo.qname = paramQName;
+        parameterInfo.xmlType = paramXmlType;
+        parameterInfo.javaType = paramJavaType;
+        parameterInfo.mode = Mode.valueOf(wsdlMessageMappingType.getParameterMode());
+        parameterInfo.soapHeader = wsdlMessageMappingType.getSoapHeader() != null;
+
+        return parameterInfo;
+    }
+
+    private void mapReturnType() throws OpenEJBException {
+        if (outputMessage == null) {
+            throw new OpenEJBException("No output message, but a mapping for it for operation " + operationName);
+        }
+
+        // verify mapped return value qname matches expected output message name
+        WsdlReturnValueMapping wsdlReturnValueMapping = methodMapping.getWsdlReturnValueMapping();
+        if (!wsdlReturnValueMapping.getWsdlMessage().equals(outputMessage.getQName())) {
+            throw new OpenEJBException("OutputMessage has QName: " + outputMessage.getQName() + " but mapping specifies: " + wsdlReturnValueMapping.getWsdlMessage() + " for operation " + operationName);
+        }
+
+        //
+        // Determind return type qname and xml schema type
+        //
+        QName returnQName = null;
+        QName returnXmlType = null;
+        if (wsdlReturnValueMapping.getWsdlMessagePartName() != null) {
+            String wsdlMessagePartName = wsdlReturnValueMapping.getWsdlMessagePartName();
+            if (outParamNames.contains(wsdlMessagePartName)) {
+                throw new OpenEJBException("output message part " + wsdlMessagePartName + " has both an INOUT or OUT mapping and a return value mapping for operation " + operationName);
+            }
+
+            if (bindingStyle.isWrapped()) {
+                Part outPart = getWrappedPart(outputMessage);
+                SchemaParticle returnParticle = getWrapperChild(outPart, wsdlMessagePartName);
+
+                returnQName = new QName("", returnParticle.getName().getLocalPart());
+                returnXmlType = returnParticle.getType().getName();
+            } else if (bindingStyle.isRpc()) {
+                Part part = outputMessage.getPart(wsdlMessagePartName);
+                if (part == null) {
+                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
+                }
+
+                returnQName = new QName("", part.getName());
+                returnXmlType = part.getTypeName();
+            } else {
+                Part part = outputMessage.getPart(wsdlMessagePartName);
+                if (part == null) {
+                    throw new OpenEJBException("No part for wsdlMessagePartName " + wsdlMessagePartName + " in output message for operation " + operationName);
+                }
+
+                returnQName = getPartName(part);
+                returnXmlType = returnQName;
+            }
+
+            outParamNames.add(wsdlMessagePartName);
+        } else {
+            // what does this mean????
+        }
+
+        operationInfo.returnQName = returnQName;
+        operationInfo.returnXmlType = returnXmlType;
+        operationInfo.returnJavaType = wsdlReturnValueMapping.getMethodReturnValue();
+    }
+
+    private JaxRpcFaultInfo mapFaults(Fault fault) throws OpenEJBException {
+        Message message = fault.getMessage();
+        ExceptionMapping exceptionMapping = mapping.getExceptionMappingMap().get(message.getQName());
+        if (exceptionMapping == null) {
+            throw new OpenEJBException("No exception mapping for fault " + fault.getName() + " and fault message " + message.getQName() + " for operation " + operationName);
+        }
+
+        // TODO investigate whether there are other cases in which the namespace of faultQName can be determined.
+        // this is weird, but I can't figure out what it should be.
+        // if part has an element rather than a type, it should be part.getElementName() (see below)
+        Part part;
+        if (exceptionMapping.getWsdlMessagePartName() != null) {
+            // According to schema documentation, this will only be set when several headerfaults use the same message.
+            String headerFaultMessagePartName = exceptionMapping.getWsdlMessagePartName();
+            part = message.getPart(headerFaultMessagePartName);
+        } else {
+            part = (Part) message.getOrderedParts(null).iterator().next();
+        }
+
+        // Determine the fault qname and xml schema type
+        QName faultQName;
+        QName faultXmlType;
+        if (part.getElementName() == null) {
+            faultQName = new QName("", fault.getName());
+            faultXmlType = part.getTypeName();
+            if (faultXmlType == null) {
+                throw new OpenEJBException("Neither type nor element name supplied for part: " + part);
+            }
+        } else {
+            faultQName = part.getElementName();
+            faultXmlType = schemaInfoBuilder.getElementToTypeMap().get(part.getElementName());
+            if (faultXmlType == null) {
+                throw new OpenEJBException("Can not find type for: element: " + part.getElementName() + ", known elements: " + schemaInfoBuilder.getElementToTypeMap());
+            }
+        }
+
+        // Get the xml schema declaration of the type
+        SchemaType complexType = schemaInfoBuilder.getComplexTypesInWsdl().get(faultXmlType);
+
+        //
+        // Build the fault info
+        //
+        JaxRpcFaultInfo faultInfo = new JaxRpcFaultInfo();
+        faultInfo.qname = faultQName;
+        faultInfo.xmlType = faultXmlType;
+        faultInfo.javaType = exceptionMapping.getExceptionType();
+        faultInfo.complex = complexType != null;
+
+        //
+        // Map exception class constructor args
+        //
+        if (exceptionMapping.getConstructorParameterOrder() != null) {
+            if (!faultInfo.complex) {
+                throw new OpenEJBException("ConstructorParameterOrder can only be set for complex types, not " + faultXmlType);
+            }
+
+            // Map xmlType properties by name
+            Map<String,SchemaType> elementMap = new HashMap<String,SchemaType>();
+            SchemaProperty[] properties = complexType.getProperties();
+            for (SchemaProperty property : properties) {
+                QName elementName = property.getName();
+                SchemaType elementType = property.getType();
+                elementMap.put(elementName.getLocalPart(), elementType);
+            }
+
+            ConstructorParameterOrder constructorParameterOrder = exceptionMapping.getConstructorParameterOrder();
+            for (int i = 0; i < constructorParameterOrder.getElementName().size(); i++) {
+                String elementName = constructorParameterOrder.getElementName().get(i);
+                SchemaType elementType = elementMap.get(elementName);
+                QName argXmlType = elementType.getName();
+
+                // Determine argument java type
+                String argJavaType;
+                if (argXmlType != null) {
+                    if (schemaInfoBuilder.getComplexTypesInWsdl().containsKey(argXmlType)) {
+                        // Complex type, so java type mapping must be declared
+                        argJavaType= publicTypes.get(argXmlType);
+                        if (argJavaType == null) {
+                            throw new OpenEJBException("No class mapped for element type: " + elementType);
+                        }
+                    } else {
+                        // Simple type with a spec defined java class mapping
+                        argJavaType = qnameToJavaType.get(argXmlType);
+                        if (argJavaType == null) {
+                            throw new OpenEJBException("Unknown type: " + elementType + " of name: " + elementName + " and QName: " + argXmlType);
+                        }
+                    }
+                } else {
+                    // anonymous type
+
+                    // qname is constructed using rules 1.b and 2.b
+                    String anonymousQName = complexType.getName().getNamespaceURI() + ":>" + complexType.getName().getLocalPart() + ">" + elementName;
+
+                    // Check for a declared type mapping for this anonymous type
+                    argJavaType = anonymousTypes.get(anonymousQName);
+                    if (argJavaType == null) {
+                        // this must be a simple type...
+                        if (!elementType.isSimpleType()) {
+                            throw new OpenEJBException("No class mapped for anonymous type: " + anonymousQName);
+                        }
+
+                        // and must have a spec defined java class mapping
+                        QName simpleTypeQName = elementType.getBaseType().getName();
+                        argJavaType = qnameToJavaType.get(simpleTypeQName);
+                        if (argJavaType == null) {
+                            throw new OpenEJBException("Unknown simple type: " + elementType + " of name: " + elementName + " and QName: " + simpleTypeQName);
+                        }
+                    }
+                }
+
+                JaxRpcParameterInfo parameterInfo = new JaxRpcParameterInfo();
+                // todo faultTypeQName is speculative
+                parameterInfo.qname = faultXmlType;
+                parameterInfo.mode = Mode.OUT;
+                // todo could be a soap header
+                parameterInfo.soapHeader = false;
+                parameterInfo.xmlType = argXmlType;
+                parameterInfo.javaType = argJavaType;
+
+                faultInfo.parameters.add(parameterInfo);
+            }
+        }
+        return faultInfo;
+    }
+
+
+    private QName getPartName(Part part) {
+        return part.getElementName() == null ? part.getTypeName() : part.getElementName();
+    }
+
+    private Part getWrappedPart(Message message) throws OpenEJBException {
+        // a wrapped element can only have one part
+        Collection parts = message.getParts().values();
+        if (parts.size() != 1) {
+            throw new OpenEJBException("message " + message.getQName() + " has " + parts.size() +
+                    " parts and should only have one as wrapper style mapping is specified for operation " +
+                    operationName);
+        }
+        return (Part) parts.iterator().next();
+    }
+
+    private SchemaParticle getWrapperChild(Part part, String wsdlMessagePartName) throws OpenEJBException {
+        // get the part name
+        QName name = part.getElementName();
+        wrapperElementQNames.add(name);
+
+        // get the part type
+        SchemaType operationType = schemaInfoBuilder.getComplexTypesInWsdl().get(name);
+        if (operationType == null) {
+            throw new OpenEJBException("No global element named " + name + " for operation " + operationName);
+        }
+        SchemaParticle parametersType = operationType.getContentModel();
+
+        // if this is a plain element, the type is the part type
+        if (parametersType.getParticleType() == SchemaParticle.ELEMENT) {
+            // verify qname matches expected message part name
+            if (!parametersType.getName().getLocalPart().equals(wsdlMessagePartName)) {
+                throw new OpenEJBException("Global element named " + name + " does not define a child element named " + wsdlMessagePartName + " required by the operation " + operationName);
+            }
+            return parametersType;
+        }
+
+        // if this is a sequence, find the element in the sequence with the specified wsdlMessagePartName
+        if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+            for (SchemaParticle parameter : parametersType.getParticleChildren()) {
+                QName element = parameter.getName();
+                if (element.getLocalPart().equals(wsdlMessagePartName)) {
+                    return parameter;
+                }
+            }
+
+            throw new OpenEJBException("Global element named " + name +
+                    " does not define a child element named " + wsdlMessagePartName +
+                    " required by the operation " + operationName);
+        }
+
+        throw new OpenEJBException("Global element named " + name + " is not a sequence for operation " + operationName);
+    }
+
+    //see jaxrpc 1.1 4.2.1
+    private static final Map<QName, String> qnameToJavaType = new HashMap<QName, String>();
+
+    static {
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "integer"), BigInteger.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "int"), int.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "long"), long.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "short"), short.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "decimal"), BigDecimal.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "float"), float.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "double"), double.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "byte"), byte.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "unsignedInt"), long.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "unsignedShort"), int.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "unsignedByte"), short.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "QName"), QName.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "dateTime"), Calendar.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "date"), Calendar.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "time"), Calendar.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "anyURI"), URI.class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "base64Binary"), byte[].class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "hexBinary"), byte[].class.getName());
+        qnameToJavaType.put(new QName("http://www.w3.org/2001/XMLSchema", "anySimpleType"), String.class.getName());
+    }
+
+
+    /**
+     * Supporting the Document/Literal Wrapped pattern
+     *
+     * See http://www-106.ibm.com/developerworks/webservices/library/ws-whichwsdl/ for a nice explanation and example
+     *
+     * wrapped-element tag is used
+     * WSDL message with a single part
+     * part uses the 'element' attribute to point to an elemement in the types section
+     * the element type and the element's name match the operation name
+     */
+
+    // standard holder classes by type
+    private static final Map<String,String> rpcHolderClasses = new HashMap<String, String>();
+
+    static {
+        rpcHolderClasses.put(BigDecimal.class.getName(), BigDecimalHolder.class.getName());
+        rpcHolderClasses.put(BigInteger.class.getName(), BigIntegerHolder.class.getName());
+        rpcHolderClasses.put(boolean.class.getName(), BooleanHolder.class.getName());
+        rpcHolderClasses.put(Boolean.class.getName(), BooleanWrapperHolder.class.getName());
+        rpcHolderClasses.put(byte[].class.getName(), ByteArrayHolder.class.getName());
+        rpcHolderClasses.put(byte.class.getName(), ByteHolder.class.getName());
+        rpcHolderClasses.put(Byte.class.getName(), ByteWrapperHolder.class.getName());
+        rpcHolderClasses.put(Calendar.class.getName(), CalendarHolder.class.getName());
+        rpcHolderClasses.put(double.class.getName(), DoubleHolder.class.getName());
+        rpcHolderClasses.put(Double.class.getName(), DoubleWrapperHolder.class.getName());
+        rpcHolderClasses.put(float.class.getName(), FloatHolder.class.getName());
+        rpcHolderClasses.put(Float.class.getName(), FloatWrapperHolder.class.getName());
+        rpcHolderClasses.put(int.class.getName(), IntHolder.class.getName());
+        rpcHolderClasses.put(Integer.class.getName(), IntegerWrapperHolder.class.getName());
+        rpcHolderClasses.put(long.class.getName(), LongHolder.class.getName());
+        rpcHolderClasses.put(Long.class.getName(), LongWrapperHolder.class.getName());
+        rpcHolderClasses.put(Object.class.getName(), ObjectHolder.class.getName());
+        rpcHolderClasses.put(QName.class.getName(), QNameHolder.class.getName());
+        rpcHolderClasses.put(short.class.getName(), ShortHolder.class.getName());
+        rpcHolderClasses.put(Short.class.getName(), ShortWrapperHolder.class.getName());
+        rpcHolderClasses.put(String.class.getName(), StringHolder.class.getName());
+    }
+}
\ No newline at end of file



Mime
View raw message