thx ray!

On 7/31/07, Ray Krueger <[EMAIL PROTECTED]> wrote:
>
> OK the final tweaks were as follows...
> I added <import resource="classpath:META-INF/cxf/cxf-extension-xml.xml"/>
> I didn't have that and was getting the error...
> org.apache.cxf.BusException: No binding factory for namespace
> http://cxf.apache.org/bindings/xformat registered.
>
> My final xml looks like this...
>
> <import resource="classpath:META-INF/cxf/cxf.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-extension-xml.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>
> <jaxws:endpoint
>         id="soapCurrencyExchange"
>         implementor="com.example.ws.fx.endpoint.CurrencyExchangeImpl"
>         address="/CurrencyExchange.soap"
>         bindingUri="http://schemas.xmlsoap.org/soap/";>
> </jaxws:endpoint>
>
> <jaxws:endpoint
>         id="poxCurrencyExchange"
>         implementor="com.example.ws.fx.endpoint.CurrencyExchangeImpl"
>         address="/CurrencyExchange.xml"
>         bindingUri="http://cxf.apache.org/bindings/xformat";>
> </jaxws:endpoint>
>
>
>
>
> On 7/31/07, Ray Krueger <[EMAIL PROTECTED]> wrote:
> > wow James that's fantastic, thanks!
> > I'll give this a shot this morning (CST) and let you know how it goes.
> >
> > On 7/30/07, James Mao <[EMAIL PROTECTED]> wrote:
> > > Modify the cxf-servlet.xml as the following
> > >
> > >       <jaxws:endpoint
> > >           id="hello_world_xml"
> > >           implementor="demo.hw.server.GreeterImpl"
> > >           address="/xml"
> > >           bindingUri="http://cxf.apache.org/bindings/xformat";>
> > >       </jaxws:endpoint>
> > >
> > >       <jaxws:endpoint
> > >           id="hello_world_soap"
> > >           implementor="demo.hw.server.GreeterImpl"
> > >           address="/soap"
> > >           bindingUri="http://apache.org/cxf/binding/http";>
> > >       </jaxws:endpoint>
> > >
> > > Your impl should look like this
> > >
> > > package demo.hw.server;
> > >
> > > @javax.jws.WebService
> > >
> > > public class GreeterImpl {
> > >     public String greetMe(String me) {
> > >         System.out.println("received calling greetMe!");
> > >         return "Hello " + me;
> > >     }
> > > }
> > >
> > >
> > > However i found there is a snag, the
> > > http://localhost:8080/helloworld/services/xml?wsdl will return the
> soap
> > > binding instead of the xml binding. I'll file a jira for this.
> > > If all goes correct, you should be able to post the xml and soap to
> > >
> > > http://localhost:8080/helloworld/services/xml
> > > http://localhost:8080/helloworld/services/soap
> > >
> > > James
> > >
> > > >
> > > >> OK, I see now that the trick to getting what I want to work
> involves
> > > >> using the xformat:binding element in my wsdl:bindings.
> > > >>
> > > >> Does this mean that I can't support both POX and SOAP using the
> same
> > > >> @WebService impl?
> > > >>
> > > >
> > > > Yes, you have to specify the @WebService and also @BindingType
> > > > determine the binding you are using
> > > > in case of SOAP1.1 you can omit the annotation, but you have to
> > > > specify the @BindingType for the XML binding and for the SOAP1.2binding
> > > >
> > > > But it's also possible to configure the cxf.xml to achieve your
> goal.
> > > > will send you the link if i found the link
> > > >
> > > > Cheers,
> > > > James
> > > >
> > > >>
> > > >> On 7/30/07, Ray Krueger <[EMAIL PROTECTED]> wrote:
> > > >>
> > > >>> Was just playing around with the hello_world_xml_bare, the
> > > >>> functionality is about what I want. But I'd like to be able to run
> it
> > > >>> in the servlet container, not using that Endpoint.publish stuff.
> > > >>>
> > > >>> I have a working jaxws endpoint, I would like CXF to handle an
> > > >>> incoming xml POST, unmarshall the payload and the object to my
> Impl
> > > >>> just as it does for the soap/jaxws stuff.
> > > >>>
> > > >>> Simply put, I'd like my clients to be able to do Http POST
> operations
> > > >>> with just the payload xml, no soap:Envelope. I'd like CXF to
> unmarshal
> > > >>> it with jaxb and pass me the object.
> > > >>>
> > > >>> Maybe the client needs to use a different url for the plain xml
> vs.
> > > >>> the soap message, that's fine. I just don't want to do the
> > > >>> unmarshalling myself in a jaxws provider.
> > > >>>
> > > >>> Make sense?
> > > >>>
> > > >>>
> > > >>>
> > > >>> On 7/30/07, James Mao <[EMAIL PROTECTED]> wrote:
> > > >>>
> > > >>>> wsdl2java tools only support the jax-ws frontend, it does not
> support
> > > >>>> the RESTful service, at moment, but we're working on it.
> > > >>>>
> > > >>>> We have a XML binding in cxf, you can check out the samples
> > > >>>> hello_world_xml_bare and hello_world_xml_wrapped,
> > > >>>> Don't know if it's what you're looking for?
> > > >>>>
> > > >>>> James
> > > >>>>
> > > >>>>
> > > >>>>> I'm loving CXF right now by the way, so thanks for that :)
> > > >>>>>
> > > >>>>> I'd like to be able to send my current WSDL types over the wire
> > > >>>>> without soap envelopes as plain-old-xml via http POST
> operations.
> > > >>>>>
> > > >>>>> I started with a WSDL and a pair of Request/Response type
> objects...
> > > >>>>>
> > > >>>>> Running wsdl2java generates a perfectly working service with
> jaxb
> > > >>>>> inputs/outputs...
> > > >>>>> (summarizing code here, not copy and pasting)
> > > >>>>>
> > > >>>>> @WebService
> > > >>>>> interface CurrencyExchange {
> > > >>>>>   @WebResult, @WebMethod
> > > >>>>>   ExchangeResponse exchange(@WebParam ExchangeRequest)
> > > >>>>> }
> > > >>>>>
> > > >>>>> Great, all this SOAP stuff works as advertised and that's
> fantastic.
> > > >>>>> I'd like people to be able to use a REST-like url (really, I
> don't
> > > >>>>> care what the url looks like), but not do the auto-magical xml
> stuff
> > > >>>>> that CXF seems to support now in the REST support.
> > > >>>>>
> > > >>>>> I'd like to use the same schemas I use for the input and output
> > > >>>>> mesage
> > > >>>>> types in the wsdl.
> > > >>>>>
> > > >>>>> via the POX approach...
> > > >>>>> http://localhost:8080/CurrencyExchange/exchange
> > > >>>>> POST <ExchangeRequest>.....</ExchangeRequest>
> > > >>>>> returns <ExchangeResponse>....</ExchangeResponse>
> > > >>>>>
> > > >>>>> via the SOAP approach...
> > > >>>>> http://localhost:8080/CurrencyExchange
> > > >>>>> POST
> <SoapStuff><ExchangeRequest>.....</ExchangeRequest></<SoapStuff>
> > > >>>>> returns
> > > >>>>> <SoapStuff><ExchangeResponse>....</ExchangeResponse></SoapStuff>
> > > >>>>>
> > > >>>>> Any ideas where I could start or what I could touch to make this
> > > >>>>> work?
> > > >>>>>
> > > >>>>> (Hopefully the half-assery that are my code examples; don't
> > > >>>>> confuse anyone)
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>
> > > >>
> > > >
> > >
> >
>

Reply via email to