You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2010/09/17 18:12:06 UTC

svn commit: r998185 - in /geronimo/server/trunk: framework/ framework/configs/karaf-framework/ plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/ plugins/axis/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/...

Author: rickmcguire
Date: Fri Sep 17 16:12:05 2010
New Revision: 998185

URL: http://svn.apache.org/viewvc?rev=998185&view=rev
Log:
some cleanup on the axis plugin to get it compile cleanly

Modified:
    geronimo/server/trunk/framework/configs/karaf-framework/pom.xml
    geronimo/server/trunk/framework/pom.xml
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/LightweightTypeInfoBuilder.java
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/TypeInfoBuilder.java
    geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/HandlerInfoInfo.java
    geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java
    geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java

Modified: geronimo/server/trunk/framework/configs/karaf-framework/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/pom.xml?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/pom.xml (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/pom.xml Fri Sep 17 16:12:05 2010
@@ -45,7 +45,7 @@
         <felix.compendium.version>1.2.0</felix.compendium.version>
         <felix.configadmin.version>1.2.4</felix.configadmin.version>
         <felix.fileinstall.version>3.0.0</felix.fileinstall.version>
-        <felix.framework.version>3.1.0-SNAPSHOT</felix.framework.version>
+        <felix.framework.version>3.0.2</felix.framework.version>
         <felix.gogo.version>0.4.0</felix.gogo.version>
         <felix.osgi.version>1.4.0</felix.osgi.version>
         <felix.plugin.version>2.1.0</felix.plugin.version>

Modified: geronimo/server/trunk/framework/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/pom.xml?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/framework/pom.xml (original)
+++ geronimo/server/trunk/framework/pom.xml Fri Sep 17 16:12:05 2010
@@ -45,7 +45,7 @@
             <dependency>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>org.apache.felix.framework</artifactId>
-                <version>3.1.0-SNAPSHOT</version>
+                <version>3.0.2</version>
                 <exclusions>
                     <exclusion>
                         <groupId>org.osgi</groupId>

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java Fri Sep 17 16:12:05 2010
@@ -62,8 +62,9 @@ import org.apache.geronimo.axis.server.P
 import org.apache.geronimo.axis.server.ServiceInfo;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanInfoBuilder; 
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
@@ -74,10 +75,6 @@ import org.apache.geronimo.xbeans.geroni
 import org.apache.geronimo.xbeans.geronimo.naming.GerPortType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
-import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingType;
-import org.apache.geronimo.xbeans.j2ee.JavaXmlTypeMappingType;
-import org.apache.geronimo.xbeans.j2ee.ServiceEndpointInterfaceMappingType;
-import org.apache.geronimo.xbeans.j2ee.ServiceEndpointMethodMappingType;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.webservices.SerializableWebServiceContainerFactoryGBean;
@@ -86,6 +83,10 @@ import org.apache.geronimo.webservices.b
 import org.apache.geronimo.webservices.builder.SchemaInfoBuilder;
 import org.apache.geronimo.webservices.builder.WSDescriptorParser;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.openejb.jee.JavaXmlTypeMapping;
+import org.apache.openejb.jee.JavaWsdlMapping;
+import org.apache.openejb.jee.ServiceEndpointInterfaceMapping;
+import org.apache.openejb.jee.ServiceEndpointMethodMapping;
 import org.apache.xbean.osgi.bundle.util.BundleClassLoader;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.util.JarUtils;
@@ -94,6 +95,7 @@ import org.osgi.framework.Bundle;
 /**
  * @version $Rev$ $Date$
  */
+@GBean(j2eeType = NameFactory.MODULE_BUILDER)
 public class AxisBuilder implements WebServiceBuilder {
 
     private static final Logger LOG = LoggerFactory.getLogger(AxisBuilder.class);
@@ -103,11 +105,7 @@ public class AxisBuilder implements WebS
     private final Environment defaultEnvironment;
     private static final String KEY = AxisBuilder.class.getName();
 
-    public AxisBuilder() {
-        defaultEnvironment = null;
-    }
-
-    public AxisBuilder(Environment defaultEnvironment) {
+    public AxisBuilder(@ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment) {
         this.defaultEnvironment = defaultEnvironment;
     }
 
@@ -249,7 +247,7 @@ public class AxisBuilder implements WebS
         GerServiceRefType gerServiceRefType = (GerServiceRefType) serviceRefType;
         JarFile moduleFile = module.getModuleFile();
         SchemaInfoBuilder schemaInfoBuilder = null;
-        JavaWsdlMappingType mapping = null;
+        JavaWsdlMapping mapping = null;
         if (wsdlURI != null) {
             schemaInfoBuilder = new SchemaInfoBuilder(moduleFile, wsdlURI);
 
@@ -259,7 +257,7 @@ public class AxisBuilder implements WebS
         return createService(serviceInterface, schemaInfoBuilder, mapping, serviceQName, SOAP_VERSION, handlerInfos, gerServiceRefType, module, bundle);
     }
 
-    public Object createService(Class serviceInterface, SchemaInfoBuilder schemaInfoBuilder, JavaWsdlMappingType mapping, QName serviceQName, SOAPConstants soapVersion, List handlerInfos, GerServiceRefType serviceRefType, Module module, Bundle bundle) throws DeploymentException {
+    public Object createService(Class serviceInterface, SchemaInfoBuilder schemaInfoBuilder, JavaWsdlMapping mapping, QName serviceQName, SOAPConstants soapVersion, List handlerInfos, GerServiceRefType serviceRefType, Module module, Bundle bundle) throws DeploymentException {
         Map seiPortNameToFactoryMap = new HashMap();
         Map seiClassNameToFactoryMap = new HashMap();
         if (schemaInfoBuilder != null) {
@@ -268,7 +266,7 @@ public class AxisBuilder implements WebS
         return new AxisServiceReference(serviceInterface.getName(), seiPortNameToFactoryMap, seiClassNameToFactoryMap);
     }
 
-    public void buildSEIFactoryMap(SchemaInfoBuilder schemaInfoBuilder, GerServiceRefType serviceRefType, JavaWsdlMappingType mapping, List handlerInfos, QName serviceQName, SOAPConstants soapVersion, Map seiPortNameToFactoryMap, Map seiClassNameToFactoryMap, Bundle bundle) throws DeploymentException {
+    public void buildSEIFactoryMap(SchemaInfoBuilder schemaInfoBuilder, GerServiceRefType serviceRefType, JavaWsdlMapping mapping, List handlerInfos, QName serviceQName, SOAPConstants soapVersion, Map seiPortNameToFactoryMap, Map seiClassNameToFactoryMap, Bundle bundle) throws DeploymentException {
         Map exceptionMap = WSDescriptorParser.getExceptionMap(mapping);
 
         Definition definition = schemaInfoBuilder.getDefinition();
@@ -344,17 +342,17 @@ public class AxisBuilder implements WebS
         }
     }
 
-    private void mapBinding(Binding binding, JavaWsdlMappingType mapping, QName serviceQName, Bundle bundle, SOAPConstants soapVersion, SchemaInfoBuilder schemaInfoBuilder, String portName, URL location, List handlerInfos, Map seiPortNameToFactoryMap, Map seiClassNameToFactoryMap, String credentialsName, Map exceptionMap) throws DeploymentException {
+    private void mapBinding(Binding binding, JavaWsdlMapping mapping, QName serviceQName, Bundle bundle, SOAPConstants soapVersion, SchemaInfoBuilder schemaInfoBuilder, String portName, URL location, List handlerInfos, Map seiPortNameToFactoryMap, Map seiClassNameToFactoryMap, String credentialsName, Map exceptionMap) throws DeploymentException {
         Style portStyle = getStyle(binding);
 
         PortType portType = binding.getPortType();
 
-        ServiceEndpointInterfaceMappingType[] endpointMappings = mapping.getServiceEndpointInterfaceMappingArray();
+        List<ServiceEndpointInterfaceMapping> endpointMappings = new ArrayList<ServiceEndpointInterfaceMapping>(mapping.getServiceEndpointInterfaceMapping());
 
         //port type corresponds to SEI
         List operations = portType.getOperations();
         OperationInfo[] operationInfos = new OperationInfo[operations.size()];
-        if (endpointMappings.length == 0) {
+        if (endpointMappings.isEmpty()) {
             doLightweightMapping(serviceQName, portType, mapping, bundle, operations, binding, portStyle, soapVersion, operationInfos, schemaInfoBuilder, portName, location, handlerInfos, seiPortNameToFactoryMap, seiClassNameToFactoryMap, credentialsName);
         } else {
             doHeavyweightMapping(serviceQName, portType, endpointMappings, bundle, operations, binding, portStyle, soapVersion, exceptionMap, schemaInfoBuilder, mapping, operationInfos, portName, location, handlerInfos, seiPortNameToFactoryMap, seiClassNameToFactoryMap, credentialsName);
@@ -422,13 +420,13 @@ public class AxisBuilder implements WebS
         return location;
     }
 
-    private void doHeavyweightMapping(QName serviceName, PortType portType, ServiceEndpointInterfaceMappingType[] endpointMappings, Bundle bundle, List operations, Binding binding, Style portStyle, SOAPConstants soapVersion, Map exceptionMap, SchemaInfoBuilder schemaInfoBuilder, JavaWsdlMappingType mapping, OperationInfo[] operationInfos, String portName, URL location, List handlerInfos, Map seiPortNameToFactoryMap, Map seiClassNameToFactoryMap, String credentialsName) throws DeploymentException {
-        Class serviceEndpointInterface;
+    private void doHeavyweightMapping(QName serviceName, PortType portType, List<ServiceEndpointInterfaceMapping> endpointMappings, Bundle bundle, List operations, Binding binding, Style portStyle, SOAPConstants soapVersion, Map exceptionMap, SchemaInfoBuilder schemaInfoBuilder, JavaWsdlMapping mapping, OperationInfo[] operationInfos, String portName, URL location, List handlerInfos, Map seiPortNameToFactoryMap, Map seiClassNameToFactoryMap, String credentialsName) throws DeploymentException {
+        Class<?> serviceEndpointInterface;
         SEIFactory seiFactory;
         //complete jaxrpc mapping file supplied
         QName portTypeQName = portType.getQName();
-        ServiceEndpointInterfaceMappingType endpointMapping = WSDescriptorParser.getServiceEndpointInterfaceMapping(endpointMappings, portTypeQName);
-        String fqcn = endpointMapping.getServiceEndpointInterface().getStringValue();
+        ServiceEndpointInterfaceMapping endpointMapping = WSDescriptorParser.getServiceEndpointInterfaceMapping(endpointMappings, portTypeQName);
+        String fqcn = endpointMapping.getServiceEndpointInterface();
         try {
             serviceEndpointInterface = bundle.loadClass(fqcn);
         } catch (ClassNotFoundException e) {
@@ -437,10 +435,10 @@ public class AxisBuilder implements WebS
 //        Class enhancedServiceEndpointClass = enhanceServiceEndpointInterface(serviceEndpointInterface, context, module, classLoader);
 
         Collection operationDescs = new ArrayList();
-        ServiceEndpointMethodMappingType[] methodMappings = endpointMapping.getServiceEndpointMethodMappingArray();
+        List<ServiceEndpointMethodMapping> methodMappings = endpointMapping.getServiceEndpointMethodMapping();
         int i = 0;
         Set wrapperElementQNames = new HashSet();
-        JavaXmlTypeMappingType[] javaXmlTypeMappings = mapping.getJavaXmlTypeMappingArray();
+        List<JavaXmlTypeMapping> javaXmlTypeMappings = mapping.getJavaXmlTypeMapping();
         boolean hasEncoded = false;
         for (Iterator ops = operations.iterator(); ops.hasNext();) {
             Operation operation = (Operation) ops.next();
@@ -459,7 +457,7 @@ public class AxisBuilder implements WebS
             if (bindingOperation == null) {
                 throw new DeploymentException("No BindingOperation for operation: " + operationName + ", input: " + operation.getInput().getName() + ", output: " + (operation.getOutput() == null ? "<none>" : operation.getOutput().getName()));
             }
-            ServiceEndpointMethodMappingType methodMapping = WSDescriptorParser.getMethodMappingForOperation(operationName, methodMappings);
+            ServiceEndpointMethodMapping methodMapping = WSDescriptorParser.getMethodMappingForOperation(operationName, methodMappings);
             HeavyweightOperationDescBuilder operationDescBuilder = new HeavyweightOperationDescBuilder(bindingOperation, mapping, methodMapping, portStyle, exceptionMap, schemaInfoBuilder, javaXmlTypeMappings, bundle, serviceEndpointInterface);
             OperationInfo operationInfo = operationDescBuilder.buildOperationInfo(soapVersion);
             operationInfos[i++] = operationInfo;
@@ -475,8 +473,8 @@ public class AxisBuilder implements WebS
         seiClassNameToFactoryMap.put(serviceEndpointInterface.getName(), seiFactory);
     }
 
-    private void doLightweightMapping(QName serviceName, PortType portType, JavaWsdlMappingType mapping, Bundle bundle, List operations, Binding binding, Style portStyle, SOAPConstants soapVersion, OperationInfo[] operationInfos, SchemaInfoBuilder schemaInfoBuilder, String portName, URL location, List handlerInfos, Map seiPortNameToFactoryMap, Map seiClassNameToFactoryMap, String credentialsName) throws DeploymentException {
-        Class serviceEndpointInterface;
+    private void doLightweightMapping(QName serviceName, PortType portType, JavaWsdlMapping mapping, Bundle bundle, List operations, Binding binding, Style portStyle, SOAPConstants soapVersion, OperationInfo[] operationInfos, SchemaInfoBuilder schemaInfoBuilder, String portName, URL location, List handlerInfos, Map seiPortNameToFactoryMap, Map seiClassNameToFactoryMap, String credentialsName) throws DeploymentException {
+        Class<?> serviceEndpointInterface;
         SEIFactory seiFactory;
         //lightweight jaxrpc mapping supplied
         serviceEndpointInterface = getServiceEndpointInterfaceLightweight(portType, mapping, bundle);
@@ -497,7 +495,7 @@ public class AxisBuilder implements WebS
         seiClassNameToFactoryMap.put(serviceEndpointInterface.getName(), seiFactory);
     }
 
-    private Class getServiceEndpointInterfaceLightweight(PortType portType, JavaWsdlMappingType mappings, Bundle bundle) throws DeploymentException {
+    private Class getServiceEndpointInterfaceLightweight(PortType portType, JavaWsdlMapping mappings, Bundle bundle) throws DeploymentException {
         QName portTypeQName = portType.getQName();
         String portTypeNamespace = portTypeQName.getNamespaceURI();
         String portTypePackage = WSDescriptorParser.getPackageFromNamespace(portTypeNamespace, mappings);
@@ -518,13 +516,12 @@ public class AxisBuilder implements WebS
         return new SEIFactoryImpl(serviceName, portName, enhancedServiceEndpointClassName, operationInfos, typeInfo, location, handlerInfos, credentialsName);
     }
 
-    private List buildHandlerInfosForPort(String portName, List handlerInfoInfos) {
-        List handlerInfos = new ArrayList();
-        for (Iterator iterator = handlerInfoInfos.iterator(); iterator.hasNext();) {
-            HandlerInfoInfo handlerInfoInfo = (HandlerInfoInfo) iterator.next();
+    private List<HandlerInfo> buildHandlerInfosForPort(String portName, List<HandlerInfoInfo> handlerInfoInfos) {
+        List<HandlerInfo> handlerInfos = new ArrayList<HandlerInfo>();
+        for (HandlerInfoInfo handlerInfoInfo: handlerInfoInfos) {
             Set portNames = handlerInfoInfo.getPortNames();
             if (portNames.isEmpty() || portNames.contains(portName)) {
-                HandlerInfo handlerInfo = new HandlerInfo(handlerInfoInfo.getHandlerClass(), handlerInfoInfo.getHandlerConfig(), handlerInfoInfo.getSoapHeaders());
+                HandlerInfo handlerInfo = new HandlerInfo(handlerInfoInfo.getHandlerClass(), handlerInfoInfo.getHandlerConfig(), handlerInfoInfo.getSoapHeaders().toArray(new QName[0]));
                 handlerInfos.add(handlerInfo);
 
                 //TODO what about the soap roles??
@@ -551,21 +548,4 @@ public class AxisBuilder implements WebS
         return (clazz.isAnnotationPresent(WebService.class) || 
                 clazz.isAnnotationPresent(WebServiceProvider.class));
     }
-    
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(AxisBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addInterface(WebServiceBuilder.class);
-        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
-
-        infoBuilder.setConstructor(new String[]{"defaultEnvironment"});
-
-        GBEAN_INFO = infoBuilder.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
-
 }

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java Fri Sep 17 16:12:05 2010
@@ -129,7 +129,7 @@ public class AxisModuleBuilderExtension 
 
         Map<String, WebServiceBinding> wsBindingMap = createWebServiceBindingMap(ejbModule);
 
-        for (EnterpriseBeanInfo bean : ejbModule.getEjbJarInfo().enterpriseBeans) {
+        for (EnterpriseBeanInfo bean : ejbModule.getEjbInfo().getEjbJarInfo().enterpriseBeans) {
             if (bean.type != EnterpriseBeanInfo.STATELESS) {
                 continue;
             }
@@ -187,7 +187,7 @@ public class AxisModuleBuilderExtension 
         Map<String, WebServiceBinding> wsBindingMap = createWebServiceBindingMap(ejbModule);
 
         AbstractNameQuery ejbModuleName = NameFactory.newTypeNameQuery(module.getEarContext().getConfigID(), NameFactory.EJB_MODULE, module.getName());
-        for (EnterpriseBeanInfo bean : ejbModule.getEjbJarInfo().enterpriseBeans) {
+        for (EnterpriseBeanInfo bean : ejbModule.getEjbInfo().getEjbJarInfo().enterpriseBeans) {
             if (bean.type != EnterpriseBeanInfo.STATELESS) {
                 continue;
             }

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java Fri Sep 17 16:12:05 2010
@@ -48,8 +48,6 @@ import org.apache.geronimo.axis.client.T
 import org.apache.geronimo.axis.server.ReadOnlyServiceDesc;
 import org.apache.geronimo.axis.server.ServiceInfo;
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.xbeans.j2ee.JavaXmlTypeMappingType;
-import org.apache.geronimo.xbeans.j2ee.ServiceEndpointMethodMappingType;
 import org.apache.geronimo.xbeans.wsdl.DefinitionsDocument;
 import org.apache.geronimo.xbeans.wsdl.TDefinitions;
 import org.apache.geronimo.xbeans.wsdl.TImport;
@@ -57,6 +55,8 @@ import org.apache.geronimo.xbeans.wsdl.T
 import org.apache.geronimo.webservices.builder.PortInfo;
 import org.apache.geronimo.webservices.builder.SchemaInfoBuilder;
 import org.apache.geronimo.webservices.builder.WSDescriptorParser;
+import org.apache.openejb.jee.JavaXmlTypeMapping;
+import org.apache.openejb.jee.ServiceEndpointMethodMapping;
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.impl.xb.xsdschema.ImportDocument;
@@ -174,9 +174,9 @@ public class AxisServiceBuilder {
                 operationDescBuilder = new LightweightOperationDescBuilder(bindingOperation, method);
             } else {
                 String operationName = bindingOperation.getOperation().getName();
-                ServiceEndpointMethodMappingType[] methodMappings = portInfo.getServiceEndpointInterfaceMapping().getServiceEndpointMethodMappingArray();
-                ServiceEndpointMethodMappingType methodMapping = WSDescriptorParser.getMethodMappingForOperation(operationName, methodMappings);
-                JavaXmlTypeMappingType[] javaXmlTypeMappingTypes = portInfo.getJavaWsdlMapping().getJavaXmlTypeMappingArray();
+                List<ServiceEndpointMethodMapping> methodMappings = portInfo.getServiceEndpointInterfaceMapping().getServiceEndpointMethodMapping();
+                ServiceEndpointMethodMapping methodMapping = WSDescriptorParser.getMethodMappingForOperation(operationName, methodMappings);
+                List<JavaXmlTypeMapping> javaXmlTypeMappingTypes = portInfo.getJavaWsdlMapping().getJavaXmlTypeMapping();
                 operationDescBuilder = new HeavyweightOperationDescBuilder(bindingOperation, portInfo.getJavaWsdlMapping(), methodMapping, portStyle, exceptionMap, portInfo.getSchemaInfoBuilder(), javaXmlTypeMappingTypes, bundle, serviceEndpointInterface);
                 Set wrappedElementQNamesForOper = ((HeavyweightOperationDescBuilder) operationDescBuilder).getWrapperElementQNames();
                 wrappedElementQNames.addAll(wrappedElementQNamesForOper);

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java Fri Sep 17 16:12:05 2010
@@ -29,8 +29,9 @@ import java.util.Set;
 import javax.xml.namespace.QName;
 
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.HandlerInfoInfo;
 import org.apache.geronimo.j2ee.deployment.Module;
@@ -41,12 +42,10 @@ import org.apache.geronimo.naming.deploy
 import org.apache.geronimo.naming.deployment.ServiceRefBuilder;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefDocument;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
-import org.apache.geronimo.xbeans.javaee6.HandlerType;
-import org.apache.geronimo.xbeans.javaee6.ParamValueType;
-import org.apache.geronimo.xbeans.javaee6.PortComponentRefType;
-import org.apache.geronimo.xbeans.javaee6.ServiceRefType;
-import org.apache.geronimo.xbeans.javaee6.XsdQNameType;
+import org.apache.openejb.jee.Handler;
 import org.apache.openejb.jee.JndiConsumer;
+import org.apache.openejb.jee.PortComponentRef;
+import org.apache.openejb.jee.ParamValue;
 import org.apache.openejb.jee.ServiceRef;
 import org.apache.xmlbeans.QNameSet;
 import org.apache.xmlbeans.XmlObject;
@@ -57,6 +56,7 @@ import org.slf4j.LoggerFactory;
 /**
  * @version $Rev$ $Date$
  */
+@GBean(j2eeType = NameFactory.MODULE_BUILDER)
 public class AxisServiceRefBuilder extends AbstractNamingBuilder implements ServiceRefBuilder {
     private static final Logger log = LoggerFactory.getLogger(AxisServiceRefBuilder.class);
     private final QNameSet serviceRefQNameSet;
@@ -65,14 +65,16 @@ public class AxisServiceRefBuilder exten
 
     private final AxisBuilder axisBuilder;
 
-    public AxisServiceRefBuilder(Environment defaultEnvironment, String[] eeNamespaces, AxisBuilder axisBuilder) {
+    public AxisServiceRefBuilder(@ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment,
+                                 @ParamAttribute(name = "eeNamespaces") String[] eeNamespaces, 
+                                 @ParamReference(name = "AxisBuilder", namingType = NameFactory.MODULE_BUILDER) AxisBuilder axisBuilder) {
         super(defaultEnvironment);
         this.axisBuilder = axisBuilder;
         serviceRefQNameSet = buildQNameSet(eeNamespaces, "service-ref");
     }
 
     protected boolean willMergeEnvironment(JndiConsumer specDD, XmlObject plan) {
-        return specDD.selectChildren(serviceRefQNameSet).length > 0;
+        return !specDD.getServiceRef().isEmpty();
     }
 
 //    public void buildNaming(XmlObject specDD, XmlObject plan, Module module, Map componentContext) throws DeploymentException {
@@ -106,11 +108,11 @@ public class AxisServiceRefBuilder exten
     @Override
     public void buildNaming(ServiceRef serviceRef, GerServiceRefType gerServiceRefType, Module module, Map<EARContext.Key, Object> sharedContext) throws DeploymentException {
         //TODO name needs to be normalized or get normalized name from jee's map.
-        String name = normalize(getStringValue(serviceRef.getServiceRefName()));
+        String name = normalize(serviceRef.getServiceRefName());
         Bundle bundle = module.getEarContext().getDeploymentBundle();
 
 //            Map credentialsNameMap = (Map) serviceRefCredentialsNameMap.get(name);
-        String serviceInterfaceName = getStringValue(serviceRef.getServiceInterface());
+        String serviceInterfaceName = serviceRef.getServiceInterface();
         assureInterface(serviceInterfaceName, "javax.xml.rpc.Service", "[Web]Service", bundle);
         Class serviceInterface;
         try {
@@ -119,47 +121,43 @@ public class AxisServiceRefBuilder exten
             throw new DeploymentException("Could not load service interface class: " + serviceInterfaceName, e);
         }
         URI wsdlURI = null;
-        if (serviceRef.isSetWsdlFile()) {
+        if (serviceRef.getWsdlFile() != null) {
             try {
-                wsdlURI = new URI(serviceRef.getWsdlFile().getStringValue().trim());
+                wsdlURI = new URI(serviceRef.getWsdlFile());
             } catch (URISyntaxException e) {
-                throw new DeploymentException("could not construct wsdl uri from " + serviceRef.getWsdlFile().getStringValue(), e);
+                throw new DeploymentException("could not construct wsdl uri from " + serviceRef.getWsdlFile(), e);
             }
         }
         URI jaxrpcMappingURI = null;
-        if (serviceRef.isSetJaxrpcMappingFile()) {
+        if (serviceRef.getJaxrpcMappingFile() != null) {
             try {
-                jaxrpcMappingURI = new URI(getStringValue(serviceRef.getJaxrpcMappingFile()));
+                jaxrpcMappingURI = new URI(serviceRef.getJaxrpcMappingFile());
             } catch (URISyntaxException e) {
                 throw new DeploymentException("Could not construct jaxrpc mapping uri from " + serviceRef.getJaxrpcMappingFile(), e);
             }
         }
         QName serviceQName = null;
-        if (serviceRef.isSetServiceQname()) {
-            serviceQName = serviceRef.getServiceQname().getQNameValue();
+        if (serviceRef.getServiceQname() != null) {
+            serviceQName = serviceRef.getServiceQname();
         }
         Map portComponentRefMap = new HashMap();
-        PortComponentRefType[] portComponentRefs = serviceRef.getPortComponentRefArray();
-        if (portComponentRefs != null) {
-            for (int j = 0; j < portComponentRefs.length; j++) {
-                PortComponentRefType portComponentRef = portComponentRefs[j];
-                String portComponentLink = getStringValue(portComponentRef.getPortComponentLink());
-                String serviceEndpointInterfaceType = getStringValue(portComponentRef.getServiceEndpointInterface());
-                assureInterface(serviceEndpointInterfaceType, "java.rmi.Remote", "ServiceEndpoint", bundle);
-                Class serviceEndpointClass;
-                try {
-                    serviceEndpointClass = bundle.loadClass(serviceEndpointInterfaceType);
-                } catch (ClassNotFoundException e) {
-                    throw new DeploymentException("could not load service endpoint class " + serviceEndpointInterfaceType, e);
-                }
-                portComponentRefMap.put(serviceEndpointClass, portComponentLink);
+        List<PortComponentRef> portComponentRefs = serviceRef.getPortComponentRef();
+        for (PortComponentRef portComponentRef : portComponentRefs) {
+            String portComponentLink = portComponentRef.getPortComponentLink();
+            String serviceEndpointInterfaceType = portComponentRef.getServiceEndpointInterface();
+            assureInterface(serviceEndpointInterfaceType, "java.rmi.Remote", "ServiceEndpoint", bundle);
+            Class serviceEndpointClass;
+            try {
+                serviceEndpointClass = bundle.loadClass(serviceEndpointInterfaceType);
+            } catch (ClassNotFoundException e) {
+                throw new DeploymentException("could not load service endpoint class " + serviceEndpointInterfaceType, e);
             }
+            portComponentRefMap.put(serviceEndpointClass, portComponentLink);
         }
-        HandlerType[] handlers = serviceRef.getHandlerArray();
-        List handlerInfos = buildHandlerInfoList(handlers, bundle);
+        List<HandlerInfoInfo> handlerInfos = buildHandlerInfoList(serviceRef.getHandler(), bundle);
 
 //we could get a Reference or the actual serializable Service back.
-        Object ref = axisBuilder.createService(serviceInterface, wsdlURI, jaxrpcMappingURI, serviceQName, portComponentRefMap, handlerInfos, serviceRefType, module, bundle);
+        Object ref = axisBuilder.createService(serviceInterface, wsdlURI, jaxrpcMappingURI, serviceQName, portComponentRefMap, handlerInfos, serviceRef, module, bundle);
         put(name, ref, module.getJndiContext(), serviceRef.getInjectionTarget(), sharedContext);
         //getJndiContextMap(componentContext).put(ENV + name, ref);
     }
@@ -173,43 +171,23 @@ public class AxisServiceRefBuilder exten
     }
 
 
-    private static List buildHandlerInfoList(HandlerType[] handlers, Bundle bundle) throws DeploymentException {
-        List handlerInfos = new ArrayList();
-        for (int i = 0; i < handlers.length; i++) {
-            HandlerType handler = handlers[i];
-            org.apache.geronimo.xbeans.javaee6.String[] portNameArray = handler.getPortNameArray();
-            List portNames = new ArrayList();
-            for (int j = 0; j < portNameArray.length; j++) {
-                portNames.add(portNameArray[j].getStringValue().trim());
-
-            }
-//            Set portNames = new HashSet(Arrays.asList(portNameArray));
-            String handlerClassName = handler.getHandlerClass().getStringValue().trim();
+    private static List<HandlerInfoInfo> buildHandlerInfoList(List<Handler> handlers, Bundle bundle) throws DeploymentException {
+        List<HandlerInfoInfo> handlerInfos = new ArrayList<HandlerInfoInfo>();
+        for (Handler handler: handlers) {
+            List<String> portNames = handler.getPortName(); 
+            String handlerClassName = handler.getHandlerClass();
             Class handlerClass;
             try {
                 handlerClass = ClassLoading.loadClass(handlerClassName, bundle);
             } catch (ClassNotFoundException e) {
                 throw new DeploymentException("Could not load handler class", e);
             }
-            Map config = new HashMap();
-            ParamValueType[] paramValues = handler.getInitParamArray();
-            for (int j = 0; j < paramValues.length; j++) {
-                ParamValueType paramValue = paramValues[j];
-                String paramName = paramValue.getParamName().getStringValue().trim();
-                String paramStringValue = paramValue.getParamValue().getStringValue().trim();
-                config.put(paramName, paramStringValue);
-            }
-            XsdQNameType[] soapHeaderQNames = handler.getSoapHeaderArray();
-            QName[] headerQNames = new QName[soapHeaderQNames.length];
-            for (int j = 0; j < soapHeaderQNames.length; j++) {
-                XsdQNameType soapHeaderQName = soapHeaderQNames[j];
-                headerQNames[j] = soapHeaderQName.getQNameValue();
-            }
-            Set soapRoles = new HashSet();
-            for (int j = 0; j < handler.getSoapRoleArray().length; j++) {
-                String soapRole = handler.getSoapRoleArray(j).getStringValue().trim();
-                soapRoles.add(soapRole);
+            Map<String, String> config = new HashMap<String, String>();
+            for (ParamValue paramValue: handler.getInitParam()) {
+                config.put(paramValue.getParamName(), paramValue.getParamValue());
             }
+            List<QName> headerQNames = handler.getSoapHeader(); 
+            Set<String> soapRoles = new HashSet<String>(handler.getSoapRole());
             HandlerInfoInfo handlerInfoInfo = new HandlerInfoInfo(new HashSet(portNames), handlerClass, config, headerQNames, soapRoles);
             handlerInfos.add(handlerInfoInfo);
         }
@@ -227,32 +205,4 @@ public class AxisServiceRefBuilder exten
         }
         return refMap;
     }
-
-    // This is temporary
-    private static String getStringValue(org.apache.geronimo.xbeans.j2ee.String string) {
-        if (string == null) {
-            return null;
-        }
-        String s = string.getStringValue();
-        return s == null ? null : s.trim();
-    }
-
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(AxisServiceRefBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addInterface(ServiceRefBuilder.class);
-        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
-        infoBuilder.addAttribute("eeNamespaces", String[].class, true, true);
-        infoBuilder.addReference("AxisBuilder", AxisBuilder.class, NameFactory.MODULE_BUILDER);
-
-        infoBuilder.setConstructor(new String[]{"defaultEnvironment", "eeNamespaces", "AxisBuilder"});
-
-        GBEAN_INFO = infoBuilder.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
-
 }

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java Fri Sep 17 16:12:05 2010
@@ -26,6 +26,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
@@ -49,18 +50,18 @@ import org.apache.axis.encoding.XMLType;
 import org.apache.geronimo.axis.client.OperationInfo;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.kernel.ClassLoading;
-import org.apache.geronimo.xbeans.j2ee.ConstructorParameterOrderType;
-import org.apache.geronimo.xbeans.j2ee.ExceptionMappingType;
-import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingType;
-import org.apache.geronimo.xbeans.j2ee.MethodParamPartsMappingType;
-import org.apache.geronimo.xbeans.j2ee.ServiceEndpointMethodMappingType;
-import org.apache.geronimo.xbeans.j2ee.WsdlMessageMappingType;
-import org.apache.geronimo.xbeans.j2ee.WsdlReturnValueMappingType;
+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.ServiceEndpointMethodMapping;
+import org.apache.openejb.jee.WsdlMessageMapping;
+import org.apache.openejb.jee.WsdlReturnValueMapping;
 import org.apache.xmlbeans.SchemaParticle;
 import org.apache.xmlbeans.SchemaProperty;
 import org.apache.xmlbeans.SchemaType;
 import org.objectweb.asm.Type;
-import org.apache.geronimo.xbeans.j2ee.JavaXmlTypeMappingType;
 import org.apache.geronimo.webservices.builder.SchemaInfoBuilder;
 import org.apache.geronimo.webservices.builder.WSDescriptorParser;
 import org.osgi.framework.Bundle;
@@ -70,8 +71,8 @@ import org.osgi.framework.Bundle;
  */
 public class HeavyweightOperationDescBuilder extends OperationDescBuilder {
 
-    private final JavaWsdlMappingType mapping;
-    private final ServiceEndpointMethodMappingType methodMapping;
+    private final JavaWsdlMapping mapping;
+    private final ServiceEndpointMethodMapping methodMapping;
     private final SOAPBody soapBody;
 
 
@@ -97,21 +98,22 @@ public class HeavyweightOperationDescBui
      */
     private final Set wrapperElementQNames = new HashSet();
 
-    public HeavyweightOperationDescBuilder(BindingOperation bindingOperation, JavaWsdlMappingType mapping, ServiceEndpointMethodMappingType methodMapping, Style defaultStyle, Map exceptionMap, SchemaInfoBuilder schemaInfoBuilder, JavaXmlTypeMappingType[] javaXmlTypeMappingTypes, Bundle bundle, Class serviceEndpointInterface) throws DeploymentException {
+    public HeavyweightOperationDescBuilder(BindingOperation bindingOperation, JavaWsdlMapping mapping, ServiceEndpointMethodMapping methodMapping, Style defaultStyle, Map exceptionMap, SchemaInfoBuilder schemaInfoBuilder, List<JavaXmlTypeMapping> javaXmlTypeMappingTypes, Bundle bundle, Class serviceEndpointInterface) throws DeploymentException {
         super(bindingOperation);
         this.mapping = mapping;
         this.methodMapping = methodMapping;
         this.exceptionMap = exceptionMap;
         this.schemaInfoBuilder = schemaInfoBuilder;
-        for (int i = 0; i < javaXmlTypeMappingTypes.length; i++) {
-            JavaXmlTypeMappingType javaXmlTypeMappingType = javaXmlTypeMappingTypes[i];
-            String javaClassName = javaXmlTypeMappingType.getJavaType().getStringValue().trim();
-            if (javaXmlTypeMappingType.isSetAnonymousTypeQname()) {
-                String anonymousTypeQName = javaXmlTypeMappingType.getAnonymousTypeQname().getStringValue().trim();
+        for (JavaXmlTypeMapping javaXmlTypeMappingType: javaXmlTypeMappingTypes) {
+            String javaClassName = javaXmlTypeMappingType.getJavaType();
+            String anonymousTypeQName = javaXmlTypeMappingType.getAnonymousTypeQname(); 
+            if (anonymousTypeQName != null) {
                 anonymousTypes.put(anonymousTypeQName, javaClassName);
-            } else if (javaXmlTypeMappingType.isSetRootTypeQname()) {
-                QName qname = javaXmlTypeMappingType.getRootTypeQname().getQNameValue();
-                publicTypes.put(qname, javaClassName);
+            } else {
+                QName qname = javaXmlTypeMappingType.getRootTypeQname();
+                if (qname != null) {
+                    publicTypes.put(qname, javaClassName);
+                }
             }
         }
         this.bundle = bundle;
@@ -119,7 +121,7 @@ public class HeavyweightOperationDescBui
         BindingInput bindingInput = bindingOperation.getBindingInput();
         this.soapBody = (SOAPBody) SchemaInfoBuilder.getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());
 
-        wrappedStyle = methodMapping.isSetWrappedElement();
+        wrappedStyle = methodMapping.getWrappedElement() != null;
         if (false == wrappedStyle) {
             Style style = Style.getStyle(soapOperation.getStyle(), defaultStyle);
             if (style == Style.RPC) {
@@ -153,7 +155,7 @@ public class HeavyweightOperationDescBui
         boolean usesSOAPAction = (soapActionURI != null);
         QName operationQName = getOperationQName();
 
-        String methodName = methodMapping.getJavaMethodName().getStringValue().trim();
+        String methodName = methodMapping.getJavaMethodName();
 
         ArrayList parameters = operationDesc.getParameters();
         Type[] parameterASMTypes = new Type[parameters.size()];
@@ -205,18 +207,17 @@ public class HeavyweightOperationDescBui
         operationDesc.setUse(use);
 
 
-        MethodParamPartsMappingType[] paramMappings = methodMapping.getMethodParamPartsMappingArray();
+        List<MethodParamPartsMapping> paramMappings = methodMapping.getMethodParamPartsMapping();
 
         /* Put the ParameterDesc instance in an array so they can be ordered properly
          * before they are added to the the OperationDesc.
          */
-        ParameterDesc[] parameterDescriptions = new ParameterDesc[paramMappings.length];
+        ParameterDesc[] parameterDescriptions = new ParameterDesc[paramMappings.size()];
 
 
         // MAP PARAMETERS
-        for (int i = 0; i < paramMappings.length; i++) {
-            MethodParamPartsMappingType paramMapping = paramMappings[i];
-            int position = paramMapping.getParamPosition().getBigIntegerValue().intValue();
+        for (MethodParamPartsMapping paramMapping: paramMappings) {
+            int position = paramMapping.getParamPosition().intValue();
 
             ParameterDesc parameterDesc = mapParameter(paramMapping);
 
@@ -269,7 +270,7 @@ public class HeavyweightOperationDescBui
             paramTypes[i] = parameterDescription.getJavaType();
         }
 
-        String methodName = methodMapping.getJavaMethodName().getStringValue().trim();
+        String methodName = methodMapping.getJavaMethodName();
         Method method = null;
         try {
             method = serviceEndpointInterface.getMethod(methodName, paramTypes);
@@ -290,7 +291,7 @@ public class HeavyweightOperationDescBui
 
         // MAP RETURN TYPE
         operationDesc.setMep(operation.getStyle());
-        if (methodMapping.isSetWsdlReturnValueMapping()) {
+        if (methodMapping.getWsdlReturnValueMapping() != null) {
             mapReturnType();
         } else if (operation.getStyle() == OperationType.REQUEST_RESPONSE) {
             //TODO WARNING THIS APPEARS TO SUBVERT THE COMMENT IN j2ee_jaxrpc_mapping_1_1.xsd IN service-endpoint-method-mappingType:
@@ -372,19 +373,19 @@ public class HeavyweightOperationDescBui
     private FaultDesc mapException(String faultName, Fault fault) throws DeploymentException {
         Message message = fault.getMessage();
         QName messageQName = message.getQName();
-        ExceptionMappingType exceptionMapping = (ExceptionMappingType) exceptionMap.get(messageQName);
+        ExceptionMapping exceptionMapping = (ExceptionMapping) exceptionMap.get(messageQName);
         if (exceptionMapping == null) {
             throw new DeploymentException("No exception mapping for fault " + faultName + " and fault message " + messageQName + " for operation " + operationName);
         }
-        String className = exceptionMapping.getExceptionType().getStringValue().trim();
+        String className = exceptionMapping.getExceptionType();
         //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)
         QName faultQName = new QName("", faultName);
         Part part;
-        if (exceptionMapping.isSetWsdlMessagePartName()) {
+        if (exceptionMapping.getWsdlMessagePartName() != null) {
             //According to schema documentation, this will only be set when several headerfaults use the same message.
-            String headerFaultMessagePartName = exceptionMapping.getWsdlMessagePartName().getStringValue();
+            String headerFaultMessagePartName = exceptionMapping.getWsdlMessagePartName();
             part = message.getPart(headerFaultMessagePartName);
         } else {
             part = (Part) message.getOrderedParts(null).iterator().next();
@@ -407,7 +408,7 @@ public class HeavyweightOperationDescBui
         FaultDesc faultDesc = new FaultDesc(faultQName, className, faultTypeQName, isComplex);
 
         //constructor parameters
-        if (exceptionMapping.isSetConstructorParameterOrder()) {
+        if (exceptionMapping.getConstructorParameterOrder() != null) {
             if (!isComplex) {
                 throw new DeploymentException("ConstructorParameterOrder can only be set for complex types, not " + faultTypeQName);
             }
@@ -420,9 +421,8 @@ public class HeavyweightOperationDescBui
                 elementMap.put(elementName.getLocalPart(), elementType);
             }
             ArrayList parameterTypes = new ArrayList();
-            ConstructorParameterOrderType constructorParameterOrder = exceptionMapping.getConstructorParameterOrder();
-            for (int i = 0; i < constructorParameterOrder.getElementNameArray().length; i++) {
-                String elementName = constructorParameterOrder.getElementNameArray(i).getStringValue().trim();
+            ConstructorParameterOrder constructorParameterOrder = exceptionMapping.getConstructorParameterOrder();
+            for (String elementName: constructorParameterOrder.getElementName()) {
                 SchemaType elementType = (SchemaType) elementMap.get(elementName);
                 Class javaElementType;
 
@@ -488,22 +488,22 @@ public class HeavyweightOperationDescBui
         if (output == null) {
             throw new DeploymentException("No output message, but a mapping for it for operation " + operationName);
         }
-        WsdlReturnValueMappingType wsdlReturnValueMapping = methodMapping.getWsdlReturnValueMapping();
-        String returnClassName = wsdlReturnValueMapping.getMethodReturnValue().getStringValue().trim();
+        WsdlReturnValueMapping wsdlReturnValueMapping = methodMapping.getWsdlReturnValueMapping();
+        String returnClassName = wsdlReturnValueMapping.getMethodReturnValue();
         try {
             returnClass = ClassLoading.loadClass(returnClassName, bundle);
         } catch (ClassNotFoundException e) {
             throw new DeploymentException("Could not load return type for operation " + operationName, e);
         }
 
-        QName wsdlMessageQName = wsdlReturnValueMapping.getWsdlMessage().getQNameValue();
+        QName wsdlMessageQName = wsdlReturnValueMapping.getWsdlMessage();
 
         if (!wsdlMessageQName.equals(output.getQName())) {
             throw new DeploymentException("OutputMessage has QName: " + output.getQName() + " but mapping specifies: " + wsdlMessageQName + " for operation " + operationName);
         }
 
-        if (wsdlReturnValueMapping.isSetWsdlMessagePartName()) {
-            String wsdlMessagePartName = wsdlReturnValueMapping.getWsdlMessagePartName().getStringValue().trim();
+        if (wsdlReturnValueMapping.getWsdlMessagePartName() != null) {
+            String wsdlMessagePartName = wsdlReturnValueMapping.getWsdlMessagePartName();
             if (outParamNames.contains(wsdlMessagePartName)) {
                 throw new DeploymentException("output message part " + wsdlMessagePartName + " has both an INOUT or OUT mapping and a return value mapping for operation " + operationName);
             }
@@ -541,12 +541,12 @@ public class HeavyweightOperationDescBui
         operationDesc.setReturnClass(returnClass);
     }
 
-    private ParameterDesc mapParameter(MethodParamPartsMappingType paramMapping) throws DeploymentException {
-        WsdlMessageMappingType wsdlMessageMappingType = paramMapping.getWsdlMessageMapping();
-        QName wsdlMessageQName = wsdlMessageMappingType.getWsdlMessage().getQNameValue();
-        String wsdlMessagePartName = wsdlMessageMappingType.getWsdlMessagePartName().getStringValue().trim();
+    private ParameterDesc mapParameter(MethodParamPartsMapping paramMapping) throws DeploymentException {
+        WsdlMessageMapping wsdlMessageMapping = paramMapping.getWsdlMessageMapping();
+        QName wsdlMessageQName = wsdlMessageMapping.getWsdlMessage();
+        String wsdlMessagePartName = wsdlMessageMapping.getWsdlMessagePartName();
 
-        String parameterMode = wsdlMessageMappingType.getParameterMode().getStringValue().trim();
+        String parameterMode = wsdlMessageMapping.getParameterMode();
         byte mode = ParameterDesc.modeFromString(parameterMode);
         boolean isInParam = mode == ParameterDesc.IN || mode == ParameterDesc.INOUT;
         boolean isOutParam = mode == ParameterDesc.OUT || mode == ParameterDesc.INOUT;
@@ -554,7 +554,7 @@ public class HeavyweightOperationDescBui
         if (isOutParam && output == null) {
             throw new DeploymentException("Mapping for output parameter " + wsdlMessagePartName + " found, but no output message for operation " + operationName);
         }
-        boolean isSoapHeader = wsdlMessageMappingType.isSetSoapHeader();
+        boolean isSoapHeader = wsdlMessageMapping.getSoapHeader() != null;
         boolean inHeader = isSoapHeader && isInParam;
         boolean outHeader = isSoapHeader && isOutParam;
 
@@ -669,9 +669,9 @@ public class HeavyweightOperationDescBui
 
         //use complexTypeMap
         boolean isComplexType = schemaInfoBuilder.getComplexTypesInWsdl().containsKey(paramTypeQName);
-        String paramJavaTypeName = paramMapping.getParamType().getStringValue().trim();
+        String paramJavaTypeName = paramMapping.getParamType();
         boolean isInOnly = mode == ParameterDesc.IN;
-        Class actualParamJavaType = WSDescriptorParser.getHolderType(paramJavaTypeName, isInOnly, paramTypeQName, isComplexType, mapping, bundle);
+        Class actualParamJavaType = WSDescriptorParser.getHolder(paramJavaTypeName, isInOnly, paramTypeQName, isComplexType, mapping, bundle);
 
         ParameterDesc parameterDesc = new ParameterDesc(paramQName, mode, paramTypeQName, actualParamJavaType, inHeader, outHeader);
         return parameterDesc;

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java Fri Sep 17 16:12:05 2010
@@ -55,10 +55,10 @@ import org.apache.geronimo.axis.client.A
 import org.apache.geronimo.axis.client.TypeInfo;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.kernel.ClassLoading;
-import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingType;
-import org.apache.geronimo.xbeans.j2ee.JavaXmlTypeMappingType;
-import org.apache.geronimo.xbeans.j2ee.VariableMappingType;
 import org.apache.geronimo.webservices.builder.SchemaTypeKey;
+import org.apache.openejb.jee.JavaWsdlMapping;
+import org.apache.openejb.jee.JavaXmlTypeMapping;
+import org.apache.openejb.jee.VariableMapping;
 import org.apache.xmlbeans.SchemaLocalAttribute;
 import org.apache.xmlbeans.SchemaParticle;
 import org.apache.xmlbeans.SchemaProperty;
@@ -90,36 +90,34 @@ public class HeavyweightTypeInfoBuilder 
         this.hasEncoded = hasEncoded;
     }
 
-    public List buildTypeInfo(JavaWsdlMappingType mapping) throws DeploymentException {
+    public List buildTypeInfo(JavaWsdlMapping mapping) throws DeploymentException {
         List typeInfoList = new ArrayList();
 
         Set mappedTypeQNames = new HashSet();
 
-        JavaXmlTypeMappingType[] javaXmlTypeMappings = mapping.getJavaXmlTypeMappingArray();
-        for (int j = 0; j < javaXmlTypeMappings.length; j++) {
-            JavaXmlTypeMappingType javaXmlTypeMapping = javaXmlTypeMappings[j];
-
+        List<JavaXmlTypeMapping> javaXmlTypeMappings = mapping.getJavaXmlTypeMapping();
+        for (JavaXmlTypeMapping javaXmlTypeMapping: javaXmlTypeMappings) {
             SchemaTypeKey key;
-            boolean isElement = javaXmlTypeMapping.getQnameScope().getStringValue().equals("element");
-            boolean isSimpleType = javaXmlTypeMapping.getQnameScope().getStringValue().equals("simpleType");
-            if (javaXmlTypeMapping.isSetRootTypeQname()) {
-                QName typeQName = javaXmlTypeMapping.getRootTypeQname().getQNameValue();
+            boolean isElement = javaXmlTypeMapping.getQNameScope().equals("element");
+            boolean isSimpleType = javaXmlTypeMapping.getQNameScope().equals("simpleType");
+            QName typeQName = javaXmlTypeMapping.getRootTypeQname();
+            if (typeQName != null) {
                 key = new SchemaTypeKey(typeQName, isElement, isSimpleType, false, null);
 
                 // Skip the wrapper elements.
                 if (wrapperElementQNames.contains(typeQName)) {
                     continue;
                 }
-            } else if (javaXmlTypeMapping.isSetAnonymousTypeQname()) {
-                String anonTypeQNameString = javaXmlTypeMapping.getAnonymousTypeQname().getStringValue();
+            } else if (javaXmlTypeMapping.getAnonymousTypeQname() != null) {
+                String anonTypeQNameString = javaXmlTypeMapping.getAnonymousTypeQname();
                 int pos = anonTypeQNameString.lastIndexOf(":");
                 if (pos == -1) {
                     throw new DeploymentException("anon QName is invalid, no final ':' " + anonTypeQNameString);
                 }
 
                 //this appears to be ignored...
-                QName typeQName = new QName(anonTypeQNameString.substring(0, pos), anonTypeQNameString.substring(pos + 1));
-                key = new SchemaTypeKey(typeQName, isElement, isSimpleType, true, null);
+                QName qname = new QName(anonTypeQNameString.substring(0, pos), anonTypeQNameString.substring(pos + 1));
+                key = new SchemaTypeKey(qname, isElement, isSimpleType, true, null);
 
                 // Skip the wrapper elements.
                 if (wrapperElementQNames.contains(new QName(anonTypeQNameString.substring(0, pos), anonTypeQNameString.substring(pos + 2)))) {
@@ -141,7 +139,7 @@ public class HeavyweightTypeInfoBuilder 
             }
             mappedTypeQNames.add(key.getqName());
 
-            String className = javaXmlTypeMapping.getJavaType().getStringValue().trim();
+            String className = javaXmlTypeMapping.getJavaType();
             Class clazz = null;
             try {
                 clazz = ClassLoading.loadClass(className, bundle);
@@ -335,7 +333,7 @@ public class HeavyweightTypeInfoBuilder 
         typeInfo.setQName(axisKey);
     }
 
-    private void populateInternalTypeInfo(Class javaClass, SchemaTypeKey key, SchemaType schemaType, JavaXmlTypeMappingType javaXmlTypeMapping, TypeInfo.UpdatableTypeInfo typeInfo) throws DeploymentException {
+    private void populateInternalTypeInfo(Class javaClass, SchemaTypeKey key, SchemaType schemaType, JavaXmlTypeMapping javaXmlTypeMapping, TypeInfo.UpdatableTypeInfo typeInfo) throws DeploymentException {
         String ns = key.getqName().getNamespaceURI();
         typeInfo.setCanSearchParents(schemaType.getDerivationType() == SchemaType.DT_RESTRICTION);
 
@@ -371,11 +369,11 @@ public class HeavyweightTypeInfoBuilder 
             }
         }
         
-        VariableMappingType[] variableMappings = javaXmlTypeMapping.getVariableMappingArray();
+        List<VariableMapping> variableMappings = javaXmlTypeMapping.getVariableMapping();
 
         // short-circuit the processing of arrays as they should not define variable-mapping elements. 
         if (javaClass.isArray()) {
-            if (0 != variableMappings.length) {
+            if (!variableMappings.isEmpty()) {
                 // for portability reason we simply warn and not fail.
                 log.warn("Ignoring variable-mapping defined for class " + javaClass + " which is an array.");
             }
@@ -383,7 +381,7 @@ public class HeavyweightTypeInfoBuilder 
             return;
         }
 
-        FieldDesc[] fields = new FieldDesc[variableMappings.length];
+        FieldDesc[] fields = new FieldDesc[variableMappings.size()];
         typeInfo.setFields(fields);
 
         PropertyDescriptor[] propertyDescriptors = new PropertyDescriptor[0];
@@ -397,18 +395,18 @@ public class HeavyweightTypeInfoBuilder 
             PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
             properties.put(propertyDescriptor.getName(), propertyDescriptor.getPropertyType());
         }
-        for (int i = 0; i < variableMappings.length; i++) {
-            VariableMappingType variableMapping = variableMappings[i];
-            String fieldName = variableMapping.getJavaVariableName().getStringValue().trim();
+        int i = 0; 
+        for (VariableMapping variableMapping: variableMappings) {
+            String fieldName = variableMapping.getJavaVariableName();
 
-            if (variableMapping.isSetXmlAttributeName()) {
+            if (variableMapping.getXmlAttributeName() != null) {
                 AttributeDesc attributeDesc = new AttributeDesc();
                 attributeDesc.setFieldName(fieldName);
                 Class javaType = (Class) properties.get(fieldName);
                 if (javaType == null) {
                     throw new DeploymentException("field name " + fieldName + " not found in " + properties);
                 }
-                String attributeLocalName = variableMapping.getXmlAttributeName().getStringValue().trim();
+                String attributeLocalName = variableMapping.getXmlAttributeName();
                 QName xmlName = new QName("", attributeLocalName);
                 attributeDesc.setXmlName(xmlName);
 
@@ -418,7 +416,7 @@ public class HeavyweightTypeInfoBuilder 
                 }
                 attributeDesc.setXmlType(attribute.getType().getName());
 
-                fields[i] = attributeDesc;
+                fields[i++] = attributeDesc;
             } else {
                 ElementDesc elementDesc = new ElementDesc();
                 elementDesc.setFieldName(fieldName);
@@ -432,10 +430,10 @@ public class HeavyweightTypeInfoBuilder 
                         throw new DeploymentException("field name " + fieldName + " not found in " + properties, e);
                     }
                 }
-                QName xmlName = new QName("", variableMapping.getXmlElementName().getStringValue().trim());
+                QName xmlName = new QName("", variableMapping.getXmlElementName());
                 SchemaParticle particle = (SchemaParticle) paramNameToType.get(xmlName);
                 if (null == particle) {
-                    xmlName = new QName(ns, variableMapping.getXmlElementName().getStringValue().trim());
+                    xmlName = new QName(ns, variableMapping.getXmlElementName());
                     particle = (SchemaParticle) paramNameToType.get(xmlName);
                     if (null == particle) {
                         throw new DeploymentException("element " + xmlName + " not found in schema " + schemaType.getName());
@@ -466,7 +464,7 @@ public class HeavyweightTypeInfoBuilder 
                     elementDesc.setMaxOccursUnbounded(particle.getIntMaxOccurs() > 1);
                 }
 
-                fields[i] = elementDesc;
+                fields[i++] = elementDesc;
             }
         }
     }

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/LightweightTypeInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/LightweightTypeInfoBuilder.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/LightweightTypeInfoBuilder.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/LightweightTypeInfoBuilder.java Fri Sep 17 16:12:05 2010
@@ -37,9 +37,9 @@ import org.apache.axis.encoding.ser.Bean
 import org.apache.geronimo.axis.client.TypeInfo;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.kernel.ClassLoading;
-import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingType;
 import org.apache.geronimo.webservices.builder.SchemaTypeKey;
 import org.apache.geronimo.webservices.builder.WSDescriptorParser;
+import org.apache.openejb.jee.JavaWsdlMapping;
 import org.apache.xmlbeans.SchemaParticle;
 import org.apache.xmlbeans.SchemaType;
 import org.osgi.framework.Bundle;
@@ -58,7 +58,7 @@ public class LightweightTypeInfoBuilder 
         this.wrapperElementQNames = wrapperElementQNames;
     }
 
-    public List buildTypeInfo(JavaWsdlMappingType mapping) throws DeploymentException {
+    public List buildTypeInfo(JavaWsdlMapping mapping) throws DeploymentException {
         List typeInfoList = new ArrayList();
 
         for (Iterator iterator = schemaTypeKeyToSchemaTypeMap.keySet().iterator(); iterator.hasNext();) {

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/TypeInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/TypeInfoBuilder.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/TypeInfoBuilder.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/TypeInfoBuilder.java Fri Sep 17 16:12:05 2010
@@ -19,8 +19,8 @@ package org.apache.geronimo.axis.builder
 import java.util.List;
 
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingType;
+import org.apache.openejb.jee.JavaWsdlMapping;
 
 public interface TypeInfoBuilder {
-    public List buildTypeInfo(JavaWsdlMappingType mapping)throws DeploymentException;
+    public List buildTypeInfo(JavaWsdlMapping mapping)throws DeploymentException;
 }

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java (original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java Fri Sep 17 16:12:05 2010
@@ -17,6 +17,8 @@
 package org.apache.geronimo.axis.builder;
 
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
 import java.lang.reflect.Method;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -25,20 +27,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import javax.wsdl.Binding;
-import javax.wsdl.BindingInput;
-import javax.wsdl.BindingOperation;
-import javax.wsdl.BindingOutput;
-import javax.wsdl.Definition;
-import javax.wsdl.Input;
-import javax.wsdl.Message;
-import javax.wsdl.Operation;
-import javax.wsdl.OperationType;
-import javax.wsdl.Output;
-import javax.wsdl.Part;
-import javax.wsdl.Port;
-import javax.wsdl.PortType;
-import javax.wsdl.WSDLException;
+import javax.wsdl.*;
 import javax.wsdl.extensions.ExtensionRegistry;
 import javax.wsdl.extensions.soap.SOAPAddress;
 import javax.wsdl.extensions.soap.SOAPBinding;
@@ -79,9 +68,9 @@ import org.apache.geronimo.kernel.util.U
 import org.apache.geronimo.testsupport.TestSupport;
 import org.apache.geronimo.webservices.builder.SchemaInfoBuilder;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
-import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingDocument;
-import org.apache.geronimo.xbeans.j2ee.JavaWsdlMappingType;
-import org.apache.geronimo.xbeans.j2ee.PackageMappingType;
+import org.apache.openejb.jee.JaxbJavaee;
+import org.apache.openejb.jee.JavaWsdlMapping;
+import org.apache.openejb.jee.PackageMapping;
 
 /**
  * @version $Rev:385232 $ $Date$
@@ -177,7 +166,7 @@ public class ServiceReferenceTest
     public void testBuildFullServiceProxy() throws Exception {
         Definition definition = buildDefinition();
         SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
-        JavaWsdlMappingType mapping = buildLightweightMappingType();
+        JavaWsdlMapping mapping = buildLightweightMappingType();
         QName serviceQName = new QName(NAMESPACE, "MockService");
         AxisBuilder builder = new AxisBuilder(null);
         Object reference = builder.createService(MockService.class, schemaInfoBuilder, mapping, serviceQName, SOAPConstants.SOAP11_CONSTANTS, handlerInfos, gerServiceRefType, module, bundleContext.getBundle());
@@ -198,8 +187,8 @@ public class ServiceReferenceTest
         Definition definition = reader.readWSDL(wsdl.toURI().toString());
         SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
         File jaxrpcMapping = new File(BASEDIR, "src/test/resources/BookQuote.xml");
-        JavaWsdlMappingDocument mappingDocument = JavaWsdlMappingDocument.Factory.parse(jaxrpcMapping);
-        JavaWsdlMappingType mapping = mappingDocument.getJavaWsdlMapping();
+        InputStream jaxrpcInputStream = new FileInputStream(jaxrpcMapping); 
+        JavaWsdlMapping mapping = (JavaWsdlMapping)JaxbJavaee.unmarshalJavaee(JavaWsdlMapping.class, jaxrpcInputStream);
         QName serviceQName = new QName("http://www.Monson-Haefel.com/jwsbook/BookQuote", "BookQuoteService");
         AxisBuilder builder = new AxisBuilder(null);
         Object reference = builder.createService(BookQuoteService.class, schemaInfoBuilder, mapping, serviceQName, SOAPConstants.SOAP11_CONSTANTS, handlerInfos, gerServiceRefType, module, bundleContext.getBundle());
@@ -220,8 +209,8 @@ public class ServiceReferenceTest
         Definition definition = reader.readWSDL(wsdlFile.toURI().toString());
         SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(null, definition);
         File jaxrpcMapping = new File(BASEDIR, "src/test/resources/interop/interop-jaxrpcmapping.xml");
-        JavaWsdlMappingDocument mappingDocument = JavaWsdlMappingDocument.Factory.parse(jaxrpcMapping);
-        JavaWsdlMappingType mapping = mappingDocument.getJavaWsdlMapping();
+        InputStream jaxrpcInputStream = new FileInputStream(jaxrpcMapping); 
+        JavaWsdlMapping mapping = (JavaWsdlMapping)JaxbJavaee.unmarshalJavaee(JavaWsdlMapping.class, jaxrpcInputStream);
         QName serviceQName = new QName("http://tempuri.org/4s4c/1/3/wsdl/def/interopLab", "interopLab");
         AxisBuilder builder = new AxisBuilder(null);
         Object proxy = builder.createService(InteropLab.class, schemaInfoBuilder, mapping, serviceQName, SOAPConstants.SOAP11_CONSTANTS, handlerInfos, gerServiceRefType, module, bundleContext.getBundle());
@@ -332,11 +321,12 @@ public class ServiceReferenceTest
         return bindingOperation;
     }
 
-    private JavaWsdlMappingType buildLightweightMappingType() {
-        JavaWsdlMappingType mapping = JavaWsdlMappingType.Factory.newInstance();
-        PackageMappingType packageMapping = mapping.addNewPackageMapping();
-        packageMapping.addNewNamespaceURI().setStringValue(NAMESPACE);
-        packageMapping.addNewPackageType().setStringValue("org.apache.geronimo.axis.builder.mock");
+    private JavaWsdlMapping buildLightweightMappingType() {
+        JavaWsdlMapping mapping = new JavaWsdlMapping(); 
+        PackageMapping packageMapping = new PackageMapping();               
+        packageMapping.setNamespaceURI(NAMESPACE);
+        packageMapping.setPackageType("org.apache.geronimo.axis.builder.mock");
+        mapping.getPackageMapping().add(packageMapping); 
         return mapping;
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/HandlerInfoInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/HandlerInfoInfo.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/HandlerInfoInfo.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/HandlerInfoInfo.java Fri Sep 17 16:12:05 2010
@@ -17,8 +17,9 @@
 
 package org.apache.geronimo.j2ee.deployment;
 
-import java.util.Set;
+import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.xml.namespace.QName;
 
@@ -26,13 +27,13 @@ import javax.xml.namespace.QName;
  * @version $Rev$ $Date$
  */
 public class HandlerInfoInfo {
-    private final Set portNames;
-    private final Class handlerClass;
-    private final Map handlerConfig;
-    private final QName[] soapHeaders;
-    private final Set soapRoles;
+    private final Set<String> portNames;
+    private final Class<?> handlerClass;
+    private final Map<String, String> handlerConfig;
+    private final List<QName> soapHeaders;
+    private final Set<String> soapRoles;
 
-    public HandlerInfoInfo(Set portNames, Class handlerClass, Map handlerConfig, QName[] soapHeaders, Set soapRoles) {
+    public HandlerInfoInfo(Set<String> portNames, Class<?> handlerClass, Map<String, String> handlerConfig, List<QName> soapHeaders, Set<String> soapRoles) {
         this.portNames = portNames;
         this.handlerClass = handlerClass;
         this.handlerConfig = handlerConfig;
@@ -40,23 +41,23 @@ public class HandlerInfoInfo {
         this.soapRoles = soapRoles;
     }
 
-    public Set getPortNames() {
+    public Set<String> getPortNames() {
         return portNames;
     }
 
-    public Class getHandlerClass() {
+    public Class<?> getHandlerClass() {
         return handlerClass;
     }
 
-    public Map getHandlerConfig() {
+    public Map<String, String> getHandlerConfig() {
         return handlerConfig;
     }
 
-    public QName[] getSoapHeaders() {
+    public List<QName> getSoapHeaders() {
         return soapHeaders;
     }
 
-    public Set getSoapRoles() {
+    public Set<String> getSoapRoles() {
         return soapRoles;
     }
 }

Modified: geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java (original)
+++ geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/PortInfo.java Fri Sep 17 16:12:05 2010
@@ -18,6 +18,8 @@ package org.apache.geronimo.webservices.
 
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.jar.JarFile;
 
@@ -26,6 +28,9 @@ import javax.wsdl.Port;
 import javax.xml.namespace.QName;
 
 import org.apache.geronimo.common.DeploymentException;
+import org.apache.openejb.jee.Handler;
+import org.apache.openejb.jee.HandlerChain;
+import org.apache.openejb.jee.HandlerChains;
 import org.apache.openejb.jee.JavaWsdlMapping;
 import org.apache.openejb.jee.ServiceEndpointInterfaceMapping;
 
@@ -36,7 +41,7 @@ public class PortInfo {
     private final String portComponentName;
     private final QName portQName;
     private final String seInterfaceName;
-//    private final PortComponentHandler[] handlers;
+    private final List<Handler> handlers;
     private final SharedPortInfo sharedPortInfo;
     
     // set after initialize is called
@@ -47,13 +52,21 @@ public class PortInfo {
     private URI contextURI;
     private String location;
 
-    public PortInfo(SharedPortInfo sharedPortInfo, String portComponentName, QName portQName, String seiInterfaceName, /*PortComponentHandler[] handlers,*/ String location) {
+    public PortInfo(SharedPortInfo sharedPortInfo, String portComponentName, QName portQName, String seiInterfaceName, HandlerChains handlerChains, String location) {
         this.sharedPortInfo = sharedPortInfo;
         this.portComponentName = portComponentName;
         this.portQName = portQName;
         this.seInterfaceName = seiInterfaceName;
-//        this.handlers = handlers;
         this.location = location;
+        this.handlers = new ArrayList<Handler>();
+        // collapse the handler chain down to a flat list 
+        if (handlerChains != null) {
+            for (HandlerChain chain: handlerChains.getHandlerChain()) {
+                for (Handler handler: chain.getHandler()) {
+                    handlers.add(handler);
+                }
+            }
+        }
     }
 
     public DescriptorVersion getDescriptorVersion() {
@@ -96,9 +109,9 @@ public class PortInfo {
         return seiMapping;
     }
 
-//    public PortComponentHandler[] getHandlers() {
-//        return handlers;
-//    }
+    public List<Handler> getHandlers() {
+        return handlers;
+    }
 
     public URI getContextURI() {
         return contextURI;

Modified: geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java?rev=998185&r1=998184&r2=998185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java (original)
+++ geronimo/server/trunk/plugins/webservices/geronimo-webservices-builder/src/main/java/org/apache/geronimo/webservices/builder/WSDescriptorParser.java Fri Sep 17 16:12:05 2010
@@ -64,6 +64,7 @@ import org.apache.geronimo.deployment.xm
 import org.apache.geronimo.kernel.ClassLoading;
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.openejb.jee.ExceptionMapping;
+import org.apache.openejb.jee.Handler;
 import org.apache.openejb.jee.JavaWsdlMapping;
 import org.apache.openejb.jee.JaxbJavaee;
 import org.apache.openejb.jee.PackageMapping;
@@ -327,16 +328,11 @@ public class WSDescriptorParser {
                     linkName = serviceImplBean.getEjbLink().trim();
                     servletLocation = (String) servletLocations.get(linkName);
                 }
-                //TODO Figure out what this is supposed to be.... jax-rpc>>
-/*
-                List<PortComponentHandler> handlers = portComponent.g;
-
-                PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName, seiInterfaceName, handlers, servletLocation);
+                PortInfo portInfo = new PortInfo(sharedPortInfo, portComponentName, portQName, seiInterfaceName, portComponent.getHandlerChains(), servletLocation);
 
                 if (portMap.put(linkName, portInfo) != null) {
                     throw new DeploymentException("Ambiguous description of port associated with j2ee component " + linkName);
                 }
-*/
             }
         }
         return portMap;
@@ -488,37 +484,33 @@ public class WSDescriptorParser {
 //        }
 //    }
 
-//    public static List<HandlerInfo> createHandlerInfoList(PortComponentHandler> handlers, Bundle bundle) throws DeploymentException {
-//        List<HandlerInfo> list = new ArrayList<HandlerInfo>();
-//        for (PortComponentHandler handler : handlers) {
-//            // Get handler class
-//            Class handlerClass;
-//            String className = handler.getHandlerClass().trim();
-//            try {
-//                handlerClass = bundle.loadClass(className);
-//            } catch (ClassNotFoundException e) {
-//                throw new DeploymentException("Unable to load handler class: " + className, e);
-//            }
-//
-//            // config data for the handler
-//            Map<String, String> config = new HashMap<String, String>();
-//            ParamValue> paramValues = handler.getInitParam();
-//            for (ParamValue paramValue : paramValues) {
-//                String paramName = paramValue.getParamName().trim();
-//                String paramStringValue = paramValue.getParamValue().trim();
-//                config.put(paramName, paramStringValue);
-//            }
-//
-//            // QName array of headers it processes
-//            XsdQName> soapHeaderQNames = handler.getSoapHeader();
-//            QName> headers = new QName[soapHeaderQNames.length];
-//            for (int j = 0; j < soapHeaderQNames.length; j++) {
-//                XsdQName soapHeaderQName = soapHeaderQNames[j];
-//                headers[j] = soapHeaderQName;
-//            }
-//
-//            list.add(new HandlerInfo(handlerClass, config, headers));
-//        }
-//        return list;
-//    }
+    public static List<HandlerInfo> createHandlerInfoList(List<Handler> handlers, Bundle bundle) throws DeploymentException {
+        List<HandlerInfo> list = new ArrayList<HandlerInfo>();
+        for (Handler handler : handlers) {
+            // Get handler class
+            Class handlerClass;
+            String className = handler.getHandlerClass().trim();
+            try {
+                handlerClass = bundle.loadClass(className);
+            } catch (ClassNotFoundException e) {
+                throw new DeploymentException("Unable to load handler class: " + className, e);
+            }
+
+            // config data for the handler
+            Map<String, String> config = new HashMap<String, String>();
+            List<ParamValue> paramValues = handler.getInitParam();
+            for (ParamValue paramValue : paramValues) {
+                String paramName = paramValue.getParamName().trim();
+                String paramStringValue = paramValue.getParamValue().trim();
+                config.put(paramName, paramStringValue);
+            }
+
+            // QName array of headers it processes
+            List<QName> soapHeaderQNames = handler.getSoapHeader();
+            QName[] headers = soapHeaderQNames.toArray(new QName[soapHeaderQNames.size()]); 
+
+            list.add(new HandlerInfo(handlerClass, config, headers));
+        }
+        return list;
+    }
 }