Zero length BigInteger

Zero length BigInteger

  
Hi, I am trying to call a webservice which takes text inputs. I get the following error when I run the logic. The webservice is in a producer eSpace.

Message:
Zero length BigInteger
Stack:
java.lang.NumberFormatException: Zero length BigInteger   at java.math.BigInteger.<init>(BigInteger.java:276)
   at java.math.BigInteger.<init>(BigInteger.java:451)
   at com.sun.xml.bind.DatatypeConverterImpl._parseInteger(DatatypeConverterImpl.java:89)
   at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$21.parse(RuntimeBuiltinLeafInfoImpl.java:782)
   at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$21.parse(RuntimeBuiltinLeafInfoImpl.java:785)
   at com.sun.xml.bind.v2.runtime.FilterTransducer.parse(FilterTransducer.java:84)
   at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:247)
   at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:209)
   at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:501)
   at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)
   at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75)
   at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:247)
   at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
   at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369)
   at c...
-Env-
eSpaceVer: 693 (Id=19163, PubId=20348, CompiledWith=8.0.1.25)


Any idea what this error means?

Thanks
Hi Stuart,

It seems you are passing an empty value "" when a BigInteger is expected.
Hi StuartB,

You say that the webservice is exposed in an OutSystems application is that it?
Hi Andre,

Yes thats correct. The input for the web service looks like this in the WSDL:

<xsd:complexType name="searchAnyPolicyDetails">
- <xsd:sequence>
  <xsd:element name="searchPolicyDetailsRequest" nillable="true" type="tns:searchPolicyDetailsRequest" />
  </xsd:sequence>
  </xsd:complexType>
- <xsd:complexType name="searchPolicyDetailsRequest">
- <xsd:sequence>
  <xsd:element name="doPolicySearchRequest" type="tns:doPolicySearchRequest" />
  </xsd:sequence>
  </xsd:complexType>
- <xsd:complexType name="doPolicySearchRequest">
- <xsd:sequence>
  <xsd:element name="PolicyNumber" type="xsd:string" />
  <xsd:element name="ExternalPolicyNumber" type="xsd:string" />
  <xsd:element name="HistoricPolicyNumber" type="xsd:string" />
  <xsd:element name="InsuredName" type="xsd:string" />
  <xsd:element name="Postcode" type="xsd:string" />
  <xsd:element name="VehicleRegNumber" type="xsd:string" />
  <xsd:element name="StartRowNo" type="xsd:positiveInteger" />
  <xsd:element name="FetchLimit" type="xsd:positiveInteger" />
  </xsd:sequence>
  </xsd:complexType>


When I debug I get to the call to the web service and it just stops. The logs from the service show that it is never actually called.
Are you consuming the webservice also in OutSystems?
Hi, the web service is external to Outsystems but added by the "Add Web Reference" in an Outsystems eSpace. The consumer references this eSpace.
Solution
Ok.

As you can see here positiveInteger attributes in the webservice are mapped to Text in OutSystems. I'd say that when you are calling this webservice you are not passing any values for these attributes when a value is probably expected in the other side. If you need to send a null instead of "" or "0" then check this topic and see the Send Default Value property for the input parameters of consumed SOAP web services.
Solution
Hi André,

Excuse me for getting a bit off topic, but if my memory doesn't fail me, it seems there is new content on that help topic. It would be a good helper having that new content flagged. For someone who studied that help before - I go there frequently - is a simple way of keeping up to date.

PS: I know I already told you this before, just recently in fact... I'm really annoying...
Hi Tiago,

Yes indeed this topic was updated with information about REST APIs. You're not annoying at all. Keep that feedback flowing our way please :)
StuartB wrote:

Hi Stuart,

Can you provide us an example to help us reproduce the error you see? If it is a bug we'll try to fix it.

Thanks,
Lúcio

Hi, I am trying to call a webservice which takes text inputs. I get the following error when I run the logic. The webservice is in a producer eSpace.

Message:
Zero length BigInteger
Stack:
java.lang.NumberFormatException: Zero length BigInteger   at java.math.BigInteger.<init>(BigInteger.java:276)
   at java.math.BigInteger.<init>(BigInteger.java:451)
   at com.sun.xml.bind.DatatypeConverterImpl._parseInteger(DatatypeConverterImpl.java:89)
   at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$21.parse(RuntimeBuiltinLeafInfoImpl.java:782)
   at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$21.parse(RuntimeBuiltinLeafInfoImpl.java:785)
   at com.sun.xml.bind.v2.runtime.FilterTransducer.parse(FilterTransducer.java:84)
   at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:247)
   at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:209)
   at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:501)
   at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)
   at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75)
   at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:247)
   at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
   at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369)
   at c...
-Env-
eSpaceVer: 693 (Id=19163, PubId=20348, CompiledWith=8.0.1.25)


Any idea what this error means?

Thanks
 
 
i am getting this error too while consuming the soap service.

how can i workaround the issue, most of my data is coming from external database which i dont have control over,