axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Detelin Yordanov (JIRA)" <>
Subject [jira] Commented: (AXIS2-3797) "Unknown type can not serialize" Exception
Date Tue, 19 Aug 2008 12:31:44 GMT


Detelin Yordanov commented on AXIS2-3797:

Hi Nandana,
  No I don't have a patch, but, I think that if I could bring Amila's attention to this, he
could explain why this is not working and a provide
a possible workaround.
My understanding so far is that in Axis2 1.3 the anyType was serialized and deserialized as
OMElement, but now in Axis2 1.4 that is not so.
I guess that decision was taken due to this jira:
And since the sample above was taken from one of the integration test clases, namely
I checked that method again in Axis2 trunk and saw that it has been commented out by Amila,
with the following comment:

"svn commit change the adb any type handling. currently it uses an om element to support
the anytype. but this is wrong. so I have change it to use the object to represent the anytype
and the
serialize it accordingly. although this a current Axis2 1.3 bug, I put this commit only to
trunk since
this is a bit large change."

So my question is whether there is a way to send OMElement in an Object array in the current

> "Unknown type can not serialize" Exception
> ------------------------------------------
>                 Key: AXIS2-3797
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4
>         Environment: Axis2 1.4, Tomcat 5.5.26
>            Reporter: Detelin Yordanov
>            Assignee: Deepal Jayasinghe
>         Attachments: full stacktrace.txt, TypeTest.aar,
> I have a simple POJO service with the following method:
> package org.tempuri.test;
> import;
> public class TypeTest {
>     public ArrayOfanyType retArrayAnyType1D(ArrayOfanyType inArrayAnyType1D) {
>         return inArrayAnyType1D;
>     }
> }
> The ArrayOfanyType is declared like this:
> public class ArrayOfanyType {
>     private Object[] anyType;
>     public Object[] getAnyType() {
>         if (anyType == null) {
>             anyType = new Object[0];
>         }
>         return this.anyType;
>     }
>     public void setAnyType(Object[] anyType) {
>     	this.anyType = anyType;
>     }
> }
> I deploy this POJO on an Axis2 1.4 runtime running on Tomcat.
> Then I generate a client stub using the following command:
> wsdl2java -ap -o ./generated -s -u -uw -uri http://localhost:8080/axis2-1.4/services/TypeTest?wsdl
> I use the stub to invoke the service passing an OMElement in the Object array:
> OMFactory factory = OMAbstractFactory.getOMFactory();
> OMNamespace ns = factory.createOMNamespace("",
> OMElement articleElement = factory.createOMElement("Article", ns);
> ArrayOfanyType input = new ArrayOfanyType();
> input.setAnyType(new OMElement[]{articleElement});
> stub.retArrayAnyType1D(input);
> While serializing the ArrayOfanyType ADBBean I get an "Unknown type can not serialize"
> Caused by: Unknow type can not serialize
> 	at org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(
> 	at
> 	at
> 	at org.tempuri.test.RetArrayAnyType1D.serialize(
> 	at org.tempuri.test.RetArrayAnyType1D.serialize(
> 	at org.tempuri.test.RetArrayAnyType1D$1.serialize(
> ...
> I did not have this problem on Axis2 1.3 so I guess something have been changed in ConverterUtil.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message