[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    SAXException: Found character data inside an array element while
From:       crazygirl <wcw () exegin ! com>
Date:       2009-03-28 1:10:15
Message-ID: 22752600.post () talk ! nabble ! com
[Download RAW message or body]


I am using Axis 1.4's wsdl2java to generate my source code. Everything works
fine with one exception: RequestIdentifier. In my schema, I have the
following parameter defined
<simpleType name="RequestIdentifier">
<restriction base="hexBinary">
		<minLength value="8"></minLength>
		</restriction>
</simpleType>
Whenever the generated source code attempts to access the parameter. I would
received following error.
org.xml.sax.SAXException: Found character data inside an array element while
deserializing
	at
org.apache.axis.encoding.ser.ArrayDeserializer.characters(ArrayDeserializer.java:502)
	at
org.apache.axis.encoding.DeserializationContext.characters(DeserializationContext.java:966)
  at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:177)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
	at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
	at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
	at org.apache.axis.client.Call.invoke(Call.java:2467)
	at org.apache.axis.client.Call.invoke(Call.java:2366)
	at org.apache.axis.client.Call.invoke(Call.java:1812)

I have referenced some other website and understand that the problem is
related to the axis' serialization and deserialization class. By default,
the generated source code has following serialization setting
 java.lang.Class arraysf =
org.apache.axis.encoding.ser.ArraySerializerFactory.class;
 java.lang.Class arraydf =
org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
            
 qName = new javax.xml.namespace.QName("http://www.zig.org/GWGSchema",
"RequestIdentifier");
 cachedSerQNames.add(qName);
 cls = byte[].class;
 cachedSerClasses.add(cls);
 cachedSerFactories.add(arraysf);
 cachedDeserFactories.add(arraydf);

I tried to add other serialization and factory class instead of
ArraySerializerFactory without avail and had attempted to register hex
mapping 
java.lang.Class hexsf = HexSerializerFactory.class;
java.lang.Class hexdf = HexDeserializerFactory.class;
_call.registerTypeMapping(cls,qName,hexsf, hexdf,false);

nothing seems to work.. so any help would be much appreciated... If anyone
knows what Axis Serialization class I am supposed to assign to get pass
this, I would be much appreciated, thanks

-- 
View this message in context: \
http://www.nabble.com/SAXException%3A-Found-character-data-inside-an-array-element-while-deserializing-tp22752600p22752600.html
 Sent from the Axis - User mailing list archive at Nabble.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic