Hallo,

I try to write my Web-Service. I have following value objects:

public class Type1 implements Serializable {

   private final static String CONST1 = 'Value1';

   private Type2 attr1;
   private String attr2;

   public Type1() {
      this(null, null);
   }

   public Type1(String param1, String param2) {
      attr1 = new Type2(CONST1,  param1);
      attr2 = param2;
   }

   public Type2 getAttr1() {
      return attr1;
   }

   public String getAttr2OfAttr1() {
      return getAttr1().getAttr2();
   }
   public void setAttr2OfAttr1(String aParam1) {
      return getAttr1().setAttr2(aParam1);
   }

   public String getAttr2() {
      return getAttr2();
   }
   public void setAttr2(String aParam1) {
      return setAttr2(aParam1);
   }
}

public class Type2 implements Serializable {

   private String attr1;
   private String attr2;

   public Type1() {
      this(null, null);
   }

   public Type1(String param1, String param2) {
      attr1 = param1;
      attr2 = param2;
   }

   public String getAttr1() {
      return attr1;
   }

   public String getAttr2() {
      return getAttr2();
   }
   public void setAttr2(String aParam1) {
      return setAttr2(aParam1);
   }
}

I will to transport the instace of value object Type1 as two strings. So I wrote to my WSDL following:

  <complexType name="Type1">
   <complexContent>
     <sequence>
      <element name="attr1" nillable="true" type="xsd:string"/>
      <element name="attr2OfAttr1" nillable="true" type="xsd:string"/>
      </sequence>
    </extension>
   </complexContent>
  </complexType>

and in my server-config.wsdd is following:

<typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; qname="ns1:Type1" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.test.do.Type1" xmlns:ns1="urn:mydos"/>

But by executing of service raise an Exception: No serializer found for class com.test.Type2 in registry [EMAIL PROTECTED]
I dont understand why? Is there any possibility to avoid a transmission of arbitrary attribut of any JavaBean?


What have I louse up?
Please, help, it's urgent.

Thanks
   Rasto.

--
======================================================================
 Rastislav Graus                  mailto:[EMAIL PROTECTED]

 ARS NOVA spol s r.o.                         http://www.arsnova.sk
 Hradná 10                                   voice:+421 2 6545 8045
 SK-841 10 Bratislava                          fax:+421 2 6545 9103
======================================================================




Reply via email to