scheu 02/02/06 11:00:20
Modified: java/samples/echo deploy.wsdd
java/src/org/apache/axis/encoding/ser ArraySerializer.java
Log:
Change the samples/echo/deploy.wsdd to register type mapping for
ArrayOfSOAPStruct. This should result in a better interop result
for when Apache SOAP invokes echoStructArray with a remote Apache Axis server.
Added comment to ArraySerializer describing pros/cons of sending generic
type="soapenc:Array" versus specific type="ns:ArrayOfFoo".
Revision Changes Path
1.12 +20 -0 xml-axis/java/samples/echo/deploy.wsdd
Index: deploy.wsdd
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/echo/deploy.wsdd,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- deploy.wsdd 5 Feb 2002 00:38:54 -0000 1.11
+++ deploy.wsdd 6 Feb 2002 19:00:20 -0000 1.12
@@ -14,5 +14,25 @@
<parameter name="allowedMethods" value="*" />
<beanMapping xmlns:echo="http://soapinterop.org/xsd" qname="echo:SOAPStruct"
languageSpecificType="java:samples.echo.SOAPStruct"/>
+ <typeMapping xmlns:echo="http://soapinterop.org/xsd"
+ qName="echo:ArrayOfSOAPStruct"
+ type="java:samples.echo.SOAPStruct[]"
+ serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
+ deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory" />
+ <typeMapping xmlns:echo="http://soapinterop.org/xsd"
+ qName="echo:ArrayOfstring"
+ type="java:java.lang.String[]"
+ serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
+ deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory" />
+ <typeMapping xmlns:echo="http://soapinterop.org/xsd"
+ qName="echo:ArrayOfint"
+ type="java:int[]"
+ serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
+ deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory" />
+ <typeMapping xmlns:echo="http://soapinterop.org/xsd"
+ qName="echo:ArrayOffloat"
+ type="java:float[]"
+ serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
+ deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory" />
</service>
</deployment>
1.9 +13 -1
xml-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java
Index: ArraySerializer.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ArraySerializer.java 5 Feb 2002 00:37:41 -0000 1.8
+++ ArraySerializer.java 6 Feb 2002 19:00:20 -0000 1.9
@@ -235,6 +235,19 @@
}
// Force type to be SOAP_ARRAY for all array serialization.
+ //
+ // There are two choices here:
+ // Force the type to type=SOAP_ARRAY
+ // Pros: More interop test successes.
+ // Cons: Since we have specific type information it
+ // is more correct to use it. Plus the specific
+ // type information may be important on the
+ // server side to disambiguate overloaded operations.
+ // Use the specific type information:
+ // Pros: The specific type information is more correct
+ // and may be useful for operation overloading.
+ // Cons: More interop test failures (as of 2/6/2002).
+ //
int typeI = attrs.getIndex(Constants.URI_CURRENT_SCHEMA_XSI,
"type");
if (typeI != -1) {
@@ -248,7 +261,6 @@
"CDATA",
context.qName2String(Constants.SOAP_ARRAY));
}
-
attributes = attrs;
}