axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Susantha Kumara" <susan...@opensource.lk>
Subject RE: WSDL2Ws doesn't understand NMTOKEN - fixes attached
Date Tue, 15 Jun 2004 14:49:22 GMT
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