Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3397

ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.3
    • 2.3.4
    • Soap Binding, Transports
    • None
    • Windows 7/JDK 1.6 Update 24

    Description

      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.

      Attachments

        1. cxf-soap-rest.zip
          3 kB
          Arul Dhesiaseelan

        Activity

          People

            njiang Willem Jiang
            aruld Arul Dhesiaseelan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: