The for ur replys..
I'm still strying to get it works:
This is the service src:
--------------------------------------------------------
package org.openspcoop.pdd.services;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.Provider;
import javax.xml.ws.ServiceMode;
import javax.xml.ws.WebServiceProvider;
import javax.xml.ws.Service.Mode;
@ServiceMode(value=Mode.MESSAGE)
@WebServiceProvider
public class RicezioneContenutiApplicativiWS implements
Provider<SOAPMessage>{
public SOAPMessage invoke(SOAPMessage request){
return request;
}
}
----------------------------------------------
this is the web.xml
------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/openspcoop_beans.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<display-name>CXF Servlet</display-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
--------------------------------------------------------
This is openspcoop_beans.xml
-------------------------------------------------
<?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:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<jaxws:endpoint id="PD"
implementor="org.openspcoop.pdd.services.RicezioneContenutiApplicativiWS"
address="/PD" />
</beans>
----------------------------------------------------
This is the error i get:
-----------------------------------------------------
10:34:31,578 INFO [TomcatDeployer] deploy, ctxPath=/CFX,
warUrl=.../deploy/CFX.war/
10:34:32,043 INFO [[/CFX]] Initializing Spring root WebApplicationContext
10:34:32,044 INFO [ContextLoader] Root WebApplicationContext:
initialization started
10:34:32,139 INFO [XmlWebApplicationContext] Refreshing
[EMAIL PROTECTED]:
display name [Root WebApplicationContext]; startup date [Mon Oct 15 10:34:32
CEST 2007]; root of context hierarchy
10:34:32,307 INFO [XmlBeanDefinitionReader] Loading XML bean definitions
from ServletContext resource [/WEB-INF/openspcoop_beans.xml]
10:34:33,381 INFO [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf.xml]
10:34:33,463 INFO [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-http-binding.xml]
10:34:33,514 INFO [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-servlet.xml]
10:34:33,575 INFO [XmlWebApplicationContext] Bean factory for application
context
[EMAIL PROTECTED]:
[EMAIL PROTECTED]
10:34:33,762 INFO [XmlWebApplicationContext] Bean
'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not eligible for
getting processed by all BeanPostProcessors (for example: not eligible for
auto-proxying)
10:34:33,767 INFO [XmlWebApplicationContext] Bean
'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not eligible for
getting processed by all BeanPostProcessors (for example: not eligible for
auto-proxying)
10:34:33,815 INFO [DefaultListableBeanFactory] Pre-instantiating singletons
in
[EMAIL PROTECTED]:
defining beans
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.transport.servlet.ServletTransportFactory,PD];
root of factory hierarchy
10:34:34,475 ERROR [STDERR] 15-ott-2007 10.34.34
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service
{http://services.pdd.openspcoop.org/}RicezioneContenutiApplicativiWSService
from class org.openspcoop.pdd.services.RicezioneContenutiApplicativiWS
10:34:34,571 INFO [DefaultListableBeanFactory] Destroying singletons in
[EMAIL PROTECTED]:
defining beans
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.transport.servlet.ServletTransportFactory,PD];
root of factory hierarchy
10:34:34,595 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'PD': Invocation of init method failed; nested exception is
org.apache.cxf.service.factory.ServiceConstructionException: Could not
resolve a binding for http://schemas.xmlsoap.org/soap/
Caused by:
org.apache.cxf.service.factory.ServiceConstructionException: Could not
resolve a binding for http://schemas.xmlsoap.org/soap/
at
org.apache.cxf.frontend.AbstractEndpointFactory.createBindingInfo(AbstractEndpointFactory.java:302)
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:137)
.....
.....
Caused by: org.apache.cxf.BusException: No binding factory for namespace
http://schemas.xmlsoap.org/soap/ registered.
at
org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:78)
at
org.apache.cxf.frontend.AbstractEndpointFactory.createBindingInfo(AbstractEndpointFactory.java:297)
... 115 more
Liu, Jervis wrote:
>
> JAX-WS Dispatch/Provider API should give you what you want. There is a
> sample named jaxws_dispatch_provider in CXF distribution demonstrates how
> to write dispatch/provider in CXF. The reason why you got that exception
> is because you are using CXF HTTP binding in your configuration, which is
> the wrong. CXF HTTP binding is supposed to be used for REST style
> services, not for SOAP services. A configuration snippet like below
> should do the trick for you:
>
> <jaxws:endpoint
> id="PD"
>
> implementor="org.openspcoop.pdd.services.RicezioneContenutiApplicativiWS"
> address="/PD" />
>
> Cheers,
> Jervis
>
>> -----Original Message-----
>> From: Cencio [mailto:[EMAIL PROTECTED]
>> Sent: 2007?10?11? 23:13
>> To: [email protected]
>> Subject: Message level service
>>
>>
>>
>> Hi all,
>>
>> i have an old service in axis that uses saaj to work on
>> messages. Now i want
>> to migrate on CFX but i encounter some problems...
>>
>> First step is make a service that works at message level with
>> saaj. So i
>> need that avery message that point to
>> http://localhost:8080/CFX/myService/and/some/more is catch
>> by myService
>> service and some method handle it (something like
>> handleMessage(SOAPMessage
>> message) )
>>
>> To work at Message level i read something about
>> @ServiceProvider but i don't
>> reach the goal...
>>
>> i tryed with:
>>
>> package org.openspcoop.pdd.services;
>> import java.rmi.RemoteException;
>> import java.util.Map;
>> import javax.xml.soap.SOAPMessage;
>> import javax.xml.ws.*;
>>
>> @WebServiceProvider
>> @ServiceMode(value=javax.xml.ws.Service.Mode.MESSAGE)
>>
>> public class RicezioneContenutiApplicativiWS {
>> public SOAPMessage invoke(SOAPMessage msg, Map<String,
>> Object> ctxt) throws
>> RemoteException {
>> return msg;
>> }
>> }
>>
>> but it doesn't work, it gives this exception when invoking:
>>
>> 17:06:10,341 ERROR [STDERR] 11-ott-2007 17.06.10
>> org.apache.cxf.binding.http.interceptor.DispatchInterceptor
>> handleMessage
>> INFO: Invoking POST on
>> 17:06:10,344 ERROR [STDERR] 11-ott-2007 17.06.10
>> org.apache.cxf.phase.PhaseInterceptorChain doIntercept
>> INFO: Interceptor has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Invalid URL/Verb
>> combination. Verb: POST
>> Path:
>> at
>> org.apache.cxf.binding.http.interceptor.DispatchInterceptor.ha
>> ndleMessage(DispatchInterceptor.java:74)
>> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIn
> terceptorChain.java:207)
>> at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(Cha
> inInitiationObserver.java:73)
>> at
>> org.apache.cxf.transport.servlet.ServletDestination.doMessage(
> ServletDestination.java:79)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invokeDesti
>> nation(ServletController.java:235)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invoke(Serv
> letController.java:140)
>> at
>> org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.
> java:278)
>> at
>> org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.
> java:256)
>> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
>> er(ApplicationFilterChain.java:252)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173)
>> at
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyH
> eaderFilter.java:96)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
>> er(ApplicationFilterChain.java:202)
>> 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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(
> SecurityAssociationValve.java:175)
>> at
>> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccCont
> extValve.java:74)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105)
>> at
>> org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(Cach
> edConnectionValve.java:156)
>> 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.MasterSlaveWorkerThread.run(MasterS
> laveWorkerThread.java:112)
>> at java.lang.Thread.run(Thread.java:595)
>>
>>
>>
>> I deployed CFX into jboss with this web.xml:
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>
>> <!DOCTYPE web-app
>> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>> "http://java.sun.com/dtd/web-app_2_3.dtd">
>> <web-app>
>> <context-param>
>> <param-name>contextConfigLocation</param-name>
>>
>> <param-value>WEB-INF/openspcoop_beans.xml</param-value>
>> </context-param>
>>
>> <listener>
>> <listener-class>
>>
>> org.springframework.web.context.ContextLoaderListener
>> </listener-class>
>> </listener>
>>
>> <servlet>
>> <servlet-name>CXFServlet</servlet-name>
>> <display-name>CXF Servlet</display-name>
>> <servlet-class>
>> org.apache.cxf.transport.servlet.CXFServlet
>> </servlet-class>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
>>
>> <servlet-mapping>
>> <servlet-name>CXFServlet</servlet-name>
>> <url-pattern>/*</url-pattern>
>> </servlet-mapping>
>> </web-app>
>>
>>
>> and added this openspcoop_beans.xml:
>>
>> <?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:jaxws="http://cxf.apache.org/jaxws"
>> xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>> http://cxf.apache.org/jaxws
>> http://cxf.apache.org/schemas/jaxws.xsd">
>>
>> <import resource="classpath:META-INF/cxf/cxf.xml"/>
>> <import
>> resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml"/>
>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>>
>> <jaxws:endpoint id="PD"
>>
>> implementor="org.openspcoop.pdd.services.RicezioneContenutiApp
>> licativiWS"
>> address="/PD"
>> bindingUri="http://apache.org/cxf/binding/http">
>> <jaxws:serviceFactory>
>> <bean
>> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>> <property name="wrapped" value="true" />
>> </bean>
>> </jaxws:serviceFactory>
>> </jaxws:endpoint>
>>
>> </beans>
>>
>>
>>
>>
>>
>> Thx for any help,
>> Lorenzo
>> --
>> View this message in context:
>> http://www.nabble.com/Message-level-service-tf4607880.html#a13157993
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>
>
--
View this message in context:
http://www.nabble.com/Message-level-service-tf4607880.html#a13208803
Sent from the cxf-user mailing list archive at Nabble.com.