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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
> > > > > Hi Dan,
> > > > >
> > > > > Sounds great, I will keep an eye out for it.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Daniel.
> > > > >
> > > > > On 7/5/07, Dan Diephouse <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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
> > > [EMAIL PROTECTED]
> > > http://www.dankulp.com/blog
> > >
> >
>
>
>