Hi Marc,

You may want to check out this section in the migration guide:

http://cwiki.apache.org/CXF20DOC/xfire-migration-guide.html#XFireMigrationGuide-HTTPandServletSetup

CXF now actually handles all the XFireHttpServer stuff behind the scenes,
making it easier for you. The address that you supply will be used. If there
is no Servlet that has been configured, CXF will automatically boot up
Jetty.

Also, JSR181 is now all wrapped up in the JAX-WS functionality, so thats
where you should be looking (I should maybe add some notes about that to the
user's guide).

Your configuration snippet looks OK. Regarding the "id" attribute, I think
for now its needed but we should be able to auto-generate one for you
instead. I filed a JIRA issue for this for 2.0.1:

https://issues.apache.org/jira/browse/CXF-767

Regards,
- Dan

On 7/5/07, Marc Baumgartner <[EMAIL PROTECTED]> wrote:

Hi Andrea,

thank you the hint, but I am still struggeling with the further steps:

How can I do something like this in XFire:

<bean id="webAnnotations" 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="webAnnotations" />
        </property>
        </bean>


Do I have always to name every service in the Configuration like this:

<jaxws:endpoint id="helloWorld" implementor="demo.spring.HelloWorldImpl"
address="/HelloWorld" />

Thanks,
Marc



-------- Original-Nachricht --------
Datum: Thu, 05 Jul 2007 12:35:11 +0100
Von: Andrea Smyth <[EMAIL PROTECTED]>
An: [email protected]
Betreff: Re: Http-Server

> Hi Marc,
>
> The CXF equivalent of the XFire class is the Bus, so you could do:
>
> Bus bus = BusFactory.getDefaultBus(); // creates a bus and makes it the
> default bus
> ....
> Endpoint.publish("http://localhost:8080/ctxA";, new ImplementorA());
> Endpoint.publish("http://localhost:8080/ctxB";, new ImplementorB());
> ....
> bus.shutdown(true);
>
> Bus.shutdown will shutdown all endpoints, and, as part of that, all http
> listeners.
> You can also shutdown endpoints individually, reference counting should
> take care that the listener on 8080 will eventually be shut down also.
> On a more granular level, you can access the endpoints' destination,
> cast it to a JettyHTTPDestination and programatically control the
> server's behaviour.
>
> Hope that helps,
> Andrea.
>
> Marc Baumgartner wrote:
>
> >Hi all,
> >
> >with XFire I have done something like this in my unit tests:
> >
> >XFireHttpServer httpServer = new XFireHttpServer();
> >httpServer.setPort(8080);
> >httpServer.start();
> >XFire xfire = XFireFactory.newInstance().getXFire();
> >AnnotationServiceFactory osf = new AnnotationServiceFactory(new
> >Jsr181WebAnnotations(), xfire.getTransportManager());
> >...
> >// Do the test
> >
> >httpServer.stop();
> >
> >How can I do something like this with cxf?
> >
> >Thanks,
> >M808
> >
> >
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland

--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger




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

Reply via email to