cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Manaloto (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1822) WSDL Schema Imports
Date Wed, 17 Jun 2009 21:24:07 GMT

    [ https://issues.apache.org/jira/browse/CXF-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720906#action_12720906
] 

Raymond Manaloto commented on CXF-1822:
---------------------------------------

Thanks for the quick response. 

I'm assuming a large number of CXF users were XFire users who went the schema-first development
way. I've searched the CXF nabble forums for anybody with similar problems and came across
this JIRA item. Is there a work around for this problem that I am not aware of? Any help would
be appreciated.

> WSDL Schema Imports
> -------------------
>
>                 Key: CXF-1822
>                 URL: https://issues.apache.org/jira/browse/CXF-1822
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.2
>            Reporter: Murtaza Goga
>            Priority: Minor
>
> The endpoint and the CXFServlet cannot be configured in such a way that a client consuming
a dynamically generated WSDL receives all the imported
> and included schemas.   
> The generated WSDL only generates the schema import with the namespace without the schemaLocation.
The WSDL writer and WSDL query handler do not render the schemaLocation value relatvie to
the Servlet so that the client consuming the WSDL can look it up.
> Example configruation below:
> End Configuration:
> <jaxws:endpoint
>   id="helloWorld"
>   implementor="com.sandbox.service.HelloWorldImpl"
>   address="/HelloWorld">
>   <jaxws:schemaLocations>
>     <jaxws:schemaLocation>file:///D:/apps/CXFProto/schemas/domain.xsd</jaxws:schemaLocation>
>   </jaxws:schemaLocations>
> </jaxws:endpoint>
> WSDL Generated:
> <wsdl:definitions name="HelloWorldImplService"
>   targetNamespace="http://service.sandbox.com/"
>   xmlns:ns1="http://cxf.apache.org/bindings/xformat"
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>   xmlns:tns="http://service.sandbox.com/"
>   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <wsdl:types>
>   <xsd:schema 
>     attributeFormDefault="unqualified" 
>     elementFormDefault="qualified" 
>     targetNamespace="http://service.sandbox.com/"
>     xmlns:cs="http://www.sandbox.com/components"
>     xmlns:sb="http://service.sandbox.com/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>       
>     <xsd:import namespace="http://www.sandbox.com/components"/>
>     <xsd:include schemaLocation="fields.xsd"/>
>     <xsd:complexType name="domainType">
>       <xsd:complexContent>
>         <xsd:extension base="cs:componentType">
>           <xsd:sequence>
>             <xsd:element minOccurs="0" name="foo" type="xsd:string"/>
>           </xsd:sequence>
>         </xsd:extension>
>       </xsd:complexContent>
>     </xsd:complexType>
>        
>     <xsd:element name="sayHi" type="sb:sayHi"/>
>   
>     <xsd:complexType name="sayHi">
>       <xsd:sequence>
>         <xsd:element minOccurs="0" name="arg0" type="xsd:string"/>
>        </xsd:sequence>
>     </xsd:complexType>
>      
>     <xsd:element name="sayHiResponse" type="sb:sayHiResponse"/>
>     
>     <xsd:complexType name="sayHiResponse">
>       <xsd:sequence>
>         <xsd:element minOccurs="0" name="return" type="xsd:string"/>
>       </xsd:sequence>
>     </xsd:complexType>
>       
>   </xsd:schema>
> </wsdl:types>
> ...
> </wsdl:definitions>
> The WSDL generator consumes the domain.xsd specified at the endpoint configuration in
Spring and renders it in the WSDL.  However the schemaLocation attribute does not contain
the path to the components.xsd imported.
> The import should look something like this:
> <xsd:import namespace="http://www.sandbox.com/components" schemaLocation="http://localhost:8080/CXFProto/services/HelloWorldServicexsd='components.xsd'
" />
> Thus a client consuming the WSDL can lookup components.xsd.  Same issue with the xsd:include
element.  A configuration option to get this behavior would be appropriate or the default
behavior changed.

-- 
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