CXF 2.4.2: No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http

后端 未结 8 1692
天命终不由人
天命终不由人 2020-12-01 18:05

I have a service client generated from wsdl. I am trying to call the remote service and I recieve the conduit initiator error seen below. I have tried numerous solutions w

相关标签:
8条回答
  • 2020-12-01 18:33

    This doesn't apply specifically to the original poster's example URLs listed, but we got this error when the URL was incorrect. I.e., we had a certain string in the URL path listed twice instead of once.

    0 讨论(0)
  • 2020-12-01 18:37

    This error can be produced by invalid url format on client. For example, if you use http transport, you should define "http://localhost:8080/services/{smth}" url. And if you define "localhost:8080/services/{smth}" without http prefix - you receive such an error.

    0 讨论(0)
  • 2020-12-01 18:46

    I was also facing the same issue. Through IntelliJ everything was working fine but maven surefire was throwing up error. And finally found the answer. Here it is:

    Basically the cxf libraries each supply a META-INF/cxf/bus-extensions.txt file and the default behavior of the packager is to replace that file, causing it to be incomplete. By configuring the shader to append instead of replace the cxf stuff will behave correctly.

    Add this to your build section of your pom in the plugins section:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.4</version>
        <configuration>
          <createDependencyReducedPom>true</createDependencyReducedPom>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                  <resource>META-INF/cxf/bus-extensions.txt</resource>
                </transformer>
              </transformers>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    
    0 讨论(0)
  • 2020-12-01 18:46

    Removing this Dependency from my POM Fixed the error for me

       <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>3.1.1</version>
        </dependency>
    
    0 讨论(0)
  • 2020-12-01 18:47

    I had a similar situation with this error and for this issue seems to be coming with the older versions of the following jars

    cxf-core-2.x.jar
    cxf-rt-frontend-jaxrs-2.x.jar
    cxf-rt-rs-client-2.x.jar
    cxf-rt-transports-http-2.x.jar
    

    When I have switched to the latest releases of these jars (3.2.1, at the time of writing) has resolved the error.

    0 讨论(0)
  • 2020-12-01 18:58

    Did you put the cxf-rt-binding-soap-2.4.x.jar into your class path?

    0 讨论(0)
提交回复
热议问题