axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject Re: Axis2 : java.lang.NumberFormatException for restriction based simple type in wsdl
Date Sat, 30 Sep 2006 22:07:51 GMT
Please log a bug in JIRA with your full wsdl, client code and server skeleton.

thanks,
dims

On 9/30/06, Gul Onural <onural@nortel.com> wrote:
>
>
>
> Hi,
>
> I have a restriction based simple type defined in my wsdl. This simple type
> is used as type of one of the complex types.
>
> <xs:simpleType name="ValidXTypes">
>     <xs:restriction base="xs:string">
>         <xs:enumeration value="X1"/>
>         <xs:enumeration value="X2"/>
>     </xs:restriction>
> </xs:simpleType>
>
> <xs:complexType name="MyComplexType">
>    <xs:sequence>
>    <xs:element minOccurs="1" maxOccurs="1" name="type"
> type="ns0:ValidXTypes"/>
>     ...
>    </xs:sequence>
> </xs:complexType>
>
> I used wsdl2java to create stub. The stub has a class for ValidXTypes and a
> set method
> on the MyComplexType to set the value of the "type".
>
> My client code uses setType method to set the value of the "type".
>
> myComplexType.setType(MyServiceStub.ValidXTypes.X1);
>
> But the code above throws exception in axis2.
>
> Any suggestions about this ? Is this a known issue ?
>
>
> Sep 30, 2006 12:31:00 PM org.apache.axis2.engine.AxisEngine
> receiveFault
> INFO: Received Error Message with id
> urn:uuid:27367917184874F99611596338605661
> org.apache.axis2.AxisFault: For input string: "X1"
>         at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:298)
>         at
> myclient.MyServiceStub.createBlah(MyServiceStub.java:149)
>         at myclient.MyClient.main(MyClient.java:58)
> Caused by: java.lang.Exception: org.apache.axis2.AxisFault: For input
> string: "X1"; nested exception i
> s:
>         java.lang.NumberFormatException: For input string: "X1"
>         at
> org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
>         at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:18
> 1)
>         at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageRece
> iver.java:39)
>         at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:493)
>         at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.jav
> a:324)
>         at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:230)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252
> )
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11Base
> Protocol.java:667)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.NumberFormatException: For input string: "X1"
>         at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>         at java.lang.Integer.parseInt(Integer.java:447)
>         at java.lang.Integer.<init>(Integer.java:620)
>         at
> org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.j
> ava:61)
>         at
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:190)
>         at
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:180)
>         at
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:226)
>         at
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:228)
>         at
> org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:472)
>         at
> org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:424)
>         at
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:375)
>         at
> org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:99)
>         at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:12
> 1)
>         ... 20 more
>
>         at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
>         ... 3 more


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message