Created:

https://issues.apache.org/jira/browse/XMLSCHEMA-22

to make sure it's not lost.

Dan



On Thursday, March 22, 2012 04:58:42 PM Daniel Kulp wrote:
> On Wednesday, March 21, 2012 12:15:28 PM Benson Margulies wrote:
> > This is clearly a bug, it shouldn't be using the thread default
> > locale. I'm not sure where the bug will turn out to be; it could be
> > JAXB.
> 
> No, this is in XmlSchema.  If you you look there in XmlSchemaForm, you
> see:
> 
> 
>     public static XmlSchemaForm schemaValueOf(String name) {
>         return EnumUtil.valueOf(XmlSchemaForm.class, name);
>     }
> 
> 
> and then in EnumUtil:
> 
>     static <T extends Enum<T>> T valueOf(Class<T> enumClass, String name)
> { return Enum.valueOf(enumClass, name.toUpperCase());
>     }
> 
> 
> the toUpperCase call would use the local Local.   I wonder if that should
> be something more like:
> 
> .toUpperCase(Locale.ENGLISH);
> 
> to force english usage for that or just put a pure valueOf on
> XmlSchemaForm that handle the three values directly.
> 
> In anycase, a fix would need to be done down there.   Patches are welcome.
> :-)
> 
> Dan
> 
> > On Wed, Mar 21, 2012 at 10:42 AM, s t <[email protected]> wrote:
> > > Hi,
> > > while generating a service from a wsdl, we are facing to problem of
> > > having turkish locale. The generator capitalizes the variable
> > > class org.apache.ws.commons.schema.XmlSchemaForm.qualified
> > > as
> > > class org.apache.ws.commons.schema.XmlSchemaForm.QUALİFİED.
> > > I am not sure how i can solve the issue without changing the locale of
> > > whole VM. May be the root of the couse should be somewhere in schema
> > > parsing library of apache. You can find the details of the exception
> > > below.
> > > 
> > > 
> > > javax.management.RuntimeMBeanException:
> > > java.lang.IllegalArgumentException: No enum const class
> > > org.apache.ws.commons.schema.XmlSchemaForm.QUALİFİED      at
> > > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultM
> > > B
> > > eanServerInterceptor.java:856)      at
> > > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBea
> > > n
> > > Exception(DefaultMBeanServerInterceptor.java:869)      at
> > > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMB
> > > e
> > > anServerInterceptor.java:838)      at
> > > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> > > 
> > >      at
> > > 
> > > javax.management.remote.generic.ServerIntermediary.handleRequest(Serve
> > > r
> > > Intermediary.java:280)      at
> > > javax.management.remote.generic.ServerIntermediary$PrivilegedRequestJo
> > > b
> > > .run(ServerIntermediary.java:951)      at
> > > java.security.AccessController.doPrivileged(Native Method)      at
> > > javax.management.remote.generic.ServerIntermediary$RequestHandler.hand
> > > l
> > > eMBSReqMessage(ServerIntermediary.java:727)      at
> > > javax.management.remote.generic.ServerIntermediary$RequestHandler.exec
> > > u
> > > te(ServerIntermediary.java:629)      at
> > > com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl$RemoteJo
> > > b
> > > .run(ServerSynchroMessageConnectionImpl.java:266)      at
> > > com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(ThreadS
> > > e
> > > rvice.java:208)      at
> > > com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59)Caused
> > > by: java.lang.IllegalArgumentException: No enum const class
> > > org.apache.ws.commons.schema.XmlSchemaForm.QUALİFİED      at
> > > java.lang.Enum.valueOf(Enum.java:196)      at
> > > org.apache.ws.commons.schema.EnumUtil.valueOf(EnumUtil.java:31)     
> > > at
> > > org.apache.ws.commons.schema.XmlSchemaForm.schemaValueOf(XmlSchemaForm
> > > .
> > > java:32)      at
> > > org.apache.ws.commons.schema.SchemaBuilder.getFormDefault(SchemaBuilde
> > > r
> > > .java:181)      at
> > > org.apache.ws.commons.schema.SchemaBuilder.handleSchemaElementBasics(S
> > > c
> > > hemaBuilder.java:1489)      at
> > > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(Sche
> > > m
> > > aBuilder.java:649)      at
> > > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollect
> > > i
> > > on.java:542)      at
> > > org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection
> > > .
> > > java:129)      at
> > > org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:133)
> > > 
> > >  at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:73)
> > >  at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:65)
> > >  at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:60)
> > >  at
> > > 
> > > org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder
> > > .
> > > java:372)      at
> > > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuil
> > > d
> > > er.java:339)      at
> > > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuil
> > > d
> > > er.java:196)      at
> > > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuil
> > > d
> > > er.java:172)      at
> > > org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.jav
> > > a
> > > 
> > > :119)      at
> > > 
> > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dyna
> > > m
> > > icClientFactory.java:294)      at
> > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dyna
> > > m
> > > icClientFactory.java:234)      at
> > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dyna
> > > m
> > > icClientFactory.java:227)      at
> > > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dyna
> > > m
> > > icClientFactory.java:182)      at
> > > com.likya.tlossw.jmx.beans.WebServiceOperator.getWsOperationList(WebSe
> > > r
> > > viceOperator.java:68)      at
> > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)      at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> > > a
> > > va:39)      at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> > > o
> > > rImpl.java:25)      at
> > > java.lang.reflect.Method.invoke(Method.java:597)
> > > 
> > >      at
> > > 
> > > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBe
> > > a
> > > nIntrospector.java:93)      at
> > > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBe
> > > a
> > > nIntrospector.java:27)      at
> > > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.ja
> > > v
> > > a:208)      at
> > > com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
> > > 
> > >  at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
> > >  
> > >      at
> > > 
> > > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMB
> > > e
> > > anServerInterceptor.java:836)      ... 9 more
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to