axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olof Edlund <olof.edl...@upright.se>
Subject Missing argument giving strange error
Date Fri, 02 Aug 2002 15:21:39 GMT
Hi,

When I call my web service with a missing integer parameter I get the
error below (at end of message).

I guess that the server croaks when trying to deserialize an integer
that doesn't exist. So an error should certainly be generated.

But is there a way for me to generate a better error message? Is it
configurable in Axis?

It seems to me as if this error occurs before the control has even been
passed over to my web service.

Can I let the parameter be "nullable" in some way and return my own
exception if the service doesn't receive it?

I'm also thinking that Axis should return a better Exception when this
happens by default, so to say.

Any ideas?

Regards,

	Olof Edlund

____________________________________

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode
xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.userException</faultcode>
   <faultstring>java.lang.NumberFormatException: </faultstring>
   <detail>
    <ns2:stackTrace
xmlns:ns2="http://xml.apache.org/axis/">java.lang.NumberFormatException:
        at
org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:186)
        at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:494)
        at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:904)
        at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:205)
        at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:644)
        at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:201)
        at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:259)
        at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:161)
        at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:289)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:312)
        at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:577)
        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(ApplicationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
        at java.lang.Thread.run(Thread.java:536)
</ns2:stackTrace>
   </detail>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>






Mime
View raw message