Hi,

Essentially, I keep running into a problem where I get an error message that says, unexpected subelement x, when I try to retrieve an object from a web service. I've seen other's run into this problem, but I have not seen the solution yet. In my previous project with web services, we simply serialized or objects ourselves, and presented web service operations that took string objects. That approach seems silly, compared to using Axis2's data binding .

I approached setting up the services by trying to take the most hands off approach available, so, where I could, I allowed Axis2 to generate code for me.

My set up is:
1. I created a set of domain objects. Each domain object subclasses an abstract domain object that has some common auditing properties.

  ex.
  class A{
     private Long id;
     private User createdBy;
     private Date createdTime;
     private User updatedBy;
     private Date updatedBy;

        //stuff
   }

 class B{
    private boolean specialBprop1;
    private String specialBprop2;
 }


2. I created some manager/service classes that performed basic crud on the domain objects. 3. I installed axis, and built and deployed an .aar file the had the compiled manager/service classes, and necessary libraries.
4. I code generated client stubs, and test cases with adb.

Ok, it compiled great, and there were certain services that tested fine after I updated the test cases (these were things that did not retrieve any subclasses). The problem however is when I attempt to retrieve a domain object that is a subclass of another rather than some specialized transfer object. Having inspected the auto-generated wsdl, I see that the element that maps to the domain object does not contain properties from the java object's superclass. I am fairly confident that this is the problem, as the classes that auto-generate from the wsdl (and look a lot like the domain objects) do not have the property either.

Is the solution for me to, not auto-generate the wsdl, but instead, define each element to have the properties of its related java object's super-class by hand? Is there another way to approach this?

Thanks




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to