Hi Martin,

I inspected your WSDL. My finding is that:
The operation "int calculateBlueBookValue(VehicleDescription param0)"
only use VehicleDescription as input, and it has nothing to do with
VehicleType defined in the WSDL. Is there any missing link between
VehicleDescription and VehicleType in your WSDL?

Hi Joshua,

Have you also tried interface types? I have already tried to convert
the following java method.

test.package.SomeServiceImpl class contains the method:

public InterfaceType2 testMethod(InterfaceType1 testArg) throws
RemoteException {
          InterfaceType2 it2 = new InterfaceType2Impl();
          it2.setName("it2Name " + testArg.getName());
          it2.setMarried(true);
          it2.setAge(24);
        
          return it2;   
}

The definitions of InterfaceType1 and InterfaceType2 are in another package:

test.package2.InterfaceType1:

public interface InterfaceType1 {
        public String getName();
        public void setName(String name);               
}

test.package2.InterfaceType2:

public interface InterfaceType2 extends InterfaceType1 {
        public int getAge();
        public void setAge(int age);
        public boolean isMarried();
        public void setMarried(boolean married);
}

The generated WSDL relevant part is:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";                     
xmlns:stn_1="http://package2.test/xsd";                        
targetNamespace="http://package2.test/xsd";
                        elementFormDefault="unqualified"
                        attributeFormDefault="unqualified">
   <xs:element type="stn_1:InterfaceType1" name="InterfaceType1" />
   <xs:complexType name="InterfaceType1">
        <xs:sequence>
        <xs:element type="xs:string" name="name" />
        </xs:sequence>
   </xs:complexType>
   <xs:element type="stn_1:InterfaceType2" name="InterfaceType2" />
   <xs:complexType name="InterfaceType2">
        <xs:sequence>
        <xs:element type="xs:boolean" name="married" />
        <xs:element type="xs:int" name="age" />
        </xs:sequence>
   </xs:complexType>

   <xs:complexType name="InterfaceType1">
               <xs:sequence>
        <xs:element type="xs:string" name="name" />
        </xs:sequence>
   </xs:complexType>
   <xs:complexType name="InterfaceType2">
        <xs:sequence>
        <xs:element type="xs:boolean" name="married" />
        <xs:element type="xs:int" name="age" />
        </xs:sequence>
   </xs:complexType>
...
</xs:schema>

I feel this WSDL is just incorrect.
Firstly, the InterfaceType1 and InterfaceType2 complexType are
generated twice. I think this is a bug of Java2WSDL. Am I right?

Secondly, the InterfaceType2 should also contain the name field since
InterfaceType2 extends InterfaceType1.

Thirdly, in the generated WSDL, there is no way to tell that
InterfaceType2 extends InterfaceType1. Is this another bug?

I also have another question for Joshua and Axis2 developer.

How can Axis2 determine the input parameter's actual type?
InterfaceType1 may have two implementations InterfaceType1ImplClass1
and InterfaceType1ImplClass2. At runtime, how can Axis2 decide the
actual type of the input object? In fact I guess there will be a
deserialization error at the server side. At the client side, there is
no problem to serialize the InterfaceType1ImplClass1 or
InterfaceType1ImplClass2 object. However, the serialized XML does not
contains the information on the actual object type. The server side
will throw error complaining that some unexpected child element in
some certain element since the server side expect an interface type. I
cannot verify my guess because I even cannot run WSDL2Java against the
generated WSDL.

Could somebody shed some insight view on how to deal with the
InterfaceType and BaseType, and how the Axis2 at runtime deserialize
the XML into object without knowing the actual specific type?



Regards,
Xinjun


On 6/27/06, Joshua Fox <[EMAIL PROTECTED]> wrote:

Thanks, yes. It was valuable to me in learning how to do this and building
the WSDL shown in my last message.

Joshua


On 6/27/06, Martin Gainty <[EMAIL PROTECTED]> wrote:
> Joshua-
>
> I sent you the wsdl for Vehicle BaseType, Car SubType and Motorcycle
subtype
> on sunday
> Did you not receive it?
> Please confirm,
>
> Martin
>
>


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

Reply via email to