On Fri October 16 2009 5:01:05 am Spam wrote:
> With 2.2.4 it works fine :-)
> 
> I still mustn't add these imports:
> 
>    <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-servlet.xml" />
> 
> But I'm now able (with 2.2.4) to configure
> 
> >      <cxf:bus>
> >         <cxf:features>
> >             <cxf:logging/>
> >         </cxf:features>
> >     </cxf:bus>
> 
> without any problem.
> 
> For my knowledge, could you give me the JIRA issue number that is
> related to your '<cxf:bus> processing modifications'? 

There wasn't a JIRA.  Something I kind of did while reviewing other stuff.   
The specific commits are:

------------------------------------------------------------------------        
                                    
r812736 | dkulp | 2009-09-08 20:35:29 -0400 (Tue, 08 Sep 2009) | 2 lines        
                                    

if <cxf:bus> is used in a context that doesn't define a bus, go ahead
and create a default bus and wire it into the context                

------------------------------------------------------------------------
r788820 | dkulp | 2009-06-26 15:13:14 -0400 (Fri, 26 Jun 2009) | 4 lines

Change <cxf:bus> processing to configure the existing bus, not create a
new one
Make Bus have properties so props (like schema-validation) can be
enabled globally



Dan



> 
> Thank you for you help.
> 
> Johann
> 
> 
> 
> On Fri, Oct 9, 2009 at 8:59 AM, Johann DUPUIS <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     Thanks I will give 2.2.4 a try.
> 
>     Johann
> 
> 
>     On Thu, Oct 8, 2009 at 10:56 PM, Daniel Kulp <[email protected]
>     <mailto:[email protected]>> wrote:
> 
> 
>         I think this is one of the bugs I fixed in 2.2.4.   If made some
>         modifications
>         to the <cxf:bus> processing stuff to grab the default bus (which
>         is what you
>         see being created) if one isn't already in the context.   Thus,
>         this may be
>         fixed in 2.2.4 (which is being voted on now)
> 
>         Dan
> 
>         On Tue October 6 2009 3:44:38 am Spam wrote:
>         > In my 'web.xml' I load services related configuration with:
>         >
>         >     <servlet>
>         >         <servlet-name>CXFServlet</servlet-name>
>         >         <display-name>CXF Servlet</display-name>
> 
>        
>  <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> 
>         >         <init-param>
>         >             <param-name>config-location</param-name>
> 
>          <param-value>/WEB-INF/services-server.xml</param-value>
> 
>         >         </init-param>
>         >         <load-on-startup>1</load-on-startup>
>         >      </servlet>
>         >
>         >     <servlet-mapping>
>         >         <servlet-name>CXFServlet</servlet-name>
>         >         <url-pattern>/services/*</url-pattern>
>         >       </servlet-mapping>
>         >
>         > If i remove those lines from 'services-server.xml', then
> 
>         imports looks
> 
>         > like useless:
>         > >      <cxf:bus>
>         > >         <cxf:features>
>         > >             <cxf:logging/>
>         > >         </cxf:features>
>         > >     </cxf:bus>
>         >
>         > For info, here is the beginning of 'services-server.xml' file:
>         > <?xml version="1.0" encoding="UTF-8"?>
>         > <beans xmlns="http://www.springframework.org/schema/beans";
>         >       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>         >       xmlns:simple="http://cxf.apache.org/simple";
>         >       xmlns:soap="http://cxf.apache.org/bindings/soap";
>         >       xmlns:cxf="http://cxf.apache.org/core";
>         >       xmlns:jaxws="http://cxf.apache.org/jaxws";
>         >       xsi:schemaLocation="
>         > http://www.springframework.org/schema/beans
>         > http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>         > http://cxf.apache.org/bindings/soap
>         > http://cxf.apache.org/schemas/configuration/soap.xsd
>         > http://cxf.apache.org/simple
> 
>         http://cxf.apache.org/schemas/simple.xsd
> 
>         > http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
>         > http://cxf.apache.org/jaxws
> 
>         http://cxf.apache.org/schemas/jaxws.xsd
> 
>         > "
>         > default-autowire="byName">
>         >
>         >
>         > Looking at Tomcat starting I can read:
>         > 09:31:10,191 INFO  [BusApplicationContext] No cxf.xml
> 
>         configuration file
> 
>         > detected, relying on defaults.
>         > 09:31:10,191 DEBUG [BusApplicationContext] Creating
> 
>         application context
> 
>         > with resources: [class path resource [META-INF/cxf/cxf.xml],
> 
>         class path
> 
>         > resource [META-INF/cxf/cxf-extension-corba.xml], class path
> 
>         resource
> 
>         > [META-INF/cxf/cxf-extension-jaxws.xml], ...
>         >
>         > So I guess there is a fallback that workaround the missing
> 
>         'cxf.xml' and
> 
>         > related files.
>         >
>         > The problem is I cannot configure <cxf:bus> since adding
> 
>         imports is
> 
>         > breaking (without error) the WS deployment.
>         >
>         > Regards.
>         > Johann
>         >
>         >
>         > On Mon, Oct 5, 2009 at 8:42 PM, Daniel Kulp <[email protected]
> 
>         <mailto:[email protected]>
> 
>         > <mailto:[email protected] <mailto:[email protected]>>> wrote:
>         >
>         >
>         >     I guess it kind of depends on how this config is picked up...
>         >
>         >     Is this a cxf-servlet.xml thing that the CXFServlet is
> 
>         loading (in
> 
>         >     which case
>         >     you shouldn't have the imports as your config is loaded on
> 
>         top of the
> 
>         >     "Default" bus configs)  or is this a
> 
>         applicationContext.xml type
> 
>         >     thing that
>         >     the sping context listener is picking up (in which case it
> 
>         IS needed)?
> 
>         >     Dan
>         >
>         >     On Mon October 5 2009 4:37:25 am Spam wrote:
>         >     > Hi All,
>         >     >
>         >     > I answer by myself.
>         >     >
>         >     > Even if I don't really know why, removing following
> 
>         lines from  my
> 
>         >     > services configuration is fixing the issue (services are
> 
>         visible
> 
>         >     and are
>         >
>         >     > running perfectly):
>         >     >
>         >     >     <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-servlet.xml" />
> 
>         >     >     <cxf:bus>
>         >     >         <cxf:features>
>         >     >             <cxf:logging/>
>         >     >         </cxf:features>
>         >     >     </cxf:bus>
>         >     >
>         >     > Any idea why these lines are preventing web services to
> 
>         be usable
> 
>         >     while
>         >
>         >     > no error message is issued?
>         >     >
>         >     > Regards.
>         >     > Johann
>         >     >
>         >     > Spam a écrit :
>         >     > > Hi All,
>         >     > >
>         >     > > I've followed the guidelines from
> 
>         "http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html"; to
> 
>         >     > > configure my web services inside Tomcat 6.0.
>         >     > >
>         >     > > If I use the following configuration, everything in
> 
>         the cxf
> 
>         >     (log4j) log
>         >
>         >     > > file looks like the services are deployed
> 
>         successfully, but
> 
>         >     > > checking with
> 
>         "http://localhost:8080/myWebApp/services/"; results in
> 
>         >     > > "No
>         >
>         >     services
>         >
>         >     > > have been found.".
>         >     > >
>         >     > >     <bean id="WSUserServicePortType"
>         >     > > class="be.eft.cbkv3.ws.WSUserServicePortTypeImpl">
>         >     > >     </bean>
>         >     > >     <jaxws:endpoint id="WSUserServicePortTypeEndpoint"
>         >     > >                     implementor="#WSUserServicePortType"
>         >     > >                     address="/WS_UserService.srv">
>         >     > >         <jaxws:binding>
>         >     > >                  <soap:soapBinding mtomEnabled="true"
>         >
>         >     version="1.2"/>
>         >
>         >     > >           </jaxws:binding>
>         >     > >     </jaxws:endpoint>
>         >     > >
>         >     > >     <bean id="WSClaimServicePortType"
>         >     > > class="be.eft.cbkv3.ws.WSClaimServicePortTypeImpl">
>         >     > >     </bean>
>         >     > >     <jaxws:endpoint id="WSClaimServicePortTypeEndpoint"
>         >     > >                     implementor="#WSClaimServicePortType"
>         >     > >                     address="/WS_ClaimService.srv">
>         >     > >         <jaxws:binding>
>         >     > >                  <soap:soapBinding mtomEnabled="true"
>         >
>         >     version="1.2"/>
>         >
>         >     > >           </jaxws:binding>
>         >     > >       </jaxws:endpoint>
>         >     > >
>         >     > > I changed configuration in that way (not using
> 
>         implementor but
> 
>         >     > > implementorClass only):
>         >     > >     <jaxws:endpoint id="WSUserServicePortTypeEndpoint"
> 
>         implementorClass="be.eft.cbkv3.ws.WSUserServicePortTypeImpl"
> 
>         >     > >                     address="/WS_UserService.srv">
>         >     > >         <jaxws:binding>
>         >     > >                  <soap:soapBinding mtomEnabled="true"
>         >
>         >     version="1.2"/>
>         >
>         >     > >           </jaxws:binding>
>         >     > >     </jaxws:endpoint>
>         >     > >
>         >     > >     <jaxws:endpoint id="WSClaimServicePortTypeEndpoint"
> 
>         implementorClass="be.eft.cbkv3.ws.WSClaimServicePortTypeImpl"
> 
>         >     > >                     address="/WS_ClaimService.srv">
>         >     > >         <jaxws:binding>
>         >     > >                  <soap:soapBinding mtomEnabled="true"
>         >
>         >     version="1.2"/>
>         >
>         >     > >           </jaxws:binding>
>         >     > >       </jaxws:endpoint>
>         >     > > Then I get on
> 
>         "http://localhost:8080/myWebApp/services/"; (looks
> 
>         >     good,
>         >
>         >     > > isn't it?):
>         >     > >     Available SOAP services:
>         >     > >         WSClaimServicePortType
>         >     > >             * getClaim
>         >     > >             * identify
>         >     > >
>         >     > >         WSUserServicePortType
>         >     > >             * openSession
>         >     > >             * identify
>         >     > >             * closeSession
>         >     > > But when I try to use the Web Services by running the WS
>         >
>         >     consumers, I
>         >
>         >     > > get this error (in tomcat log):
>         >     > >        02 Oct 2009 at 18.06.57,929    WARN
> 
>         (SessionId=,org.apache.cxf.common.logging.LogUtils,345,http-8080-1)
>         []
> 
>         >     > > Application has thrown exception, unwinding now
>         >     > > org.apache.cxf.interceptor.Fault: object is not an
> 
>         instance of
> 
>         >     declaring
>         >
>         >     > > class while invoking public java.lang.String
> 
>         
>  myPackage.ws.WSUserServicePortTypeImpl.openSession(java.lang.String,java.
> 
>         >     > >lang.String,java.lang.Short,java.lang.String) throws
>         >     > > myPackage.ws.LoginException_Exception with params [login,
>         >
>         >     password, 0,
>         >
>         >     > > localhost].
>         >     > >     at
> 
>         
>  org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoke
> 
>         >     > >r.java:152) at
> 
>         
>  org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWS
> 
>         >     > >MethodInvoker.java:83) at
> 
>         
>  org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.jav
> 
>         >     > >a:126) at
> 
>         
>  org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55
> 
>         >     > >) at
> 
>         
>  org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.jav
> 
>         >     > >a:68) at
> 
>         
>  org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvoker
> 
>         >     > >Interceptor.java:58) at
> 
>        
>  java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> 
>         >     > >     at
> 
>         java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 
>         >     > >     at
> 
>         java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 
>         >     > >     at
> 
>         
>  org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.
> 
>         >     > >java:37) at
> 
>         
>  org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Servic
> 
>         >     > >eInvokerInterceptor.java:98) at
> 
>         
>  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
> 
>         >     > >ain.java:236) at
> 
>         
>  org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiatio
> 
>         >     > >nObserver.java:104) at
> 
>         
>  org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestina
> 
>         >     > >tion.java:99) at
> 
>         
>  org.apache.cxf.transport.servlet.ServletController.invokeDestination(Serv
> 
>         >     > >letController.java:452) at
> 
>         
>  org.apache.cxf.transport.servlet.ServletController.invoke(ServletControll
> 
>         >     > >er.java:196) at
> 
>         
>  org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSer
> 
>         >     > >vlet.java:220) at
> 
>         
>  org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFSer
> 
>         >     > >vlet.java:153) at
> 
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at
> 
> 
> 
>         
>  org.apache.cxf.transport.servlet.AbstractCXFServlet.service(AbstractCXFSe
> 
>         >     > >rvlet.java:211) at
> 
>         
>  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
> 
>         >     > >ionFilterChain.java:290) at
> 
>         
>  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte
> 
>         >     > >rChain.java:206) at
> 
>         
>  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve
> 
>         >     > >.java:233) at
> 
>         
>  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve
> 
>         >     > >.java:191) at
> 
>         
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
>         >     > >128) at
> 
>         
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
>         >     > >102) at
> 
>         
>  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j
> 
>         >     > >ava:109) at
> 
>         
>  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:28
> 
>         >     > >6) at
> 
>         
>  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845
> 
>         >     > >) at
> 
>         
>  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(H
> 
>         >     > >ttp11Protocol.java:583) at
> 
>        
>  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 
>         >     > >     at java.lang.Thread.run(Thread.java:619)
>         >     > > Caused by: java.lang.IllegalArgumentException: object
> 
>         is not an
> 
>         >     instance
>         >
>         >     > > of declaring class
>         >     > >     at
> 
>         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>         >     > >     at
> 
>         
>  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> 
>         >     > >:39) at
> 
>         
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> 
>         >     > >mpl.java:25) at
> 
>         java.lang.reflect.Method.invoke(Method.java:597)
> 
>         >     > >     at
> 
>         
>  org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Abstract
> 
>         >     > >Invoker.java:166) at
> 
>         
>  org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.jav
> 
>         >     > >a:82) ... 29 more
>         >     > >
>         >     > > I wonder what is wrong in my configuration?
>         >     > >
>         >     > > I've tested using "jaxws:server" and I have same
> 
>         issue: the web
> 
>         >     services
>         >
>         >     > > looks like deployed in the log but access to
>         >     > > "http://localhost:8080/myWebApp/services/"; results in "No
>         >
>         >     services have
>         >
>         >     > > been found.".
>         >     > >
>         >     > > By the way, my tests based on Simple Frontend are
> 
>         working well:
>         >     > >    <simple:server id="cxf.wsUserService"
>         >     > > serviceClass="myPackage.ws.interfaces.WSUserService"
>         >     > > address="/WS_UserService.srv">
>         >     > >       <simple:serviceBean>
>         >     > >         <bean id="server.wsUserService"
>         >     > > class="myPackage.ws.impl.WSUserServiceImpl">
>         >     > >             <property name="businessFacade"
> 
>         ref="businessFacade"/>
> 
>         >     > >         </bean>
>         >     > >       </simple:serviceBean>
>         >     > >   </simple:server>
>         >     > >
>         >     > >   <simple:server id="cxf.wsClaimService"
>         >     > > serviceClass="myPackage.ws.interfaces.WSClaimService"
>         >     > > address="/WS_ClaimService.srv">
>         >     > >       <simple:serviceBean>
>         >     > >           <bean id="server.wsClaimService"
>         >     > > class="myPackage.ws.impl.WSClaimServiceImpl">
>         >     > >             <property name="businessFacade"
> 
>         ref="businessFacade"/>
> 
>         >     > >         </bean>
>         >     > >       </simple:serviceBean>
>         >     > >   </simple:server>
>         >     > >
>         >     > > Any help would be greatly appreciated.
>         >     > >
>         >     > > Regards.
>         >     > > Johann
>         >
>         >     --
>         >     Daniel Kulp
>         >     [email protected] <mailto:[email protected]>
> 
>         <mailto:[email protected] <mailto:[email protected]>>
> 
>         >     http://www.dankulp.com/blog
> 
>         --
>         Daniel Kulp
>         [email protected] <mailto:[email protected]>
>         http://www.dankulp.com/blog
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to