This is not directly related to the discussion on hand. But I have been trying to get around this problem in axis.
If you notice the element
<processName xmlns="">CourseBusinessProcess</processName>
why should the message have a namespace xmlns="" Is it right to have this for elements.
What is the significance of this element.
Any pointers will be helpful
Vijay
P.S - I am sort of a newbie in axis.
Hari Lakshmanan <[EMAIL PROTECTED]> wrote:
I get the same error and it happens only in a particular scenario. I have a class like thispublic 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:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 1:04 PM
To: [EMAIL PROTECTED]
Subject: RE: SimpleDeserializer encountered a child element, which is NOT expectedP.S. The same error occurs when I set my XML parser to be Xerces in stead of Crimson-----Original Message-----
From: Nick Sharples [mailto:[EMAIL PROTECTED]
Sent: 17 March 2004 21:02
To: [EMAIL PROTECTED]
Subject: SimpleDeserializer encountered a child element, which is NOT expectedHello 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.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.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(DeserializationContextImpl.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(GroupManagementServiceSyncSoapStub.java:742)
at xx.xx.xx.GroupManagementServiceSyncTestCase.test1GroupManagementServiceSyncSoapCreateGroup(GroupManagementServiceSyncTestCase.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)=============================================
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
