axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Dick <adrian.d...@uk.ibm.com>
Subject RE: WSDL2Ws doesn't understand NMTOKEN - fixes attached
Date Wed, 16 Jun 2004 08:40:00 GMT




Hi,

I've made the modification in the manner you suggested.

Here are the diffs:
(See attached file: AxisUserAPI.h.patch)(See attached file:
CUtils.java.patch)(See attached file: ParmHeaderFileWriter.java.patch)(See
attached file: TypeMap.java.patch)(See attached file: TypeMapping.h.patch)

Regards,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)



                                                                           
             "Susantha Kumara"                                             
             <susantha@opensou                                             
             rce.lk>                                                    To 
                                       "'Apache AXIS C Developers List'"   
             15-06-04 15:49            <axis-c-dev@ws.apache.org>          
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
              "Apache AXIS C           RE: WSDL2Ws doesn't understand      
             Developers List"          NMTOKEN - fixes attached            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi Adrian,

The proper way to do this is that we have to define types in
AxisUserAPI.h.
Ex:
             typedef char* xsd__NMTOKEN

And then use it in the coding.

For example,

>       qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE,
> "NMTOKEN"), "xsd__NMTOKEN");

And everywhere in the WSDL2Ws tool this xsd__NMTOKEN is treated in the
same way as xsd__string. When you add this xsd__NMTOKEN to all the maps
in CUtils.java I hope this is done.

Also there are a lot of other xsd types that maps to base xsd types like
string, int , long etc. We have to do the same thing to support them
too.

Thanks,

Susantha
---

> -----Original Message-----
> From: Adrian Dick [mailto:adrian.dick@uk.ibm.com]
> Sent: Tuesday, June 15, 2004 7:10 PM
> To: axis-c-dev@ws.apache.org
> Subject: WSDL2Ws doesn't understand NMTOKEN - fixes attached
>
>
>
>
>
> Hi,
>
> I've found that the WSDL2Ws tool doesn't correctly understand the
NMTOKEN
> type within WSDL definitions.
>
> This can be fixed by applying the following patch:
> Within org.apache.axis.wsdl.wsdl2ws.CUtils
> To the static block add
>       qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE,
> "NMTOKEN"), "xsd__string");
> (See attached file: CUtils.cpp.patch)
>
> Also, following on from this change enumerations for NMTOKENs aren't
> correctly written to the generated stubs, causing compilation errors.
> This
> can be fixed by apply this patch:
> Within
>
org.apache.axis.wsdl.wsdl2ws.cpp.literal.ParmHeaderFileWriter#writeSimpl
eT
> ypeWithEnumerations
>
> Modify
>       if ("string".equals(baseType.getLocalPart())){
> to become
>       if ("string".equals(baseType.getLocalPart()) || "NMTOKEN"
> .equals(baseType.getLocalPart())){
> (See attached file: ParmHeaderFileWriter.cpp.patch)
>
> I've just checked out the latest code from CVS, and found the
following is
> also required:
> Within org.apache.axis.wsdl.wsdl2ws.info.TypeMap
> To the static block add
>       basicTypeQname2classmap.put(new
> QName(WrapperConstants.SCHEMA_NAMESPACE, "NMTOKEN"),"xsd__string");
> (See attached file: TypeMap.cpp.patch)
>
> Regards,
> Adrian
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)


Mime
View raw message