axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francesco Viscomi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AXIS2-5669) bug on ConverterUtil.compare
Date Wed, 10 Sep 2014 14:30:29 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-5669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Francesco Viscomi updated AXIS2-5669:
-------------------------------------
    Description: 
i have this fragment in wsdl file:
	<xsd:element name="annorif"
               type="impl:_4integerType" maxOccurs="1" minOccurs="1">
	</xsd:element>

with the plugin axis2-wsdl2code-maven-plugin i've generated the code 

public void set_4IntegerType(java.math.BigInteger param) {
			java.lang.String totalDigitsDecimal = org.apache.axis2.databinding.utils.ConverterUtil.convertToStandardDecimalNotation("4").toString();
			if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, totalDigitsDecimal)
> 0) {
				this.local_4IntegerType = param;
			} else {
				throw new java.lang.RuntimeException();
			}

		}


Now i've read that there is a bug on it and i have to change this one
convertToStandardDecimalNotation("4").toString();
with this one
convertToStandardDecimalNotation("4").toPlainString()

unfortunately i do that but the next line that is
if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, totalDigitsDecimal) >
0) {


through the following exception
2014-09-10 16:29:12,488 ERROR [btpool0-0] rpc.RPC (RPC.java:570) - InvocationTargetException
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:552)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:324)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.NumberFormatException: For input string: "10000.0"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Long.parseLong(Long.java:441)
	at java.lang.Long.parseLong(Long.java:483)
	at org.apache.axis2.databinding.utils.ConverterUtil.compare(ConverterUtil.java:1305)
	at it.lispa.opere.server.ws.simoi.OIWSServiceStub$_4IntegerType.set_4IntegerType(OIWSServiceStub.java:15469)
	at it.lispa.opere.server.OpereServiceImpl.inviaElencoItaca(OpereServiceImpl.java:1705)
	... 27 more



i call the code as in the following
	_4IntegerType param = new _4IntegerType();
	param.set_4IntegerType(BigInteger.valueOf(anno));	
	inviaEOI0.setAnnorif(param);


  was:
i have this fragment in wsdl file:
	<xsd:element name="annorif"
               type="impl:_4integerType" maxOccurs="1" minOccurs="1">
	</xsd:element>

with the plugin axis2-wsdl2code-maven-plugin i've generated the code 

public void set_4IntegerType(java.math.BigInteger param) {
			java.lang.String totalDigitsDecimal = org.apache.axis2.databinding.utils.ConverterUtil.convertToStandardDecimalNotation("4").toString();
			if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, totalDigitsDecimal)
> 0) {
				this.local_4IntegerType = param;
			} else {
				throw new java.lang.RuntimeException();
			}

		}


> bug on ConverterUtil.compare
> ----------------------------
>
>                 Key: AXIS2-5669
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5669
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.2
>         Environment: windows 8
>            Reporter: Francesco Viscomi
>
> i have this fragment in wsdl file:
> 	<xsd:element name="annorif"
>                type="impl:_4integerType" maxOccurs="1" minOccurs="1">
> 	</xsd:element>
> with the plugin axis2-wsdl2code-maven-plugin i've generated the code 
> public void set_4IntegerType(java.math.BigInteger param) {
> 			java.lang.String totalDigitsDecimal = org.apache.axis2.databinding.utils.ConverterUtil.convertToStandardDecimalNotation("4").toString();
> 			if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, totalDigitsDecimal)
> 0) {
> 				this.local_4IntegerType = param;
> 			} else {
> 				throw new java.lang.RuntimeException();
> 			}
> 		}
> Now i've read that there is a bug on it and i have to change this one
> convertToStandardDecimalNotation("4").toString();
> with this one
> convertToStandardDecimalNotation("4").toPlainString()
> unfortunately i do that but the next line that is
> if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, totalDigitsDecimal)
> 0) {
> through the following exception
> 2014-09-10 16:29:12,488 ERROR [btpool0-0] rpc.RPC (RPC.java:570) - InvocationTargetException
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:552)
> 	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
> 	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
> 	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:324)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
> Caused by: java.lang.NumberFormatException: For input string: "10000.0"
> 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> 	at java.lang.Long.parseLong(Long.java:441)
> 	at java.lang.Long.parseLong(Long.java:483)
> 	at org.apache.axis2.databinding.utils.ConverterUtil.compare(ConverterUtil.java:1305)
> 	at it.lispa.opere.server.ws.simoi.OIWSServiceStub$_4IntegerType.set_4IntegerType(OIWSServiceStub.java:15469)
> 	at it.lispa.opere.server.OpereServiceImpl.inviaElencoItaca(OpereServiceImpl.java:1705)
> 	... 27 more
> i call the code as in the following
> 	_4IntegerType param = new _4IntegerType();
> 	param.set_4IntegerType(BigInteger.valueOf(anno));	
> 	inviaEOI0.setAnnorif(param);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message