You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by JuanJara <jc...@avansoft.com> on 2009/08/31 16:19:34 UTC

A class/interface with the same name exception when trying to consume a service in Websphere Process server from CXF Client


Hi All

I’m trying to consume a web service that is running on WebSphere Process
Server. The client sends the request and the server replies with a general
exception when I check the server log I found that is rejecting the request
when the server is processing the xml:

Exception in thread "main" java.lang.RuntimeException: Error compiling
schema from WSDL at
{http://srmdeesbd01.suranet.com:9084/TestSuraBrokerSrv2Web/sca/ws2/wsdl/TestSuraBrokerSrv2_ws2.wsdl}:
A class/interface with the same name "test.contabilidad.suramericana.Pago"
is already in use. Use a class customization to resolve this conflict.
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.error(DynamicClientFactory.java:493)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:285)
at
com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java:77)
at
com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFactory.java:116)
at
com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFactory.java:77)
at
com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasses(ImplStructureStrategy.java:78)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanGenerator.java:402)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator.java:434)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:201)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:174)
at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:251)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:187)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:165)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:144)
at cxf.test.DynamicClientWesbSrv2.main(DynamicClientWesbSrv2.java:39)
Caused by: org.xml.sax.SAXParseException: A class/interface with the same
name "test.contabilidad.suramericana.Pago" is already in use. Use a class
customization to resolve this conflict.
... 14 more

I'm using CXF 2.1.2 and websphere Process Server 6.2.

I’m attaching the wsdl with all the dependences 
http://www.nabble.com/file/p25224292/wsdl2.rar wsdl2.rar 

Thanks in Advance.


-- 
View this message in context: http://www.nabble.com/A-class-interface-with-the-same-name-exception-when-trying-to-consume-a-service-in-Websphere-Process-server-from-CXF-Client-tp25224292p25224292.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: A class/interface with the same name exception when trying to consume a service in Websphere Process server from CXF Client

Posted by JuanJara <jc...@avansoft.com>.
Thank you very much Daniel.

Best regards,



dkulp wrote:
> 
> 
> I'm pretty sure this was "fixed" in cxf 2.1.5 or 2.1.6.   We now add a 
> ClassNameAllocator to the jaxb factories to auto resolve some of the
> classname 
> issues like this.   My suggestion: upgrade.
> 
> Dan
> 
> 
> On Tue September 1 2009 11:59:56 am JuanJara wrote:
>> I really appreciate if somebody can help me on this issue
>>
>> JuanJara wrote:
>> > Hi All
>> >
>> > I’m trying to consume a web service that is running on WebSphere
>> Process
>> > Server. The client sends the request and the server replies with a
>> > general exception when I check the server log I found that is rejecting
>> > the request when the server is processing the xml:
>> >
>> > Exception in thread "main" java.lang.RuntimeException: Error compiling
>> > schema from WSDL at
>> >
>> {http://srmdeesbd01.suranet.com:9084/TestSuraBrokerSrv2Web/sca/ws2/wsdl/T
>> >estSuraBrokerSrv2_ws2.wsdl}: A class/interface with the same name
>> > "test.contabilidad.suramericana.Pago" is already in use. Use a class
>> > customization to resolve this conflict. at
>> >
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.e
>> >rror(DynamicClientFactory.java:493) at
>> >
>> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImp
>> >l.java:285) at
>> >
>> com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java
>> >:77) at
>> >
>> com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFa
>> >ctory.java:116) at
>> >
>> com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFa
>> >ctory.java:77) at
>> >
>> com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasses(Im
>> >plStructureStrategy.java:78) at
>> >
>> com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanGener
>> >ator.java:402) at
>> >
>> com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator.jav
>> >a:434) at
>> >
>> com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:
>> >201) at
>> >
>> com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.jav
>> >a:174) at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
>> > at
>> >
>> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl
>> >.java:251) at
>> >
>> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl
>> >.java:85) at
>> >
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynamic
>> >ClientFactory.java:187) at
>> >
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynamic
>> >ClientFactory.java:165) at
>> >
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynamic
>> >ClientFactory.java:144) at
>> > cxf.test.DynamicClientWesbSrv2.main(DynamicClientWesbSrv2.java:39)
>> Caused
>> > by: org.xml.sax.SAXParseException: A class/interface with the same name
>> > "test.contabilidad.suramericana.Pago" is already in use. Use a class
>> > customization to resolve this conflict.
>> > ... 14 more
>> >
>> > I'm using CXF 2.1.2 and websphere Process Server 6.2.
>> >
>> > I’m attaching the wsdl with all the dependences
>> > http://www.nabble.com/file/p25224292/wsdl2.rar wsdl2.rar
>> >
>> > Thanks in Advance.
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/A-class-interface-with-the-same-name-exception-when-trying-to-consume-a-service-in-Websphere-Process-server-from-CXF-Client-tp25224292p25257546.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: A class/interface with the same name exception when trying to consume a service in Websphere Process server from CXF Client

Posted by Daniel Kulp <dk...@apache.org>.
I'm pretty sure this was "fixed" in cxf 2.1.5 or 2.1.6.   We now add a 
ClassNameAllocator to the jaxb factories to auto resolve some of the classname 
issues like this.   My suggestion: upgrade.

Dan


On Tue September 1 2009 11:59:56 am JuanJara wrote:
> I really appreciate if somebody can help me on this issue
>
> JuanJara wrote:
> > Hi All
> >
> > I’m trying to consume a web service that is running on WebSphere Process
> > Server. The client sends the request and the server replies with a
> > general exception when I check the server log I found that is rejecting
> > the request when the server is processing the xml:
> >
> > Exception in thread "main" java.lang.RuntimeException: Error compiling
> > schema from WSDL at
> > {http://srmdeesbd01.suranet.com:9084/TestSuraBrokerSrv2Web/sca/ws2/wsdl/T
> >estSuraBrokerSrv2_ws2.wsdl}: A class/interface with the same name
> > "test.contabilidad.suramericana.Pago" is already in use. Use a class
> > customization to resolve this conflict. at
> > org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.e
> >rror(DynamicClientFactory.java:493) at
> > com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImp
> >l.java:285) at
> > com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java
> >:77) at
> > com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFa
> >ctory.java:116) at
> > com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFa
> >ctory.java:77) at
> > com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasses(Im
> >plStructureStrategy.java:78) at
> > com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanGener
> >ator.java:402) at
> > com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator.jav
> >a:434) at
> > com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:
> >201) at
> > com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.jav
> >a:174) at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
> > at
> > com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl
> >.java:251) at
> > com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl
> >.java:85) at
> > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynamic
> >ClientFactory.java:187) at
> > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynamic
> >ClientFactory.java:165) at
> > org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynamic
> >ClientFactory.java:144) at
> > cxf.test.DynamicClientWesbSrv2.main(DynamicClientWesbSrv2.java:39) Caused
> > by: org.xml.sax.SAXParseException: A class/interface with the same name
> > "test.contabilidad.suramericana.Pago" is already in use. Use a class
> > customization to resolve this conflict.
> > ... 14 more
> >
> > I'm using CXF 2.1.2 and websphere Process Server 6.2.
> >
> > I’m attaching the wsdl with all the dependences
> > http://www.nabble.com/file/p25224292/wsdl2.rar wsdl2.rar
> >
> > Thanks in Advance.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: A class/interface with the same name exception when trying to consume a service in Websphere Process server from CXF Client

Posted by JuanJara <jc...@avansoft.com>.
I really appreciate if somebody can help me on this issue 


JuanJara wrote:
> 
> 
> Hi All
> 
> I’m trying to consume a web service that is running on WebSphere Process
> Server. The client sends the request and the server replies with a general
> exception when I check the server log I found that is rejecting the
> request when the server is processing the xml:
> 
> Exception in thread "main" java.lang.RuntimeException: Error compiling
> schema from WSDL at
> {http://srmdeesbd01.suranet.com:9084/TestSuraBrokerSrv2Web/sca/ws2/wsdl/TestSuraBrokerSrv2_ws2.wsdl}:
> A class/interface with the same name "test.contabilidad.suramericana.Pago"
> is already in use. Use a class customization to resolve this conflict.
> at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.error(DynamicClientFactory.java:493)
> at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:285)
> at
> com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java:77)
> at
> com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFactory.java:116)
> at
> com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFactory.java:77)
> at
> com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasses(ImplStructureStrategy.java:78)
> at
> com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanGenerator.java:402)
> at
> com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator.java:434)
> at
> com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:201)
> at
> com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:174)
> at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
> at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:251)
> at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
> at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:187)
> at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:165)
> at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:144)
> at cxf.test.DynamicClientWesbSrv2.main(DynamicClientWesbSrv2.java:39)
> Caused by: org.xml.sax.SAXParseException: A class/interface with the same
> name "test.contabilidad.suramericana.Pago" is already in use. Use a class
> customization to resolve this conflict.
> ... 14 more
> 
> I'm using CXF 2.1.2 and websphere Process Server 6.2.
> 
> I’m attaching the wsdl with all the dependences 
> http://www.nabble.com/file/p25224292/wsdl2.rar wsdl2.rar 
> 
> Thanks in Advance.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/A-class-interface-with-the-same-name-exception-when-trying-to-consume-a-service-in-Websphere-Process-server-from-CXF-Client-tp25224292p25243011.html
Sent from the cxf-user mailing list archive at Nabble.com.