| Author |
NumberFormatException: For input string: "" in XsTypeConverter
|
Tauqueer Ali
Ranch Hand
Joined: Sep 05, 2001
Posts: 53
|
|
My webservice request contains a tag for an integer field. When this tag is populated with an integer or when I don't include this tag in the request, the web services works fine but when I send an empty tag for this integer field, I get this NubmerFromatException in weblogic when it constructs soap request (stack trace below) Soap Request : <caseSearching> <CaseSearchInput> <m1:AerNum>981209-107024933</m1:AerNum> <m1:AgeCodeId /> <m1:CurrentVersion>true</m1:CurrentVersion> <m1:NotAerNum>false</m1:NotAerNum> </CaseSearchInput> </caseSearching> wsdl defenition for this field : <xs:element minOccurs="1" name="AgeCodeId" nillable="true" type="xs:int" /> It doens't seem to be a problem with minOccurs="1". The issue occurs even when minOccurs="0". Resopnse with exceptions : <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header /> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server</faultcode> <faultstring>For input string: ""</faultstring> <detail> <bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0" /> java.lang.NumberFormatException: For input string: "" at com.bea.xbean.util.XsTypeConverter.parseIntXsdNumber(XsTypeConverter.java:642) at com.bea.xbean.util.XsTypeConverter.parseInt(XsTypeConverter.java:624) at com.bea.xbean.util.XsTypeConverter.lexInt(XsTypeConverter.java:268) at weblogic.xml.dom.DOMStreamReaderExt.getIntValue(DOMStreamReaderExt.java:98) at com.bea.staxb.runtime.internal.UnmarshalResult.getIntValue(UnmarshalResult.java:411) at com.bea.staxb.runtime.internal.IntTypeConverter.getObject(IntTypeConverter.java:27) at com.bea.staxb.runtime.internal.BaseSimpleTypeConverter.unmarshal(BaseSimpleTypeConverter.java:39) at com.bea.staxb.runtime.internal.LiteralUnmarshalResult.unmarshalElementProperty(LiteralUnmarshalResult.java:150) at com.bea.staxb.runtime.internal.LiteralUnmarshalResult.extractAndFillElementProp(LiteralUnmarshalResult.java:119) at com.bea.staxb.runtime.internal.ByNameUnmarshaller.deserializeContents(ByNameUnmarshaller.java:48) at com.bea.staxb.runtime.internal.AttributeUnmarshaller.unmarshal(AttributeUnmarshaller.java:38) at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType(UnmarshalResult.java:174) at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalType(UnmarshalResult.java:212) at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshalType(UnmarshallerImpl.java:127) at weblogic.wsee.bind.runtime.internal.LiteralDeserializerContext.unmarshalType(LiteralDeserializerContext.java:60) at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.internalDeserializeType(BaseDeserializerContext.java:161) at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeType(BaseDeserializerContext.java:78) at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeWrappedElement(BaseDeserializerContext.java:124) at weblogic.wsee.codec.soap11.SoapDecoder.decodePart(SoapDecoder.java:303) at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:187) at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:150) at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:103) at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:121) at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:138) at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:39) at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127) at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:84) at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:60) at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66) at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44) at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:124) at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:179) </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope> wsdl: I can send the complete wsdl if anybody wants to take a look at it.
|
SCJP2, SCWCD, XML, OOAD<br />Kolkata, India
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: NumberFormatException: For input string: "" in XsTypeConverter
|
|
|