users@jax-rpc.java.net

Got XML parsring error when passing int as parameter.

From: Frank Xia <FXia_at_ESRI.COM>
Date: Thu, 18 Jul 2002 16:28:37 -0400

Anyone enountered the similar problem I have here?

I used the following line to call the getImage method which has signature of
(int width, int height, String extent).

            _call.setOperationName( new QName(BODY_NAMESPACE_VALUE,
"getImage"));

            _call.addParameter( "width", XMLType.XSD_INT, ParameterMode.IN
);
            _call.addParameter( "height", XMLType.XSD_INT, ParameterMode.IN
);
            _call.addParameter( "extent", XMLType.XSD_STRING,
ParameterMode.IN );
            _call.setReturnType( XMLType.XSD_STRING);
            url = (String)_call.invoke(new Object[]{new Integer(width), new
Integer(height), extent});

When the last line was executed, I got the following error message from the
server side,

Did I miss anything obvious?

Thanks a lot

Frank

======= ERROR MESSAGE FROM SERVER ======
deserialization error: unexpected XML reader state. expected: END but found:
START: width
        at
com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBa
se.java:200)
        at
com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(Referenceab
leSerializerImpl.java:115)
        at com.esri.mo.svr.map.MapService_Tie.deserialize_getImage(Unknown
Source)
        at com.esri.mo.svr.map.MapService_Tie.readFirstBodyElement(Unknown
Source)
        at
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:162)
        at
com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDel
egate.java:151)
        at
com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2349)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:644)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:644)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:644)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:376)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:518)
        at java.lang.Thread.run(Thread.java:536)

CAUSE:

unexpected XML reader state. expected: END but found: START: width
        at
com.sun.xml.rpc.streaming.XMLReaderUtil.verifyReaderState(XMLReaderUtil.java
:49)
        at
com.esri.mo.svr.map.MapService_GetImage_RequestStruct_SOAPSerializer.doDeser
ialize(Unknown Source)
        at
com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBa
se.java:163)
        at
com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(Referenceab
leSerializerImpl.java:115)
        at com.esri.mo.svr.map.MapService_Tie.deserialize_getImage(Unknown
Source)
        at com.esri.mo.svr.map.MapService_Tie.readFirstBodyElement(Unknown
Source)
        at
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:162)
        at
com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDel
egate.java:151)
        at
com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2349)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:644)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:644)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:644)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:376)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:518)
        at java.lang.Thread.run(Thread.java:536)