Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-1185

RemotingServlet does not set operation name on inbound exchanges

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 0.6
    • Fix Version/s: 0.7
    • Component/s: None
    • Labels:
      None

      Description

      From Yusuf Bata:

      The RemoteInvoker API apparently supports the invocation of an operation on a Service with multiple operations, as shown below with the use of the RemoteMessage Interface.

      RemoteMessage msg = invoker.invoke(new RemoteMessage()
      .setContext(new DefaultContext())
      .setService(new QName("urn:switchyard-quickstart:resteasy-binding:1.0", "ISimpleService"))
      .setOperation("sayHello")
      .setContent(input)
      );
      This does NOT however work. The SwitchYardRemotingServlet generates the following error:

      10:56:21,436 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/switchyard-remote].[SwitchYardRemotingServlet]] (http--127.0.0.1-8080-1) Servlet.service() for servlet SwitchYardRemotingServlet threw exception: org.switchyard.exception.SwitchYardException: Operation name required - multiple operations on service interface:

      {urn:switchyard-quickstart:resteasy-binding:1.0}

      ISimpleService
      at org.switchyard.internal.ServiceReferenceImpl.createExchange(ServiceReferenceImpl.java:116) [switchyard-runtime-0.6.0.Final.jar:0.6.0.Final]
      at org.switchyard.component.remote.SwitchYardRemotingServlet.doPost(SwitchYardRemotingServlet.java:82) [switchyard-component-remote-0.6.0.Final.jar:0.6.0.Final]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
      at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
      at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]
      The root cause of this problem seems to be the following snippet in the SwitchYardRemotingServlet on line 82:

      Exchange ex = service.createExchange(replyHandler);
      I believe an overloaded version of the createExchange method should be invoked, particular one that includes the operation name parameter like:

      public Exchange createExchange(String operation, ExchangeHandler handler)
      Or am I perhaps missing some obvious configuration parameter somewhere else? If this is indeed an issue, when will it be resolved?

      Thanks in advance!

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                kcbabo Keith Babo
                Reporter:
                kcbabo Keith Babo
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: