1 2 Previous Next 20 Replies Latest reply on Dec 17, 2008 3:14 AM by a.gazzarini Go to original post
      • 15. Re: Problem with inheritance and JBossWS
        mrokka123

        After Using @XmlSeeAlso only difference I found on generated WSDL was There was complextype name b and c which I don?t get without using @XmlSeeAlso. I have used wsconsume to create the web service artifacts of the generated wsdl and my client code looks like this:

        MyWebService obj=new MyWebService();
        MyWebServicePortType obj1=obj.getMyWebServicePort();
        B b=new B();
        b.setName("SoulFly");
        A aobj=b;
        System.out.println("ClassName:"+obj1.getClassName(aobj)); //return com.d2.client.A


        One thing is that on generated bean of class A there is no @XmlSeeAlso annotation, Does it makes any different?.

        • 16. Re: Problem with inheritance and JBossWS
          thomas.diesler

          Hi mrokka, I encourage you to investigate this further. Please work with our testsuite and bring your usecase into it. If you find a solution that you can contribute - even better.

          • 17. Re: Problem with inheritance and JBossWS
            mrokka123

            After some search I found that @XmlSeeAlso works with DPIM [dynamic proxy invocation mechanism] client.
            For Schema2Java approach I?ve managed to verify that this is a known JBossWS issue that is marked to be fixed in JBossWS 2.0.2.

            http://jira.jboss.com/jira/browse/JBWS-1795;jsessionid=EA365E1210EF3FB1F472335E50BE69B0?page=all

            • 18. Re: Problem with inheritance and JBossWS
              a.gazzarini

              Excuse me, just a simple question...with @XmlSeeAlso annotation you MUST list in the superclass all the required subclasses (subclasses that need to be declared / defined in WSDL schema portion) ...isn't it absurd from an OO point of view?

              I mean, a superclass should ignore whenever there are subclasses or not.
              On top of that, is there another way to insert on the WSDL (Schema section) the definition of my subclasses?

              Best Regards,
              Andrea

              • 19. Re: Problem with inheritance and JBossWS
                ropalka

                Hi Andrea,

                you're absolutely right, it's absurd. It's the Sun wrong approach hotfix for some
                OO related issues in their JAXB tool.

                Richard

                • 20. Re: Problem with inheritance and JBossWS
                  a.gazzarini

                  Hi Richard, thanks for reply!
                  I think that it could be better (for example) if it should be possible to insert the @XmlSeeAlso in the service endpoint class.
                  In this way when you defining the XXX Service endpoint class you can indicate implicit classes that are involved in the service execution (and therefore need to be described in the WSDL).
                  Ok, this will introduce a dependency between the endpoint and the implicit subclass(es) but from my point of view is better than the inheritance issue...

                  So, for example....

                  @WebService
                  @XmlSeeAlso (value=Employee.class)
                  public class XXXServiceEndpoint {
                  
                   @WebMethod
                   public Person getPerson(){
                   return new Employee(...);
                   }
                  }



                  So the Person class will be picked up automatically as part of method signature, while the Employee subclass will be included by the @XmlSeeAlso annotation.
                  The advantage is that the Person class is left untouched (without any annotation)

                  But unfortunately things are not working in that way...

                  Regards,
                  Andrea

                  1 2 Previous Next