You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jara Cesnek (JIRA)" <ji...@apache.org> on 2010/02/04 10:08:27 UTC
[jira] Commented: (CXF-2648) JaxWSClient Fail on legal interface -
XmlSchemaException: Schema for namespace 'nn' already contains type 'tt'
[ https://issues.apache.org/jira/browse/CXF-2648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829542#action_12829542 ]
Jara Cesnek commented on CXF-2648:
----------------------------------
Fixed in cxf-2.2.6.jar.
You can close this issue.
> JaxWSClient Fail on legal interface - XmlSchemaException: Schema for namespace 'nn' already contains type 'tt'
> --------------------------------------------------------------------------------------------------------------
>
> Key: CXF-2648
> URL: https://issues.apache.org/jira/browse/CXF-2648
> Project: CXF
> Issue Type: Bug
> Components: Aegis Databinding
> Affects Versions: 2.1.9
> Reporter: Jara Cesnek
>
> Have interface with two methods. Each has parameter with *same name but other type!*
> {code}
> @WebService(name="documents", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
> public interface Documents {
> void getDocumentByFilter( @WebParam(name="filter") VOFilter);
> void getDocumentByExtendedFilter( @WebParam(name="filter") VOExtendedFilter);
> }
> {code}
> {code}
> @XmlType(name = "SimpleFilter", namespace = NamespaceInfo.NAMESPACE_V1)
> public class VOFilter {
> ...
> }
> @XmlType(name = "ExtendedFilter", namespace = NamespaceInfo.NAMESPACE_V1)
> public class VOExtendedFilter {
> ...
> }
> {code}
> On the server side all working. WSDL seems OK and method call by SOAPUI working too.
> But on the client side (when try to call by CXF client) exception is thrown :
> {code}
> org.apache.ws.commons.schema.XmlSchemaException: Schema for namespace 'http://wo.v1.ws.doc.modules.daisy.marbes.cz' already contains type 'filter'
> at org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:558)
> at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:206)
> at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:121)
> at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:509)
> at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:493)
> at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:158)
> at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:136)
> at org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(AegisDatabinding.java:532)
> at org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabinding.java:323)
> at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:378)
> at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:530)
> at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:437)
> at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:192)
> at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:165)
> at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
> at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
> at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
> at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
> {code}
> Client code:
> {code}
> JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> factory.setServiceClass( Documents.class );
> factory.setAddress(publishURL);
> factory.setDataBinding(new AegisDatabinding());
> Object remoteInterfaceImpl = factory.create();
> {code}
> Server code:
> {code}
> JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
> serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); // Documents.class
> serverFactoryBean.setServiceBean(implementor); //DocumentsImpl
> serverFactoryBean.setDataBinding(new AegisDatabinding());
> serverFactoryBean.setAddress(url);
> serverFactoryBean.create();
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.