Hi,
On 09/05/12 14:10, Paul Selibas wrote:
Thank your for your response...

I tried what you said and I got it to work. You have no idea how grateful I am.

cool
Can I just confirm with you what I have done because I am not sure its
100% correct...

I defined a bean
     <bean name="myBus"
class="org.apache.cxf.bus.extension.ExtensionManagerBus"></bean>

And then my servlet
     <bean class="org.apache.cxf.transport.servlet.CXFNonSpringServlet">
         <property name="bus" ref="myBus" />
     </bean>

And then my endpoint
     <jaxws:endpoint id="webService" implementor="com.xxx.EndpointImp"
                address="/enpoint" bus="myBus">
     </jaxws:endpoint>

And it works. I cant believe there is zero documentation on this.

Great that it works. I guess it's a not a main-stream approach toward deploying the endpoints, but I guess it would be of interest in cases where web.xml is not even required. You can probably use CXFServlet declaration too, given that its init() method is bypassed so it won't try to load the context itself...
You should use a cxf:bus declaration instead, it supports 'id' attributes

Cheers, Sergey


Thank you again.

Paul


On Wed, May 9, 2012 at 1:18 PM, Sergey Beryozkin<[email protected]>  wrote:
Hi

On 09/05/12 11:37, Paul Selibas wrote:

Hello,

Yesterday I asked a question that seems cant be answered. So i will
rephrase my question...
I am new to CXF so please bear with me:

I have created a standalone spring application.
I have a spring config file where I have defined a jetty Server
instance, as well as a CXFServlet, which is registered to this Server.

When I target the URL for that servlet I get the expected "No services
have been found.", which is perfect.

I then, from the same spring config file, specify the following:
     <import resource="classpath:META-INF/cxf/cxf.xml" />
     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />

This extension import is redundant now...

     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
     <jaxws:endpoint id="webService" implementor="com.xx.EndpointImp"
         address="/endpoint">
     </jaxws:endpoint>

I would then expect the service to be published at the "<servlet
url>/endpoint". But its not. Where am I going wrong?
I am confused as to what links up the endpoint to the CXFServlet
instance I have created. Please note I don't have a
web.xml as it is purely configured in spring.

web.xml will also contains a reference to
org.springframework.web.context.ContextLoaderListener and CXFServlet reacts
to it.

Perhaps you should use CXFNonSpringServlet instead, get an explicit cxf:bus
[1] bean declared in the context and have a reference to it injected into a
'bus' property on the servlet...
Alternatively, have the 'main' context which only declares CXFServlet with
its "config-location" init parameter pointing to the 'real' configuration
containing the endpoint info, not sure if it will work :-)

Cheers, Sergey

[1] http://cxf.apache.org/docs/bus-configuration.html


Any help or guidance will really be appreciated.

Paul



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to