axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sascha-Matthias Kulawik" <>
Subject Mystic Bug - sending array in bean through document / wrapped does not work (org.xml.sax.SAXException: Found character data inside an array element while deserializing)
Date Wed, 06 Jul 2005 07:13:45 GMT
Ive found a mysterious bug and just wanted to know if this is already known.
Several days I've tried to figure out, why I'm getting a "org.xml.sax.SAXException: Found
character data inside an array element while deserializing" by sending a request through WSDL2Java-generated
stubs to my webservice. First - it is not the client, this error comes on the server side.
Today I've found the solution - it was an array inside a bean.
Following example:

Remote method is: 

public void enableGroup(GroupValue groupValue);

|       GroupValue     |
| +roles : RoleValue[] |
| +groupId : Integer   |

On client side it is:

|       GroupValue          |
| +roles : ArrayOfRoleValue |
| +groupId : Integer        |

Where roles != null and ArrayOfRoleValue contains one item.

Then the request sended looks good:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=""
        <addUserToGroup xmlns="">

But then the server answeres with:
<faultstring>org.xml.sax.SAXException: Found character data inside an array element
                while deserializing</faultstring>

If im doing groupValue.setRoles(new ArrayOfRoleValue()); before sending the request, all went

Any ideas?


View raw message