Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-4230

Cannot select an HTTP connector for use with a CXF endpoint

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: ITR16, 2.2.1
    • Component/s: Modules: CXF
    • Labels:
      None
    • Environment:

      JDK 1.5, WinXP, Mule 2.2 CE

    • Severity:
      S1
    • Configuration:
      Hide

      <?xml version="1.0" encoding="UTF-8"?>
      <mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
      xmlns:file="http://www.mulesource.org/schema/mule/file/2.2"
      xmlns:cxf="http://www.mulesource.org/schema/mule/cxf/2.2"
      xmlns:http="http://www.mulesource.org/schema/mule/http/2.2"
      xmlns:axis="http://www.mulesource.org/schema/mule/axis/2.2"
      xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
      xsi:schemaLocation="
      http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
      http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
      http://www.mulesource.org/schema/mule/file/2.2 http://www.mulesource.org/schema/mule/file/2.2/mule-file.xsd
      http://www.mulesource.org/schema/mule/cxf/2.2 http://www.mulesource.org/schema/mule/cxf/2.2/mule-cxf.xsd
      http://www.mulesource.org/schema/mule/http/2.2 http://www.mulesource.org/schema/mule/http/2.2/mule-http.xsd
      http://www.mulesource.org/schema/mule/axis/2.2 http://www.mulesource.org/schema/mule/axis/2.2/mule-axis.xsd
      http://www.mulesource.org/schema/mule/jms/2.2 http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd">

      <description> This a sample configuration that shows how to choose an HTTP connector for
      your WS endpoints </description>

      <cxf:connector name="myCXF" defaultFrontend="simple"/>

      <http:connector name="Http1"/>
      <http:connector name="Http2"/>

      <cxf:endpoint address="http://localhost:1968?connector=Http1" name="myCxfEndpoint"/>
      <!-- Connector-ref for CXF endpoints must point to a CXF connector -->

      <model name="Example">

      <service name="CXF-Test">
      <inbound>
      <cxf:inbound-endpoint ref="myCxfEndpoint"/>
      </inbound>
      <component class="com.ricston.services.AntoineChangeMessage"/>
      </service>

      </model>
      </mule>

      Show
      <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesource.org/schema/mule/core/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2" xmlns:file="http://www.mulesource.org/schema/mule/file/2.2" xmlns:cxf="http://www.mulesource.org/schema/mule/cxf/2.2" xmlns:http="http://www.mulesource.org/schema/mule/http/2.2" xmlns:axis="http://www.mulesource.org/schema/mule/axis/2.2" xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2" xsi:schemaLocation=" http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd http://www.mulesource.org/schema/mule/file/2.2 http://www.mulesource.org/schema/mule/file/2.2/mule-file.xsd http://www.mulesource.org/schema/mule/cxf/2.2 http://www.mulesource.org/schema/mule/cxf/2.2/mule-cxf.xsd http://www.mulesource.org/schema/mule/http/2.2 http://www.mulesource.org/schema/mule/http/2.2/mule-http.xsd http://www.mulesource.org/schema/mule/axis/2.2 http://www.mulesource.org/schema/mule/axis/2.2/mule-axis.xsd http://www.mulesource.org/schema/mule/jms/2.2 http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd "> <description> This a sample configuration that shows how to choose an HTTP connector for your WS endpoints </description> <cxf:connector name="myCXF" defaultFrontend="simple"/> <http:connector name="Http1"/> <http:connector name="Http2"/> <cxf:endpoint address="http://localhost:1968?connector=Http1" name="myCxfEndpoint"/> <!-- Connector-ref for CXF endpoints must point to a CXF connector --> <model name="Example"> <service name="CXF-Test"> <inbound> <cxf:inbound-endpoint ref="myCxfEndpoint"/> </inbound> <component class="com.ricston.services.AntoineChangeMessage"/> </service> </model> </mule>
    • Log Output:
      See above for error log

      Description

      If you have multiple HTTP connectors declared in your Mule config and have a CXF connector, Mule points out that you need to identify the HTTP connector to use since there are multiple ones available. However, there is no way to actually do this on a CXF endpoint.

      Using the connector-ref attribute, I can only refer to a CXF connector.
      Using the ?connector=NAME, I can only refer to a CXF connector. (The error is:
      java.lang.IllegalArgumentException: Endpoint scheme must be compatible with the connector scheme. Connector is: "http", endpoint is "http://localhost:1968?method=change&protocolConnector=Http1&connector=Http1"
      at org.mule.endpoint.AbstractEndpointBuilder.doBuildOutboundEndpoint(AbstractEndpointBuilder.java:180)
      at org.mule.endpoint.AbstractEndpointBuilder.buildOutboundEndpoint(AbstractEndpointBuilder.java:93)
      at org.mule.endpoint.DefaultEndpointFactory.getOutboundEndpoint(DefaultEndpointFactory.java:86)
      at org.mule.endpoint.DefaultEndpointFactory.getOutboundEndpoint(DefaultEndpointFactory.java:62)
      at org.mule.module.client.MuleClient.getOutboundEndpoint(MuleClient.java:805)
      at org.mule.module.client.MuleClient.getEvent(MuleClient.java:749)
      at org.mule.module.client.MuleClient.send(MuleClient.java:645)
      at org.mule.module.client.MuleClient.send(MuleClient.java:596)
      at com.ricston.tests.MultipleHTTPConnectorsTestSuite.testSendUsingHTTP1(MultipleHTTPConnectorsTestSuite.java:27)
      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:585)
      at junit.framework.TestCase.runTest(TestCase.java:168)
      at junit.framework.TestCase.runBare(TestCase.java:134)
      at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:255)
      at junit.framework.TestResult$1.protect(TestResult.java:110)
      at junit.framework.TestResult.runProtected(TestResult.java:128)
      at junit.framework.TestResult.run(TestResult.java:113)
      at junit.framework.TestCase.run(TestCase.java:124)
      at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:235)
      at junit.framework.TestSuite.runTest(TestSuite.java:232)
      at junit.framework.TestSuite.run(TestSuite.java:227)
      at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

      I also tried using the protocolConnector attribute but that did not help either

        Attachments

          Activity

            People

            • Assignee:
              dandiep_OLD Dan Diephouse
              Reporter:
              antoine.borg Antoine Borg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support

                  Backbone Issue Sync

                  • It looks like Backbone Issue Sync is not enabled for your project.