axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aedemar Cooke (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Updated: (AXIS-2118) No Helper class and deploy.wsdd incorrect for class containing an array of Strings
Date Thu, 14 Jul 2005 07:52:10 GMT
     [ http://issues.apache.org/jira/browse/AXIS-2118?page=all ]

Aedemar Cooke updated AXIS-2118:
--------------------------------

    Attachment: test.wsdl

>  No Helper class and deploy.wsdd incorrect for class containing an array of Strings
> -----------------------------------------------------------------------------------
>
>          Key: AXIS-2118
>          URL: http://issues.apache.org/jira/browse/AXIS-2118
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1
>  Environment: Axis service deployed to websphere server
> WebSphere Platform 5.1 [BASE 5.1.1 a0426.01] [JDK 1.4.2 cn1420-20040626] [PME 5.1.1 o0429.02]
 running with process name localhost\localhost\server1 and process id 3052
> Host Operating System is Windows 2000, version 5.0
> Java version = J2RE 1.4.2 IBM Windows 32 build cn1420-20040626 (JIT enabled: jitc), Java
Compiler = jitc, Java VM name = Classic VM
> Microsoft Development Environment 2003
> Microsoft .NET Framework 1.1
> Microsoft Visual C# .NET 69586-335-0000007-18998 
>     Reporter: Aedemar Cooke
>     Priority: Blocker
>  Attachments: test.wsdl
>
> I have a class that has one property, an array of strings. On its own it is not much
use, but I have other classes that extend it so unless I get this resolved, I can't upgrade
my application from using Axis1.1 rpc/encoded to Axis1.2.1 wrapped/literal 
> My WSDL for the class is (see attached file test.wsdl for complete wsdl)
>  <complexType name="StringArray">
>     <sequence>
>      <element name="values" nillable="true" maxOccurs="unbounded" type="xsd:string"/>
>     </sequence>
>    </complexType>
> When I use the org.apache.axis.wsdl.WSDL2Java -command specifying the  --helperGen option,
Axis doesn't generate a Helper class or class for the StringArray class.
> The deploy.wsdd file contains an array mapping:rather than a type mapping:
>  <arrayMapping
>         xmlns:ns="http://test.axis"
>         qname="ns:StringArray"
>         type="java:java.lang.String[]"
>         innerType="cmp-ns:string" xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema"
>         encodingStyle=""
>       />
> Calling a web service method that takes a StringArray as a parameter causes a Sax Exception
as it says it has found characters when it is expecting an array.
> If I add another property to the complex type definition, say a boolean 
>    <complexType name="StringArray">
>     <sequence>
>      <element name="values" nillable="true" maxOccurs="unbounded" type="xsd:string"/>
>      <element name="notInUse" type="xsd:boolean"/>
>     </sequence>
>    </complexType>
> I do get the helper class with the following type description
>  static {
>         typeDesc.setXmlType(new javax.xml.namespace.QName("http://test.axis", "StringArray"));
>         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
>         elemField.setFieldName("values");
>         elemField.setXmlName(new javax.xml.namespace.QName("http://test.axis", "values"));
>         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema",
"string"));
>         elemField.setNillable(true);
>         elemField.setMaxOccursUnbounded(true);
>         typeDesc.addFieldDesc(elemField);
>         elemField = new org.apache.axis.description.ElementDesc();
>         elemField.setFieldName("notInUse");
>         elemField.setXmlName(new javax.xml.namespace.QName("http://test.axis", "notInUse"));
>         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema",
"boolean"));
>         elemField.setNillable(false);
>         typeDesc.addFieldDesc(elemField);
>     }
> and the deploy.wsdd has a type mapping
> <typeMapping
>         xmlns:ns="http://test.axis"
>         qname="ns:StringArray"
>         type="java:axis.test.StringArray"
>         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>         deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>         encodingStyle=""
>       />
> If I manually create a Helper class for the version of the class without a boolean property
and edit the deploy.wsdd to have the type mapping rather than the array mapping, my application
works.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message