You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Murtaza Goga (JIRA)" <ji...@apache.org> on 2008/09/25 19:35:44 UTC

[jira] Created: (CXF-1822) WSDL Schema Imports

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
             Fix For: 2.1.3


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.


[jira] Commented: (CXF-1822) WSDL Schema Imports

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720892#action_12720892 ] 

Benson Margulies commented on CXF-1822:
---------------------------------------

This is an open source project. None of us, apparently, are in a position to tackle this. If you need it badly enough, I'm afraid you will have to join in and make a patch.

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


[jira] Updated: (CXF-1822) WSDL Schema Imports

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated CXF-1822:
------------------------------

    Fix Version/s:     (was: 2.1.3)
                   2.1.4

move it to CXF 2.1.4

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


[jira] Resolved: (CXF-1822) WSDL Schema Imports

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-1822.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.3
                   2.1.6
         Assignee: Daniel Kulp

> 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
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.1.6, 2.2.3
>
>
> 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.


[jira] Commented: (CXF-1822) WSDL Schema Imports

Posted by "Raymond Manaloto (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720888#action_12720888 ] 

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

What's the status of this? This is preventing me from the schema-first development I had with XFire. 

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


[jira] Commented: (CXF-1822) WSDL Schema Imports

Posted by "Yogesh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839267#action_12839267 ] 

Yogesh commented on CXF-1822:
-----------------------------

Is this issue really resolved? I am facing same problem, with CXF 2.2.5.

> 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
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.1.6, 2.2.3
>
>
> 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.


[jira] Commented: (CXF-1822) WSDL Schema Imports

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720898#action_12720898 ] 

Daniel Kulp commented on CXF-1822:
----------------------------------

Barring a full patch,  attaching a full "ready to run" test case is also the best way to help get it fixed.   Creating the test cases is usually one of the hardest parts of fixing these things.


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


[jira] Commented: (CXF-1822) WSDL Schema Imports

Posted by "Raymond Manaloto (JIRA)" <ji...@apache.org>.
    [ 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.