You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by babloosony <ba...@gmail.com> on 2005/02/11 11:02:21 UTC

Newbie Doubts on Custom Types

Hi All,

I have few doubts on custom types transferring between java/.net using
axis 1.2 rc2 document style web services.

Say I have below structure of my classes

class a
{
	public boolean a1=true;
}
class b extends a 
{
	public boolean b1=false;
}

class c
{
	public boolean c1=true;
}
class d extends c
{
	public boolean d1=false;
}



now say I have an POJO or EJB method with below signature:

public d sayHello(B b);


Now if I transfer b object between .NET as Client and Java as Server
then can I read  d.d1 and d.c1 on client side and b.b1 and b.a1 on the
server side. In this case, how can the schemas that need to be 
included inside WSDL for this POJO/EJB web service for these objects
looks like. Will it include all schema definitions  for all a, b, c, d
objects ?


Can anyone please clarify my doubts ?



Thanks & Regards,
Kumar.

Re: Newbie Doubts on Custom Types

Posted by Bill Keese <bi...@tech.beacon-it.co.jp>.
Inheritance can be specfied in schemas.

  <wsdl:types>
    <schema targetNamespace="http://example.org " 
xmlns:tns="http://example.org">

      <complexType name="a">
        <sequence>
          <element name="a1" type="string"/>
        </sequence>
      </complexType>
     
      <complexType name="b">
        <complexContent>
        <extension base="tns:a">
          <sequence>
            <element name="b1" type="string"/>
          </sequence>
        </extension>
        </complexContent>
      </complexType>

...


babloosony wrote:

>Hi All,
>
>I have few doubts on custom types transferring between java/.net using
>axis 1.2 rc2 document style web services.
>
>Say I have below structure of my classes
>
>class a
>{
>	public boolean a1=true;
>}
>class b extends a 
>{
>	public boolean b1=false;
>}
>
>class c
>{
>	public boolean c1=true;
>}
>class d extends c
>{
>	public boolean d1=false;
>}
>
>
>
>now say I have an POJO or EJB method with below signature:
>
>public d sayHello(B b);
>
>
>Now if I transfer b object between .NET as Client and Java as Server
>then can I read  d.d1 and d.c1 on client side and b.b1 and b.a1 on the
>server side. In this case, how can the schemas that need to be 
>included inside WSDL for this POJO/EJB web service for these objects
>looks like. Will it include all schema definitions  for all a, b, c, d
>objects ?
>
>
>Can anyone please clarify my doubts ?
>
>
>
>Thanks & Regards,
>Kumar.
>
>
>  
>