• RavishC
  • NEWBIE
  • 5 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies

While calling a webservice from Salesforce, if the soap response has integer fields with null value, we get following error-

 

System.CalloutException: Web service callout failed: Failed to deserialize value '', due to:For input string: ""

 

The Request looked like -

 

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <http://www.w3.org/2001/XMLSchema-instance> >
            <env:Header/>
            <env:Body>
                        <parameters xmlns="http://www.approuter.com/connectors/request/4/" <http://www.approuter.com/connectors/request/4/> >
                                    <FEDERAL_TAXID>
111111111</FEDERAL_TAXID>
                        </parameters>
            </env:Body>
</env:Envelope>



The Response looked like -

 

<?xml version="1.0"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" <http://schemas.xmlsoap.org/soap/envelope/> >
            <Body>
                        <rows xmlns="http://www.approuter.com/connectors/response/4/" <http://www.approuter.com/connectors/response/4/> >
                                    <row>
                                                <Name>ABC Company</Name>
                                                <MasterID>111111</MasterID>
                                                <ParentCompany/>
                                                <ParentTaxID/>
                                                <TaxID>111111111</TaxID>
                                                <TaxIDType>FedTaxID</TaxIDType>
                                                <DateEstablished>2000-01-01T00:00:00.000</DateEstablished>
                                                <GrossAnnualSalesYear/>
                                                <GrossAnnualSales>100000</GrossAnnualSales>
                                                <NoOfEmployee>30</NoOfEmployee>
                                                <Website/>
                                                <DUNSNumber>01234567</DUNSNumber>
                                                <MajorityOwnershipEthnicityID>A99</MajorityOwnershipEthnicityID>
                                                <MinorityOrWomenOwned/>
                                                <WomenOwnershipPercent/>
                                                <DiversityOwnershipPercent/>
                                                <DBAName>ABC Connections</DBAName>
                                                <FormerCompanyName/>
                                    </row>
                        </rows>
            </Body>
</Envelope>

 

 

In the above response GrossAnnualSalesYear, WomenOwnershipPercent and DiversityOwnershipPercent are integer fields which do not have values.

 

It gets resolved if we change the integer data returned by the webservice to always have some integer value.

 

It is only a temporary solution as it requires that we assume some value like in our case -1 as a value for NULL, since we are dealing with positive values only. 

 

I am looking for a better solution or if it is a bug in the system, a fix from Salesforce.

 

Thanks.

Message Edited by RavishC on 07-16-2009 03:10 PM
Message Edited by RavishC on 07-16-2009 03:13 PM
Message Edited by RavishC on 07-16-2009 03:13 PM

It seems like Salesforce pages are not tested on IE as we can see that even https://login.salesforce.com/ is having javascript errors. And even in some pages its giving javascript errors like as shown below.

 

Error

 

 Going forward are we supposed to ask our clients to preferably use Firefox only?

While calling a webservice from Salesforce, if the soap response has integer fields with null value, we get following error-

 

System.CalloutException: Web service callout failed: Failed to deserialize value '', due to:For input string: ""

 

The Request looked like -

 

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <http://www.w3.org/2001/XMLSchema-instance> >
            <env:Header/>
            <env:Body>
                        <parameters xmlns="http://www.approuter.com/connectors/request/4/" <http://www.approuter.com/connectors/request/4/> >
                                    <FEDERAL_TAXID>
111111111</FEDERAL_TAXID>
                        </parameters>
            </env:Body>
</env:Envelope>



The Response looked like -

 

<?xml version="1.0"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" <http://schemas.xmlsoap.org/soap/envelope/> >
            <Body>
                        <rows xmlns="http://www.approuter.com/connectors/response/4/" <http://www.approuter.com/connectors/response/4/> >
                                    <row>
                                                <Name>ABC Company</Name>
                                                <MasterID>111111</MasterID>
                                                <ParentCompany/>
                                                <ParentTaxID/>
                                                <TaxID>111111111</TaxID>
                                                <TaxIDType>FedTaxID</TaxIDType>
                                                <DateEstablished>2000-01-01T00:00:00.000</DateEstablished>
                                                <GrossAnnualSalesYear/>
                                                <GrossAnnualSales>100000</GrossAnnualSales>
                                                <NoOfEmployee>30</NoOfEmployee>
                                                <Website/>
                                                <DUNSNumber>01234567</DUNSNumber>
                                                <MajorityOwnershipEthnicityID>A99</MajorityOwnershipEthnicityID>
                                                <MinorityOrWomenOwned/>
                                                <WomenOwnershipPercent/>
                                                <DiversityOwnershipPercent/>
                                                <DBAName>ABC Connections</DBAName>
                                                <FormerCompanyName/>
                                    </row>
                        </rows>
            </Body>
</Envelope>

 

 

In the above response GrossAnnualSalesYear, WomenOwnershipPercent and DiversityOwnershipPercent are integer fields which do not have values.

 

It gets resolved if we change the integer data returned by the webservice to always have some integer value.

 

It is only a temporary solution as it requires that we assume some value like in our case -1 as a value for NULL, since we are dealing with positive values only. 

 

I am looking for a better solution or if it is a bug in the system, a fix from Salesforce.

 

Thanks.

Message Edited by RavishC on 07-16-2009 03:10 PM
Message Edited by RavishC on 07-16-2009 03:13 PM
Message Edited by RavishC on 07-16-2009 03:13 PM

It seems like Salesforce pages are not tested on IE as we can see that even https://login.salesforce.com/ is having javascript errors. And even in some pages its giving javascript errors like as shown below.

 

Error

 

 Going forward are we supposed to ask our clients to preferably use Firefox only?

We're receiving the following error when making a webservice callout:

16:05:08 ERROR - Evaluation error: System.CalloutException: IO Exception: DerInputStream.getLength(): lengthTag=75, too big.
16:05:08 ERROR - Evaluation error: Class.wsFiberlinkCom.EspWebServiceImpl.checkIfValidMaas360UserName: line 58, column 13
AnonymousBlock: line 4, column 1

Any idea what the source is?

Thanks in advance.