You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Alex Earnshaw <al...@openet-telecom.com> on 2003/04/03 18:39:20 UTC

EmptyStackException when parsing response

Hi all, hope someone can help
 
I have a java client using xmlrpc1.1. This sends the following xmlrpc
request to a c++ server (our own implementation of xmlrpc):
 
<?xml version="1.0"
encoding="ISO-8859-1"?><methodCall><methodName>ScriptsHandler.getCreditB
alance</methodName><params><param><value><struct><member><name>currencyC
ode</name><value>EUR</value></member><member><name>transactionId</name><
value><int>1</int></value></member></struct></value></param></params></m
ethodCall>
 
Excuse the line length but I didn't want to add any \n\r 's in case it
has something to with the problem.
 
The response being sent back to the java client is:
 
<?xml
version="1.0"?><methodResponse><params><param><value><struct><member><na
me>Amount</name><int>4</int></member></struct></value></param></params><
/methodResponse>
 
With XmlRpc.debug turned on I get the following output:
 
Client calling procedure 'ScriptsHandler.getCreditBalance' with
parameters [{currencyCode=EUR, transactionId=1}]
Beginning parsing XML input stream
startElement: methodResponse
startElement: params
startElement: param
startElement: value
startElement: struct
startElement: member
startElement: name
endElement: name
startElement: int
endElement: int
endElement: member
java.util.EmptyStackException
        at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
        at org.apache.xmlrpc.XmlRpc.parse(XmlRpc.java)
        at
org.apache.xmlrpc.XmlRpcClient$Worker.execute(XmlRpcClient.java)
        at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java)
        at
com.openet_telecom.ActiveCharge.eai.testcases.PurseMgrNegativeTest.testG
etCreditBalance(PurseMgrNegativeTest.java:91)
        at java.lang.reflect.Method.invoke(Native Method)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at junit.textui.TestRunner.doRun(TestRunner.java:116)
        at junit.textui.TestRunner.doRun(TestRunner.java:109)
        at junit.textui.TestRunner.run(TestRunner.java:72)
        at junit.textui.TestRunner.run(TestRunner.java:57)
        at
com.openet_telecom.ActiveCharge.eai.testcases.PurseMgrNegativeTest.main(
PurseMgrNegativeTest.java:296)

Can anyone tell me what is wrong??? How to fix it?
 
Thanks
 
Alex
 
==========================================
Alex Earnshaw
Sun Certified Java Programmer
Software Design Engineer
Openet Telecom
 
Email: alex.earnshaw@openet-telecom.com
Phone: 01 6204641
==========================================