You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@us.ibm.com on 2002/08/13 00:11:55 UTC

RE: Problems with "sequence maxOccurs='unbounded' " in WSDL types def intion

Glen said:
As it stands, it appears we ignore the actual semantics of the <choice>,
and make a regular multi-field bean!  Am I missing something?

Correct.  And I agree that the serializer would need to introspect to
determine how to serialize the value.  Also need to throw an exception in
the set methods (or change the deserializer) to make sure that the choices
are set correctly.

I wish that JSR 101 had defined a mapping!

Rich Scheuerle
IBM WebSphere & Axis Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                                                                 
                      Glen Daniels                                                                                               
                      <gdaniels@macrome        To:       "'axis-dev@xml.apache.org'" <ax...@xml.apache.org>                   
                      dia.com>                 cc:                                                                               
                                               Subject:  RE: Problems with "sequence maxOccurs='unbounded' " in WSDL types       
                      07/30/2002 10:35              def intion                                                                   
                      AM                                                                                                         
                      Please respond to                                                                                          
                      axis-dev                                                                                                   
                                                                                                                                 
                                                                                                                                 



I hadn't realized there was choice support yet... cool!

We don't do them right, though.  A choice should, perhaps, look something
like this (pseudocoded):

public class ChoiceBean {
    private static final QName QNAME_A = new QName("", "A");
    private static final QName QNAME_B = new QName("", "B");

    private Object value;  // only one value, not multiple
    private QName which; // tells us which element this is

    public Object getValue() {
        return value;
    }

    public int getAsA() {
        if (which != QNAME_A)
            throw something;
        return value == null : 0 : ((Integer)value).getIntValue();
    }

    public String getAsB() {
        if (which != QNAME_B)
            throw something;
        return (String)value;
    }

    public void setAsA(int i) {
        which = QNAME_A;
        value = new Integer(i);
    }

    public void setAsB(String s) {
        which = QNAME_B;
        value = s;
    }
}

Then the serializer needs to have some knowledge of this as well, so it can
serialize the "value" object as the correct QName.

As it stands, it appears we ignore the actual semantics of the <choice>,
and make a regular multi-field bean!  Am I missing something?

--Glen
 -----Original Message-----
 From: butek@us.ibm.com [mailto:butek@us.ibm.com]
 Sent: Tuesday, July 30, 2002 9:50 AM
 To: axis-dev@xml.apache.org
 Subject: RE: Problems with "sequence maxOccurs='unbounded' " in WSDL types
 def intion

 Glen, we DO support complexType choices - see
 test/wsdl/types/ComprehensiveTypes.wsdl - but we don't support maxOccurs
 on a <sequence> element.

 Russell Butek
 butek@us.ibm.com



 Please respond to axis-dev@xml.apache.org


 To: "'axis-dev@xml.apache.org'" <ax...@xml.apache.org>
 cc:
 Subject: RE: Problems with "sequence maxOccurs='unbounded' " in WSDL types
 def intion




 Hi Werner!

 Your WSDL files points out a couple of things we don't deal with yet in
 Axis.  In particular, I don't think we support maxOccurs on a <sequence>
 element itself (though we do on <element>s inside it).  We also do not
 handle <choice> elements yet.

 Could you submit this WSDL in a bugzilla bug report?  I think it's pretty
 critical that we begin to support this stuff soon.

 Thanks!
 --Glen

 > -----Original Message-----
 > From: Dittmann Werner [mailto:Werner.Dittmann@icn.siemens.de]
 > Sent: Tuesday, July 30, 2002 2:28 AM
 > To: 'axis-dev@xml.apache.org'
 > Subject: Problems with "sequence maxOccurs='unbounded' " in WSDL types
 > def intion
 >
 >
 > Hi,
 >
 > while playing/testing with Axis I used the following WSDL file to
 > generate stubs, skeletons etc. Please look at the "sequence" statement
 > in the complexType "idxType". The idea is to have the block
 > enclosed by
 > the sequence as an array.
 > I didn't get any complaints during the WSDL2Java run but looking at
 > the generated code I couldn't figure out how to set the sequence
 > part more then once.
 > Because of the definitions in the WSDL type section I expected to
 > find an array of the "sequence" defined in idxType because it is
 > defined as unbounded.  Did I made somthing wrong or is
 > it a known problem or yet unsupported in Axis?
 >
 > <?xml version='1.0' encoding='UTF-8'?>
 >
 > <definitions name='forTest'
 >   targetNamespace="urn:Ops" xmlns:tns="urn:Ops"
 >   xmlns:srv="urn:service"
 >   xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
 >   xmlns:xsd='http://www.w3.org/2001/XMLSchema'
 >   xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
 >   xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
 >   xmlns='http://schemas.xmlsoap.org/wsdl/'>
 >
 >   <types>
 >     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 >       targetNamespace="urn:service" xmlns:tns="urn:service"
 >       version="1.0" xml:lang="EN">
 >
 > <xsd:complexType name="Range">
 >  <xsd:sequence>
 >    <xsd:element name="START" type="xsd:integer"/>
 >    <xsd:element name="STOP" type="xsd:integer"/>
 >    </xsd:sequence>
 > </xsd:complexType>
 >
 > <xsd:complexType name="idxType">
 >   <xsd:sequence minOccurs="1" maxOccurs="unbounded">
 >     <xsd:choice>
 > <xsd:element name="SINGLE" type="xsd:integer"/>
 > <xsd:element name="RANGE" type="tns:Range"/>
 >     </xsd:choice>
 > <xsd:element name="ARRAY" type="xsd:string"
 >  minOccurs="0"/>
 >   </xsd:sequence>
 > </xsd:complexType>
 >     </xsd:schema>
 >   </types>
 >
 >   <message name='Data'>
 >     <part name='dataParam' type='srv:idxType' />
 >   </message>
 >
 >   <message name='dataResponse'/>
 >
 >   <portType name='dataPortType'>
 >     <operation name='getData'>
 >       <input  name='idxData'  message='tns:Data'/>
 >       <output name='outData'  message='tns:DataResponse'/>
 >     </operation>
 >   </portType>
 >
 >   <binding name='dataBinding' type='tns:dataPortType'>
 >     <soap:binding style='rpc'
 >       transport='http://schemas.xmlsoap.org/soap/http'/>
 >     <operation name='getData'>
 >       <soap:operation soapAction='getData' style='rpc' />
 >       <input name='idxData'>
 >         <soap:body use='encoded'
 >  encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
 >    namespace="urn:Ops" />
 >       </input>
 >       <output name='outData'>
 >         <soap:body use='encoded'
 >  encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
 >       </output>
 >     </operation>
 >   </binding>
 >
 >   <service name="DataService">
 >     <port name="dataPort" binding="tns:dataBinding">
 >       <soap:address
 > location="http://localhost:8090/axis/servlet/AxisServlet"/>
 >     </port>
 >   </service>
 >
 > </definitions>
 >
 >
 > Tia
 > Werner
 >
 > Werner Dittmann
 > Siemens ICM N PG ES AS TP
 > mailto:Werner.Dittmann@icn.siemens.de
 > Tel: +49(0)89 722 42481/+49(0)172 85 85 245
 >



Re: added support for xsd:NCName, xsd:NMTOKEN, xsd:Name

Posted by Davanum Srinivas <di...@yahoo.com>.
Chris,

Please send a note to (root at apache.org) with details...(your apache id etc).

Thanks,
dims

--- Chris Haddad <ch...@cobia.net> wrote:
> Axis-dev -  early in the morning, I added support for xsd:NCName,
> xsd:NMTOKEN, xsd:Name. Also, I removed the custom deserializers for
> Token, NormalizedString, and Unsigned*.
> 
> For some reason, my commits are not generating cvs mail, but the
> repository is being properly updated.  
> 
> Here is the diff and file mods:
> 
> A src/org/apache/axis/types/Name.java
> A src/org/apache/axis/types/NCName.java
> A src/org/apache/axis/types/NMToken.java
> A test/encoding/TestName.java
> A test/encoding/TestNCName.java
> A test/encoding/TestNMToken.java
> M src/org/apache/axis/Constants.java
> M src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
> M src/org/apache/axis/types/UnsignedByte.java
> M src/org/apache/axis/types/UnsignedInt.java
> M src/org/apache/axis/types/UnsignedLong.java
> M src/org/apache/axis/types/UnsignedShort.java
> M src/org/apache/axis/utils/axisNLS.properties
> M test/encoding/PackageTests.java
> M test/encoding/TestDeser2001.java
> 
> 
> Index: src/org/apache/axis/Constants.java
> ===================================================================
> RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Constants.java,v
> retrieving revision 1.78
> diff -u -r1.78 Constants.java
> --- src/org/apache/axis/Constants.java	9 Aug 2002 15:18:30 -0000
> 1.78
> +++ src/org/apache/axis/Constants.java	13 Aug 2002 05:52:28 -0000
> @@ -452,13 +452,16 @@
>      public static final QName XSD_UNSIGNEDINT = new
> QName(URI_2001_SCHEMA_XSD, "unsignedInt");
>      public static final QName XSD_UNSIGNEDSHORT = new
> QName(URI_2001_SCHEMA_XSD, "unsignedShort");
>      public static final QName XSD_UNSIGNEDBYTE = new
> QName(URI_2001_SCHEMA_XSD, "unsignedByte");
> -    
> +
>      public static final QName XSD_YEARMONTH = new
> QName(URI_2001_SCHEMA_XSD, "gYearMonth");
>      public static final QName XSD_MONTHDAY = new
> QName(URI_2001_SCHEMA_XSD, "gMonthDay");
>      public static final QName XSD_YEAR = new QName(URI_2001_SCHEMA_XSD,
> "gYear");
>      public static final QName XSD_MONTH = new
> QName(URI_2001_SCHEMA_XSD, "gMonth");
>      public static final QName XSD_DAY = new QName(URI_2001_SCHEMA_XSD,
> "gDay");
> -    
> +
> +    public static final QName XSD_NAME = new QName(URI_2001_SCHEMA_XSD,
> "Name");
> +    public static final QName XSD_NCNAME = new
> QName(URI_2001_SCHEMA_XSD, "NCName");
> +    public static final QName XSD_NMTOKEN = new
> QName(URI_2001_SCHEMA_XSD, "NMTOKEN");
>  
>      public static final QName SOAP_BASE64 = new
> QName(URI_DEFAULT_SOAP_ENC, "base64");
>      public static final QName SOAP_STRING = new
> QName(URI_DEFAULT_SOAP_ENC, "string");
> Index: src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingI
> mpl.java,v
> retrieving revision 1.42
> diff -u -r1.42 DefaultTypeMappingImpl.java
> --- src/org/apache/axis/encoding/DefaultTypeMappingImpl.java	9 Aug
> 2002 15:18:30 -0000	1.42
> +++ src/org/apache/axis/encoding/DefaultTypeMappingImpl.java	13 Aug
> 2002 05:52:30 -0000
> @@ -327,7 +327,7 @@
>                     new
> SimpleDeserializerFactory(org.apache.axis.types.MonthDay.class,
>                                               Constants.XSD_MONTHDAY),
>                     true);
> -        
> +
>          // Serialize all extensions of Map to SOAP_MAP
>          // The SOAP_MAP will be deserialized into a HashMap by default.
>          myRegister(Constants.SOAP_MAP,       java.util.HashMap.class,
> @@ -375,67 +375,75 @@
>  
>          // xsd:token
>          myRegister(Constants.XSD_TOKEN,
> org.apache.axis.types.Token.class,
> -                new
> TokenSerializerFactory(org.apache.axis.types.Token.class,
> -                    Constants.XSD_TOKEN),
> -                new TokenDeserializerFactory(
> -                    org.apache.axis.types.Token.class,
> -                    Constants.XSD_TOKEN),
> -                false);
> +                   new
> SimplePrimitiveSerializerFactory(org.apache.axis.types.Token.class,
> +                                             Constants.XSD_TOKEN),
> +                   new
> SimpleDeserializerFactory(org.apache.axis.types.Token.class,
> +                                             Constants.XSD_TOKEN),
> +                   true);
>  
>          // a xsd:normalizedString
> -        myRegister(Constants.XSD_NORMALIZEDSTRING,
> -                org.apache.axis.types.NormalizedString.class,
> -                new NormalizedStringSerializerFactory(
> -                    org.apache.axis.types.NormalizedString.class,
> -                    Constants.XSD_NORMALIZEDSTRING),
> -                new NormalizedStringDeserializerFactory(
> -                    org.apache.axis.types.NormalizedString.class,
> -                    Constants.XSD_NORMALIZEDSTRING),
> -                false);
> +        myRegister(Constants.XSD_NORMALIZEDSTRING,
> org.apache.axis.types.NormalizedString.class,
> +                   new
> SimplePrimitiveSerializerFactory(org.apache.axis.types.NormalizedString.
> class,
> +
> Constants.XSD_NORMALIZEDSTRING),
> +                   new
> SimpleDeserializerFactory(org.apache.axis.types.NormalizedString.class,
> +
> Constants.XSD_NORMALIZEDSTRING),
> +                   true);
>  
>          // a xsd:unsignedLong
> -        myRegister(Constants.XSD_UNSIGNEDLONG,
> -                org.apache.axis.types.UnsignedLong.class,
> -                new UnsignedLongSerializerFactory(
> -                    org.apache.axis.types.UnsignedLong.class,
> -                    Constants.XSD_UNSIGNEDLONG),
> -                new UnsignedLongDeserializerFactory(
> -                    org.apache.axis.types.UnsignedLong.class,
> -                    Constants.XSD_UNSIGNEDLONG),
> -                false);
> +        myRegister(Constants.XSD_UNSIGNEDLONG,
> org.apache.axis.types.UnsignedLong.class,
> +             new
> SimplePrimitiveSerializerFactory(org.apache.axis.types.UnsignedLong.clas
> s,
> +
> Constants.XSD_UNSIGNEDLONG),
> +             new
> SimpleDeserializerFactory(org.apache.axis.types.UnsignedLong.class,
> +                                           Constants.XSD_UNSIGNEDLONG),
> +             true);
>  
>          // a xsd:unsignedInt
> -        myRegister(Constants.XSD_UNSIGNEDINT,
> -                org.apache.axis.types.UnsignedInt.class,
> -                new UnsignedIntSerializerFactory(
> -                    org.apache.axis.types.UnsignedInt.class,
> -                    Constants.XSD_UNSIGNEDINT),
> -                new UnsignedIntDeserializerFactory(
> -                    org.apache.axis.types.UnsignedInt.class,
> -                    Constants.XSD_UNSIGNEDINT),
> -                false);
> +        myRegister(Constants.XSD_UNSIGNEDINT,
> org.apache.axis.types.UnsignedInt.class,
> +             new
> SimplePrimitiveSerializerFactory(org.apache.axis.types.UnsignedInt.class
> ,
> +
> Constants.XSD_UNSIGNEDINT),
> +             new
> SimpleDeserializerFactory(org.apache.axis.types.UnsignedInt.class,
> +                                           Constants.XSD_UNSIGNEDINT),
> +             true);
>  
>          // a xsd:unsignedShort
> -        myRegister(Constants.XSD_UNSIGNEDSHORT,
> -                org.apache.axis.types.UnsignedShort.class,
> -                new UnsignedShortSerializerFactory(
> -                    org.apache.axis.types.UnsignedShort.class,
> -                    Constants.XSD_UNSIGNEDSHORT),
> -                new UnsignedShortDeserializerFactory(
> -                    org.apache.axis.types.UnsignedShort.class,
> -                    Constants.XSD_UNSIGNEDSHORT),
> -                false);
> +        myRegister(Constants.XSD_UNSIGNEDSHORT,
> org.apache.axis.types.UnsignedShort.class,
> +             new
> SimplePrimitiveSerializerFactory(org.apache.axis.types.UnsignedShort.cla
> ss,
> +
> Constants.XSD_UNSIGNEDSHORT),
> +             new
> SimpleDeserializerFactory(org.apache.axis.types.UnsignedShort.class,
> +
> Constants.XSD_UNSIGNEDSHORT),
> +             true);
>  
>          // a xsd:unsignedByte
> -        myRegister(Constants.XSD_UNSIGNEDBYTE,
> -                org.apache.axis.types.UnsignedByte.class,
> -                new UnsignedByteSerializerFactory(
> 
=== message truncated ===


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

added support for xsd:NCName, xsd:NMTOKEN, xsd:Name

Posted by Chris Haddad <ch...@cobia.net>.
Axis-dev -  early in the morning, I added support for xsd:NCName,
xsd:NMTOKEN, xsd:Name. Also, I removed the custom deserializers for
Token, NormalizedString, and Unsigned*.

For some reason, my commits are not generating cvs mail, but the
repository is being properly updated.  

Here is the diff and file mods:

A src/org/apache/axis/types/Name.java
A src/org/apache/axis/types/NCName.java
A src/org/apache/axis/types/NMToken.java
A test/encoding/TestName.java
A test/encoding/TestNCName.java
A test/encoding/TestNMToken.java
M src/org/apache/axis/Constants.java
M src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
M src/org/apache/axis/types/UnsignedByte.java
M src/org/apache/axis/types/UnsignedInt.java
M src/org/apache/axis/types/UnsignedLong.java
M src/org/apache/axis/types/UnsignedShort.java
M src/org/apache/axis/utils/axisNLS.properties
M test/encoding/PackageTests.java
M test/encoding/TestDeser2001.java


Index: src/org/apache/axis/Constants.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Constants.java,v
retrieving revision 1.78
diff -u -r1.78 Constants.java
--- src/org/apache/axis/Constants.java	9 Aug 2002 15:18:30 -0000
1.78
+++ src/org/apache/axis/Constants.java	13 Aug 2002 05:52:28 -0000
@@ -452,13 +452,16 @@
     public static final QName XSD_UNSIGNEDINT = new
QName(URI_2001_SCHEMA_XSD, "unsignedInt");
     public static final QName XSD_UNSIGNEDSHORT = new
QName(URI_2001_SCHEMA_XSD, "unsignedShort");
     public static final QName XSD_UNSIGNEDBYTE = new
QName(URI_2001_SCHEMA_XSD, "unsignedByte");
-    
+
     public static final QName XSD_YEARMONTH = new
QName(URI_2001_SCHEMA_XSD, "gYearMonth");
     public static final QName XSD_MONTHDAY = new
QName(URI_2001_SCHEMA_XSD, "gMonthDay");
     public static final QName XSD_YEAR = new QName(URI_2001_SCHEMA_XSD,
"gYear");
     public static final QName XSD_MONTH = new
QName(URI_2001_SCHEMA_XSD, "gMonth");
     public static final QName XSD_DAY = new QName(URI_2001_SCHEMA_XSD,
"gDay");
-    
+
+    public static final QName XSD_NAME = new QName(URI_2001_SCHEMA_XSD,
"Name");
+    public static final QName XSD_NCNAME = new
QName(URI_2001_SCHEMA_XSD, "NCName");
+    public static final QName XSD_NMTOKEN = new
QName(URI_2001_SCHEMA_XSD, "NMTOKEN");
 
     public static final QName SOAP_BASE64 = new
QName(URI_DEFAULT_SOAP_ENC, "base64");
     public static final QName SOAP_STRING = new
QName(URI_DEFAULT_SOAP_ENC, "string");
Index: src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingI
mpl.java,v
retrieving revision 1.42
diff -u -r1.42 DefaultTypeMappingImpl.java
--- src/org/apache/axis/encoding/DefaultTypeMappingImpl.java	9 Aug
2002 15:18:30 -0000	1.42
+++ src/org/apache/axis/encoding/DefaultTypeMappingImpl.java	13 Aug
2002 05:52:30 -0000
@@ -327,7 +327,7 @@
                    new
SimpleDeserializerFactory(org.apache.axis.types.MonthDay.class,
                                              Constants.XSD_MONTHDAY),
                    true);
-        
+
         // Serialize all extensions of Map to SOAP_MAP
         // The SOAP_MAP will be deserialized into a HashMap by default.
         myRegister(Constants.SOAP_MAP,       java.util.HashMap.class,
@@ -375,67 +375,75 @@
 
         // xsd:token
         myRegister(Constants.XSD_TOKEN,
org.apache.axis.types.Token.class,
-                new
TokenSerializerFactory(org.apache.axis.types.Token.class,
-                    Constants.XSD_TOKEN),
-                new TokenDeserializerFactory(
-                    org.apache.axis.types.Token.class,
-                    Constants.XSD_TOKEN),
-                false);
+                   new
SimplePrimitiveSerializerFactory(org.apache.axis.types.Token.class,
+                                             Constants.XSD_TOKEN),
+                   new
SimpleDeserializerFactory(org.apache.axis.types.Token.class,
+                                             Constants.XSD_TOKEN),
+                   true);
 
         // a xsd:normalizedString
-        myRegister(Constants.XSD_NORMALIZEDSTRING,
-                org.apache.axis.types.NormalizedString.class,
-                new NormalizedStringSerializerFactory(
-                    org.apache.axis.types.NormalizedString.class,
-                    Constants.XSD_NORMALIZEDSTRING),
-                new NormalizedStringDeserializerFactory(
-                    org.apache.axis.types.NormalizedString.class,
-                    Constants.XSD_NORMALIZEDSTRING),
-                false);
+        myRegister(Constants.XSD_NORMALIZEDSTRING,
org.apache.axis.types.NormalizedString.class,
+                   new
SimplePrimitiveSerializerFactory(org.apache.axis.types.NormalizedString.
class,
+
Constants.XSD_NORMALIZEDSTRING),
+                   new
SimpleDeserializerFactory(org.apache.axis.types.NormalizedString.class,
+
Constants.XSD_NORMALIZEDSTRING),
+                   true);
 
         // a xsd:unsignedLong
-        myRegister(Constants.XSD_UNSIGNEDLONG,
-                org.apache.axis.types.UnsignedLong.class,
-                new UnsignedLongSerializerFactory(
-                    org.apache.axis.types.UnsignedLong.class,
-                    Constants.XSD_UNSIGNEDLONG),
-                new UnsignedLongDeserializerFactory(
-                    org.apache.axis.types.UnsignedLong.class,
-                    Constants.XSD_UNSIGNEDLONG),
-                false);
+        myRegister(Constants.XSD_UNSIGNEDLONG,
org.apache.axis.types.UnsignedLong.class,
+             new
SimplePrimitiveSerializerFactory(org.apache.axis.types.UnsignedLong.clas
s,
+
Constants.XSD_UNSIGNEDLONG),
+             new
SimpleDeserializerFactory(org.apache.axis.types.UnsignedLong.class,
+                                           Constants.XSD_UNSIGNEDLONG),
+             true);
 
         // a xsd:unsignedInt
-        myRegister(Constants.XSD_UNSIGNEDINT,
-                org.apache.axis.types.UnsignedInt.class,
-                new UnsignedIntSerializerFactory(
-                    org.apache.axis.types.UnsignedInt.class,
-                    Constants.XSD_UNSIGNEDINT),
-                new UnsignedIntDeserializerFactory(
-                    org.apache.axis.types.UnsignedInt.class,
-                    Constants.XSD_UNSIGNEDINT),
-                false);
+        myRegister(Constants.XSD_UNSIGNEDINT,
org.apache.axis.types.UnsignedInt.class,
+             new
SimplePrimitiveSerializerFactory(org.apache.axis.types.UnsignedInt.class
,
+
Constants.XSD_UNSIGNEDINT),
+             new
SimpleDeserializerFactory(org.apache.axis.types.UnsignedInt.class,
+                                           Constants.XSD_UNSIGNEDINT),
+             true);
 
         // a xsd:unsignedShort
-        myRegister(Constants.XSD_UNSIGNEDSHORT,
-                org.apache.axis.types.UnsignedShort.class,
-                new UnsignedShortSerializerFactory(
-                    org.apache.axis.types.UnsignedShort.class,
-                    Constants.XSD_UNSIGNEDSHORT),
-                new UnsignedShortDeserializerFactory(
-                    org.apache.axis.types.UnsignedShort.class,
-                    Constants.XSD_UNSIGNEDSHORT),
-                false);
+        myRegister(Constants.XSD_UNSIGNEDSHORT,
org.apache.axis.types.UnsignedShort.class,
+             new
SimplePrimitiveSerializerFactory(org.apache.axis.types.UnsignedShort.cla
ss,
+
Constants.XSD_UNSIGNEDSHORT),
+             new
SimpleDeserializerFactory(org.apache.axis.types.UnsignedShort.class,
+
Constants.XSD_UNSIGNEDSHORT),
+             true);
 
         // a xsd:unsignedByte
-        myRegister(Constants.XSD_UNSIGNEDBYTE,
-                org.apache.axis.types.UnsignedByte.class,
-                new UnsignedByteSerializerFactory(
-                    org.apache.axis.types.UnsignedByte.class,
-                    Constants.XSD_UNSIGNEDBYTE),
-                new UnsignedByteDeserializerFactory(
-                    org.apache.axis.types.UnsignedByte.class,
-                    Constants.XSD_UNSIGNEDBYTE),
-                false);
+        myRegister(Constants.XSD_UNSIGNEDBYTE,
org.apache.axis.types.UnsignedByte.class,
+                   new
SimplePrimitiveSerializerFactory(org.apache.axis.types.UnsignedByte.clas
s,
+
Constants.XSD_UNSIGNEDBYTE),
+                   new
SimpleDeserializerFactory(org.apache.axis.types.UnsignedByte.class,
+
Constants.XSD_UNSIGNEDBYTE),
+                   true);
+
+        // a xsd:Name
+        myRegister(Constants.XSD_NAME,
org.apache.axis.types.Name.class,
+                   new
SimplePrimitiveSerializerFactory(org.apache.axis.types.Name.class,
+                                             Constants.XSD_NAME),
+                   new
SimpleDeserializerFactory(org.apache.axis.types.Name.class,
+                                             Constants.XSD_NAME),
+                   true);
+
+        // a xsd:NCName
+        myRegister(Constants.XSD_NCNAME,
org.apache.axis.types.NCName.class,
+                   new
SimplePrimitiveSerializerFactory(org.apache.axis.types.NCName.class,
+                                             Constants.XSD_NCNAME),
+                   new
SimpleDeserializerFactory(org.apache.axis.types.NCName.class,
+                                             Constants.XSD_NCNAME),
+                   true);
+
+        // a xsd:NmToken
+        myRegister(Constants.XSD_NMTOKEN,
org.apache.axis.types.NMToken.class,
+                   new
SimplePrimitiveSerializerFactory(org.apache.axis.types.NMToken.class,
+                                             Constants.XSD_NMTOKEN),
+                   new
SimpleDeserializerFactory(org.apache.axis.types.NMToken.class,
+                                             Constants.XSD_NMTOKEN),
+                   true);
 
         // All array objects automatically get associated with the
SOAP_ARRAY.
         // There is no way to do this with a hash table,
Index: src/org/apache/axis/types/UnsignedByte.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/types/UnsignedByte.java,v
retrieving revision 1.1
diff -u -r1.1 UnsignedByte.java
--- src/org/apache/axis/types/UnsignedByte.java	7 Aug 2002 21:02:09
-0000	1.1
+++ src/org/apache/axis/types/UnsignedByte.java	13 Aug 2002 05:52:41
-0000
@@ -76,7 +76,11 @@
      * @exception Exception will be thrown if validation fails
      */
     public UnsignedByte(long sValue) throws Exception {
-            setValue(sValue);
+      setValue(sValue);
+    }
+
+    public UnsignedByte(String sValue) throws Exception {
+      setValue(Long.parseLong(sValue));
     }
 
     /**
Index: src/org/apache/axis/types/UnsignedInt.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/types/UnsignedInt.java,v
retrieving revision 1.2
diff -u -r1.2 UnsignedInt.java
--- src/org/apache/axis/types/UnsignedInt.java	8 Aug 2002 16:44:15
-0000	1.2
+++ src/org/apache/axis/types/UnsignedInt.java	13 Aug 2002 05:52:41
-0000
@@ -78,11 +78,11 @@
      * @exception Exception will be thrown if validation fails
      */
     public UnsignedInt(long iValue) throws Exception {
-            setValue(iValue);
+      setValue(iValue);
     }
 
     public UnsignedInt(String stValue) throws Exception {
-            setValue(Long.parseLong(stValue));
+      setValue(Long.parseLong(stValue));
     }
 
 
Index: src/org/apache/axis/types/UnsignedLong.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/types/UnsignedLong.java,v
retrieving revision 1.2
diff -u -r1.2 UnsignedLong.java
--- src/org/apache/axis/types/UnsignedLong.java	8 Aug 2002 16:44:15
-0000	1.2
+++ src/org/apache/axis/types/UnsignedLong.java	13 Aug 2002 05:52:42
-0000
@@ -77,7 +77,11 @@
      * @exception Exception will be thrown if validation fails
      */
     public UnsignedLong(double lValue) throws Exception {
-            setValue(lValue);
+      setValue(lValue);
+    }
+
+    public UnsignedLong(String stValue) throws Exception {
+      setValue(Double.parseDouble(stValue));
     }
 
     /**
Index: src/org/apache/axis/types/UnsignedShort.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/types/UnsignedShort.java,v
retrieving revision 1.1
diff -u -r1.1 UnsignedShort.java
--- src/org/apache/axis/types/UnsignedShort.java	7 Aug 2002
21:02:09 -0000	1.1
+++ src/org/apache/axis/types/UnsignedShort.java	13 Aug 2002
05:52:42 -0000
@@ -75,7 +75,11 @@
      * @exception Exception will be thrown if validation fails
      */
     public UnsignedShort(long sValue) throws Exception {
-            setValue(sValue);
+      setValue(sValue);
+    }
+
+    public UnsignedShort(String sValue) throws Exception {
+      setValue(Long.parseLong(sValue));
     }
 
     /**
Index: src/org/apache/axis/utils/axisNLS.properties
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/utils/axisNLS.properties,v
retrieving revision 1.38
diff -u -r1.38 axisNLS.properties
--- src/org/apache/axis/utils/axisNLS.properties	9 Aug 2002
19:40:12 -0000	1.38
+++ src/org/apache/axis/utils/axisNLS.properties	13 Aug 2002
05:52:48 -0000
@@ -51,6 +51,10 @@
 
 badNameAttr00=No ''name'' attribute was specified in an undeployment
element
 badNamespace00=Bad envelope namespace:  {0}
+badNameType00=Invalid Name
+badNCNameType00=Invalid NCName
+badNmtoken00=Invalid Nmtoken
+badNmtokens00=Invalid Nmtokens
 badOffset00=Malformed offset attribute ''{0}''.
 badpackage00=Error: --NStoPKG and --package switch can't be used
together
 # NOTE:  in badParmMode00, do not translate "Parameter".
Index: test/encoding/PackageTests.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/encoding/PackageTests.java,v
retrieving revision 1.21
diff -u -r1.21 PackageTests.java
--- test/encoding/PackageTests.java	9 Aug 2002 15:18:30 -0000
1.21
+++ test/encoding/PackageTests.java	13 Aug 2002 05:52:48 -0000
@@ -48,6 +48,9 @@
         suite.addTestSuite(TestMonth.class);
         suite.addTestSuite(TestMonthDay.class);
         suite.addTestSuite(TestDay.class);
+        suite.addTestSuite(TestName.class);
+        suite.addTestSuite(TestNCName.class);
+        suite.addTestSuite(TestNMToken.class);
         return suite;
     }
 }
Index: test/encoding/TestDeser2001.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/encoding/TestDeser2001.java,v
retrieving revision 1.19
diff -u -r1.19 TestDeser2001.java
--- test/encoding/TestDeser2001.java	9 Aug 2002 15:18:30 -0000
1.19
+++ test/encoding/TestDeser2001.java	13 Aug 2002 05:52:49 -0000
@@ -15,6 +15,9 @@
 import org.apache.axis.types.Month;
 import org.apache.axis.types.Day;
 import org.apache.axis.types.MonthDay;
+import org.apache.axis.types.Name;
+import org.apache.axis.types.NCName;
+import org.apache.axis.types.NMToken;
 
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -94,7 +97,7 @@
 
     /**
      * Test the xsd:Time deserialization
-     */ 
+     */
     public void testTimeZ() throws Exception {
         Calendar date = Calendar.getInstance();
         date.set(Calendar.HOUR_OF_DAY, 12);
@@ -121,7 +124,7 @@
                      "</result>",
                      time);
     }
-    
+
     private final int msecsInMinute = 60000;
     private final int msecsInHour = 60 * msecsInMinute;
 
@@ -190,6 +193,21 @@
     public void testUnsignedByte() throws Exception {
         deserialize("<result
xsi:type=\"xsd:unsignedByte\">103</result>",
                     new UnsignedByte(103),true);
+    }
+
+    public void testName() throws Exception {
+        deserialize("<result xsi:type=\"xsd:Name\">:Braves</result>",
+                    new Name(":Braves"),true);
+    }
+
+    public void testNCName() throws Exception {
+        deserialize("<result
xsi:type=\"xsd:NCName\">_Atlanta.Braves</result>",
+                    new NCName("_Atlanta.Braves"),true);
+    }
+
+    public void testNMToken() throws Exception {
+        deserialize("<result
xsi:type=\"xsd:NMTOKEN\">_A.B.C.1-2-3</result>",
+                    new NMToken("_A.B.C.1-2-3"),true);
     }
 
     public void testQName() throws Exception {