axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hari Lakshmanan" <h...@wakesoft.com>
Subject RE: SimpleDeserializer encountered a child element, which is NOT expected
Date Thu, 18 Mar 2004 01:01:39 GMT
I get the same error and it happens only in a particular scenario. I
have a class like this
 
public class BPEvent {
private String processName;
private HashMap attributes;
...
...
}
 
When I add a String object to atts everythign works fine. However when I
add my customized type, I get this error. The SOAP message looks like
this
 
<soapenv:Body>
  <in0 xmlns="urn:typeNS">
   <processName xmlns="">CourseBusinessProcess</processName>
   <attributes xmlns="">
    <item xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://xml.apache.org/xml-soap">
     <key>Operation</key>
     <value>Save</value>
    </item>
    <item>
     <key>COURSEBO</key>
     <value>
      <ID>0</ID>
      <name xsi:nil="true"/>
     </value>
    </item>
   </attributes>
  </in0>
 </soapenv:Body>
 
In the above the Item COURSEBO is my customized type and note the way
the value element is being formed. My guess is this is causing the above
exception. 
 
is this a known issue with Map serializer and de-serializer? If so are
there any workarounds?
 
Thanks
__Hari

	-----Original Message-----
	From: Nick Sharples [mailto:nick.anonymous@blueyonder.co.uk] 
	Sent: Wednesday, March 17, 2004 1:04 PM
	To: axis-user@ws.apache.org
	Subject: RE: SimpleDeserializer encountered a child element,
which is NOT expected
	
	
	P.S. The same error occurs when I set my XML parser to be Xerces
in stead of Crimson

		-----Original Message-----
		From: Nick Sharples
[mailto:nick.anonymous@blueyonder.co.uk] 
		Sent: 17 March 2004 21:02
		To: axis-user@ws.apache.org
		Subject: SimpleDeserializer encountered a child element,
which is NOT expected
		
		
		Hello All,
		 
		Has anybody seen this message before?
		 
		I wouldn't be so confused if this error was consistent,
but it only occurs when I try to run the my JUnit test cases and NOT
when I run my client application.
		 
		I've checked for differences in the classpaths for the
two apps and the only difference I can notice is that when I run the
tests is that I have junit.jar in my classpath.
		 
		The complete axis fault trace looks like this:
		 
		=============================================
		 
		org.xml.sax.SAXException: SimpleDeserializer encountered
a child element, which is NOT expected, in something it was trying to
deserialize.
		AxisFault
		 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
		 faultSubcode: 
		 faultString: org.xml.sax.SAXException:
SimpleDeserializer encountered a child element, which is NOT expected,
in something it was trying to deserialize.
		 faultActor: 
		 faultNode: 
		 faultDetail: 
		 {http://xml.apache.org/axis/}stackTrace: AxisFault
		 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
		 faultSubcode: 
		 faultString: org.xml.sax.SAXException:
SimpleDeserializer encountered a child element, which is NOT expected,
in something it was trying to deserialize.
		 faultActor: 
		 faultNode: 
		 faultDetail: 
		 
		org.xml.sax.SAXException: SimpleDeserializer encountered
a child element, which is NOT expected, in something it was trying to
deserialize.
		 at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.ja
va:260)
		 at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.jav
a:169)
		 at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseriali
zationContextImpl.java:1015)
		 at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1675)
		 at
org.apache.crimson.parser.Parser2.content(Parser2.java:1926)
		 at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
		 at
org.apache.crimson.parser.Parser2.content(Parser2.java:1926)
		 at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
		 at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634)
		 at
org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
		 at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
		 at
javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
		 at
org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializatio
nContextImpl.java:242)
		 at
org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
		 at
org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
		 at
org.apache.axis.client.Call.invokeEngine(Call.java:2583)
		 at org.apache.axis.client.Call.invoke(Call.java:2553)
		 at org.apache.axis.client.Call.invoke(Call.java:2248)
		 at org.apache.axis.client.Call.invoke(Call.java:2171)
		 at org.apache.axis.client.Call.invoke(Call.java:1691)
		 at
xx.xx.xx.GroupManagementServiceSyncSoapStub.createGroup(GroupManagementS
erviceSyncSoapStub.java:742)
		 at
xx.xx.xx.GroupManagementServiceSyncTestCase.test1GroupManagementServiceS
yncSoapCreateGroup(GroupManagementServiceSyncTestCase.java:41)
		 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
		 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
		 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
		 
		
		=============================================


Mime
View raw message