4 Replies Latest reply on Oct 30, 2006 11:05 AM by kalvin

    JBossWS Eclipse Plugin and WSDL Polymorphism

    kalvin

      Hello all,

      I am trying out the JBossIDE 2.0.0.Beta2, especially the JBossWS Eclipse plugin. Does anyone know that it supports polymorphism for the parameter and the return type of the service endpoint interface? Perhaps I should break it down to:

      Does JBossWS (jbossws-1.0.3.GA) support polymorphism on SEI?
      Does JBossWS Eclipse Plugin support polymorphism on SEI?

      Thanks,
      Kalvin

        • 1. Re: JBossWS Eclipse Plugin and WSDL Polymorphism

          Hi Kalvin,

          I'm not sure about the jbossws stack and the associated wstools (which are used by the eclipse plugin), but the underlying webservice logic in the plugin *should* support polymorphism as you describe.. ie you should be able to import a WSDL containing a portType with the same operation name taking different arguments, I'm unsure about return-type polymorphism only though..

          if you can mail me your WSDL I can validate this for you.. (ole@eviware.com)

          kind regards!

          /Ole
          eviware.com

          • 2. Re: JBossWS Eclipse Plugin and WSDL Polymorphism
            kalvin

            Hi Ole,

            Sorry for the confusion, but I didn't mean to expose overloaded Java methods in the service endpoint interface. In my case, I want to publish POJO webservice, which has a single Java method that takes abstract parameter and returns abstract return value as follow:

            public WSAbstractReturnValue getValueBy(WSAbstractParameter paramter);

            And, I have two subclasses for each of the abstract types:

            public class WSReturnImplOne extends WSAbstractReturnValue {}
            public class WSReturnImplTwo extends WSAbstractReturnValue {}
            public class WSParameterImplOne extends WSAbstractParameter {}
            public class WSParameterImplTwo extends WSAbstractParameter {}

            I want that the client may call the service method with a parameter of arbitrary subtype, and the service method may also return arbitrary subtype.

            By simply using steps from the bottom-up example (http://www.soapui.org/jbossws/bottomup.html) for my POJO, first, I didn't find expected elements for the derived types in the generated WSDL file. Hence, I didn't get the corresponding client artifacts when following the next walkthrough example (http://www.soapui.org/jbossws/consume.html).

            If I use the wstools directly, running the wstools command against a config file, is there a way to specify the subclasses in the configuration file? On top of that, is there a way to specify the subclasses through the plugin dialogs?

            Thanks,
            Kalvin

            • 3. Re: JBossWS Eclipse Plugin and WSDL Polymorphism

              Hi Kalvin,

              ok.. sorry.. mistake was mine.. I'm not sure if wstools supports this currently, the coming JAX-WS 2.0 compatible JBossWS 2.0 uses JAXB for databinding which probably supports your scenario.. but I'm not sure on any of those claims ;-).. try reposting your question in the JBossWS forum to see what "the experts" say..

              Obviously, if it is supported by wstools, we will add a UI for it as well..

              regards!

              /Ole

              • 4. Re: JBossWS Eclipse Plugin and WSDL Polymorphism
                kalvin

                Thanks Ole, I'll certainly repost this to the JBossWS forum... and I am looking forward to see this feature in the plugin UI.

                Kalvin