Sure...
<target name="wsdl" depends="createDirs">
<path id="classpath">
<fileset dir="${libDir}/xfire">
<include name="*.jar" />
</fileset>
</path>
<taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask"
classpathref="classpath"/>
<wsgen outputDirectory="${basedir}/target/generated-source"
wsdl="${wsdl.file}" package="${package.name}" overwrite="true"/>
</target>
Makes nice looking code, just that it's missing a setter on any unbounded
schema elements, so no clients can set those fields in their requests.
Cheers,
Karl P
> -----Original Message-----
> From: Chris Thatcher [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 01, 2006 3:53 AM
> To: [email protected]
> Subject: Re: [xfire-user] xfire client using jaxb [was:
> help!- spring2, jaxb2 config setup]
>
> Karl, actually I only include that for hibernate3/ejb3,
> though it may well prevent another issue which you describe.
> I have had success with jaxb2 and xfire without that if I
> recall. Can you send me the code or config you use to create
> the server side service. It sounds like it's not actually
> using the jaxb factory.
>
> ----- Original Message -----
> From: "Karl Palsson" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Thursday, November 30, 2006 10:47 PM
> Subject: RE: [xfire-user] xfire client using jaxb [was:
> help!- spring2,
> jaxb2 config setup]
>
>
>
> Right, see that CDATA section about no setter?
>
> That's what I'm following up. I want to be able to generate
> a server from a WSDL, (or for the java heads that just use
> xsd's to make their types, generate the types from a schema)
> and have it work.
>
> Without the CDATA section, and the jaxb extensions to the
> schema, the services and types that xfire generates from this
> schema are unusable. (Or manually patching the type after
> the generation takes place)
>
> Being forced to include that (implementation details) in the
> !schema! is a bug, at least as far as I'm concerned.
> (XFIRE-509 unless someone suggests a better bug)
>
> Cheers,
> Karl P
>
>
> > -----Original Message-----
> > From: Chris Thatcher [mailto:[EMAIL PROTECTED]
> > Sent: Friday, December 01, 2006 3:31 AM
> > To: [email protected]
> > Subject: RE: [xfire-user] xfire client using jaxb [was:
> > help!- spring2, jaxb2 config setup]
> >
> > Starting with XMLSchema first here is a model of an object using
> > lists:
> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema
> > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >
> >
> targetNamespace="http://www.emergent.net/www/servertools/common/model"
> > xmlns:tns="http://www.emergent.net/www/servertools/common/model"
> > xmlns:html="http://www.w3.org/1999/xhtml"
> > xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
> > xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
> > xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
> > jxb:extensionBindingPrefixes="xjc"
> > jxb:version="1.0"
> > elementFormDefault="qualified">
> >
> > <xs:element name="command" type="tns:command"/> <xs:complexType
> > name="command">
> > <xs:sequence>
> > <xs:element ref="egt:property" maxOccurs="unbounded"
> > minOccurs="0">
> > <xs:annotation><xs:appinfo><jxb:property ><jxb:javadoc>
> > <!-- This conveniently adds a setter for the
> list which it
> > makes me crazy that jaxb wont allow -->
> > <![CDATA[*/public void setProperty(List<Property>
> > property) {this.property = property;}/*]]>
> >
> </jxb:javadoc></jxb:property></xs:appinfo></xs:annotation>
> > </xs:element>
> > </xs:sequence>
> > <xs:attribute name="id" type="xs:long"/> </xs:complexType>
> >
> > <xs:element name="property" type="tns:property"/> <xs:complexType
> > name="property">
> > <xs:attribute name="name" type="xs:string" use="required"/>
> > <xs:attribute name="value" type="xs:string" use="required"/>
> > <xs:attribute name="id" type="xs:long"/> </xs:complexType>
> >
> > <xs:element name="start" type="tns:start" />
> >
> > <xs:complexType name="start">
> > <xs:sequence>
> > <xs:element ref="tns:command" minOccurs="0"/>
> > </xs:sequence>
> > </xs:complexType>
> >
> > <xs:element name="startResponse" type="tns:startResponse" />
> >
> > <xs:complexType name="startResponse">
> > <xs:sequence>
> > <xs:element name="success" type="xs:boolean" minOccurs="0"/>
> > </xs:sequence>
> > </xs:complexType>
> >
> > </xs:schema>
> > Here is an ant macro I use to generate the java from it:
> >
> > <macrodef name="codegen-model"
> > uri="http://www.emergent.net/servertools/ant/macrodef"
> > description="Generates Model Classes From XMLSchema">
> > <attribute name="schema" default="EGT*.xsd"/>
> > <attribute name="schemadir" default="src/schema/"/>
> >
> > <sequential>
> > <echo message=""/>
> > <echo message="TARGET: codegen-model"/>
> > <echo message=" schema = @{schema}"/>
> > <echo message=" schemadir = @{schemadir}"/>
> > <echo message=""/>
> > <taskdef name="xjc"
> classname="com.sun.tools.xjc.XJCTask">
> > <classpath path="${javac.classpath}"/>
> > </taskdef>
> > <xjc
> > target="src/generated/java"
> > extension="true">
> > <schema dir="@{schemadir}" includes="@{schema}"/>
> > <depends dir="@{schemadir}">
> > <include name="@{schema}" />
> > </depends>
> > <produces dir="${basedir}/src/generated" >
> > <include name="**/model/*.java"/>
> > </produces>
> > </xjc>
> > </sequential>
> > </macrodef>
> >
> > Thats step 1. Let me know if its not a sufficient solution so far.
> > Step 2 next.
> >
> > Thatcher
> >
> > ----- Original Message -----
> > From: Chris Thatcher <mailto:[EMAIL PROTECTED]>
> > To: [email protected]
> > Sent: Thursday, November 30, 2006 9:00 PM
> > Subject: RE: [xfire-user] xfire client using jaxb [was:
> > help! - spring2, jaxb2 config setup]
> >
> > Hi guys,
> > I would like to help you because I use Jaxb2, Spring2, and Xfire
> > together successfully with very complex data structures including
> > lists, list of lists, etc. I doubt that xfire is the root
> cause here
> > so lets step back and try to figure out what the cause is together.
> >
> > Below is an example of how I use these technologies
> together, though
> > there are variations so if this is not your approach it is at least
> > 'a' way the technologies coexist successfully. The
> approach used is,
> > generally speaking, as follows:
> >
> > 1. Develop the XMLSchema representing the data model 2.
> Generate the
> > java classes with jaxb2.
> > 3. Define ServiceInterfaces with java classes and
> > jsr181 annotations
> > 4. Implement the service.
> > 5. Wire it up to XFire (and Acegi and Hibernate3 or
> > whatever) with Spring2.
> > 6. Start a server (I use the embedded jetty server for dev testing).
> > 7. Run a client.
> >
> > With that info here I'm going to mail this while I start presenting
> > the relavent examples. If your approach is drastically
> different and
> > this can't suffice as an example approach, please do let me know.
> >
> > Thatcher
> >
> > ----- Original Message -----
> > From: "Karl Palsson" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Thursday, November 30, 2006 8:31 PM
> > Subject: RE: [xfire-user] xfire client using jaxb [was:
> > help! - spring2,
> > jaxb2 config setup]
> >
> >
> > I'd like to keep separate the, "my java xfire client
> doesn't work with
> > lists" from the "my server doesn't let anyone use lists"
> >
> > If xfire won't let clients consume services that have list
> parameters,
> > that's one bug. (alluded to in the closing comments of
> > XFIRE-509 with, "use
> > this XXX to make your client, not YYYY"
> >
> > If the xfire _service_ won't let anyone set a list, I see that as a
> > separate problem. Whichever one XFIRE-509 is, can we track them
> > separately?
> >
> > Cheers,
> > Karl P
> > > -----Original Message-----
> > > From: Deno Vichas [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, November 30, 2006 10:23 PM
> > > To: [email protected]
> > > Subject: RE: [xfire-user] xfire client using jaxb [was: help!
> > > - spring2, jaxb2 config setup]
> > >
> > > Ok.. this is related the 509 bug. The comment by Dan
> doesn't work
> > > and give me the stack trace below.
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: Deno Vichas [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, November 30, 2006 1:07 PM
> > > To: [email protected]
> > > Subject: [xfire-user] xfire client using jaxb [was: help!
> - spring2,
> > > jaxb2 config setup]
> > >
> > >
> > >
> > > I think my service is working as I get WSDL to generate. I think
> > > the problem I'm having now is with my client code.
> > >
> > >
> > >
> > > If I use
> > >
> > > Service serviceModel = new
> > >
> > AnnotationServiceFactory().create(VehicleLookupServiceImpl.class);
> > >
> > >
> > >
> > > It complains about not having a setting for the array
> list that jaxb
> > > created. So I did some search and found some other with
> this same
> > > problem. one post said I need to use
> > >
> > >
> > >
> > >
> > >
> > > Service serviceModel = new
> > > JaxbServiceFactory().create(VehicleLookupServiceImpl.class);
> > >
> > >
> > >
> > >
> > >
> > > But this gives me the stack trace below. At this point I'm at a
> > > total lost.
> > >
> > >
> > >
> > >
> > >
> > > Thanks,
> > >
> > > deno
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 2006-11-29 12:30:40,393 ERROR
> > > [org.apache.catalina.core.ContainerBase.[Catalina].[localhost]
> > > .[/oracle].[dispatch]] - Servlet.service() for servlet dispatch
> > > threw exception
> > >
> > > org.codehaus.xfire.XFireRuntimeException: Could not
> invoke service..
> > > Nested exception is
> > > org.codehaus.xfire.fault.XFireFault: Could not marshall type.
> > >
> > > org.codehaus.xfire.fault.XFireFault: Could not marshall type.
> > >
> > > at
> > >
> > org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:254)
> > >
> > > at
> > > org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(A
> > > egisBindingProvider.java:200)
> > >
> > > at
> > > org.codehaus.xfire.service.binding.AbstractBinding.writeParame
> > > ter(AbstractBinding.java:273)
> > >
> > > at
> > > org.codehaus.xfire.service.binding.WrappedBinding.writeMessage
> > > (WrappedBinding.java:89)
> > >
> > > at
> > > org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerial
> > > izer.java:80)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAtta
> > > chments(HttpChannel.java:56)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.CommonsHttpMessageSender.get
> > > ByteArrayRequestEntity(CommonsHttpMessageSender.java:313)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.CommonsHttpMessageSender.sen
> > > d(CommonsHttpMessageSender.java:251)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(Ht
> > > tpChannel.java:123)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel
> > > .java:48)
> > >
> > > at
> > > org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageS
> > > ender.java:26)
> > >
> > > at
> > > org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipel
> > > ine.java:131)
> > >
> > > at
> > >
> > org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
> > >
> > > at
> > org.codehaus.xfire.client.Client.invoke(Client.java:335)
> > >
> > > at
> > >
> >
> org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
> > >
> > > at
> > >
> > org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
> > >
> > > at $Proxy12.getVehicles(Unknown Source)
> > >
> > > at
> > > com.autoreturn.web.VehicleLookupController.handle(VehicleLooku
> > > pController.java:53)
> > >
> > > at
> > > org.springframework.web.servlet.mvc.AbstractCommandController.
> > > handleRequestInternal(AbstractCommandController.java:82)
> > >
> > > at
> > > org.springframework.web.servlet.mvc.AbstractController.handleR
> > > equest(AbstractController.java:153)
> > >
> > > at
> > > org.springframework.web.servlet.mvc.SimpleControllerHandlerAda
> > > pter.handle(SimpleControllerHandlerAdapter.java:45)
> > >
> > > at
> > > org.springframework.web.servlet.DispatcherServlet.doDispatch(D
> > > ispatcherServlet.java:806)
> > >
> > > at
> > > org.springframework.web.servlet.DispatcherServlet.doService(Di
> > > spatcherServlet.java:736)
> > >
> > > at
> > > org.springframework.web.servlet.FrameworkServlet.processReques
> > > t(FrameworkServlet.java:396)
> > >
> > > at
> > > org.springframework.web.servlet.FrameworkServlet.doGet(Framewo
> > > rkServlet.java:350)
> > >
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> > >
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > >
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> > > er(ApplicationFilterChain.java:252)
> > >
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> > > cationFilterChain.java:173)
> > >
> > > at
> > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> > > rapperValve.java:213)
> > >
> > > at
> > > org.apache.catalina.core.StandardContextValve.invoke(StandardC
> > > ontextValve.java:178)
> > >
> > > at
> > > org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> > > Valve.java:126)
> > >
> > > at
> > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> > > Valve.java:105)
> > >
> > > at
> > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> > > gineValve.java:107)
> > >
> > > at
> > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> > > ter.java:148)
> > >
> > > at
> > > org.apache.coyote.http11.Http11Processor.process(Http11Process
> > > or.java:869)
> > >
> > > at
> > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHa
> > > ndler.processConnection(Http11BaseProtocol.java:664)
> > >
> > > at
> > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> > > cpEndpoint.java:527)
> > >
> > > at
> > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> > > aderFollowerWorkerThread.java:80)
> > >
> > > at
> > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> > > ThreadPool.java:684)
> > >
> > > at java.lang.Thread.run(Thread.java:595)
> > >
> > > Caused by: javax.xml.bind.JAXBException:
> > > com.autoreturn.service.model.LookupVehiclesRequest nor any of its
> > > super class is known to this context
> > >
> > > at
> > > com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBCo
> > > ntextImpl.java:446)
> > >
> > > at
> > > com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSeria
> > > lizer.java:447)
> > >
> > > at
> > > com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImp
> > > l.java:263)
> > >
> > > at
> > > com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerI
> > > mpl.java:143)
> > >
> > > at
> > >
> > org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:249)
> > >
> > > ... 40 more
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: Deno Vichas [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, November 29, 2006 12:34 PM
> > > To: [email protected]
> > > Subject: RE: [xfire-user] help! - spring2, jaxb2 config setup
> > >
> > >
> > >
> > > Honestly I'm not even fully sure what the remoting is
> used for. I
> > > just want to create some soap services using sping2, jaxb2,
> > > hibernate, and xfire. I did find my startup problem.
> > > I'm now back to my original problem. Here's my
> > client code I have;
> > >
> > >
> > >
> > > Service serviceModel = new
> > > JaxbServiceFactory().create(VehicleLookupServiceImpl.class);
> > > // some post I found on the net said I needed to use the
> > > JaxbServiceFactory.
> > >
> > > //Service serviceModel = new
> > > AnnotationServiceFactory().create(VehicleLookupServiceImpl.cla
> > > ss); // this bitches about not having a setting for the
> array list
> > > from jaxb. Argh!
> > >
> > > try {
> > >
> > > VehicleLookupService service =
> > > (VehicleLookupService) new
> > XFireProxyFactory().create(serviceModel,
> > >
> > >
> > >
> > > "http://localhost:8080/oracle/services/VehicleLookupService");
> > >
> > > LookupVehiclesResponse r =
> > > service.getVehicles(buildLookupVehiclesRequest(cmd));
> > >
> > > pw.println(marshallRequest(r));
> > >
> > >
> > >
> > > } catch (MalformedURLException e) {
> > >
> > > e.printStackTrace();
> > >
> > > }
> > >
> > >
> > >
> > >
> > >
> > > 2006-11-29 12:30:40,393 ERROR
> > > [org.apache.catalina.core.ContainerBase.[Catalina].[localhost]
> > > .[/oracle].[dispatch]] - Servlet.service() for servlet dispatch
> > > threw exception
> > >
> > > org.codehaus.xfire.XFireRuntimeException: Could not
> invoke service..
> > > Nested exception is
> > > org.codehaus.xfire.fault.XFireFault: Could not marshall type.
> > >
> > > org.codehaus.xfire.fault.XFireFault: Could not marshall type.
> > >
> > > at
> > >
> > org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:254)
> > >
> > > at
> > > org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(A
> > > egisBindingProvider.java:200)
> > >
> > > at
> > > org.codehaus.xfire.service.binding.AbstractBinding.writeParame
> > > ter(AbstractBinding.java:273)
> > >
> > > at
> > > org.codehaus.xfire.service.binding.WrappedBinding.writeMessage
> > > (WrappedBinding.java:89)
> > >
> > > at
> > > org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerial
> > > izer.java:80)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAtta
> > > chments(HttpChannel.java:56)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.CommonsHttpMessageSender.get
> > > ByteArrayRequestEntity(CommonsHttpMessageSender.java:313)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.CommonsHttpMessageSender.sen
> > > d(CommonsHttpMessageSender.java:251)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(Ht
> > > tpChannel.java:123)
> > >
> > > at
> > > org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel
> > > .java:48)
> > >
> > > at
> > > org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageS
> > > ender.java:26)
> > >
> > > at
> > > org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipel
> > > ine.java:131)
> > >
> > > at
> > >
> > org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
> > >
> > > at
> > org.codehaus.xfire.client.Client.invoke(Client.java:335)
> > >
> > > at
> > >
> >
> org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
> > >
> > > at
> > >
> > org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
> > >
> > > at $Proxy12.getVehicles(Unknown Source)
> > >
> > > at
> > > com.autoreturn.web.VehicleLookupController.handle(VehicleLooku
> > > pController.java:53)
> > >
> > > at
> > > org.springframework.web.servlet.mvc.AbstractCommandController.
> > > handleRequestInternal(AbstractCommandController.java:82)
> > >
> > > at
> > > org.springframework.web.servlet.mvc.AbstractController.handleR
> > > equest(AbstractController.java:153)
> > >
> > > at
> > > org.springframework.web.servlet.mvc.SimpleControllerHandlerAda
> > > pter.handle(SimpleControllerHandlerAdapter.java:45)
> > >
> > > at
> > > org.springframework.web.servlet.DispatcherServlet.doDispatch(D
> > > ispatcherServlet.java:806)
> > >
> > > at
> > > org.springframework.web.servlet.DispatcherServlet.doService(Di
> > > spatcherServlet.java:736)
> > >
> > > at
> > > org.springframework.web.servlet.FrameworkServlet.processReques
> > > t(FrameworkServlet.java:396)
> > >
> > > at
> > > org.springframework.web.servlet.FrameworkServlet.doGet(Framewo
> > > rkServlet.java:350)
> > >
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> > >
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > >
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> > > er(ApplicationFilterChain.java:252)
> > >
> > > at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> > > cationFilterChain.java:173)
> > >
> > > at
> > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> > > rapperValve.java:213)
> > >
> > > at
> > > org.apache.catalina.core.StandardContextValve.invoke(StandardC
> > > ontextValve.java:178)
> > >
> > > at
> > > org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> > > Valve.java:126)
> > >
> > > at
> > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> > > Valve.java:105)
> > >
> > > at
> > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> > > gineValve.java:107)
> > >
> > > at
> > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> > > ter.java:148)
> > >
> > > at
> > > org.apache.coyote.http11.Http11Processor.process(Http11Process
> > > or.java:869)
> > >
> > > at
> > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHa
> > > ndler.processConnection(Http11BaseProtocol.java:664)
> > >
> > > at
> > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> > > cpEndpoint.java:527)
> > >
> > > at
> > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> > > aderFollowerWorkerThread.java:80)
> > >
> > > at
> > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> > > ThreadPool.java:684)
> > >
> > > at java.lang.Thread.run(Thread.java:595)
> > >
> > > Caused by: javax.xml.bind.JAXBException:
> > > com.autoreturn.service.model.LookupVehiclesRequest nor any of its
> > > super class is known to this context
> > >
> > > at
> > > com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBCo
> > > ntextImpl.java:446)
> > >
> > > at
> > > com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSeria
> > > lizer.java:447)
> > >
> > > at
> > > com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImp
> > > l.java:263)
> > >
> > > at
> > > com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerI
> > > mpl.java:143)
> > >
> > > at
> > >
> > org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:249)
> > >
> > > ... 40 more
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Here's my POJO
> > >
> > >
> > >
> > > package com.autoreturn.service;
> > >
> > >
> > >
> > > import javax.jws.WebParam;
> > >
> > > import javax.jws.WebService;
> > >
> > >
> > >
> > > import com.autoreturn.service.model.LookupVehiclesRequest;
> > >
> > > import com.autoreturn.service.model.LookupVehiclesResponse;
> > >
> > >
> > >
> > > @WebService(name="VehicleLookupService",
> > >
> > > targetNamespace="http://oracle.autoreturn.com")
> > >
> > > public interface VehicleLookupService {
> > >
> > >
> > >
> > > public LookupVehiclesResponse
> > > getVehicles(@WebParam(name="LookupVehiclesRequest")
> > > LookupVehiclesRequest request);
> > >
> > >
> > >
> > > }
> > >
> > >
> > >
> > > ----
> > >
> > >
> > >
> > > package com.autoreturn.service;
> > >
> > >
> > >
> > > import javax.jws.WebService;
> > >
> > > import javax.jws.soap.SOAPBinding;
> > >
> > >
> > >
> > > import com.autoreturn.dts.DTSLookupResponse;
> > >
> > > import com.autoreturn.dts.DTSManagerFactory;
> > >
> > > import com.autoreturn.manager.XmlConverter;
> > >
> > > import com.autoreturn.service.model.LookupVehiclesRequest;
> > >
> > > import com.autoreturn.service.model.LookupVehiclesResponse;
> > >
> > >
> > >
> > > @WebService(
> > >
> > > serviceName = "VehicleLookupService",
> > >
> > > endpointInterface =
> > "com.autoreturn.service.VehicleLookupService"
> > >
> > > )
> > >
> > > @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
> > >
> > > public class VehicleLookupServiceImpl implements
> > > VehicleLookupService {
> > >
> > > private final DTSManagerFactory _dtsFactory;
> > >
> > > private final XmlConverter _xmlConverter;
> > >
> > >
> > >
> > > public VehicleLookupServiceImpl(DTSManagerFactory
> > > dtsManagerFactory, XmlConverter xmlConverter) {
> > >
> > > _dtsFactory = dtsManagerFactory;
> > >
> > > _xmlConverter = xmlConverter;
> > >
> > > }
> > >
> > >
> > >
> > > public LookupVehiclesResponse
> > > getVehicles(LookupVehiclesRequest request) {
> > >
> > >
> > >
> > > DTSLookupResponse dtsResponse =
> > > _dtsFactory.lookupVehicle(request);
> > >
> > > return
> > _xmlConverter.buildArLookupVehicleReponse(dtsResponse);
> > >
> > >
> > >
> > > }
> > >
> > >
> > >
> > > }
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: Ruth, Brice D [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, November 29, 2006 11:34 AM
> > > To: [email protected]
> > > Subject: RE: [xfire-user] help! - spring2, jaxb2 config setup
> > >
> > >
> > >
> > > From the exception, it looks like the wrong bean is
> getting passed
> > > in. What's your POJO that has the @WebService annotation on it?
> > > ServiceBean is the XFire object that wraps your POJO, from what I
> > > understand.
> > >
> > >
> > >
> > > I'm not familiar with the handler mapping stuff from Spring
> > > remoting. We use a Jsr181BeanPostProcessor ... is there a
> particular
> > > need for the Spring remoting?
> > >
> > >
> > >
> > > Cheers,
> > >
> > > Brice
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Deno Vichas [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, November 29, 2006 11:34 AM
> > > To: [email protected]
> > > Subject: RE: [xfire-user] help! - spring2, jaxb2 config setup
> > >
> > > I tried something like that already using
> > > org.codehaus.xfire.spring.remoting.XFireExporter, using
> your sample
> > > I get on startup -
> > >
> > >
> > >
> > > 2006-11-29 09:27:13,817 ERROR
> > > [org.springframework.web.context.ContextLoader] - Context
> > > initialization failed
> > >
> > > org.springframework.beans.factory.BeanCreationException:
> > > Error creating bean with name 'vehicleLookup' defined in
> > > ServletContext resource [/WEB-INF/xfire-servlet.xml]:
> > > Invocation of init method failed; nested exception is
> > > org.codehaus.xfire.annotations.AnnotationException: Class
> > > org.codehaus.xfire.spring.ServiceBean does not have a WebService
> > > annotation
> > >
> > > Caused by:
> > >
> > > org.codehaus.xfire.annotations.AnnotationException: Class
> > > org.codehaus.xfire.spring.ServiceBean does not have a WebService
> > > annotation
> > >
> > >
> > >
> > >
> > >
> > > I'm using JSR181 to expose my service with
> > >
> > >
> > >
> > > <bean id="xfire.commonsAnnotations"
> > >
> > class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations"/>
> > >
> > >
> > >
> > > <bean id="handlerMapping"
> > >
> > class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping">
> > >
> > > <property name="typeMappingRegistry"
> > > ref="xfire.typeMappingRegistry"/>
> > >
> > > <property name="xfire" ref="xfire"/>
> > >
> > > <property name="webAnnotations"
> > > ref="xfire.commonsAnnotations"/>
> > >
> > > </bean>
> > >
> > >
> > >
> > > <bean
> > > class="org.springframework.web.servlet.handler.SimpleUrlHandle
> > > rMapping">
> > >
> > > <property name="urlMap">
> > >
> > > <map>
> > >
> > > <entry key="/">
> > >
> > > <ref bean="handlerMapping"/>
> > >
> > > </entry>
> > >
> > > </map>
> > >
> > > </property>
> > >
> > > </bean>
> > >
> > >
> > >
> > >
> > >
> > > Is this bad to try to do this?
> > >
> > >
> > >
> > >
> > >
> > > Thanks.
> > >
> > > deno
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: Ruth, Brice D [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, November 29, 2006 6:56 AM
> > > To: [email protected]
> > > Subject: RE: [xfire-user] help! - spring2, jaxb2 config setup
> > >
> > >
> > >
> > > <!-- Initialize JAXB2 service factory -->
> > >
> > > <bean name="jaxbServiceFactory"
> > >
> > > class="org.codehaus.xfire.jaxb2.JaxbServiceFactory">
> > >
> > > <constructor-arg ref="xfire.transportManager" />
> > >
> > > </bean>
> > >
> > >
> > >
> > > <bean id="ewsng.TaskController.service"
> > > class="org.codehaus.xfire.spring.ServiceBean">
> > >
> > > <property name="serviceBean" ref="ewsng.taskController"
> > > /> <!-- this is my POJO -->
> > >
> > > <property name="serviceFactory"
> > ref="jaxbServiceFactory" />
> > >
> > > </bean>
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Deno Vichas [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, November 29, 2006 12:13 AM
> > > To: [email protected]
> > > Subject: RE: [xfire-user] help! - spring2, jaxb2 config setup
> > >
> > > > Have you imported the xfire spring config into your main
> > > spring config?
> > >
> > > I didn't at when I posted that last stack trace. I'm
> importing in
> > > my web.xml file
> > >
> > >
> > >
> > > Ok.. I've got the WSDL to generate! I think my problem
> is I need to
> > > be using the jaxbServiceFactory but don't know how to wire it up
> > > correct.
> > >
> > >
> > >
> > > Here's what my web.xml and xfire-servlet.xml files look like;
> > >
> > >
> > >
> > > <context-param>
> > >
> > >
> > <param-name>log4jConfigLocation</param-name>
> > >
> > >
> > > <param-value>/WEB-INF/log4j.properties</param-value>
> > >
> > > </context-param>
> > >
> > > <context-param>
> > >
> > > <param-name>log4jRefreshInterval</param-name>
> > >
> > > <param-value>1000</param-value>
> > >
> > > </context-param>
> > >
> > > <context-param>
> > >
> > > <param-name>contextConfigLocation</param-name>
> > >
> > > <param-value>
> > >
> > > /WEB-INF/applicationContext.xml
> > >
> > > /WEB-INF/xfire-servlet.xml
> > >
> > > classpath:org/codehaus/xfire/spring/xfire.xml
> > >
> > > </param-value>
> > >
> > > </context-param>
> > >
> > >
> > >
> > > <listener>
> > >
> > >
> > > <listener-class>org.springframework.web.util.Log4jConfigListen
> > > er</listener-class>
> > >
> > > </listener>
> > >
> > >
> > >
> > > <listener>
> > >
> > >
> > > <listener-class>org.springframework.web.context.ContextLoaderL
> > > istener</listener-class>
> > >
> > > </listener>
> > >
> > >
> > >
> > > <servlet>
> > >
> > > <servlet-name>dispatch</servlet-name>
> > >
> > >
> > > <servlet-class>org.springframework.web.servlet.DispatcherServl
> > > et</servlet-class>
> > >
> > > <load-on-startup>1</load-on-startup>
> > >
> > > </servlet>
> > >
> > >
> > >
> > > <servlet-mapping>
> > >
> > > <servlet-name>dispatch</servlet-name>
> > >
> > > <url-pattern>/*</url-pattern>
> > >
> > > </servlet-mapping>
> > >
> > >
> > >
> > > <!-- start Xfire -->
> > >
> > > <servlet>
> > >
> > > <servlet-name>XFireServlet</servlet-name>
> > >
> > > <servlet-class>
> > >
> > > org.codehaus.xfire.spring.XFireSpringServlet
> > >
> > > </servlet-class>
> > >
> > > </servlet>
> > >
> > >
> > >
> > > <servlet-mapping>
> > >
> > > <servlet-name>XFireServlet</servlet-name>
> > >
> > > <url-pattern>/servlet/XFireServlet/*</url-pattern>
> > >
> > > </servlet-mapping>
> > >
> > >
> > >
> > > <servlet-mapping>
> > >
> > > <servlet-name>XFireServlet</servlet-name>
> > >
> > > <url-pattern>/services/*</url-pattern>
> > >
> > > </servlet-mapping>
> > >
> > > <!-- end: XFire -->
> > >
> > >
> > >
> > > * - - - - - - -
> > >
> > >
> > >
> > > xfire-servlet.xml
> > >
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > >
> > > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> > > "http://www.springframework.org/dtd/spring-beans.dtd">
> > >
> > > <beans>
> > >
> > >
> > >
> > > <bean id="vehicleLookup"
> > > class="com.autoreturn.service.VehicleLookupServiceImpl" >
> > >
> > > <constructor-arg index="0" ref="DTSManager" />
> > >
> > > <constructor-arg index="1" ref="XmlConverter" />
> > >
> > > </bean>
> > >
> > >
> > >
> > > <bean name="jaxbServiceFactory"
> > > class="org.codehaus.xfire.jaxb2.JaxbServiceFactory">
> > >
> > > <constructor-arg ref="xfire.transportManager"/>
> > >
> > > </bean>
> > >
> > >
> > >
> > >
> > >
> > > <bean id="xfire.commonsAnnotations"
> > >
> > class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations"/>
> > >
> > >
> > >
> > > <bean id="handlerMapping"
> > >
> > class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping">
> > >
> > > <property name="typeMappingRegistry">
> > >
> > > <ref bean="xfire.typeMappingRegistry"/>
> > >
> > > </property>
> > >
> > > <property name="xfire">
> > >
> > > <ref bean="xfire"/>
> > >
> > > </property>
> > >
> > > <property name="webAnnotations">
> > >
> > > <ref bean="xfire.commonsAnnotations"/>
> > >
> > > </property>
> > >
> > > </bean>
> > >
> > >
> > >
> > > <bean
> > > class="org.springframework.web.servlet.handler.SimpleUrlHandle
> > > rMapping">
> > >
> > > <property name="urlMap">
> > >
> > > <map>
> > >
> > > <entry key="/">
> > >
> > > <ref bean="handlerMapping"/>
> > >
> > > </entry>
> > >
> > > </map>
> > >
> > > </property>
> > >
> > > </bean>
> > >
> > >
> > >
> > > </beans>
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> > http://xircles.codehaus.org/manage_email
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email