You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Murtaza Goga <Mu...@trisyngroup.com> on 2008/09/19 18:45:43 UTC

WSDL Schema Imports

Is there a way to configure the endpoint and the CXFServlet so 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.  I was hoping to have the WSDL writer render
the schemaLocation value relative to the Servlet so that the client
consuming the WSDL can look it up.  Added a jax-ws-catalog as well to
resolve some of the relative paths on the imports.  

 

Any configuration ideas would be appreciated.

 

Using CXF 2.1.2 to prototype this.

 

Thanks,

Murtaza. 

 


RE: WSDL Schema Imports

Posted by Murtaza Goga <Mu...@trisyngroup.com>.
Updating discussion thread with logged issue:
https://issues.apache.org/jira/browse/CXF-1822

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Tuesday, September 23, 2008 3:39 PM
To: users@cxf.apache.org
Cc: Murtaza Goga
Subject: Re: WSDL Schema Imports


This seems like a bug to me.   Can you log a JIRA and attach the simple 
testcase?

Dan


On Tuesday 23 September 2008 10:24:10 am Murtaza Goga wrote:
> A more concrete example to back the question:
>
>
>
> 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>
>
>
>
>
>
> Is it possible to have the schemaLocation attribute on xsd:import be
> generated with the location of the imported schema.
>
>
>
> <xsd:import namespace="http://www.sandbox.com/components"
>
schemaLocation="http://localhost:8080/CXFProto/services/HelloWorldServic
> e?xsd='components.xsd' " />
>
>
>
> Thanks,
>
> Murtaza.
>
>
>
> -----Original Message-----
> From: Murtaza Goga [mailto:Murtaza.Goga@trisyngroup.com]
> Sent: Friday, September 19, 2008 12:46 PM
> To: users@cxf.apache.org
> Subject: WSDL Schema Imports
>
>
>
> Is there a way to configure the endpoint and the CXFServlet so 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.  I was hoping to have the WSDL writer
render
>
> the schemaLocation value relative to the Servlet so that the client
>
> consuming the WSDL can look it up.  Added a jax-ws-catalog as well to
>
> resolve some of the relative paths on the imports.
>
>
>
>
>
>
>
> Any configuration ideas would be appreciated.
>
>
>
>
>
>
>
> Using CXF 2.1.2 to prototype this.
>
>
>
>
>
>
>
> Thanks,
>
>
>
> Murtaza.



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

Re: WSDL Schema Imports

Posted by Daniel Kulp <dk...@apache.org>.
This seems like a bug to me.   Can you log a JIRA and attach the simple 
testcase?

Dan


On Tuesday 23 September 2008 10:24:10 am Murtaza Goga wrote:
> A more concrete example to back the question:
>
>
>
> 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>
>
>
>
>
>
> Is it possible to have the schemaLocation attribute on xsd:import be
> generated with the location of the imported schema.
>
>
>
> <xsd:import namespace="http://www.sandbox.com/components"
> schemaLocation="http://localhost:8080/CXFProto/services/HelloWorldServic
> e?xsd='components.xsd' " />
>
>
>
> Thanks,
>
> Murtaza.
>
>
>
> -----Original Message-----
> From: Murtaza Goga [mailto:Murtaza.Goga@trisyngroup.com]
> Sent: Friday, September 19, 2008 12:46 PM
> To: users@cxf.apache.org
> Subject: WSDL Schema Imports
>
>
>
> Is there a way to configure the endpoint and the CXFServlet so 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.  I was hoping to have the WSDL writer render
>
> the schemaLocation value relative to the Servlet so that the client
>
> consuming the WSDL can look it up.  Added a jax-ws-catalog as well to
>
> resolve some of the relative paths on the imports.
>
>
>
>
>
>
>
> Any configuration ideas would be appreciated.
>
>
>
>
>
>
>
> Using CXF 2.1.2 to prototype this.
>
>
>
>
>
>
>
> Thanks,
>
>
>
> Murtaza.



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

RE: WSDL Schema Imports

Posted by Murtaza Goga <Mu...@trisyngroup.com>.
A more concrete example to back the question:

 

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>

 

 

Is it possible to have the schemaLocation attribute on xsd:import be
generated with the location of the imported schema.  

 

<xsd:import namespace="http://www.sandbox.com/components"
schemaLocation="http://localhost:8080/CXFProto/services/HelloWorldServic
e?xsd='components.xsd' " />

 

Thanks,

Murtaza.

 

-----Original Message-----
From: Murtaza Goga [mailto:Murtaza.Goga@trisyngroup.com] 
Sent: Friday, September 19, 2008 12:46 PM
To: users@cxf.apache.org
Subject: WSDL Schema Imports

 

Is there a way to configure the endpoint and the CXFServlet so 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.  I was hoping to have the WSDL writer render

the schemaLocation value relative to the Servlet so that the client

consuming the WSDL can look it up.  Added a jax-ws-catalog as well to

resolve some of the relative paths on the imports.  

 

 

 

Any configuration ideas would be appreciated.

 

 

 

Using CXF 2.1.2 to prototype this.

 

 

 

Thanks,

 

Murtaza. 

 

 

 


Re: WSDL Schema Imports

Posted by "juan.velez" <ju...@areva-td.com>.
Along the lines of this question, I have a WSDL that imports a schema

  <wsdl:types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema">

      <import namespace="http://www.areva.com/mmi/xml"
              schemaLocation="mmi.xsd" />

    </xsd:schema>
  </wsdl:types>
  
The mmi.xsd can be found "jared" up in a library (mmischema.jar), but when I
try to start the app, I get:

Caused by: javax.wsdl.WSDLException: WSDLException (at
/wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR: Problem
parsing 'jndi:/localhost/mmi/WEB-INF/mmi.xsd'.:
java.io.FileNotFoundException

How can CXF be told to look in the classpath for the mmi.xsd file when
resolving the import?

Thanks,

Juan


Goga, Murtaza wrote:
> 
> Is there a way to configure the endpoint and the CXFServlet so 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.  I was hoping to have the WSDL writer render
> the schemaLocation value relative to the Servlet so that the client
> consuming the WSDL can look it up.  Added a jax-ws-catalog as well to
> resolve some of the relative paths on the imports.  
> 
>  
> 
> Any configuration ideas would be appreciated.
> 
>  
> 
> Using CXF 2.1.2 to prototype this.
> 
>  
> 
> Thanks,
> 
> Murtaza. 
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/WSDL-Schema-Imports-tp19575815p20464602.html
Sent from the cxf-user mailing list archive at Nabble.com.