cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-2648) JaxWSClient Fail on legal interface - XmlSchemaException: Schema for namespace 'nn' already contains type 'tt'
Date Thu, 04 Feb 2010 12:20:28 GMT

     [ https://issues.apache.org/jira/browse/CXF-2648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-2648.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.6

> 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
>             Fix For: 2.2.6
>
>
> 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.


Mime
View raw message