You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Daniel Pike <da...@gmail.com> on 2007/07/05 02:06:22 UTC

Schema-First Development with CXF

Hi,

I am currently looking at migrating our existing XFire web service across to
CXF.  We have used schema-first development to develop this web service and
are hoping to do the same with CXF

The problem that I am having is that I cannot find a way to specify the
location of the XSD files when configuring the app using spring.  I noticed
that the ServiceInfo class has a method called addSchema but this does not
appear to be called in the code in a way that would allow me to specify the
schema.

Is schema first-development supported in CXF?

Regards,

Daniel.

Re: Schema-First Development with CXF

Posted by Daniel Kulp <dk...@apache.org>.

On Monday 27 August 2007, Dan Diephouse wrote:
> Hi Daniel (and Eric who is hopefully still listening),
>
> I've just fixed this problem in SVN. The problem was I added
> capabilities to do this from the API, but forgot to actually write a
> test for the XML config - which wasn't fully working :-(. Dan Kulp
> will be publishing some new snapshots tonight I think, at which point
> you can test out the fixed functionality.

New SNAPSHOT is up:

http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apache-cxf/2.1-incubator-SNAPSHOT/


Dan



> I did think of a workaround though. You could do something like this:
>
> <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
>   <property name="serviceBean">
>     <bean class="my.proto.HelloWorldImpl">
>   </property>
>   <property name="address" value="/helloWorld"
>   <property name="schemaLocations>
>     <list>
>      <value>foo.xsd</value>
>     </list>
>   </property>
> </bean>
>
> Sorry for the troubles - it'll be fully fixed in 2.0.2.
>
> - Dan
>
> On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
> > Hi Dans,
> >
> > Sorry for the delay but I have only just got around to testing this.
> >  I have
> > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot
> > version as well as the 2.1-snapshot version.  Unfortunately,
> > whenever I try add the xml
> > below, I get the following error:
> >
> > org.springframework.beans.factory.parsing.BeanDefinitionParsingExcep
> >tion: Configuration problem: Cannot locate BeanDefinitionParser for
> > element [schemaLocation]
> >
> > I have setup my endpoint as below:
> >
> >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> >         <jaxws:implementor>
> >             <bean id="helloBean"
> >                 class="my.proto.HelloWorldImpl">
> >                 <property name="suffix" value="mySuffix" />
> >             </bean>
> >         </jaxws:implementor>
> >
> >         <jaxws:schemaLocations>
> >
> >
> > <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:
> >schemaLocation> </jaxws:schemaLocations>
> >     </jaxws:endpoint>
> >
> > Any ideas what might be causing this problem?
> >
> > Thanks,
> >
> > Daniel.
> >
> > On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> > > Dan,
> > >
> > > Sorry.   I didn't see this till now.
> > >
> > > I'll get a new snapshot deploying now.
> > >
> > > Dan
> > >
> > > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> > >
> > > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > > Hi Daniel,
> > > >
> > > > Sorry for the delay with these changes. It turns out I need to
> > > > fix something else inside CXF to make this work correctly yet. I
> > > > added some basic support for it to though to today's SVN. Since
> > > > I'm on a cellular connection, I can't publish a snapshot now,
> > > > but I think another CXF dev probably will today. Then you'll be
> > > > able to do something like:
> > > >
> > > > <jaxws:endpoint>
> > > > <jaxws:schemaLocations>
> > > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > > </jaxws:schemaLocations>
> > > > </jaxws:endpoint>
> > > >
> > > > The curent issue with the code is that CXF will parse the
> > > > schemas with a library called XmlSchema and it doesn't preserve
> > > > things like formatting or documentation. I'll be fixing this
> > > > later tonight though (hopefully I'll be able to get it done
> > > > tonight).
> > > >
> > > > Thanks for your patience and testing! I'll keep an on eye on the
> > > > snapshots and let you know when one is published.
> > > >
> > > > - Dan
> > > >
> > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > Hi Dan,
> > > > >
> > > > > Sounds great, I will keep an eye out for it.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Daniel.
> > > > >
> > > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > > Hi Daniel,
> > > > > > I think I might have overlooked configuration of this in the
> > > > > > JAXB databinding. Its just a few lines of code for me to
> > > > > > change though. I
> > > > >
> > > > > think
> > > > >
> > > > > > I
> > > > > > can probably push out a snapshot this week with the change
> > > > > > if you want
> > > > >
> > > > > to
> > > > >
> > > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > > - Dan
> > > > > >
> > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > I am currently looking at migrating our existing XFire web
> > > > > > > service
> > > > > >
> > > > > > across
> > > > > >
> > > > > > > to
> > > > > > > CXF.  We have used schema-first development to develop
> > > > > > > this web
> > > > >
> > > > > service
> > > > >
> > > > > > > and
> > > > > > > are hoping to do the same with CXF
> > > > > > >
> > > > > > > The problem that I am having is that I cannot find a way
> > > > > > > to specify
> > > > >
> > > > > the
> > > > >
> > > > > > > location of the XSD files when configuring the app using
> > > > > > > spring. I noticed
> > > > > > > that the ServiceInfo class has a method called addSchema
> > > > > > > but this does
> > > > > >
> > > > > > not
> > > > > >
> > > > > > > appear to be called in the code in a way that would allow
> > > > > > > me to
> > > > >
> > > > > specify
> > > > >
> > > > > > > the
> > > > > > > schema.
> > > > > > >
> > > > > > > Is schema first-development supported in CXF?
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > Daniel.
> > > > > >
> > > > > > --
> > > > > > Dan Diephouse
> > > > > > Envoi Solutions
> > > > > > http://envoisolutions.com | http://netzooid.com/blog
> > >
> > > --
> > > J. Daniel Kulp
> > > Principal Engineer
> > > IONA
> > > P: 781-902-8727    C: 508-380-7194
> > > daniel.kulp@iona.com
> > > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Schema-First Development with CXF

Posted by Eric Miles <er...@kronos.com>.
Daniel,

I posted this exact same question last week to the mailing list but have
not received a response on it yet.  I am receiving the exact same error
as you.  I attempted to look for the namespace parser that extracts the
schemaLocation but couldn't find one.  Hopefully I just couldn't find it
rather than it hasn't been developed!

Eric




On Mon, 2007-08-27 at 20:26 +1000, Daniel Pike wrote:

> Hi Dans,
> 
> Sorry for the delay but I have only just got around to testing this.  I have
> tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot version as
> well as the 2.1-snapshot version.  Unfortunately, whenever I try add the xml
> below, I get the following error:
> 
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Cannot locate BeanDefinitionParser for element
> [schemaLocation]
> 
> I have setup my endpoint as below:
> 
>     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
>         <jaxws:implementor>
>             <bean id="helloBean"
>                 class="my.proto.HelloWorldImpl">
>                 <property name="suffix" value="mySuffix" />
>             </bean>
>         </jaxws:implementor>
> 
>         <jaxws:schemaLocations>
> 
> <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
>         </jaxws:schemaLocations>
>     </jaxws:endpoint>
> 
> Any ideas what might be causing this problem?
> 
> Thanks,
> 
> Daniel.
> 
> On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> >
> > Dan,
> >
> > Sorry.   I didn't see this till now.
> >
> > I'll get a new snapshot deploying now.
> >
> > Dan
> >
> > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> >
> > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > Hi Daniel,
> > >
> > > Sorry for the delay with these changes. It turns out I need to fix
> > > something else inside CXF to make this work correctly yet. I added
> > > some basic support for it to though to today's SVN. Since I'm on a
> > > cellular connection, I can't publish a snapshot now, but I think
> > > another CXF dev probably will today. Then you'll be able to do
> > > something like:
> > >
> > > <jaxws:endpoint>
> > > <jaxws:schemaLocations>
> > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > </jaxws:schemaLocations>
> > > </jaxws:endpoint>
> > >
> > > The curent issue with the code is that CXF will parse the schemas with
> > > a library called XmlSchema and it doesn't preserve things like
> > > formatting or documentation. I'll be fixing this later tonight though
> > > (hopefully I'll be able to get it done tonight).
> > >
> > > Thanks for your patience and testing! I'll keep an on eye on the
> > > snapshots and let you know when one is published.
> > >
> > > - Dan
> > >
> > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > Hi Dan,
> > > >
> > > > Sounds great, I will keep an eye out for it.
> > > >
> > > > Thanks,
> > > >
> > > > Daniel.
> > > >
> > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > Hi Daniel,
> > > > > I think I might have overlooked configuration of this in the JAXB
> > > > > databinding. Its just a few lines of code for me to change though.
> > > > > I
> > > >
> > > > think
> > > >
> > > > > I
> > > > > can probably push out a snapshot this week with the change if you
> > > > > want
> > > >
> > > > to
> > > >
> > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > - Dan
> > > > >
> > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I am currently looking at migrating our existing XFire web
> > > > > > service
> > > > >
> > > > > across
> > > > >
> > > > > > to
> > > > > > CXF.  We have used schema-first development to develop this web
> > > >
> > > > service
> > > >
> > > > > > and
> > > > > > are hoping to do the same with CXF
> > > > > >
> > > > > > The problem that I am having is that I cannot find a way to
> > > > > > specify
> > > >
> > > > the
> > > >
> > > > > > location of the XSD files when configuring the app using spring.
> > > > > >  I noticed
> > > > > > that the ServiceInfo class has a method called addSchema but
> > > > > > this does
> > > > >
> > > > > not
> > > > >
> > > > > > appear to be called in the code in a way that would allow me to
> > > >
> > > > specify
> > > >
> > > > > > the
> > > > > > schema.
> > > > > >
> > > > > > Is schema first-development supported in CXF?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Daniel.
> > > > >
> > > > > --
> > > > > Dan Diephouse
> > > > > Envoi Solutions
> > > > > http://envoisolutions.com | http://netzooid.com/blog
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog
> >

Re: Schema-First Development with CXF

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 27 August 2007, Eric Miles wrote:
> Dan,
>
> Thanks for the follow up.  Any idea when 2.0.2 will be released?

I just started a discussion about it on cxf-dev this afternoon.  I'm kind 
of hoping for next week, but I'm not 100% sure what is left outstanding 
for it.    I'll try and go through the open JIRA issues in the next 
couple days and see what else is a "must get in" type thing.

In anycase, if you have other issues, make sure they're logged in 
Jira.  :-)

Dan

>
> Thanks!
> Eric
>
> On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote:
> > Hi Daniel (and Eric who is hopefully still listening),
> >
> > I've just fixed this problem in SVN. The problem was I added
> > capabilities to do this from the API, but forgot to actually write a
> > test for the XML config - which wasn't fully working :-(. Dan Kulp
> > will be publishing some new snapshots tonight I think, at which
> > point you can test out the fixed functionality.
> >
> > I did think of a workaround though. You could do something like
> > this:
> >
> > <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
> >   <property name="serviceBean">
> >     <bean class="my.proto.HelloWorldImpl">
> >   </property>
> >   <property name="address" value="/helloWorld"
> >   <property name="schemaLocations>
> >     <list>
> >      <value>foo.xsd</value>
> >     </list>
> >   </property>
> > </bean>
> >
> > Sorry for the troubles - it'll be fully fixed in 2.0.2.
> >
> > - Dan
> >
> > On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
> > > Hi Dans,
> > >
> > > Sorry for the delay but I have only just got around to testing
> > > this.  I have
> > > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot
> > > version as well as the 2.1-snapshot version.  Unfortunately,
> > > whenever I try add the xml
> > > below, I get the following error:
> > >
> > > org.springframework.beans.factory.parsing.BeanDefinitionParsingExc
> > >eption: Configuration problem: Cannot locate BeanDefinitionParser
> > > for element [schemaLocation]
> > >
> > > I have setup my endpoint as below:
> > >
> > >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> > >         <jaxws:implementor>
> > >             <bean id="helloBean"
> > >                 class="my.proto.HelloWorldImpl">
> > >                 <property name="suffix" value="mySuffix" />
> > >             </bean>
> > >         </jaxws:implementor>
> > >
> > >         <jaxws:schemaLocations>
> > >
> > >
> > > <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxw
> > >s:schemaLocation> </jaxws:schemaLocations>
> > >     </jaxws:endpoint>
> > >
> > > Any ideas what might be causing this problem?
> > >
> > > Thanks,
> > >
> > > Daniel.
> > >
> > > On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> > > > Dan,
> > > >
> > > > Sorry.   I didn't see this till now.
> > > >
> > > > I'll get a new snapshot deploying now.
> > > >
> > > > Dan
> > > >
> > > > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I?
> > > > :-)
> > > >
> > > > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > > > Hi Daniel,
> > > > >
> > > > > Sorry for the delay with these changes. It turns out I need to
> > > > > fix something else inside CXF to make this work correctly yet.
> > > > > I added some basic support for it to though to today's SVN.
> > > > > Since I'm on a cellular connection, I can't publish a snapshot
> > > > > now, but I think another CXF dev probably will today. Then
> > > > > you'll be able to do something like:
> > > > >
> > > > > <jaxws:endpoint>
> > > > > <jaxws:schemaLocations>
> > > > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > > > </jaxws:schemaLocations>
> > > > > </jaxws:endpoint>
> > > > >
> > > > > The curent issue with the code is that CXF will parse the
> > > > > schemas with a library called XmlSchema and it doesn't
> > > > > preserve things like formatting or documentation. I'll be
> > > > > fixing this later tonight though (hopefully I'll be able to
> > > > > get it done tonight).
> > > > >
> > > > > Thanks for your patience and testing! I'll keep an on eye on
> > > > > the snapshots and let you know when one is published.
> > > > >
> > > > > - Dan
> > > > >
> > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > Hi Dan,
> > > > > >
> > > > > > Sounds great, I will keep an eye out for it.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Daniel.
> > > > > >
> > > > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > > > Hi Daniel,
> > > > > > > I think I might have overlooked configuration of this in
> > > > > > > the JAXB databinding. Its just a few lines of code for me
> > > > > > > to change though. I
> > > > > >
> > > > > > think
> > > > > >
> > > > > > > I
> > > > > > > can probably push out a snapshot this week with the change
> > > > > > > if you want
> > > > > >
> > > > > > to
> > > > > >
> > > > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > > > - Dan
> > > > > > >
> > > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I am currently looking at migrating our existing XFire
> > > > > > > > web service
> > > > > > >
> > > > > > > across
> > > > > > >
> > > > > > > > to
> > > > > > > > CXF.  We have used schema-first development to develop
> > > > > > > > this web
> > > > > >
> > > > > > service
> > > > > >
> > > > > > > > and
> > > > > > > > are hoping to do the same with CXF
> > > > > > > >
> > > > > > > > The problem that I am having is that I cannot find a way
> > > > > > > > to specify
> > > > > >
> > > > > > the
> > > > > >
> > > > > > > > location of the XSD files when configuring the app using
> > > > > > > > spring. I noticed
> > > > > > > > that the ServiceInfo class has a method called addSchema
> > > > > > > > but this does
> > > > > > >
> > > > > > > not
> > > > > > >
> > > > > > > > appear to be called in the code in a way that would
> > > > > > > > allow me to
> > > > > >
> > > > > > specify
> > > > > >
> > > > > > > > the
> > > > > > > > schema.
> > > > > > > >
> > > > > > > > Is schema first-development supported in CXF?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > >
> > > > > > > > Daniel.
> > > > > > >
> > > > > > > --
> > > > > > > Dan Diephouse
> > > > > > > Envoi Solutions
> > > > > > > http://envoisolutions.com | http://netzooid.com/blog
> > > >
> > > > --
> > > > J. Daniel Kulp
> > > > Principal Engineer
> > > > IONA
> > > > P: 781-902-8727    C: 508-380-7194
> > > > daniel.kulp@iona.com
> > > > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Schema-First Development with CXF

Posted by Eric Miles <er...@kronos.com>.
Dan,

I tried this and for some reason my service isn't being registered.
Here are snippets of what I have:

Spring config:
	<bean id="tawsMobileService"
		class="org.apache.cxf.jaxws.JaxWsServerFactoryBean">
		<property name="serviceBean" ref="tawsMobileServiceImpl" />
		<property name="address" value="/MobileService" />
		<property name="schemaLocations">
			<list>
				<value>com/kronos/taws/services/mobile/MobileService.xsd</value>
			</list>
		</property>
		<property name="inInterceptors">
			<list>
				<ref bean="wss4jInterceptor"/>
				<ref bean="saajInterceptor" />
				<ref bean="wsAuthenticationInterceptor"/>
			</list>
		</property>
	</bean>
...

Interface def:
@WebService(targetNamespace =
"http://taws.kronos.com/services/MobileService")
public interface MobileService {
...

Impl def:
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE, style =
SOAPBinding.Style.DOCUMENT)
@WebService(serviceName = "MobileService", endpointInterface =
"com.kronos.taws.services.mobile.MobileService",
portName="MobileServicePort", name="MobileService")
public class MobileServiceImpl implements MobileService,
InitializingBean {
...

web.xml:
	<servlet>
		<servlet-name>taws-services</servlet-name>
		<servlet-class>
			org.apache.cxf.transport.servlet.CXFServlet
		</servlet-class>
		<load-on-startup>2</load-on-startup>
	</servlet>
...

When I go to the services servlet, I do not have a listing for the
registered service.  I also attempted to make a call (on faith) and I
receive a response back from the framework that no such service exists.
Suggestions?

Thanks!
Eric

On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote:

> Hi Daniel (and Eric who is hopefully still listening),
> 
> I've just fixed this problem in SVN. The problem was I added capabilities to
> do this from the API, but forgot to actually write a test for the XML config
> - which wasn't fully working :-(. Dan Kulp will be publishing some new
> snapshots tonight I think, at which point you can test out the fixed
> functionality.
> 
> I did think of a workaround though. You could do something like this:
> 
> <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
>   <property name="serviceBean">
>     <bean class="my.proto.HelloWorldImpl">
>   </property>
>   <property name="address" value="/helloWorld"
>   <property name="schemaLocations>
>     <list>
>      <value>foo.xsd</value>
>     </list>
>   </property>
> </bean>
> 
> Sorry for the troubles - it'll be fully fixed in 2.0.2.
> 
> - Dan
> 
> On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
> >
> > Hi Dans,
> >
> > Sorry for the delay but I have only just got around to testing this.  I
> > have
> > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot version as
> > well as the 2.1-snapshot version.  Unfortunately, whenever I try add the
> > xml
> > below, I get the following error:
> >
> > org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> > Configuration problem: Cannot locate BeanDefinitionParser for element
> > [schemaLocation]
> >
> > I have setup my endpoint as below:
> >
> >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> >         <jaxws:implementor>
> >             <bean id="helloBean"
> >                 class="my.proto.HelloWorldImpl">
> >                 <property name="suffix" value="mySuffix" />
> >             </bean>
> >         </jaxws:implementor>
> >
> >         <jaxws:schemaLocations>
> >
> >
> > <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
> >         </jaxws:schemaLocations>
> >     </jaxws:endpoint>
> >
> > Any ideas what might be causing this problem?
> >
> > Thanks,
> >
> > Daniel.
> >
> > On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> > >
> > > Dan,
> > >
> > > Sorry.   I didn't see this till now.
> > >
> > > I'll get a new snapshot deploying now.
> > >
> > > Dan
> > >
> > > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> > >
> > > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > > Hi Daniel,
> > > >
> > > > Sorry for the delay with these changes. It turns out I need to fix
> > > > something else inside CXF to make this work correctly yet. I added
> > > > some basic support for it to though to today's SVN. Since I'm on a
> > > > cellular connection, I can't publish a snapshot now, but I think
> > > > another CXF dev probably will today. Then you'll be able to do
> > > > something like:
> > > >
> > > > <jaxws:endpoint>
> > > > <jaxws:schemaLocations>
> > > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > > </jaxws:schemaLocations>
> > > > </jaxws:endpoint>
> > > >
> > > > The curent issue with the code is that CXF will parse the schemas with
> > > > a library called XmlSchema and it doesn't preserve things like
> > > > formatting or documentation. I'll be fixing this later tonight though
> > > > (hopefully I'll be able to get it done tonight).
> > > >
> > > > Thanks for your patience and testing! I'll keep an on eye on the
> > > > snapshots and let you know when one is published.
> > > >
> > > > - Dan
> > > >
> > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > Hi Dan,
> > > > >
> > > > > Sounds great, I will keep an eye out for it.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Daniel.
> > > > >
> > > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > > Hi Daniel,
> > > > > > I think I might have overlooked configuration of this in the JAXB
> > > > > > databinding. Its just a few lines of code for me to change though.
> > > > > > I
> > > > >
> > > > > think
> > > > >
> > > > > > I
> > > > > > can probably push out a snapshot this week with the change if you
> > > > > > want
> > > > >
> > > > > to
> > > > >
> > > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > > - Dan
> > > > > >
> > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > I am currently looking at migrating our existing XFire web
> > > > > > > service
> > > > > >
> > > > > > across
> > > > > >
> > > > > > > to
> > > > > > > CXF.  We have used schema-first development to develop this web
> > > > >
> > > > > service
> > > > >
> > > > > > > and
> > > > > > > are hoping to do the same with CXF
> > > > > > >
> > > > > > > The problem that I am having is that I cannot find a way to
> > > > > > > specify
> > > > >
> > > > > the
> > > > >
> > > > > > > location of the XSD files when configuring the app using spring.
> > > > > > >  I noticed
> > > > > > > that the ServiceInfo class has a method called addSchema but
> > > > > > > this does
> > > > > >
> > > > > > not
> > > > > >
> > > > > > > appear to be called in the code in a way that would allow me to
> > > > >
> > > > > specify
> > > > >
> > > > > > > the
> > > > > > > schema.
> > > > > > >
> > > > > > > Is schema first-development supported in CXF?
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > Daniel.
> > > > > >
> > > > > > --
> > > > > > Dan Diephouse
> > > > > > Envoi Solutions
> > > > > > http://envoisolutions.com | http://netzooid.com/blog
> > >
> > > --
> > > J. Daniel Kulp
> > > Principal Engineer
> > > IONA
> > > P: 781-902-8727    C: 508-380-7194
> > > daniel.kulp@iona.com
> > > http://www.dankulp.com/blog
> > >
> >
> 
> 
> 

Re: Schema-First Development with CXF

Posted by Eric Miles <er...@kronos.com>.
Dan,

Thanks for the follow up.  Any idea when 2.0.2 will be released?

Thanks!
Eric

On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote:

> Hi Daniel (and Eric who is hopefully still listening),
> 
> I've just fixed this problem in SVN. The problem was I added capabilities to
> do this from the API, but forgot to actually write a test for the XML config
> - which wasn't fully working :-(. Dan Kulp will be publishing some new
> snapshots tonight I think, at which point you can test out the fixed
> functionality.
> 
> I did think of a workaround though. You could do something like this:
> 
> <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
>   <property name="serviceBean">
>     <bean class="my.proto.HelloWorldImpl">
>   </property>
>   <property name="address" value="/helloWorld"
>   <property name="schemaLocations>
>     <list>
>      <value>foo.xsd</value>
>     </list>
>   </property>
> </bean>
> 
> Sorry for the troubles - it'll be fully fixed in 2.0.2.
> 
> - Dan
> 
> On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
> >
> > Hi Dans,
> >
> > Sorry for the delay but I have only just got around to testing this.  I
> > have
> > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot version as
> > well as the 2.1-snapshot version.  Unfortunately, whenever I try add the
> > xml
> > below, I get the following error:
> >
> > org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> > Configuration problem: Cannot locate BeanDefinitionParser for element
> > [schemaLocation]
> >
> > I have setup my endpoint as below:
> >
> >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> >         <jaxws:implementor>
> >             <bean id="helloBean"
> >                 class="my.proto.HelloWorldImpl">
> >                 <property name="suffix" value="mySuffix" />
> >             </bean>
> >         </jaxws:implementor>
> >
> >         <jaxws:schemaLocations>
> >
> >
> > <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
> >         </jaxws:schemaLocations>
> >     </jaxws:endpoint>
> >
> > Any ideas what might be causing this problem?
> >
> > Thanks,
> >
> > Daniel.
> >
> > On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> > >
> > > Dan,
> > >
> > > Sorry.   I didn't see this till now.
> > >
> > > I'll get a new snapshot deploying now.
> > >
> > > Dan
> > >
> > > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> > >
> > > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > > Hi Daniel,
> > > >
> > > > Sorry for the delay with these changes. It turns out I need to fix
> > > > something else inside CXF to make this work correctly yet. I added
> > > > some basic support for it to though to today's SVN. Since I'm on a
> > > > cellular connection, I can't publish a snapshot now, but I think
> > > > another CXF dev probably will today. Then you'll be able to do
> > > > something like:
> > > >
> > > > <jaxws:endpoint>
> > > > <jaxws:schemaLocations>
> > > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > > </jaxws:schemaLocations>
> > > > </jaxws:endpoint>
> > > >
> > > > The curent issue with the code is that CXF will parse the schemas with
> > > > a library called XmlSchema and it doesn't preserve things like
> > > > formatting or documentation. I'll be fixing this later tonight though
> > > > (hopefully I'll be able to get it done tonight).
> > > >
> > > > Thanks for your patience and testing! I'll keep an on eye on the
> > > > snapshots and let you know when one is published.
> > > >
> > > > - Dan
> > > >
> > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > Hi Dan,
> > > > >
> > > > > Sounds great, I will keep an eye out for it.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Daniel.
> > > > >
> > > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > > Hi Daniel,
> > > > > > I think I might have overlooked configuration of this in the JAXB
> > > > > > databinding. Its just a few lines of code for me to change though.
> > > > > > I
> > > > >
> > > > > think
> > > > >
> > > > > > I
> > > > > > can probably push out a snapshot this week with the change if you
> > > > > > want
> > > > >
> > > > > to
> > > > >
> > > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > > - Dan
> > > > > >
> > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > I am currently looking at migrating our existing XFire web
> > > > > > > service
> > > > > >
> > > > > > across
> > > > > >
> > > > > > > to
> > > > > > > CXF.  We have used schema-first development to develop this web
> > > > >
> > > > > service
> > > > >
> > > > > > > and
> > > > > > > are hoping to do the same with CXF
> > > > > > >
> > > > > > > The problem that I am having is that I cannot find a way to
> > > > > > > specify
> > > > >
> > > > > the
> > > > >
> > > > > > > location of the XSD files when configuring the app using spring.
> > > > > > >  I noticed
> > > > > > > that the ServiceInfo class has a method called addSchema but
> > > > > > > this does
> > > > > >
> > > > > > not
> > > > > >
> > > > > > > appear to be called in the code in a way that would allow me to
> > > > >
> > > > > specify
> > > > >
> > > > > > > the
> > > > > > > schema.
> > > > > > >
> > > > > > > Is schema first-development supported in CXF?
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > Daniel.
> > > > > >
> > > > > > --
> > > > > > Dan Diephouse
> > > > > > Envoi Solutions
> > > > > > http://envoisolutions.com | http://netzooid.com/blog
> > >
> > > --
> > > J. Daniel Kulp
> > > Principal Engineer
> > > IONA
> > > P: 781-902-8727    C: 508-380-7194
> > > daniel.kulp@iona.com
> > > http://www.dankulp.com/blog
> > >
> >
> 
> 
> 

Re: Schema-First Development with CXF

Posted by Eric Miles <er...@kronos.com>.
Dan,

I found out a few things, that my services WERE actually working as
expected, provided I made sure I did a few things.  When looking at the
WSDL, notice the wsdl:import statement.  You should see that it points
to servlet generated WSDL and should contain your imported schema.
Secondly (this is a problem I had as well), ensure that the
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE, style =
SOAPBinding.Style.DOCUMENT) is on the INTERFACE.  I'm not sure if this
is a bug or not, but it wasn't required by XFire however it is required
by CXF.  I had it on my Impl and the framework was wrapping all of my
requests, when it shouldn't have been.

Good luck,
Eric





On Wed, 2007-09-19 at 19:25 +1000, Daniel Pike wrote:
> Hi,
> 
> Just wondering if there was any further update on this?
> 
> Daniel.
> 
> On 9/5/07, Dan Diephouse <da...@mulesource.com> wrote:
> >
> >  Hi Eric,
> >
> > I'll do some more digging into this today - I lost track of the thread.
> > Provided you aren't too frustrated with me/us, I'll see if I can't dig out
> > the problem and get things working for you.
> >
> > - Dan
> >
> > Eric Miles wrote:
> >
> > Daniel,
> >
> > I re-asked my question again last week and haven't heard anything in
> > about 7 days on the subject.  I've taken that to signal it's either a
> > fairly big problem and it's taking them a while to look at it or it's
> > just not that important.  Unfortunately, it's such a severe issue
> > (doesn't work), it is keeping our group from moving from XFire to CXF.
> >
> > Eric
> >
> >
> > On Sat, 2007-09-01 at 19:35 +1000, Daniel Pike wrote:
> >
> >    Hi Dan & Eric,
> >
> > I have just finished testing this and have found that I am also experiencing
> > the same issue.  When I specify the schema location, the definition does not
> > actually appear in the WSDL.  Any ideas on what may be causing this?
> >
> > Regards,
> >
> > Daniel.
> >
> >
> >
> > On 8/30/07, Eric Miles <er...@kronos.com> <er...@kronos.com> wrote:
> >
> >  Any feedback on this question?
> >
> > On Tue, 2007-08-28 at 10:02 -0400, Eric Miles wrote:
> >
> >        Dan,
> >
> > On the heels of the trouble I'm having with the suggestion below, I
> > decided to give the 2.1 snapshot version a try with the fixed Spring
> > namespace support.  This actually does register my service and I can
> > view the WSDL.  However, the behavior is not as I expected.  In XFire
> > 1.2.6, when I gave my schema locations, the WSDL Generator took my
> > schemas and added them to the generated WSDL.  With CXF 2.1-SNAPSHOT,
> > this is not happening.  Is this the expected behavior?  Do I need more
> > configuration in my Spring context?
> >
> > Here is the configuration:
> >
> > <jaxws:endpoint id="tawsMobileService"
> > implementor="#tawsMobileServiceImpl" name="MobileService"
> > address="/MobileService">
> > <jaxws:inInterceptors>
> > <ref bean="wss4jInterceptor"/>
> > <ref bean="saajInterceptor" />
> > <ref bean="wsAuthenticationInterceptor"/>
> > </jaxws:inInterceptors>
> > <jaxws:schemaLocations>
> >
> >          <jaxws:schemaLocation>classpath:com/kronos/taws/services/mobile/MobileService.xsd</jaxws:schemaLocation>
> >
> >  </jaxws:schemaLocations>
> > </jaxws:endpoint>
> >
> > Attached are the 2 WSDLs.  One generated from XFire 1.2.6 and one from
> > CXF 2.1-SNAPSHOT.  Keep in mind, the only thing I have changed in the
> > interface and impl classes were the addition of the portType in the
> > CXF version (to get around the use of the classname from the proxy
> > class).
> >
> > Thanks,
> > Eric
> >
> > On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote:
> >
> >          Hi Daniel (and Eric who is hopefully still listening),
> >
> > I've just fixed this problem in SVN. The problem was I added
> >
> >  capabilities to
> >
> >  do this from the API, but forgot to actually write a test for the XML
> >
> >  config
> >
> >  - which wasn't fully working :-(. Dan Kulp will be publishing some new
> > snapshots tonight I think, at which point you can test out the fixed
> > functionality.
> >
> > I did think of a workaround though. You could do something like this:
> >
> > <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
> >   <property name="serviceBean">
> >     <bean class="my.proto.HelloWorldImpl">
> >   </property>
> >   <property name="address" value="/helloWorld"
> >   <property name="schemaLocations>
> >     <list>
> >      <value>foo.xsd</value>
> >     </list>
> >   </property>
> > </bean>
> >
> > Sorry for the troubles - it'll be fully fixed in 2.0.2.
> >
> > - Dan
> >
> > On 8/27/07, Daniel Pike <da...@gmail.com> <da...@gmail.com> wrote:
> >
> >  Hi Dans,
> >
> > Sorry for the delay but I have only just got around to testing
> >
> >   this.  I
> >
> >   have
> > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshotversion as
> > well as the 2.1-snapshot version.  Unfortunately, whenever I try add
> >
> >   the
> >
> >   xml
> > below, I get the following error:
> >
> >
> >               org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> >
> >   Configuration problem: Cannot locate BeanDefinitionParser for
> >
> >   element
> >
> >   [schemaLocation]
> >
> > I have setup my endpoint as below:
> >
> >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> >         <jaxws:implementor>
> >             <bean id="helloBean"
> >                 class="my.proto.HelloWorldImpl">
> >                 <property name="suffix" value="mySuffix" />
> >             </bean>
> >         </jaxws:implementor>
> >
> >         <jaxws:schemaLocations>
> >
> >
> >
> >               <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
> >
> >           </jaxws:schemaLocations>
> >     </jaxws:endpoint>
> >
> > Any ideas what might be causing this problem?
> >
> > Thanks,
> >
> > Daniel.
> >
> > On 7/11/07, Daniel Kulp <dk...@apache.org> <dk...@apache.org> wrote:
> >
> >  Dan,
> >
> > Sorry.   I didn't see this till now.
> >
> > I'll get a new snapshot deploying now.
> >
> > Dan
> >
> > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> >
> > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> >
> >  Hi Daniel,
> >
> > Sorry for the delay with these changes. It turns out I need to
> >
> >    fix
> >
> >    something else inside CXF to make this work correctly yet. I
> >
> >    added
> >
> >    some basic support for it to though to today's SVN. Since I'm on
> >
> >    a
> >
> >    cellular connection, I can't publish a snapshot now, but I think
> > another CXF dev probably will today. Then you'll be able to do
> > something like:
> >
> > <jaxws:endpoint>
> > <jaxws:schemaLocations>
> >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > </jaxws:schemaLocations>
> > </jaxws:endpoint>
> >
> > The curent issue with the code is that CXF will parse the
> >
> >    schemas with
> >
> >    a library called XmlSchema and it doesn't preserve things like
> > formatting or documentation. I'll be fixing this later tonight
> >
> >    though
> >
> >    (hopefully I'll be able to get it done tonight).
> >
> > Thanks for your patience and testing! I'll keep an on eye on the
> > snapshots and let you know when one is published.
> >
> > - Dan
> >
> > On 7/4/07, Daniel Pike <da...@gmail.com> <da...@gmail.com> wrote:
> >
> >  Hi Dan,
> >
> > Sounds great, I will keep an eye out for it.
> >
> > Thanks,
> >
> > Daniel.
> >
> > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> <da...@envoisolutions.com> wrote:
> >
> >  Hi Daniel,
> > I think I might have overlooked configuration of this in the
> >
> >     JAXB
> >
> >     databinding. Its just a few lines of code for me to change
> >
> >     though.
> >
> >     I
> >
> >  think
> >
> >                    I
> > can probably push out a snapshot this week with the change
> >
> >     if you
> >
> >     want
> >
> >  to
> >
> >                    try it. Then it'll get in our 2.0.1 release. Sound good?
> > - Dan
> >
> > On 7/4/07, Daniel Pike <da...@gmail.com> <da...@gmail.com> wrote:
> >
> >  Hi,
> >
> > I am currently looking at migrating our existing XFire web
> > service
> >
> >  across
> >
> >                      to
> > CXF.  We have used schema-first development to develop
> >
> >     this web
> >
> >    service
> >
> >                    and
> > are hoping to do the same with CXF
> >
> > The problem that I am having is that I cannot find a way
> >
> >     to
> >
> >     specify
> >
> >  the
> >
> >                    location of the XSD files when configuring the app using
> >
> >     spring.
> >
> >      I noticed
> > that the ServiceInfo class has a method called addSchema
> >
> >     but
> >
> >     this does
> >
> >  not
> >
> >                      appear to be called in the code in a way that would allow
> >
> >     me to
> >
> >    specify
> >
> >                    the
> > schema.
> >
> > Is schema first-development supported in CXF?
> >
> > Regards,
> >
> > Daniel.
> >
> >  --
> > Dan Diephouse
> > Envoi Solutions
> > http://envoisolutions.com | http://netzooid.com/blog
> >
> >   --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.comhttp://www.dankulp.com/blog
> >
> >
> >
> > --
> > Dan Diephouse
> > MuleSource
> > http://mulesource.com | http://netzooid.com/blog
> >
> >

Re: Schema-First Development with CXF

Posted by Daniel Pike <da...@gmail.com>.
Hi,

Just wondering if there was any further update on this?

Daniel.

On 9/5/07, Dan Diephouse <da...@mulesource.com> wrote:
>
>  Hi Eric,
>
> I'll do some more digging into this today - I lost track of the thread.
> Provided you aren't too frustrated with me/us, I'll see if I can't dig out
> the problem and get things working for you.
>
> - Dan
>
> Eric Miles wrote:
>
> Daniel,
>
> I re-asked my question again last week and haven't heard anything in
> about 7 days on the subject.  I've taken that to signal it's either a
> fairly big problem and it's taking them a while to look at it or it's
> just not that important.  Unfortunately, it's such a severe issue
> (doesn't work), it is keeping our group from moving from XFire to CXF.
>
> Eric
>
>
> On Sat, 2007-09-01 at 19:35 +1000, Daniel Pike wrote:
>
>    Hi Dan & Eric,
>
> I have just finished testing this and have found that I am also experiencing
> the same issue.  When I specify the schema location, the definition does not
> actually appear in the WSDL.  Any ideas on what may be causing this?
>
> Regards,
>
> Daniel.
>
>
>
> On 8/30/07, Eric Miles <er...@kronos.com> <er...@kronos.com> wrote:
>
>  Any feedback on this question?
>
> On Tue, 2007-08-28 at 10:02 -0400, Eric Miles wrote:
>
>        Dan,
>
> On the heels of the trouble I'm having with the suggestion below, I
> decided to give the 2.1 snapshot version a try with the fixed Spring
> namespace support.  This actually does register my service and I can
> view the WSDL.  However, the behavior is not as I expected.  In XFire
> 1.2.6, when I gave my schema locations, the WSDL Generator took my
> schemas and added them to the generated WSDL.  With CXF 2.1-SNAPSHOT,
> this is not happening.  Is this the expected behavior?  Do I need more
> configuration in my Spring context?
>
> Here is the configuration:
>
> <jaxws:endpoint id="tawsMobileService"
> implementor="#tawsMobileServiceImpl" name="MobileService"
> address="/MobileService">
> <jaxws:inInterceptors>
> <ref bean="wss4jInterceptor"/>
> <ref bean="saajInterceptor" />
> <ref bean="wsAuthenticationInterceptor"/>
> </jaxws:inInterceptors>
> <jaxws:schemaLocations>
>
>          <jaxws:schemaLocation>classpath:com/kronos/taws/services/mobile/MobileService.xsd</jaxws:schemaLocation>
>
>  </jaxws:schemaLocations>
> </jaxws:endpoint>
>
> Attached are the 2 WSDLs.  One generated from XFire 1.2.6 and one from
> CXF 2.1-SNAPSHOT.  Keep in mind, the only thing I have changed in the
> interface and impl classes were the addition of the portType in the
> CXF version (to get around the use of the classname from the proxy
> class).
>
> Thanks,
> Eric
>
> On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote:
>
>          Hi Daniel (and Eric who is hopefully still listening),
>
> I've just fixed this problem in SVN. The problem was I added
>
>  capabilities to
>
>  do this from the API, but forgot to actually write a test for the XML
>
>  config
>
>  - which wasn't fully working :-(. Dan Kulp will be publishing some new
> snapshots tonight I think, at which point you can test out the fixed
> functionality.
>
> I did think of a workaround though. You could do something like this:
>
> <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
>   <property name="serviceBean">
>     <bean class="my.proto.HelloWorldImpl">
>   </property>
>   <property name="address" value="/helloWorld"
>   <property name="schemaLocations>
>     <list>
>      <value>foo.xsd</value>
>     </list>
>   </property>
> </bean>
>
> Sorry for the troubles - it'll be fully fixed in 2.0.2.
>
> - Dan
>
> On 8/27/07, Daniel Pike <da...@gmail.com> <da...@gmail.com> wrote:
>
>  Hi Dans,
>
> Sorry for the delay but I have only just got around to testing
>
>   this.  I
>
>   have
> tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshotversion as
> well as the 2.1-snapshot version.  Unfortunately, whenever I try add
>
>   the
>
>   xml
> below, I get the following error:
>
>
>               org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>
>   Configuration problem: Cannot locate BeanDefinitionParser for
>
>   element
>
>   [schemaLocation]
>
> I have setup my endpoint as below:
>
>     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
>         <jaxws:implementor>
>             <bean id="helloBean"
>                 class="my.proto.HelloWorldImpl">
>                 <property name="suffix" value="mySuffix" />
>             </bean>
>         </jaxws:implementor>
>
>         <jaxws:schemaLocations>
>
>
>
>               <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
>
>           </jaxws:schemaLocations>
>     </jaxws:endpoint>
>
> Any ideas what might be causing this problem?
>
> Thanks,
>
> Daniel.
>
> On 7/11/07, Daniel Kulp <dk...@apache.org> <dk...@apache.org> wrote:
>
>  Dan,
>
> Sorry.   I didn't see this till now.
>
> I'll get a new snapshot deploying now.
>
> Dan
>
> (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
>
> On Monday 09 July 2007 09:42, Dan Diephouse wrote:
>
>  Hi Daniel,
>
> Sorry for the delay with these changes. It turns out I need to
>
>    fix
>
>    something else inside CXF to make this work correctly yet. I
>
>    added
>
>    some basic support for it to though to today's SVN. Since I'm on
>
>    a
>
>    cellular connection, I can't publish a snapshot now, but I think
> another CXF dev probably will today. Then you'll be able to do
> something like:
>
> <jaxws:endpoint>
> <jaxws:schemaLocations>
>   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> </jaxws:schemaLocations>
> </jaxws:endpoint>
>
> The curent issue with the code is that CXF will parse the
>
>    schemas with
>
>    a library called XmlSchema and it doesn't preserve things like
> formatting or documentation. I'll be fixing this later tonight
>
>    though
>
>    (hopefully I'll be able to get it done tonight).
>
> Thanks for your patience and testing! I'll keep an on eye on the
> snapshots and let you know when one is published.
>
> - Dan
>
> On 7/4/07, Daniel Pike <da...@gmail.com> <da...@gmail.com> wrote:
>
>  Hi Dan,
>
> Sounds great, I will keep an eye out for it.
>
> Thanks,
>
> Daniel.
>
> On 7/5/07, Dan Diephouse <da...@envoisolutions.com> <da...@envoisolutions.com> wrote:
>
>  Hi Daniel,
> I think I might have overlooked configuration of this in the
>
>     JAXB
>
>     databinding. Its just a few lines of code for me to change
>
>     though.
>
>     I
>
>  think
>
>                    I
> can probably push out a snapshot this week with the change
>
>     if you
>
>     want
>
>  to
>
>                    try it. Then it'll get in our 2.0.1 release. Sound good?
> - Dan
>
> On 7/4/07, Daniel Pike <da...@gmail.com> <da...@gmail.com> wrote:
>
>  Hi,
>
> I am currently looking at migrating our existing XFire web
> service
>
>  across
>
>                      to
> CXF.  We have used schema-first development to develop
>
>     this web
>
>    service
>
>                    and
> are hoping to do the same with CXF
>
> The problem that I am having is that I cannot find a way
>
>     to
>
>     specify
>
>  the
>
>                    location of the XSD files when configuring the app using
>
>     spring.
>
>      I noticed
> that the ServiceInfo class has a method called addSchema
>
>     but
>
>     this does
>
>  not
>
>                      appear to be called in the code in a way that would allow
>
>     me to
>
>    specify
>
>                    the
> schema.
>
> Is schema first-development supported in CXF?
>
> Regards,
>
> Daniel.
>
>  --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
>
>   --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.comhttp://www.dankulp.com/blog
>
>
>
> --
> Dan Diephouse
> MuleSource
> http://mulesource.com | http://netzooid.com/blog
>
>

Re: Schema-First Development with CXF

Posted by Eric Miles <er...@kronos.com>.
Daniel,

I re-asked my question again last week and haven't heard anything in
about 7 days on the subject.  I've taken that to signal it's either a
fairly big problem and it's taking them a while to look at it or it's
just not that important.  Unfortunately, it's such a severe issue
(doesn't work), it is keeping our group from moving from XFire to CXF.

Eric


On Sat, 2007-09-01 at 19:35 +1000, Daniel Pike wrote:

> Hi Dan & Eric,
> 
> I have just finished testing this and have found that I am also experiencing
> the same issue.  When I specify the schema location, the definition does not
> actually appear in the WSDL.  Any ideas on what may be causing this?
> 
> Regards,
> 
> Daniel.
> 
> 
> 
> On 8/30/07, Eric Miles <er...@kronos.com> wrote:
> >
> > Any feedback on this question?
> >
> > On Tue, 2007-08-28 at 10:02 -0400, Eric Miles wrote:
> >
> > > Dan,
> > >
> > > On the heels of the trouble I'm having with the suggestion below, I
> > > decided to give the 2.1 snapshot version a try with the fixed Spring
> > > namespace support.  This actually does register my service and I can
> > > view the WSDL.  However, the behavior is not as I expected.  In XFire
> > > 1.2.6, when I gave my schema locations, the WSDL Generator took my
> > > schemas and added them to the generated WSDL.  With CXF 2.1-SNAPSHOT,
> > > this is not happening.  Is this the expected behavior?  Do I need more
> > > configuration in my Spring context?
> > >
> > > Here is the configuration:
> > >
> > > <jaxws:endpoint id="tawsMobileService"
> > > implementor="#tawsMobileServiceImpl" name="MobileService"
> > > address="/MobileService">
> > > <jaxws:inInterceptors>
> > > <ref bean="wss4jInterceptor"/>
> > > <ref bean="saajInterceptor" />
> > > <ref bean="wsAuthenticationInterceptor"/>
> > > </jaxws:inInterceptors>
> > > <jaxws:schemaLocations>
> > >
> > <jaxws:schemaLocation>classpath:com/kronos/taws/services/mobile/MobileService.xsd</jaxws:schemaLocation>
> > > </jaxws:schemaLocations>
> > > </jaxws:endpoint>
> > >
> > > Attached are the 2 WSDLs.  One generated from XFire 1.2.6 and one from
> > > CXF 2.1-SNAPSHOT.  Keep in mind, the only thing I have changed in the
> > > interface and impl classes were the addition of the portType in the
> > > CXF version (to get around the use of the classname from the proxy
> > > class).
> > >
> > > Thanks,
> > > Eric
> > >
> > > On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote:
> > >
> > > > Hi Daniel (and Eric who is hopefully still listening),
> > > >
> > > > I've just fixed this problem in SVN. The problem was I added
> > capabilities to
> > > > do this from the API, but forgot to actually write a test for the XML
> > config
> > > > - which wasn't fully working :-(. Dan Kulp will be publishing some new
> > > > snapshots tonight I think, at which point you can test out the fixed
> > > > functionality.
> > > >
> > > > I did think of a workaround though. You could do something like this:
> > > >
> > > > <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
> > > >   <property name="serviceBean">
> > > >     <bean class="my.proto.HelloWorldImpl">
> > > >   </property>
> > > >   <property name="address" value="/helloWorld"
> > > >   <property name="schemaLocations>
> > > >     <list>
> > > >      <value>foo.xsd</value>
> > > >     </list>
> > > >   </property>
> > > > </bean>
> > > >
> > > > Sorry for the troubles - it'll be fully fixed in 2.0.2.
> > > >
> > > > - Dan
> > > >
> > > > On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
> > > > >
> > > > > Hi Dans,
> > > > >
> > > > > Sorry for the delay but I have only just got around to testing
> > this.  I
> > > > > have
> > > > > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshotversion as
> > > > > well as the 2.1-snapshot version.  Unfortunately, whenever I try add
> > the
> > > > > xml
> > > > > below, I get the following error:
> > > > >
> > > > >
> > org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> > > > > Configuration problem: Cannot locate BeanDefinitionParser for
> > element
> > > > > [schemaLocation]
> > > > >
> > > > > I have setup my endpoint as below:
> > > > >
> > > > >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> > > > >         <jaxws:implementor>
> > > > >             <bean id="helloBean"
> > > > >                 class="my.proto.HelloWorldImpl">
> > > > >                 <property name="suffix" value="mySuffix" />
> > > > >             </bean>
> > > > >         </jaxws:implementor>
> > > > >
> > > > >         <jaxws:schemaLocations>
> > > > >
> > > > >
> > > > >
> > <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
> > > > >         </jaxws:schemaLocations>
> > > > >     </jaxws:endpoint>
> > > > >
> > > > > Any ideas what might be causing this problem?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Daniel.
> > > > >
> > > > > On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> > > > > >
> > > > > > Dan,
> > > > > >
> > > > > > Sorry.   I didn't see this till now.
> > > > > >
> > > > > > I'll get a new snapshot deploying now.
> > > > > >
> > > > > > Dan
> > > > > >
> > > > > > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> > > > > >
> > > > > > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > > > > > Hi Daniel,
> > > > > > >
> > > > > > > Sorry for the delay with these changes. It turns out I need to
> > fix
> > > > > > > something else inside CXF to make this work correctly yet. I
> > added
> > > > > > > some basic support for it to though to today's SVN. Since I'm on
> > a
> > > > > > > cellular connection, I can't publish a snapshot now, but I think
> > > > > > > another CXF dev probably will today. Then you'll be able to do
> > > > > > > something like:
> > > > > > >
> > > > > > > <jaxws:endpoint>
> > > > > > > <jaxws:schemaLocations>
> > > > > > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > > > > > </jaxws:schemaLocations>
> > > > > > > </jaxws:endpoint>
> > > > > > >
> > > > > > > The curent issue with the code is that CXF will parse the
> > schemas with
> > > > > > > a library called XmlSchema and it doesn't preserve things like
> > > > > > > formatting or documentation. I'll be fixing this later tonight
> > though
> > > > > > > (hopefully I'll be able to get it done tonight).
> > > > > > >
> > > > > > > Thanks for your patience and testing! I'll keep an on eye on the
> > > > > > > snapshots and let you know when one is published.
> > > > > > >
> > > > > > > - Dan
> > > > > > >
> > > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > > Hi Dan,
> > > > > > > >
> > > > > > > > Sounds great, I will keep an eye out for it.
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > >
> > > > > > > > Daniel.
> > > > > > > >
> > > > > > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > > > > > Hi Daniel,
> > > > > > > > > I think I might have overlooked configuration of this in the
> > JAXB
> > > > > > > > > databinding. Its just a few lines of code for me to change
> > though.
> > > > > > > > > I
> > > > > > > >
> > > > > > > > think
> > > > > > > >
> > > > > > > > > I
> > > > > > > > > can probably push out a snapshot this week with the change
> > if you
> > > > > > > > > want
> > > > > > > >
> > > > > > > > to
> > > > > > > >
> > > > > > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > > > > > - Dan
> > > > > > > > >
> > > > > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > I am currently looking at migrating our existing XFire web
> > > > > > > > > > service
> > > > > > > > >
> > > > > > > > > across
> > > > > > > > >
> > > > > > > > > > to
> > > > > > > > > > CXF.  We have used schema-first development to develop
> > this web
> > > > > > > >
> > > > > > > > service
> > > > > > > >
> > > > > > > > > > and
> > > > > > > > > > are hoping to do the same with CXF
> > > > > > > > > >
> > > > > > > > > > The problem that I am having is that I cannot find a way
> > to
> > > > > > > > > > specify
> > > > > > > >
> > > > > > > > the
> > > > > > > >
> > > > > > > > > > location of the XSD files when configuring the app using
> > spring.
> > > > > > > > > >  I noticed
> > > > > > > > > > that the ServiceInfo class has a method called addSchema
> > but
> > > > > > > > > > this does
> > > > > > > > >
> > > > > > > > > not
> > > > > > > > >
> > > > > > > > > > appear to be called in the code in a way that would allow
> > me to
> > > > > > > >
> > > > > > > > specify
> > > > > > > >
> > > > > > > > > > the
> > > > > > > > > > schema.
> > > > > > > > > >
> > > > > > > > > > Is schema first-development supported in CXF?
> > > > > > > > > >
> > > > > > > > > > Regards,
> > > > > > > > > >
> > > > > > > > > > Daniel.
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Dan Diephouse
> > > > > > > > > Envoi Solutions
> > > > > > > > > http://envoisolutions.com | http://netzooid.com/blog
> > > > > >
> > > > > > --
> > > > > > J. Daniel Kulp
> > > > > > Principal Engineer
> > > > > > IONA
> > > > > > P: 781-902-8727    C: 508-380-7194
> > > > > > daniel.kulp@iona.com
> > > > > > http://www.dankulp.com/blog
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> >

Re: Schema-First Development with CXF

Posted by Daniel Pike <da...@gmail.com>.
Hi Dan & Eric,

I have just finished testing this and have found that I am also experiencing
the same issue.  When I specify the schema location, the definition does not
actually appear in the WSDL.  Any ideas on what may be causing this?

Regards,

Daniel.



On 8/30/07, Eric Miles <er...@kronos.com> wrote:
>
> Any feedback on this question?
>
> On Tue, 2007-08-28 at 10:02 -0400, Eric Miles wrote:
>
> > Dan,
> >
> > On the heels of the trouble I'm having with the suggestion below, I
> > decided to give the 2.1 snapshot version a try with the fixed Spring
> > namespace support.  This actually does register my service and I can
> > view the WSDL.  However, the behavior is not as I expected.  In XFire
> > 1.2.6, when I gave my schema locations, the WSDL Generator took my
> > schemas and added them to the generated WSDL.  With CXF 2.1-SNAPSHOT,
> > this is not happening.  Is this the expected behavior?  Do I need more
> > configuration in my Spring context?
> >
> > Here is the configuration:
> >
> > <jaxws:endpoint id="tawsMobileService"
> > implementor="#tawsMobileServiceImpl" name="MobileService"
> > address="/MobileService">
> > <jaxws:inInterceptors>
> > <ref bean="wss4jInterceptor"/>
> > <ref bean="saajInterceptor" />
> > <ref bean="wsAuthenticationInterceptor"/>
> > </jaxws:inInterceptors>
> > <jaxws:schemaLocations>
> >
> <jaxws:schemaLocation>classpath:com/kronos/taws/services/mobile/MobileService.xsd</jaxws:schemaLocation>
> > </jaxws:schemaLocations>
> > </jaxws:endpoint>
> >
> > Attached are the 2 WSDLs.  One generated from XFire 1.2.6 and one from
> > CXF 2.1-SNAPSHOT.  Keep in mind, the only thing I have changed in the
> > interface and impl classes were the addition of the portType in the
> > CXF version (to get around the use of the classname from the proxy
> > class).
> >
> > Thanks,
> > Eric
> >
> > On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote:
> >
> > > Hi Daniel (and Eric who is hopefully still listening),
> > >
> > > I've just fixed this problem in SVN. The problem was I added
> capabilities to
> > > do this from the API, but forgot to actually write a test for the XML
> config
> > > - which wasn't fully working :-(. Dan Kulp will be publishing some new
> > > snapshots tonight I think, at which point you can test out the fixed
> > > functionality.
> > >
> > > I did think of a workaround though. You could do something like this:
> > >
> > > <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
> > >   <property name="serviceBean">
> > >     <bean class="my.proto.HelloWorldImpl">
> > >   </property>
> > >   <property name="address" value="/helloWorld"
> > >   <property name="schemaLocations>
> > >     <list>
> > >      <value>foo.xsd</value>
> > >     </list>
> > >   </property>
> > > </bean>
> > >
> > > Sorry for the troubles - it'll be fully fixed in 2.0.2.
> > >
> > > - Dan
> > >
> > > On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
> > > >
> > > > Hi Dans,
> > > >
> > > > Sorry for the delay but I have only just got around to testing
> this.  I
> > > > have
> > > > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshotversion as
> > > > well as the 2.1-snapshot version.  Unfortunately, whenever I try add
> the
> > > > xml
> > > > below, I get the following error:
> > > >
> > > >
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> > > > Configuration problem: Cannot locate BeanDefinitionParser for
> element
> > > > [schemaLocation]
> > > >
> > > > I have setup my endpoint as below:
> > > >
> > > >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> > > >         <jaxws:implementor>
> > > >             <bean id="helloBean"
> > > >                 class="my.proto.HelloWorldImpl">
> > > >                 <property name="suffix" value="mySuffix" />
> > > >             </bean>
> > > >         </jaxws:implementor>
> > > >
> > > >         <jaxws:schemaLocations>
> > > >
> > > >
> > > >
> <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
> > > >         </jaxws:schemaLocations>
> > > >     </jaxws:endpoint>
> > > >
> > > > Any ideas what might be causing this problem?
> > > >
> > > > Thanks,
> > > >
> > > > Daniel.
> > > >
> > > > On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> > > > >
> > > > > Dan,
> > > > >
> > > > > Sorry.   I didn't see this till now.
> > > > >
> > > > > I'll get a new snapshot deploying now.
> > > > >
> > > > > Dan
> > > > >
> > > > > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> > > > >
> > > > > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > > > > Hi Daniel,
> > > > > >
> > > > > > Sorry for the delay with these changes. It turns out I need to
> fix
> > > > > > something else inside CXF to make this work correctly yet. I
> added
> > > > > > some basic support for it to though to today's SVN. Since I'm on
> a
> > > > > > cellular connection, I can't publish a snapshot now, but I think
> > > > > > another CXF dev probably will today. Then you'll be able to do
> > > > > > something like:
> > > > > >
> > > > > > <jaxws:endpoint>
> > > > > > <jaxws:schemaLocations>
> > > > > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > > > > </jaxws:schemaLocations>
> > > > > > </jaxws:endpoint>
> > > > > >
> > > > > > The curent issue with the code is that CXF will parse the
> schemas with
> > > > > > a library called XmlSchema and it doesn't preserve things like
> > > > > > formatting or documentation. I'll be fixing this later tonight
> though
> > > > > > (hopefully I'll be able to get it done tonight).
> > > > > >
> > > > > > Thanks for your patience and testing! I'll keep an on eye on the
> > > > > > snapshots and let you know when one is published.
> > > > > >
> > > > > > - Dan
> > > > > >
> > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > Hi Dan,
> > > > > > >
> > > > > > > Sounds great, I will keep an eye out for it.
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Daniel.
> > > > > > >
> > > > > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > > > > Hi Daniel,
> > > > > > > > I think I might have overlooked configuration of this in the
> JAXB
> > > > > > > > databinding. Its just a few lines of code for me to change
> though.
> > > > > > > > I
> > > > > > >
> > > > > > > think
> > > > > > >
> > > > > > > > I
> > > > > > > > can probably push out a snapshot this week with the change
> if you
> > > > > > > > want
> > > > > > >
> > > > > > > to
> > > > > > >
> > > > > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > > > > - Dan
> > > > > > > >
> > > > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I am currently looking at migrating our existing XFire web
> > > > > > > > > service
> > > > > > > >
> > > > > > > > across
> > > > > > > >
> > > > > > > > > to
> > > > > > > > > CXF.  We have used schema-first development to develop
> this web
> > > > > > >
> > > > > > > service
> > > > > > >
> > > > > > > > > and
> > > > > > > > > are hoping to do the same with CXF
> > > > > > > > >
> > > > > > > > > The problem that I am having is that I cannot find a way
> to
> > > > > > > > > specify
> > > > > > >
> > > > > > > the
> > > > > > >
> > > > > > > > > location of the XSD files when configuring the app using
> spring.
> > > > > > > > >  I noticed
> > > > > > > > > that the ServiceInfo class has a method called addSchema
> but
> > > > > > > > > this does
> > > > > > > >
> > > > > > > > not
> > > > > > > >
> > > > > > > > > appear to be called in the code in a way that would allow
> me to
> > > > > > >
> > > > > > > specify
> > > > > > >
> > > > > > > > > the
> > > > > > > > > schema.
> > > > > > > > >
> > > > > > > > > Is schema first-development supported in CXF?
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > >
> > > > > > > > > Daniel.
> > > > > > > >
> > > > > > > > --
> > > > > > > > Dan Diephouse
> > > > > > > > Envoi Solutions
> > > > > > > > http://envoisolutions.com | http://netzooid.com/blog
> > > > >
> > > > > --
> > > > > J. Daniel Kulp
> > > > > Principal Engineer
> > > > > IONA
> > > > > P: 781-902-8727    C: 508-380-7194
> > > > > daniel.kulp@iona.com
> > > > > http://www.dankulp.com/blog
> > > > >
> > > >
> > >
> > >
> > >
>

Re: Schema-First Development with CXF

Posted by Eric Miles <er...@kronos.com>.
Any feedback on this question?

On Tue, 2007-08-28 at 10:02 -0400, Eric Miles wrote:

> Dan,
> 
> On the heels of the trouble I'm having with the suggestion below, I
> decided to give the 2.1 snapshot version a try with the fixed Spring
> namespace support.  This actually does register my service and I can
> view the WSDL.  However, the behavior is not as I expected.  In XFire
> 1.2.6, when I gave my schema locations, the WSDL Generator took my
> schemas and added them to the generated WSDL.  With CXF 2.1-SNAPSHOT,
> this is not happening.  Is this the expected behavior?  Do I need more
> configuration in my Spring context?
> 
> Here is the configuration:
> 
> <jaxws:endpoint id="tawsMobileService"
> implementor="#tawsMobileServiceImpl" name="MobileService" 
> address="/MobileService">
> <jaxws:inInterceptors>
> <ref bean="wss4jInterceptor"/>
> <ref bean="saajInterceptor" />
> <ref bean="wsAuthenticationInterceptor"/>
> </jaxws:inInterceptors>
> <jaxws:schemaLocations>
> <jaxws:schemaLocation>classpath:com/kronos/taws/services/mobile/MobileService.xsd</jaxws:schemaLocation>
> </jaxws:schemaLocations>
> </jaxws:endpoint>
> 
> Attached are the 2 WSDLs.  One generated from XFire 1.2.6 and one from
> CXF 2.1-SNAPSHOT.  Keep in mind, the only thing I have changed in the
> interface and impl classes were the addition of the portType in the
> CXF version (to get around the use of the classname from the proxy
> class).
> 
> Thanks,
> Eric
> 
> On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote: 
> 
> > Hi Daniel (and Eric who is hopefully still listening),
> > 
> > I've just fixed this problem in SVN. The problem was I added capabilities to
> > do this from the API, but forgot to actually write a test for the XML config
> > - which wasn't fully working :-(. Dan Kulp will be publishing some new
> > snapshots tonight I think, at which point you can test out the fixed
> > functionality.
> > 
> > I did think of a workaround though. You could do something like this:
> > 
> > <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
> >   <property name="serviceBean">
> >     <bean class="my.proto.HelloWorldImpl">
> >   </property>
> >   <property name="address" value="/helloWorld"
> >   <property name="schemaLocations>
> >     <list>
> >      <value>foo.xsd</value>
> >     </list>
> >   </property>
> > </bean>
> > 
> > Sorry for the troubles - it'll be fully fixed in 2.0.2.
> > 
> > - Dan
> > 
> > On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
> > >
> > > Hi Dans,
> > >
> > > Sorry for the delay but I have only just got around to testing this.  I
> > > have
> > > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot version as
> > > well as the 2.1-snapshot version.  Unfortunately, whenever I try add the
> > > xml
> > > below, I get the following error:
> > >
> > > org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> > > Configuration problem: Cannot locate BeanDefinitionParser for element
> > > [schemaLocation]
> > >
> > > I have setup my endpoint as below:
> > >
> > >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> > >         <jaxws:implementor>
> > >             <bean id="helloBean"
> > >                 class="my.proto.HelloWorldImpl">
> > >                 <property name="suffix" value="mySuffix" />
> > >             </bean>
> > >         </jaxws:implementor>
> > >
> > >         <jaxws:schemaLocations>
> > >
> > >
> > > <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
> > >         </jaxws:schemaLocations>
> > >     </jaxws:endpoint>
> > >
> > > Any ideas what might be causing this problem?
> > >
> > > Thanks,
> > >
> > > Daniel.
> > >
> > > On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> > > >
> > > > Dan,
> > > >
> > > > Sorry.   I didn't see this till now.
> > > >
> > > > I'll get a new snapshot deploying now.
> > > >
> > > > Dan
> > > >
> > > > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> > > >
> > > > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > > > Hi Daniel,
> > > > >
> > > > > Sorry for the delay with these changes. It turns out I need to fix
> > > > > something else inside CXF to make this work correctly yet. I added
> > > > > some basic support for it to though to today's SVN. Since I'm on a
> > > > > cellular connection, I can't publish a snapshot now, but I think
> > > > > another CXF dev probably will today. Then you'll be able to do
> > > > > something like:
> > > > >
> > > > > <jaxws:endpoint>
> > > > > <jaxws:schemaLocations>
> > > > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > > > </jaxws:schemaLocations>
> > > > > </jaxws:endpoint>
> > > > >
> > > > > The curent issue with the code is that CXF will parse the schemas with
> > > > > a library called XmlSchema and it doesn't preserve things like
> > > > > formatting or documentation. I'll be fixing this later tonight though
> > > > > (hopefully I'll be able to get it done tonight).
> > > > >
> > > > > Thanks for your patience and testing! I'll keep an on eye on the
> > > > > snapshots and let you know when one is published.
> > > > >
> > > > > - Dan
> > > > >
> > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > Hi Dan,
> > > > > >
> > > > > > Sounds great, I will keep an eye out for it.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Daniel.
> > > > > >
> > > > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > > > Hi Daniel,
> > > > > > > I think I might have overlooked configuration of this in the JAXB
> > > > > > > databinding. Its just a few lines of code for me to change though.
> > > > > > > I
> > > > > >
> > > > > > think
> > > > > >
> > > > > > > I
> > > > > > > can probably push out a snapshot this week with the change if you
> > > > > > > want
> > > > > >
> > > > > > to
> > > > > >
> > > > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > > > - Dan
> > > > > > >
> > > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I am currently looking at migrating our existing XFire web
> > > > > > > > service
> > > > > > >
> > > > > > > across
> > > > > > >
> > > > > > > > to
> > > > > > > > CXF.  We have used schema-first development to develop this web
> > > > > >
> > > > > > service
> > > > > >
> > > > > > > > and
> > > > > > > > are hoping to do the same with CXF
> > > > > > > >
> > > > > > > > The problem that I am having is that I cannot find a way to
> > > > > > > > specify
> > > > > >
> > > > > > the
> > > > > >
> > > > > > > > location of the XSD files when configuring the app using spring.
> > > > > > > >  I noticed
> > > > > > > > that the ServiceInfo class has a method called addSchema but
> > > > > > > > this does
> > > > > > >
> > > > > > > not
> > > > > > >
> > > > > > > > appear to be called in the code in a way that would allow me to
> > > > > >
> > > > > > specify
> > > > > >
> > > > > > > > the
> > > > > > > > schema.
> > > > > > > >
> > > > > > > > Is schema first-development supported in CXF?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > >
> > > > > > > > Daniel.
> > > > > > >
> > > > > > > --
> > > > > > > Dan Diephouse
> > > > > > > Envoi Solutions
> > > > > > > http://envoisolutions.com | http://netzooid.com/blog
> > > >
> > > > --
> > > > J. Daniel Kulp
> > > > Principal Engineer
> > > > IONA
> > > > P: 781-902-8727    C: 508-380-7194
> > > > daniel.kulp@iona.com
> > > > http://www.dankulp.com/blog
> > > >
> > >
> > 
> > 
> > 

Re: Schema-First Development with CXF

Posted by Eric Miles <er...@kronos.com>.
Dan,

On the heels of the trouble I'm having with the suggestion below, I
decided to give the 2.1 snapshot version a try with the fixed Spring
namespace support.  This actually does register my service and I can
view the WSDL.  However, the behavior is not as I expected.  In XFire
1.2.6, when I gave my schema locations, the WSDL Generator took my
schemas and added them to the generated WSDL.  With CXF 2.1-SNAPSHOT,
this is not happening.  Is this the expected behavior?  Do I need more
configuration in my Spring context?

Here is the configuration:

	<jaxws:endpoint id="tawsMobileService"
implementor="#tawsMobileServiceImpl" name="MobileService" 
		address="/MobileService">
		<jaxws:inInterceptors>
			<ref bean="wss4jInterceptor"/>
			<ref bean="saajInterceptor" />
			<ref bean="wsAuthenticationInterceptor"/>
		</jaxws:inInterceptors>
		<jaxws:schemaLocations>

<jaxws:schemaLocation>classpath:com/kronos/taws/services/mobile/MobileService.xsd</jaxws:schemaLocation>
		</jaxws:schemaLocations>
	</jaxws:endpoint>

Attached are the 2 WSDLs.  One generated from XFire 1.2.6 and one from
CXF 2.1-SNAPSHOT.  Keep in mind, the only thing I have changed in the
interface and impl classes were the addition of the portType in the CXF
version (to get around the use of the classname from the proxy class).

Thanks,
Eric

On Mon, 2007-08-27 at 18:22 -0400, Dan Diephouse wrote:

> Hi Daniel (and Eric who is hopefully still listening),
> 
> I've just fixed this problem in SVN. The problem was I added capabilities to
> do this from the API, but forgot to actually write a test for the XML config
> - which wasn't fully working :-(. Dan Kulp will be publishing some new
> snapshots tonight I think, at which point you can test out the fixed
> functionality.
> 
> I did think of a workaround though. You could do something like this:
> 
> <bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
>   <property name="serviceBean">
>     <bean class="my.proto.HelloWorldImpl">
>   </property>
>   <property name="address" value="/helloWorld"
>   <property name="schemaLocations>
>     <list>
>      <value>foo.xsd</value>
>     </list>
>   </property>
> </bean>
> 
> Sorry for the troubles - it'll be fully fixed in 2.0.2.
> 
> - Dan
> 
> On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
> >
> > Hi Dans,
> >
> > Sorry for the delay but I have only just got around to testing this.  I
> > have
> > tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot version as
> > well as the 2.1-snapshot version.  Unfortunately, whenever I try add the
> > xml
> > below, I get the following error:
> >
> > org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> > Configuration problem: Cannot locate BeanDefinitionParser for element
> > [schemaLocation]
> >
> > I have setup my endpoint as below:
> >
> >     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
> >         <jaxws:implementor>
> >             <bean id="helloBean"
> >                 class="my.proto.HelloWorldImpl">
> >                 <property name="suffix" value="mySuffix" />
> >             </bean>
> >         </jaxws:implementor>
> >
> >         <jaxws:schemaLocations>
> >
> >
> > <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
> >         </jaxws:schemaLocations>
> >     </jaxws:endpoint>
> >
> > Any ideas what might be causing this problem?
> >
> > Thanks,
> >
> > Daniel.
> >
> > On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> > >
> > > Dan,
> > >
> > > Sorry.   I didn't see this till now.
> > >
> > > I'll get a new snapshot deploying now.
> > >
> > > Dan
> > >
> > > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> > >
> > > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > > Hi Daniel,
> > > >
> > > > Sorry for the delay with these changes. It turns out I need to fix
> > > > something else inside CXF to make this work correctly yet. I added
> > > > some basic support for it to though to today's SVN. Since I'm on a
> > > > cellular connection, I can't publish a snapshot now, but I think
> > > > another CXF dev probably will today. Then you'll be able to do
> > > > something like:
> > > >
> > > > <jaxws:endpoint>
> > > > <jaxws:schemaLocations>
> > > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > > </jaxws:schemaLocations>
> > > > </jaxws:endpoint>
> > > >
> > > > The curent issue with the code is that CXF will parse the schemas with
> > > > a library called XmlSchema and it doesn't preserve things like
> > > > formatting or documentation. I'll be fixing this later tonight though
> > > > (hopefully I'll be able to get it done tonight).
> > > >
> > > > Thanks for your patience and testing! I'll keep an on eye on the
> > > > snapshots and let you know when one is published.
> > > >
> > > > - Dan
> > > >
> > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > Hi Dan,
> > > > >
> > > > > Sounds great, I will keep an eye out for it.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Daniel.
> > > > >
> > > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > > Hi Daniel,
> > > > > > I think I might have overlooked configuration of this in the JAXB
> > > > > > databinding. Its just a few lines of code for me to change though.
> > > > > > I
> > > > >
> > > > > think
> > > > >
> > > > > > I
> > > > > > can probably push out a snapshot this week with the change if you
> > > > > > want
> > > > >
> > > > > to
> > > > >
> > > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > > - Dan
> > > > > >
> > > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > I am currently looking at migrating our existing XFire web
> > > > > > > service
> > > > > >
> > > > > > across
> > > > > >
> > > > > > > to
> > > > > > > CXF.  We have used schema-first development to develop this web
> > > > >
> > > > > service
> > > > >
> > > > > > > and
> > > > > > > are hoping to do the same with CXF
> > > > > > >
> > > > > > > The problem that I am having is that I cannot find a way to
> > > > > > > specify
> > > > >
> > > > > the
> > > > >
> > > > > > > location of the XSD files when configuring the app using spring.
> > > > > > >  I noticed
> > > > > > > that the ServiceInfo class has a method called addSchema but
> > > > > > > this does
> > > > > >
> > > > > > not
> > > > > >
> > > > > > > appear to be called in the code in a way that would allow me to
> > > > >
> > > > > specify
> > > > >
> > > > > > > the
> > > > > > > schema.
> > > > > > >
> > > > > > > Is schema first-development supported in CXF?
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > Daniel.
> > > > > >
> > > > > > --
> > > > > > Dan Diephouse
> > > > > > Envoi Solutions
> > > > > > http://envoisolutions.com | http://netzooid.com/blog
> > >
> > > --
> > > J. Daniel Kulp
> > > Principal Engineer
> > > IONA
> > > P: 781-902-8727    C: 508-380-7194
> > > daniel.kulp@iona.com
> > > http://www.dankulp.com/blog
> > >
> >
> 
> 
> 

Re: Schema-First Development with CXF

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hi Daniel (and Eric who is hopefully still listening),

I've just fixed this problem in SVN. The problem was I added capabilities to
do this from the API, but forgot to actually write a test for the XML config
- which wasn't fully working :-(. Dan Kulp will be publishing some new
snapshots tonight I think, at which point you can test out the fixed
functionality.

I did think of a workaround though. You could do something like this:

<bean id="myServer" class="org.apache.cxf.jaxws.ServerFactoryBean">
  <property name="serviceBean">
    <bean class="my.proto.HelloWorldImpl">
  </property>
  <property name="address" value="/helloWorld"
  <property name="schemaLocations>
    <list>
     <value>foo.xsd</value>
    </list>
  </property>
</bean>

Sorry for the troubles - it'll be fully fixed in 2.0.2.

- Dan

On 8/27/07, Daniel Pike <da...@gmail.com> wrote:
>
> Hi Dans,
>
> Sorry for the delay but I have only just got around to testing this.  I
> have
> tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot version as
> well as the 2.1-snapshot version.  Unfortunately, whenever I try add the
> xml
> below, I get the following error:
>
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Cannot locate BeanDefinitionParser for element
> [schemaLocation]
>
> I have setup my endpoint as below:
>
>     <jaxws:endpoint id="helloWorld" address="/HelloWorld">
>         <jaxws:implementor>
>             <bean id="helloBean"
>                 class="my.proto.HelloWorldImpl">
>                 <property name="suffix" value="mySuffix" />
>             </bean>
>         </jaxws:implementor>
>
>         <jaxws:schemaLocations>
>
>
> <jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
>         </jaxws:schemaLocations>
>     </jaxws:endpoint>
>
> Any ideas what might be causing this problem?
>
> Thanks,
>
> Daniel.
>
> On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
> >
> > Dan,
> >
> > Sorry.   I didn't see this till now.
> >
> > I'll get a new snapshot deploying now.
> >
> > Dan
> >
> > (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
> >
> > On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > > Hi Daniel,
> > >
> > > Sorry for the delay with these changes. It turns out I need to fix
> > > something else inside CXF to make this work correctly yet. I added
> > > some basic support for it to though to today's SVN. Since I'm on a
> > > cellular connection, I can't publish a snapshot now, but I think
> > > another CXF dev probably will today. Then you'll be able to do
> > > something like:
> > >
> > > <jaxws:endpoint>
> > > <jaxws:schemaLocations>
> > >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > > </jaxws:schemaLocations>
> > > </jaxws:endpoint>
> > >
> > > The curent issue with the code is that CXF will parse the schemas with
> > > a library called XmlSchema and it doesn't preserve things like
> > > formatting or documentation. I'll be fixing this later tonight though
> > > (hopefully I'll be able to get it done tonight).
> > >
> > > Thanks for your patience and testing! I'll keep an on eye on the
> > > snapshots and let you know when one is published.
> > >
> > > - Dan
> > >
> > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > Hi Dan,
> > > >
> > > > Sounds great, I will keep an eye out for it.
> > > >
> > > > Thanks,
> > > >
> > > > Daniel.
> > > >
> > > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > > Hi Daniel,
> > > > > I think I might have overlooked configuration of this in the JAXB
> > > > > databinding. Its just a few lines of code for me to change though.
> > > > > I
> > > >
> > > > think
> > > >
> > > > > I
> > > > > can probably push out a snapshot this week with the change if you
> > > > > want
> > > >
> > > > to
> > > >
> > > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > > - Dan
> > > > >
> > > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I am currently looking at migrating our existing XFire web
> > > > > > service
> > > > >
> > > > > across
> > > > >
> > > > > > to
> > > > > > CXF.  We have used schema-first development to develop this web
> > > >
> > > > service
> > > >
> > > > > > and
> > > > > > are hoping to do the same with CXF
> > > > > >
> > > > > > The problem that I am having is that I cannot find a way to
> > > > > > specify
> > > >
> > > > the
> > > >
> > > > > > location of the XSD files when configuring the app using spring.
> > > > > >  I noticed
> > > > > > that the ServiceInfo class has a method called addSchema but
> > > > > > this does
> > > > >
> > > > > not
> > > > >
> > > > > > appear to be called in the code in a way that would allow me to
> > > >
> > > > specify
> > > >
> > > > > > the
> > > > > > schema.
> > > > > >
> > > > > > Is schema first-development supported in CXF?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Daniel.
> > > > >
> > > > > --
> > > > > Dan Diephouse
> > > > > Envoi Solutions
> > > > > http://envoisolutions.com | http://netzooid.com/blog
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog
> >
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Schema-First Development with CXF

Posted by Daniel Pike <da...@gmail.com>.
Hi Dans,

Sorry for the delay but I have only just got around to testing this.  I have
tried this using the 2.0.1-incubator, 2.0.1-incubator-snapshot version as
well as the 2.1-snapshot version.  Unfortunately, whenever I try add the xml
below, I get the following error:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Cannot locate BeanDefinitionParser for element
[schemaLocation]

I have setup my endpoint as below:

    <jaxws:endpoint id="helloWorld" address="/HelloWorld">
        <jaxws:implementor>
            <bean id="helloBean"
                class="my.proto.HelloWorldImpl">
                <property name="suffix" value="mySuffix" />
            </bean>
        </jaxws:implementor>

        <jaxws:schemaLocations>

<jaxws:schemaLocation>/META-INF/schemas/helloWorldSchema.xsd</jaxws:schemaLocation>
        </jaxws:schemaLocations>
    </jaxws:endpoint>

Any ideas what might be causing this problem?

Thanks,

Daniel.

On 7/11/07, Daniel Kulp <dk...@apache.org> wrote:
>
> Dan,
>
> Sorry.   I didn't see this till now.
>
> I'll get a new snapshot deploying now.
>
> Dan
>
> (hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)
>
> On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> > Hi Daniel,
> >
> > Sorry for the delay with these changes. It turns out I need to fix
> > something else inside CXF to make this work correctly yet. I added
> > some basic support for it to though to today's SVN. Since I'm on a
> > cellular connection, I can't publish a snapshot now, but I think
> > another CXF dev probably will today. Then you'll be able to do
> > something like:
> >
> > <jaxws:endpoint>
> > <jaxws:schemaLocations>
> >   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> > </jaxws:schemaLocations>
> > </jaxws:endpoint>
> >
> > The curent issue with the code is that CXF will parse the schemas with
> > a library called XmlSchema and it doesn't preserve things like
> > formatting or documentation. I'll be fixing this later tonight though
> > (hopefully I'll be able to get it done tonight).
> >
> > Thanks for your patience and testing! I'll keep an on eye on the
> > snapshots and let you know when one is published.
> >
> > - Dan
> >
> > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > Hi Dan,
> > >
> > > Sounds great, I will keep an eye out for it.
> > >
> > > Thanks,
> > >
> > > Daniel.
> > >
> > > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > > Hi Daniel,
> > > > I think I might have overlooked configuration of this in the JAXB
> > > > databinding. Its just a few lines of code for me to change though.
> > > > I
> > >
> > > think
> > >
> > > > I
> > > > can probably push out a snapshot this week with the change if you
> > > > want
> > >
> > > to
> > >
> > > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > > - Dan
> > > >
> > > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > > Hi,
> > > > >
> > > > > I am currently looking at migrating our existing XFire web
> > > > > service
> > > >
> > > > across
> > > >
> > > > > to
> > > > > CXF.  We have used schema-first development to develop this web
> > >
> > > service
> > >
> > > > > and
> > > > > are hoping to do the same with CXF
> > > > >
> > > > > The problem that I am having is that I cannot find a way to
> > > > > specify
> > >
> > > the
> > >
> > > > > location of the XSD files when configuring the app using spring.
> > > > >  I noticed
> > > > > that the ServiceInfo class has a method called addSchema but
> > > > > this does
> > > >
> > > > not
> > > >
> > > > > appear to be called in the code in a way that would allow me to
> > >
> > > specify
> > >
> > > > > the
> > > > > schema.
> > > > >
> > > > > Is schema first-development supported in CXF?
> > > > >
> > > > > Regards,
> > > > >
> > > > > Daniel.
> > > >
> > > > --
> > > > Dan Diephouse
> > > > Envoi Solutions
> > > > http://envoisolutions.com | http://netzooid.com/blog
>
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
>

Re: Schema-First Development with CXF

Posted by Daniel Kulp <dk...@apache.org>.
Dan,

Sorry.   I didn't see this till now.   

I'll get a new snapshot deploying now.

Dan

(hmm.... 3 Dan's....   I'm getting confused.   Which one am I? :-)

On Monday 09 July 2007 09:42, Dan Diephouse wrote:
> Hi Daniel,
>
> Sorry for the delay with these changes. It turns out I need to fix
> something else inside CXF to make this work correctly yet. I added
> some basic support for it to though to today's SVN. Since I'm on a
> cellular connection, I can't publish a snapshot now, but I think
> another CXF dev probably will today. Then you'll be able to do
> something like:
>
> <jaxws:endpoint>
> <jaxws:schemaLocations>
>   <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
> </jaxws:schemaLocations>
> </jaxws:endpoint>
>
> The curent issue with the code is that CXF will parse the schemas with
> a library called XmlSchema and it doesn't preserve things like
> formatting or documentation. I'll be fixing this later tonight though
> (hopefully I'll be able to get it done tonight).
>
> Thanks for your patience and testing! I'll keep an on eye on the
> snapshots and let you know when one is published.
>
> - Dan
>
> On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > Hi Dan,
> >
> > Sounds great, I will keep an eye out for it.
> >
> > Thanks,
> >
> > Daniel.
> >
> > On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> > > Hi Daniel,
> > > I think I might have overlooked configuration of this in the JAXB
> > > databinding. Its just a few lines of code for me to change though.
> > > I
> >
> > think
> >
> > > I
> > > can probably push out a snapshot this week with the change if you
> > > want
> >
> > to
> >
> > > try it. Then it'll get in our 2.0.1 release. Sound good?
> > > - Dan
> > >
> > > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > I am currently looking at migrating our existing XFire web
> > > > service
> > >
> > > across
> > >
> > > > to
> > > > CXF.  We have used schema-first development to develop this web
> >
> > service
> >
> > > > and
> > > > are hoping to do the same with CXF
> > > >
> > > > The problem that I am having is that I cannot find a way to
> > > > specify
> >
> > the
> >
> > > > location of the XSD files when configuring the app using spring.
> > > >  I noticed
> > > > that the ServiceInfo class has a method called addSchema but
> > > > this does
> > >
> > > not
> > >
> > > > appear to be called in the code in a way that would allow me to
> >
> > specify
> >
> > > > the
> > > > schema.
> > > >
> > > > Is schema first-development supported in CXF?
> > > >
> > > > Regards,
> > > >
> > > > Daniel.
> > >
> > > --
> > > Dan Diephouse
> > > Envoi Solutions
> > > http://envoisolutions.com | http://netzooid.com/blog

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Schema-First Development with CXF

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hi Daniel,

Sorry for the delay with these changes. It turns out I need to fix something
else inside CXF to make this work correctly yet. I added some basic support
for it to though to today's SVN. Since I'm on a cellular connection, I can't
publish a snapshot now, but I think another CXF dev probably will today.
Then you'll be able to do something like:

<jaxws:endpoint>
<jaxws:schemaLocations>
  <jaxws:schemaLocation>/foo/bar.xsd</jaxws:schemaLocation>
</jaxws:schemaLocations>
</jaxws:endpoint>

The curent issue with the code is that CXF will parse the schemas with a
library called XmlSchema and it doesn't preserve things like formatting or
documentation. I'll be fixing this later tonight though (hopefully I'll be
able to get it done tonight).

Thanks for your patience and testing! I'll keep an on eye on the snapshots
and let you know when one is published.

- Dan

On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
>
> Hi Dan,
>
> Sounds great, I will keep an eye out for it.
>
> Thanks,
>
> Daniel.
>
> On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
> >
> > Hi Daniel,
> > I think I might have overlooked configuration of this in the JAXB
> > databinding. Its just a few lines of code for me to change though. I
> think
> > I
> > can probably push out a snapshot this week with the change if you want
> to
> > try it. Then it'll get in our 2.0.1 release. Sound good?
> > - Dan
> >
> > On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I am currently looking at migrating our existing XFire web service
> > across
> > > to
> > > CXF.  We have used schema-first development to develop this web
> service
> > > and
> > > are hoping to do the same with CXF
> > >
> > > The problem that I am having is that I cannot find a way to specify
> the
> > > location of the XSD files when configuring the app using spring.  I
> > > noticed
> > > that the ServiceInfo class has a method called addSchema but this does
> > not
> > > appear to be called in the code in a way that would allow me to
> specify
> > > the
> > > schema.
> > >
> > > Is schema first-development supported in CXF?
> > >
> > > Regards,
> > >
> > > Daniel.
> > >
> >
> >
> >
> > --
> > Dan Diephouse
> > Envoi Solutions
> > http://envoisolutions.com | http://netzooid.com/blog
> >
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Schema-First Development with CXF

Posted by Daniel Pike <da...@gmail.com>.
Hi Dan,

Sounds great, I will keep an eye out for it.

Thanks,

Daniel.

On 7/5/07, Dan Diephouse <da...@envoisolutions.com> wrote:
>
> Hi Daniel,
> I think I might have overlooked configuration of this in the JAXB
> databinding. Its just a few lines of code for me to change though. I think
> I
> can probably push out a snapshot this week with the change if you want to
> try it. Then it'll get in our 2.0.1 release. Sound good?
> - Dan
>
> On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
> >
> > Hi,
> >
> > I am currently looking at migrating our existing XFire web service
> across
> > to
> > CXF.  We have used schema-first development to develop this web service
> > and
> > are hoping to do the same with CXF
> >
> > The problem that I am having is that I cannot find a way to specify the
> > location of the XSD files when configuring the app using spring.  I
> > noticed
> > that the ServiceInfo class has a method called addSchema but this does
> not
> > appear to be called in the code in a way that would allow me to specify
> > the
> > schema.
> >
> > Is schema first-development supported in CXF?
> >
> > Regards,
> >
> > Daniel.
> >
>
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
>

Re: Schema-First Development with CXF

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hi Daniel,
I think I might have overlooked configuration of this in the JAXB
databinding. Its just a few lines of code for me to change though. I think I
can probably push out a snapshot this week with the change if you want to
try it. Then it'll get in our 2.0.1 release. Sound good?
- Dan

On 7/4/07, Daniel Pike <da...@gmail.com> wrote:
>
> Hi,
>
> I am currently looking at migrating our existing XFire web service across
> to
> CXF.  We have used schema-first development to develop this web service
> and
> are hoping to do the same with CXF
>
> The problem that I am having is that I cannot find a way to specify the
> location of the XSD files when configuring the app using spring.  I
> noticed
> that the ServiceInfo class has a method called addSchema but this does not
> appear to be called in the code in a way that would allow me to specify
> the
> schema.
>
> Is schema first-development supported in CXF?
>
> Regards,
>
> Daniel.
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog