function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Joseph FerraroJoseph Ferraro 

DerInputStream error from webservice callout

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.
RavishCRavishC

I am also trying to call a secure webservice with certificate in PKCS12 format assigned to clientCert_x and Base64 encoded passPhrase to clientCertPasswd_x, but getting this error back-

 

 System.CalloutException: IO Exception: DerInputStream.getLength(): lengthTag=31, too big.

 

I am still trying for a solution, but if anyone already has some idea on this, please respond.

 

 

Thanks in advance. 

RavishCRavishC

I could get the issue resolved and solution came from getting the perfect PKCS12 cert from the server hosting the webservice and encoding the cert to Base64.

 

Once I have the Base64 encoded PKCS12 cert, I assign it to clientCert_x in the WSDL class that was autogenerated by Salesforce from the wsdl of the webservice. I also assign the password used to generate PKCS12 cert to clientCertPasswd_x in the same WSDL class as specified in the documentation (http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_web_services_wsdl2apex.htm) under Client Certificate Support section.

 

 So in the end if the cert and password are right, everything works smoothly.


 

Ravish Verma 10Ravish Verma 10
Dear Ravish,

I am facing the exact same error message, while calling out sharepoint online webservice from apex code. I tried to give the certificate name whih i got after click on the green lock icon in browser. 
I am a sharepoint developer and not having much knowladge in apex coding. 

below is the sample which i am trying to execute
 
SharepointTaxonomySchemaClass.Taxonomy_x0020_web_x0020_serviceSoap proxyclass = new SharepointTaxonomySchemaClass.Taxonomy_x0020_web_x0020_serviceSoap();
proxyclass.inputHttpHeaders_x = new Map<String, String>();
proxyclass.inputHttpHeaders_x.put('X-RequestDigest', requestDigestXml);
proxyclass.inputHttpHeaders_x.put('Cookie', cookie);
proxyclass.inputHttpHeaders_x.put('Method','POST');
proxyclass.timeout_x = 60000;
proxyclass.clientCert_x = 'Baltimore CyberTrust Root';
proxyclass.clientCertPasswd_x = cookie;

i dont know, which password and client certificate name i have to provide here.  

error message for the above statement is : System.CalloutException: IO Exception: DerInputStream.getLength(): lengthTag=41, too big.

Please help me to get the dertificate name and the password for the same.

Thanks 
Ravish Verma