geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r164508 - in /geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder: AxisBuilder.java AxisServiceBuilder.java HeavyweightOperationDescBuilder.java HeavyweightTypeInfoBuilder.java
Date Mon, 25 Apr 2005 00:04:24 GMT
Author: djencks
Date: Sun Apr 24 17:04:22 2005
New Revision: 164508

URL: http://svn.apache.org/viewcvs?rev=164508&view=rev
Log:
With shiny new encoding, ignore those pesky schema constraints

Modified:
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java?rev=164508&r1=164507&r2=164508&view=diff
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisBuilder.java
Sun Apr 24 17:04:22 2005
@@ -325,6 +325,7 @@
         int i = 0;
         Set wrapperElementQNames = new HashSet();
         JavaXmlTypeMappingType[] javaXmlTypeMappings = mapping.getJavaXmlTypeMappingArray();
+        boolean hasEncoded = false;
         for (Iterator ops = operations.iterator(); ops.hasNext();) {
             Operation operation = (Operation) ops.next();
             String operationName = operation.getName();
@@ -347,8 +348,9 @@
             OperationInfo operationInfo = operationDescBuilder.buildOperationInfo(soapVersion);
             operationInfos[i++] = operationInfo;
             wrapperElementQNames.addAll(operationDescBuilder.getWrapperElementQNames());
+            hasEncoded |= operationDescBuilder.isEncoded();
         }
-        HeavyweightTypeInfoBuilder builder = new HeavyweightTypeInfoBuilder(classLoader,
schemaInfoBuilder.getSchemaTypeKeyToSchemaTypeMap(), wrapperElementQNames);
+        HeavyweightTypeInfoBuilder builder = new HeavyweightTypeInfoBuilder(classLoader,
schemaInfoBuilder.getSchemaTypeKeyToSchemaTypeMap(), wrapperElementQNames, hasEncoded);
         List typeInfo = builder.buildTypeInfo(mapping);
 
         seiFactory = createSEIFactory(serviceName, portName, enhancedServiceEndpointClass,
serviceImpl, typeInfo, location, operationInfos, handlerInfos, credentialsName, context, classLoader);

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java?rev=164508&r1=164507&r2=164508&view=diff
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/AxisServiceBuilder.java
Sun Apr 24 17:04:22 2005
@@ -147,7 +147,7 @@
         } else {
             serviceDesc.setUse(Use.ENCODED);
         }
-
+        boolean hasEncoded = serviceDesc.getUse() == Use.ENCODED;
 
         boolean isLightweight = portInfo.getServiceEndpointInterfaceMapping() == null;
 
@@ -170,11 +170,11 @@
             LightweightTypeInfoBuilder builder = new LightweightTypeInfoBuilder(classLoader,
schemaTypeKeyToSchemaTypeMap, wrapperElementQNames);
             typeInfo = builder.buildTypeInfo(portInfo.getJavaWsdlMapping());
         } else {
-            HeavyweightTypeInfoBuilder builder = new HeavyweightTypeInfoBuilder(classLoader,
schemaTypeKeyToSchemaTypeMap, wrapperElementQNames);
+            HeavyweightTypeInfoBuilder builder = new HeavyweightTypeInfoBuilder(classLoader,
schemaTypeKeyToSchemaTypeMap, wrapperElementQNames, hasEncoded);
             typeInfo = builder.buildTypeInfo(portInfo.getJavaWsdlMapping());
         }
         TypeInfo.register(typeInfo, typeMapping);
-        
+
         serviceDesc.getOperations();
         return new ReadOnlyServiceDesc(serviceDesc, typeInfo);
     }

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java?rev=164508&r1=164507&r2=164508&view=diff
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
Sun Apr 24 17:04:22 2005
@@ -76,6 +76,7 @@
     private final boolean rpcStyle;
     private final boolean documentStyle;
     private final boolean wrappedStyle;
+    private final boolean isEncoded;
     private final Map publicTypes = new HashMap();
     private final Map anonymousTypes = new HashMap();
 
@@ -127,6 +128,7 @@
             rpcStyle = false;
             documentStyle = false;
         }
+        isEncoded = Use.getUse(soapBody.getUse()) == Use.ENCODED;
     }
 
     public Set getWrapperElementQNames() throws DeploymentException {
@@ -135,6 +137,10 @@
         return Collections.unmodifiableSet(wrapperElementQNames);
     }
 
+    public boolean isEncoded() {
+        return isEncoded;
+    }
+
     public OperationInfo buildOperationInfo(SOAPConstants soapVersion) throws DeploymentException
{
         buildOperationDesc();
 
@@ -633,7 +639,7 @@
     private QName getPartName(Part part) {
         return null == part.getElementName()? part.getTypeName() : part.getElementName();
     }
-    
+
     private Part getWrappedPart(Message message) throws DeploymentException {
         // in case of wrapped element, the message has only one part.
         Collection parts = message.getParts().values();

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java?rev=164508&r1=164507&r2=164508&view=diff
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
Sun Apr 24 17:04:22 2005
@@ -50,14 +50,17 @@
  * @version $Rev:  $ $Date:  $
  */
 public class HeavyweightTypeInfoBuilder implements TypeInfoBuilder {
+    private static final String SOAP_ENCODING_NS = "http://schemas.xmlsoap.org/soap/encoding/";
     private final ClassLoader cl;
     private final Map schemaTypeKeyToSchemaTypeMap;
     private final Set wrapperElementQNames;
+    private final boolean hasEncoded;
 
-    public HeavyweightTypeInfoBuilder(ClassLoader cl, Map schemaTypeKeyToSchemaTypeMap, Set
wrapperElementQNames) {
+    public HeavyweightTypeInfoBuilder(ClassLoader cl, Map schemaTypeKeyToSchemaTypeMap, Set
wrapperElementQNames, boolean hasEncoded) {
         this.cl = cl;
         this.schemaTypeKeyToSchemaTypeMap = schemaTypeKeyToSchemaTypeMap;
         this.wrapperElementQNames = wrapperElementQNames;
+        this.hasEncoded = hasEncoded;
     }
 
     public List buildTypeInfo(JavaWsdlMappingType mapping) throws DeploymentException {
@@ -221,7 +224,7 @@
                 } else if (SchemaParticle.ELEMENT != particle.getParticleType()) {
                     throw new DeploymentException(xmlName + " is not an element in schema
" + schemaType.getName());
                 }
-                elementDesc.setNillable(particle.isNillable());
+                elementDesc.setNillable(particle.isNillable() || hasEncoded);
                 elementDesc.setXmlName(xmlName);
                 elementDesc.setXmlType(particle.getType().getName());
 



Mime
View raw message