You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2011/03/14 10:08:29 UTC
[jira] Commented: (CXF-3397) ServiceConstructionException: Could
not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
[ https://issues.apache.org/jira/browse/CXF-3397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006359#comment-13006359 ]
Willem Jiang commented on CXF-3397:
-----------------------------------
CXF will try to use SpringBusFactory when there is "org.springframework.context.ApplicationContext" class in the class path.
When you keep the "spring-web" dependency in the pom.xml, mvn will add the dependency of spring context into the class path, and SpringBusFactory will be used.
If you exclude the dependency of "spring-web" CXF will use CxfBusFactory to load the components, there maybe something wrong with that part.
I will keep digging to see why the CXFBusFactory cannot load the SoapBindingFactory rightly.
Willem
> ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
> ---------------------------------------------------------------------------------------------------
>
> Key: CXF-3397
> URL: https://issues.apache.org/jira/browse/CXF-3397
> Project: CXF
> Issue Type: Bug
> Components: Soap Binding, Transports
> Affects Versions: 2.3.3
> Environment: Windows 7/JDK 1.6 Update 24
> Reporter: Arulazi Dhesiaseelan
> Assignee: Willem Jiang
> Attachments: cxf-soap-rest.zip
>
>
> I get the following exception when I deploy a JAXWS and JAXRS service using the CXF Jetty transport.
> Mar 13, 2011 11:10:17 PM org.apache.cxf.endpoint.ServerImpl initDestination
> INFO: Setting the server's publish address to be http://localhost:9090/echo-rest
> Mar 13, 2011 11:10:17 PM org.eclipse.jetty.util.log.Slf4jLog info
> INFO: jetty-7.2.2.v20101205
> Mar 13, 2011 11:10:17 PM org.eclipse.jetty.util.log.Slf4jLog info
> INFO: Started SelectChannelConnector@localhost:9090
> Mar 13, 2011 11:10:17 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
> INFO: Creating Service {http://example.com}EchoServiceService from class org.demo.EchoService
> REST Server started @ http://localhost:9090/echo-rest
> Exception in thread "main" org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
> at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:349)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:166)
> at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:251)
> at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:147)
> at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:148)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:183)
> at org.demo.Main.main(Main.java:40)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
> Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered.
> at org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:120)
> at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:337)
> ... 11 more
> This exception goes away, when I do not exclude spring-web in the maven dependency:
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-transports-http-jetty</artifactId>
> <version>2.3.3</version>
> <exclusions>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-web</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> I believe Spring is not a requirement for this Jetty transport module. Could someone clarify this behavior? I am attaching a sample maven project that reproduces this problem. I have checked JIRA and CXF-2284 sounds very similar to this, not sure if I can comment on a closed JIRA, so opened a new one.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira