You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Mark Streit <mc...@gmail.com> on 2012/04/23 04:56:02 UTC
recent changes with CXF 2.6.0 - missing import on generated WSDL and
Spring JAR question
I have a couple of questions re: the recently released CXF 2.6.0
We have a baseline code-first project (used for examples/testing) where we
would use the Java2WS tool from within an Ant build to generate the
WSDL/XSDs - *when using CXF 2.5.2,* this worked flawlessly. We would get
the WSDL with the 3 generated XSDs imported into the WSDL. We would deploy
the packaged WAR into /webapps under Tomcat and it deployed and started and
worked without issue.
Upon switching over to point the the newer 2.6.0 distribution....We use the
exact same baseline code-first project and use Java2WS tool from within an
Ant build to generate the WSDL/XSDs - HOWEVER, now *only 2 of the 3 XSDs
are being imported*. Source classes/packages HAVE NOT been altered in any
way and in fact, the CORRECT 3 XSDs for the expected namespace and types *ARE
created* - but the 3rd one is missing from the <import> element list in the
resulting WSDL.
*with 2.6.0 - ONLY 2 of 3 expected imports are present (but all 3 XSD are
created):*
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="BookOrderManagerService" targetNamespace="
http://webservices.book.acme.com/" xmlns:ns1="http://util.book.acme.com/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
http://webservices.book.acme.com/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
*<import namespace="http://webservices.book.acme.com/"
schemaLocation="BookOrderManagerService_schema1.xsd"/>
<import namespace="http://util.book.acme.com/"
schemaLocation="BookOrderManagerService_schema2.xsd"/>*
</schema>
...
...
SNIP
<wsdl:service name="BookOrderManagerService">
<wsdl:port name="BookOrderManagerServicePort"
binding="tns:BookOrderManagerServiceSoapBinding">
<soap:address location="
http://localhost:8080/CXFTest11_26WS/services/BookOrderManagerServicePort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
*with 2.5.2 - all 3 expected imports are present:*
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="BookOrderManagerService" targetNamespace="
http://webservices.book.acme.com/" xmlns:ns1="http://util.book.acme.com/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
http://webservices.book.acme.com/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
*<import namespace="http://webservices.book.acme.com/"
schemaLocation="BookOrderManagerService_schema1.xsd"/>
<import namespace="http://util.book.acme.com/"
schemaLocation="BookOrderManagerService_schema2.xsd"/>
<import namespace="http://dvo.services.book.acme.com/"
schemaLocation="BookOrderManagerService_schema3.xsd"/>*
</schema>
...
...
SNIP
<wsdl:service name="BookOrderManagerService">
<wsdl:port name="BookOrderManagerServicePort"
binding="tns:BookOrderManagerServiceSoapBinding">
<soap:address location="
http://localhost:8080/CXFTest11WS/services/BookOrderManagerServicePort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
*
The content of the XSDs created, are IDENTICAL with either version
however.*Is this a possible JIRA candidate item?
*Second issue/item* (and I am sure I missed this somewhere in the
announcement) - it appears 2 Spring related JARs are not included any
longer - in particular:
>From the 2.5.2 distribution: *spring-web-3.0.6.RELEASE.jar *WAS included
but NO such equivalent appears in the 2.6.0 distribution (those that are,
are labeled with ..3.0.7.RELEASE...).
Having *had a web.xml in the original WAR file (based on 2.5.2) that
looked like this*:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5" xmlns="
http://java.sun.com/xml/ns/javaee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>CXFTest11WS</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/cxf-beans.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<description>
Apache CXF Endpoint</description>
<display-name>cxf</display-name>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>
/services/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
</web-app>
... of course now no longer works since the referenced *ContextLoaderListener
*cannot be found using the JARs of the 2.6.0 distribution. The WAR file
created and defined this way (web.xml) worked perfectly under 2.5.2. The
same won't deploy under Tomcat at the moment (until I can figure out what
to change). However, I assume we have to change how this is done now
because 2.6.0 has itself undergone some changes requiring a different
approach be taken? As I prefaced my question - perhaps I am missing where
this was mentioned in the migration notes?
Thanks in advance for any insight.
*Mark
*
Re: recent changes with CXF 2.6.0 - missing import on generated WSDL and Spring JAR question
Posted by Daniel Kulp <dk...@apache.org>.
Question 1:
Are all three imports REQUIRED within the service wsdl? Aka: are
elements/types from all three referenced as parts in messages? If not, it
may not be outputting the import. If they are referenced, then it sounds
like a bug and I'd love to see a testcase.
Question 2:
It's part of the bullet:
"Spring is now an optional component of the http-jetty transports module and
other modules. Applications that may have pulled in Spring transitively via
CXF will be required to declare required spring dependencies in their own
poms directly."
but not really clear. We worked pretty hard to reduce the required spring
jars and mark as much of them as "provided" as possible. If you use spring
in you application, it's now much more "up to the developer" to provide the
spring jars they need. The exception is the JMS transport which has a
strong dependency on Spring. Thus, the spring jars we ship are those that
are needed for the JMS transport to work along with basic spring
configuration. For the most part, if you are heavily using Spring, you'll
likely need to provide the jars you want/need.
Dan
On Sunday, April 22, 2012 10:56:02 PM Mark Streit wrote:
> I have a couple of questions re: the recently released CXF 2.6.0
>
> We have a baseline code-first project (used for examples/testing) where we
> would use the Java2WS tool from within an Ant build to generate the
> WSDL/XSDs - *when using CXF 2.5.2,* this worked flawlessly. We would get
> the WSDL with the 3 generated XSDs imported into the WSDL. We would
> deploy the packaged WAR into /webapps under Tomcat and it deployed and
> started and worked without issue.
>
> Upon switching over to point the the newer 2.6.0 distribution....We use
> the exact same baseline code-first project and use Java2WS tool from
> within an Ant build to generate the WSDL/XSDs - HOWEVER, now *only 2 of
> the 3 XSDs are being imported*. Source classes/packages HAVE NOT been
> altered in any way and in fact, the CORRECT 3 XSDs for the expected
> namespace and types *ARE created* - but the 3rd one is missing from the
> <import> element list in the resulting WSDL.
>
> *with 2.6.0 - ONLY 2 of 3 expected imports are present (but all 3 XSD are
> created):*
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="BookOrderManagerService" targetNamespace="
> http://webservices.book.acme.com/" xmlns:ns1="http://util.book.acme.com/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> http://webservices.book.acme.com/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:soap="
> http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema">
>
> *<import namespace="http://webservices.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema1.xsd"/>
> <import namespace="http://util.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema2.xsd"/>*
>
> </schema>
> ...
> ...
> SNIP
> <wsdl:service name="BookOrderManagerService">
> <wsdl:port name="BookOrderManagerServicePort"
> binding="tns:BookOrderManagerServiceSoapBinding">
> <soap:address location="
> http://localhost:8080/CXFTest11_26WS/services/BookOrderManagerServicePort"
> /> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
>
> *with 2.5.2 - all 3 expected imports are present:*
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="BookOrderManagerService" targetNamespace="
> http://webservices.book.acme.com/" xmlns:ns1="http://util.book.acme.com/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> http://webservices.book.acme.com/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:soap="
> http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema">
>
> *<import namespace="http://webservices.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema1.xsd"/>
> <import namespace="http://util.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema2.xsd"/>
> <import namespace="http://dvo.services.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema3.xsd"/>*
>
> </schema>
> ...
> ...
> SNIP
> <wsdl:service name="BookOrderManagerService">
> <wsdl:port name="BookOrderManagerServicePort"
> binding="tns:BookOrderManagerServiceSoapBinding">
> <soap:address location="
> http://localhost:8080/CXFTest11WS/services/BookOrderManagerServicePort"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> *
> The content of the XSDs created, are IDENTICAL with either version
> however.*Is this a possible JIRA candidate item?
>
>
> *Second issue/item* (and I am sure I missed this somewhere in the
> announcement) - it appears 2 Spring related JARs are not included any
> longer - in particular:
>
> From the 2.5.2 distribution: *spring-web-3.0.6.RELEASE.jar *WAS included
> but NO such equivalent appears in the 2.6.0 distribution (those that are,
> are labeled with ..3.0.7.RELEASE...).
>
> Having *had a web.xml in the original WAR file (based on 2.5.2) that
> looked like this*:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.5" xmlns="
> http://java.sun.com/xml/ns/javaee" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> <display-name>CXFTest11WS</display-name>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>WEB-INF/cxf-beans.xml</param-value>
> </context-param>
> <listener>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener</lis
> tener-class> </listener>
> <servlet>
> <description>
> Apache CXF Endpoint</description>
> <display-name>cxf</display-name>
> <servlet-name>cxf</servlet-name>
>
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>cxf</servlet-name>
> <url-pattern>
> /services/*</url-pattern>
> </servlet-mapping>
> <session-config>
> <session-timeout>60</session-timeout>
> </session-config>
> </web-app>
>
> ... of course now no longer works since the referenced
> *ContextLoaderListener *cannot be found using the JARs of the 2.6.0
> distribution. The WAR file created and defined this way (web.xml) worked
> perfectly under 2.5.2. The same won't deploy under Tomcat at the moment
> (until I can figure out what to change). However, I assume we have to
> change how this is done now because 2.6.0 has itself undergone some
> changes requiring a different approach be taken? As I prefaced my
> question - perhaps I am missing where this was mentioned in the migration
> notes?
>
> Thanks in advance for any insight.
>
> *Mark
> *
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: recent changes with CXF 2.6.0 - missing import on generated WSDL
and Spring JAR question
Posted by ja...@gmail.com.
Oops - the class in that package ServiceWSDLBuilder ....
On Apr 24, 2012 7:02 PM, <ja...@gmail.com> wrote:
> So schema3 is not referenced directly by the wsdl, but schema1 does.
>
> Your wsdl should still work as schema1 will bring in schema3 anyway.
>
> But yes it is a change in 2.6 and 2.5.3
>
> You can find the code in rt/core/src/main/org/apache/cxf/wsdl11/
>
> The method - buildTypesWithSchemaImports
>
> Look for a comment ...
>
> // this ensures only the schemas directly referenced by the wsdl are
> included
> On Apr 24, 2012 8:57 AM, "Mark Streit" <mc...@gmail.com> wrote:
>
>> Yes....schema1 does import schema3....but it also does with 2.5.2 ... The
>> only diff now with 2.6.0 ... It stopped importing that schema3 in the
>> WSDL.
>>
>> Mark
>> On Apr 23, 2012 6:39 PM, <ja...@gmail.com> wrote:
>>
>> > Does schema1 or schema2 import schema3 now?can you check
>> > On Apr 23, 2012 12:56 PM, "Mark Streit" <mc...@gmail.com> wrote:
>> >
>> > > I have a couple of questions re: the recently released CXF 2.6.0
>> > >
>> > > We have a baseline code-first project (used for examples/testing)
>> where
>> > we
>> > > would use the Java2WS tool from within an Ant build to generate the
>> > > WSDL/XSDs - *when using CXF 2.5.2,* this worked flawlessly. We would
>> get
>> > > the WSDL with the 3 generated XSDs imported into the WSDL. We would
>> > deploy
>> > > the packaged WAR into /webapps under Tomcat and it deployed and
>> started
>> > and
>> > > worked without issue.
>> > >
>> > > Upon switching over to point the the newer 2.6.0 distribution....We
>> use
>> > the
>> > > exact same baseline code-first project and use Java2WS tool from
>> within
>> > an
>> > > Ant build to generate the WSDL/XSDs - HOWEVER, now *only 2 of the 3
>> XSDs
>> > > are being imported*. Source classes/packages HAVE NOT been altered in
>> > any
>> > > way and in fact, the CORRECT 3 XSDs for the expected namespace and
>> types
>> > > *ARE
>> > > created* - but the 3rd one is missing from the <import> element list
>> in
>> > the
>> > > resulting WSDL.
>> > >
>> > > *with 2.6.0 - ONLY 2 of 3 expected imports are present (but all 3 XSD
>> are
>> > > created):*
>> > >
>> > > <?xml version="1.0" encoding="UTF-8"?>
>> > > <wsdl:definitions name="BookOrderManagerService" targetNamespace="
>> > > http://webservices.book.acme.com/" xmlns:ns1="
>> http://util.book.acme.com/
>> > "
>> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
>> > > http://webservices.book.acme.com/" xmlns:xsd="
>> > > http://www.w3.org/2001/XMLSchema" xmlns:soap="
>> > > http://schemas.xmlsoap.org/wsdl/soap/">
>> > > <wsdl:types>
>> > > <schema xmlns="http://www.w3.org/2001/XMLSchema">
>> > >
>> > > *<import namespace="http://webservices.book.acme.com/"
>> > > schemaLocation="BookOrderManagerService_schema1.xsd"/>
>> > > <import namespace="http://util.book.acme.com/"
>> > > schemaLocation="BookOrderManagerService_schema2.xsd"/>*
>> > >
>> > > </schema>
>> > > ...
>> > > ...
>> > > SNIP
>> > > <wsdl:service name="BookOrderManagerService">
>> > > <wsdl:port name="BookOrderManagerServicePort"
>> > > binding="tns:BookOrderManagerServiceSoapBinding">
>> > > <soap:address location="
>> > >
>> >
>> http://localhost:8080/CXFTest11_26WS/services/BookOrderManagerServicePort
>> > > "/>
>> > > </wsdl:port>
>> > > </wsdl:service>
>> > > </wsdl:definitions>
>> > >
>> > >
>> > > *with 2.5.2 - all 3 expected imports are present:*
>> > >
>> > > <?xml version="1.0" encoding="UTF-8"?>
>> > > <wsdl:definitions name="BookOrderManagerService" targetNamespace="
>> > > http://webservices.book.acme.com/" xmlns:ns1="
>> http://util.book.acme.com/
>> > "
>> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
>> > > http://webservices.book.acme.com/" xmlns:xsd="
>> > > http://www.w3.org/2001/XMLSchema" xmlns:soap="
>> > > http://schemas.xmlsoap.org/wsdl/soap/">
>> > > <wsdl:types>
>> > > <schema xmlns="http://www.w3.org/2001/XMLSchema">
>> > >
>> > > *<import namespace="http://webservices.book.acme.com/"
>> > > schemaLocation="BookOrderManagerService_schema1.xsd"/>
>> > > <import namespace="http://util.book.acme.com/"
>> > > schemaLocation="BookOrderManagerService_schema2.xsd"/>
>> > > <import namespace="http://dvo.services.book.acme.com/"
>> > > schemaLocation="BookOrderManagerService_schema3.xsd"/>*
>> > >
>> > > </schema>
>> > > ...
>> > > ...
>> > > SNIP
>> > > <wsdl:service name="BookOrderManagerService">
>> > > <wsdl:port name="BookOrderManagerServicePort"
>> > > binding="tns:BookOrderManagerServiceSoapBinding">
>> > > <soap:address location="
>> > >
>> http://localhost:8080/CXFTest11WS/services/BookOrderManagerServicePort
>> > "/>
>> > > </wsdl:port>
>> > > </wsdl:service>
>> > > </wsdl:definitions>
>> > > *
>> > > The content of the XSDs created, are IDENTICAL with either version
>> > > however.*Is this a possible JIRA candidate item?
>> > >
>> > >
>> > > *Second issue/item* (and I am sure I missed this somewhere in the
>> > > announcement) - it appears 2 Spring related JARs are not included any
>> > > longer - in particular:
>> > >
>> > > From the 2.5.2 distribution: *spring-web-3.0.6.RELEASE.jar *WAS
>> included
>> > > but NO such equivalent appears in the 2.6.0 distribution (those that
>> are,
>> > > are labeled with ..3.0.7.RELEASE...).
>> > >
>> > > Having *had a web.xml in the original WAR file (based on 2.5.2) that
>> > > looked like this*:
>> > >
>> > > <?xml version="1.0" encoding="UTF-8"?>
>> > > <web-app id="WebApp_ID" version="2.5" xmlns="
>> > > http://java.sun.com/xml/ns/javaee" xmlns:xsi="
>> > > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>> > > http://java.sun.com/xml/ns/javaee
>> > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>> > > <display-name>CXFTest11WS</display-name>
>> > > <context-param>
>> > > <param-name>contextConfigLocation</param-name>
>> > > <param-value>WEB-INF/cxf-beans.xml</param-value>
>> > > </context-param>
>> > > <listener>
>> > >
>> > >
>> > >
>> >
>> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>> > > </listener>
>> > > <servlet>
>> > > <description>
>> > > Apache CXF Endpoint</description>
>> > > <display-name>cxf</display-name>
>> > > <servlet-name>cxf</servlet-name>
>> > >
>> > >
>> >
>> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
>> > > <load-on-startup>1</load-on-startup>
>> > > </servlet>
>> > > <servlet-mapping>
>> > > <servlet-name>cxf</servlet-name>
>> > > <url-pattern>
>> > > /services/*</url-pattern>
>> > > </servlet-mapping>
>> > > <session-config>
>> > > <session-timeout>60</session-timeout>
>> > > </session-config>
>> > > </web-app>
>> > >
>> > > ... of course now no longer works since the referenced
>> > > *ContextLoaderListener
>> > > *cannot be found using the JARs of the 2.6.0 distribution. The WAR
>> file
>> > > created and defined this way (web.xml) worked perfectly under 2.5.2.
>> The
>> > > same won't deploy under Tomcat at the moment (until I can figure out
>> what
>> > > to change). However, I assume we have to change how this is done now
>> > > because 2.6.0 has itself undergone some changes requiring a different
>> > > approach be taken? As I prefaced my question - perhaps I am missing
>> > where
>> > > this was mentioned in the migration notes?
>> > >
>> > > Thanks in advance for any insight.
>> > >
>> > > *Mark
>> > > *
>> > >
>> >
>>
>
Re: recent changes with CXF 2.6.0 - missing import on generated WSDL
and Spring JAR question
Posted by ja...@gmail.com.
So schema3 is not referenced directly by the wsdl, but schema1 does.
Your wsdl should still work as schema1 will bring in schema3 anyway.
But yes it is a change in 2.6 and 2.5.3
You can find the code in rt/core/src/main/org/apache/cxf/wsdl11/
The method - buildTypesWithSchemaImports
Look for a comment ...
// this ensures only the schemas directly referenced by the wsdl are
included
On Apr 24, 2012 8:57 AM, "Mark Streit" <mc...@gmail.com> wrote:
> Yes....schema1 does import schema3....but it also does with 2.5.2 ... The
> only diff now with 2.6.0 ... It stopped importing that schema3 in the WSDL.
>
> Mark
> On Apr 23, 2012 6:39 PM, <ja...@gmail.com> wrote:
>
> > Does schema1 or schema2 import schema3 now?can you check
> > On Apr 23, 2012 12:56 PM, "Mark Streit" <mc...@gmail.com> wrote:
> >
> > > I have a couple of questions re: the recently released CXF 2.6.0
> > >
> > > We have a baseline code-first project (used for examples/testing) where
> > we
> > > would use the Java2WS tool from within an Ant build to generate the
> > > WSDL/XSDs - *when using CXF 2.5.2,* this worked flawlessly. We would
> get
> > > the WSDL with the 3 generated XSDs imported into the WSDL. We would
> > deploy
> > > the packaged WAR into /webapps under Tomcat and it deployed and started
> > and
> > > worked without issue.
> > >
> > > Upon switching over to point the the newer 2.6.0 distribution....We use
> > the
> > > exact same baseline code-first project and use Java2WS tool from within
> > an
> > > Ant build to generate the WSDL/XSDs - HOWEVER, now *only 2 of the 3
> XSDs
> > > are being imported*. Source classes/packages HAVE NOT been altered in
> > any
> > > way and in fact, the CORRECT 3 XSDs for the expected namespace and
> types
> > > *ARE
> > > created* - but the 3rd one is missing from the <import> element list in
> > the
> > > resulting WSDL.
> > >
> > > *with 2.6.0 - ONLY 2 of 3 expected imports are present (but all 3 XSD
> are
> > > created):*
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <wsdl:definitions name="BookOrderManagerService" targetNamespace="
> > > http://webservices.book.acme.com/" xmlns:ns1="
> http://util.book.acme.com/
> > "
> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> > > http://webservices.book.acme.com/" xmlns:xsd="
> > > http://www.w3.org/2001/XMLSchema" xmlns:soap="
> > > http://schemas.xmlsoap.org/wsdl/soap/">
> > > <wsdl:types>
> > > <schema xmlns="http://www.w3.org/2001/XMLSchema">
> > >
> > > *<import namespace="http://webservices.book.acme.com/"
> > > schemaLocation="BookOrderManagerService_schema1.xsd"/>
> > > <import namespace="http://util.book.acme.com/"
> > > schemaLocation="BookOrderManagerService_schema2.xsd"/>*
> > >
> > > </schema>
> > > ...
> > > ...
> > > SNIP
> > > <wsdl:service name="BookOrderManagerService">
> > > <wsdl:port name="BookOrderManagerServicePort"
> > > binding="tns:BookOrderManagerServiceSoapBinding">
> > > <soap:address location="
> > >
> >
> http://localhost:8080/CXFTest11_26WS/services/BookOrderManagerServicePort
> > > "/>
> > > </wsdl:port>
> > > </wsdl:service>
> > > </wsdl:definitions>
> > >
> > >
> > > *with 2.5.2 - all 3 expected imports are present:*
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <wsdl:definitions name="BookOrderManagerService" targetNamespace="
> > > http://webservices.book.acme.com/" xmlns:ns1="
> http://util.book.acme.com/
> > "
> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> > > http://webservices.book.acme.com/" xmlns:xsd="
> > > http://www.w3.org/2001/XMLSchema" xmlns:soap="
> > > http://schemas.xmlsoap.org/wsdl/soap/">
> > > <wsdl:types>
> > > <schema xmlns="http://www.w3.org/2001/XMLSchema">
> > >
> > > *<import namespace="http://webservices.book.acme.com/"
> > > schemaLocation="BookOrderManagerService_schema1.xsd"/>
> > > <import namespace="http://util.book.acme.com/"
> > > schemaLocation="BookOrderManagerService_schema2.xsd"/>
> > > <import namespace="http://dvo.services.book.acme.com/"
> > > schemaLocation="BookOrderManagerService_schema3.xsd"/>*
> > >
> > > </schema>
> > > ...
> > > ...
> > > SNIP
> > > <wsdl:service name="BookOrderManagerService">
> > > <wsdl:port name="BookOrderManagerServicePort"
> > > binding="tns:BookOrderManagerServiceSoapBinding">
> > > <soap:address location="
> > > http://localhost:8080/CXFTest11WS/services/BookOrderManagerServicePort
> > "/>
> > > </wsdl:port>
> > > </wsdl:service>
> > > </wsdl:definitions>
> > > *
> > > The content of the XSDs created, are IDENTICAL with either version
> > > however.*Is this a possible JIRA candidate item?
> > >
> > >
> > > *Second issue/item* (and I am sure I missed this somewhere in the
> > > announcement) - it appears 2 Spring related JARs are not included any
> > > longer - in particular:
> > >
> > > From the 2.5.2 distribution: *spring-web-3.0.6.RELEASE.jar *WAS
> included
> > > but NO such equivalent appears in the 2.6.0 distribution (those that
> are,
> > > are labeled with ..3.0.7.RELEASE...).
> > >
> > > Having *had a web.xml in the original WAR file (based on 2.5.2) that
> > > looked like this*:
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <web-app id="WebApp_ID" version="2.5" xmlns="
> > > http://java.sun.com/xml/ns/javaee" xmlns:xsi="
> > > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> > > http://java.sun.com/xml/ns/javaee
> > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> > > <display-name>CXFTest11WS</display-name>
> > > <context-param>
> > > <param-name>contextConfigLocation</param-name>
> > > <param-value>WEB-INF/cxf-beans.xml</param-value>
> > > </context-param>
> > > <listener>
> > >
> > >
> > >
> >
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> > > </listener>
> > > <servlet>
> > > <description>
> > > Apache CXF Endpoint</description>
> > > <display-name>cxf</display-name>
> > > <servlet-name>cxf</servlet-name>
> > >
> > >
> >
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> > > <load-on-startup>1</load-on-startup>
> > > </servlet>
> > > <servlet-mapping>
> > > <servlet-name>cxf</servlet-name>
> > > <url-pattern>
> > > /services/*</url-pattern>
> > > </servlet-mapping>
> > > <session-config>
> > > <session-timeout>60</session-timeout>
> > > </session-config>
> > > </web-app>
> > >
> > > ... of course now no longer works since the referenced
> > > *ContextLoaderListener
> > > *cannot be found using the JARs of the 2.6.0 distribution. The WAR
> file
> > > created and defined this way (web.xml) worked perfectly under 2.5.2.
> The
> > > same won't deploy under Tomcat at the moment (until I can figure out
> what
> > > to change). However, I assume we have to change how this is done now
> > > because 2.6.0 has itself undergone some changes requiring a different
> > > approach be taken? As I prefaced my question - perhaps I am missing
> > where
> > > this was mentioned in the migration notes?
> > >
> > > Thanks in advance for any insight.
> > >
> > > *Mark
> > > *
> > >
> >
>
Re: recent changes with CXF 2.6.0 - missing import on generated WSDL
and Spring JAR question
Posted by Mark Streit <mc...@gmail.com>.
Yes....schema1 does import schema3....but it also does with 2.5.2 ... The
only diff now with 2.6.0 ... It stopped importing that schema3 in the WSDL.
Mark
On Apr 23, 2012 6:39 PM, <ja...@gmail.com> wrote:
> Does schema1 or schema2 import schema3 now?can you check
> On Apr 23, 2012 12:56 PM, "Mark Streit" <mc...@gmail.com> wrote:
>
> > I have a couple of questions re: the recently released CXF 2.6.0
> >
> > We have a baseline code-first project (used for examples/testing) where
> we
> > would use the Java2WS tool from within an Ant build to generate the
> > WSDL/XSDs - *when using CXF 2.5.2,* this worked flawlessly. We would get
> > the WSDL with the 3 generated XSDs imported into the WSDL. We would
> deploy
> > the packaged WAR into /webapps under Tomcat and it deployed and started
> and
> > worked without issue.
> >
> > Upon switching over to point the the newer 2.6.0 distribution....We use
> the
> > exact same baseline code-first project and use Java2WS tool from within
> an
> > Ant build to generate the WSDL/XSDs - HOWEVER, now *only 2 of the 3 XSDs
> > are being imported*. Source classes/packages HAVE NOT been altered in
> any
> > way and in fact, the CORRECT 3 XSDs for the expected namespace and types
> > *ARE
> > created* - but the 3rd one is missing from the <import> element list in
> the
> > resulting WSDL.
> >
> > *with 2.6.0 - ONLY 2 of 3 expected imports are present (but all 3 XSD are
> > created):*
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions name="BookOrderManagerService" targetNamespace="
> > http://webservices.book.acme.com/" xmlns:ns1="http://util.book.acme.com/
> "
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> > http://webservices.book.acme.com/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema" xmlns:soap="
> > http://schemas.xmlsoap.org/wsdl/soap/">
> > <wsdl:types>
> > <schema xmlns="http://www.w3.org/2001/XMLSchema">
> >
> > *<import namespace="http://webservices.book.acme.com/"
> > schemaLocation="BookOrderManagerService_schema1.xsd"/>
> > <import namespace="http://util.book.acme.com/"
> > schemaLocation="BookOrderManagerService_schema2.xsd"/>*
> >
> > </schema>
> > ...
> > ...
> > SNIP
> > <wsdl:service name="BookOrderManagerService">
> > <wsdl:port name="BookOrderManagerServicePort"
> > binding="tns:BookOrderManagerServiceSoapBinding">
> > <soap:address location="
> >
> http://localhost:8080/CXFTest11_26WS/services/BookOrderManagerServicePort
> > "/>
> > </wsdl:port>
> > </wsdl:service>
> > </wsdl:definitions>
> >
> >
> > *with 2.5.2 - all 3 expected imports are present:*
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions name="BookOrderManagerService" targetNamespace="
> > http://webservices.book.acme.com/" xmlns:ns1="http://util.book.acme.com/
> "
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> > http://webservices.book.acme.com/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema" xmlns:soap="
> > http://schemas.xmlsoap.org/wsdl/soap/">
> > <wsdl:types>
> > <schema xmlns="http://www.w3.org/2001/XMLSchema">
> >
> > *<import namespace="http://webservices.book.acme.com/"
> > schemaLocation="BookOrderManagerService_schema1.xsd"/>
> > <import namespace="http://util.book.acme.com/"
> > schemaLocation="BookOrderManagerService_schema2.xsd"/>
> > <import namespace="http://dvo.services.book.acme.com/"
> > schemaLocation="BookOrderManagerService_schema3.xsd"/>*
> >
> > </schema>
> > ...
> > ...
> > SNIP
> > <wsdl:service name="BookOrderManagerService">
> > <wsdl:port name="BookOrderManagerServicePort"
> > binding="tns:BookOrderManagerServiceSoapBinding">
> > <soap:address location="
> > http://localhost:8080/CXFTest11WS/services/BookOrderManagerServicePort
> "/>
> > </wsdl:port>
> > </wsdl:service>
> > </wsdl:definitions>
> > *
> > The content of the XSDs created, are IDENTICAL with either version
> > however.*Is this a possible JIRA candidate item?
> >
> >
> > *Second issue/item* (and I am sure I missed this somewhere in the
> > announcement) - it appears 2 Spring related JARs are not included any
> > longer - in particular:
> >
> > From the 2.5.2 distribution: *spring-web-3.0.6.RELEASE.jar *WAS included
> > but NO such equivalent appears in the 2.6.0 distribution (those that are,
> > are labeled with ..3.0.7.RELEASE...).
> >
> > Having *had a web.xml in the original WAR file (based on 2.5.2) that
> > looked like this*:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app id="WebApp_ID" version="2.5" xmlns="
> > http://java.sun.com/xml/ns/javaee" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> > http://java.sun.com/xml/ns/javaee
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> > <display-name>CXFTest11WS</display-name>
> > <context-param>
> > <param-name>contextConfigLocation</param-name>
> > <param-value>WEB-INF/cxf-beans.xml</param-value>
> > </context-param>
> > <listener>
> >
> >
> >
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> > </listener>
> > <servlet>
> > <description>
> > Apache CXF Endpoint</description>
> > <display-name>cxf</display-name>
> > <servlet-name>cxf</servlet-name>
> >
> >
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> > <load-on-startup>1</load-on-startup>
> > </servlet>
> > <servlet-mapping>
> > <servlet-name>cxf</servlet-name>
> > <url-pattern>
> > /services/*</url-pattern>
> > </servlet-mapping>
> > <session-config>
> > <session-timeout>60</session-timeout>
> > </session-config>
> > </web-app>
> >
> > ... of course now no longer works since the referenced
> > *ContextLoaderListener
> > *cannot be found using the JARs of the 2.6.0 distribution. The WAR file
> > created and defined this way (web.xml) worked perfectly under 2.5.2. The
> > same won't deploy under Tomcat at the moment (until I can figure out what
> > to change). However, I assume we have to change how this is done now
> > because 2.6.0 has itself undergone some changes requiring a different
> > approach be taken? As I prefaced my question - perhaps I am missing
> where
> > this was mentioned in the migration notes?
> >
> > Thanks in advance for any insight.
> >
> > *Mark
> > *
> >
>
Re: recent changes with CXF 2.6.0 - missing import on generated WSDL
and Spring JAR question
Posted by ja...@gmail.com.
Does schema1 or schema2 import schema3 now?can you check
On Apr 23, 2012 12:56 PM, "Mark Streit" <mc...@gmail.com> wrote:
> I have a couple of questions re: the recently released CXF 2.6.0
>
> We have a baseline code-first project (used for examples/testing) where we
> would use the Java2WS tool from within an Ant build to generate the
> WSDL/XSDs - *when using CXF 2.5.2,* this worked flawlessly. We would get
> the WSDL with the 3 generated XSDs imported into the WSDL. We would deploy
> the packaged WAR into /webapps under Tomcat and it deployed and started and
> worked without issue.
>
> Upon switching over to point the the newer 2.6.0 distribution....We use the
> exact same baseline code-first project and use Java2WS tool from within an
> Ant build to generate the WSDL/XSDs - HOWEVER, now *only 2 of the 3 XSDs
> are being imported*. Source classes/packages HAVE NOT been altered in any
> way and in fact, the CORRECT 3 XSDs for the expected namespace and types
> *ARE
> created* - but the 3rd one is missing from the <import> element list in the
> resulting WSDL.
>
> *with 2.6.0 - ONLY 2 of 3 expected imports are present (but all 3 XSD are
> created):*
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="BookOrderManagerService" targetNamespace="
> http://webservices.book.acme.com/" xmlns:ns1="http://util.book.acme.com/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> http://webservices.book.acme.com/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:soap="
> http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema">
>
> *<import namespace="http://webservices.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema1.xsd"/>
> <import namespace="http://util.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema2.xsd"/>*
>
> </schema>
> ...
> ...
> SNIP
> <wsdl:service name="BookOrderManagerService">
> <wsdl:port name="BookOrderManagerServicePort"
> binding="tns:BookOrderManagerServiceSoapBinding">
> <soap:address location="
> http://localhost:8080/CXFTest11_26WS/services/BookOrderManagerServicePort
> "/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
>
> *with 2.5.2 - all 3 expected imports are present:*
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="BookOrderManagerService" targetNamespace="
> http://webservices.book.acme.com/" xmlns:ns1="http://util.book.acme.com/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> http://webservices.book.acme.com/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:soap="
> http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema">
>
> *<import namespace="http://webservices.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema1.xsd"/>
> <import namespace="http://util.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema2.xsd"/>
> <import namespace="http://dvo.services.book.acme.com/"
> schemaLocation="BookOrderManagerService_schema3.xsd"/>*
>
> </schema>
> ...
> ...
> SNIP
> <wsdl:service name="BookOrderManagerService">
> <wsdl:port name="BookOrderManagerServicePort"
> binding="tns:BookOrderManagerServiceSoapBinding">
> <soap:address location="
> http://localhost:8080/CXFTest11WS/services/BookOrderManagerServicePort"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> *
> The content of the XSDs created, are IDENTICAL with either version
> however.*Is this a possible JIRA candidate item?
>
>
> *Second issue/item* (and I am sure I missed this somewhere in the
> announcement) - it appears 2 Spring related JARs are not included any
> longer - in particular:
>
> From the 2.5.2 distribution: *spring-web-3.0.6.RELEASE.jar *WAS included
> but NO such equivalent appears in the 2.6.0 distribution (those that are,
> are labeled with ..3.0.7.RELEASE...).
>
> Having *had a web.xml in the original WAR file (based on 2.5.2) that
> looked like this*:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.5" xmlns="
> http://java.sun.com/xml/ns/javaee" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> <display-name>CXFTest11WS</display-name>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>WEB-INF/cxf-beans.xml</param-value>
> </context-param>
> <listener>
>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
> <servlet>
> <description>
> Apache CXF Endpoint</description>
> <display-name>cxf</display-name>
> <servlet-name>cxf</servlet-name>
>
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>cxf</servlet-name>
> <url-pattern>
> /services/*</url-pattern>
> </servlet-mapping>
> <session-config>
> <session-timeout>60</session-timeout>
> </session-config>
> </web-app>
>
> ... of course now no longer works since the referenced
> *ContextLoaderListener
> *cannot be found using the JARs of the 2.6.0 distribution. The WAR file
> created and defined this way (web.xml) worked perfectly under 2.5.2. The
> same won't deploy under Tomcat at the moment (until I can figure out what
> to change). However, I assume we have to change how this is done now
> because 2.6.0 has itself undergone some changes requiring a different
> approach be taken? As I prefaced my question - perhaps I am missing where
> this was mentioned in the migration notes?
>
> Thanks in advance for any insight.
>
> *Mark
> *
>