Thursday, 1 August 2013

Lessons learned while working of Salesforce Web Services

My this blog is directly or indirectly associated to the Thomson Reuters internal blogs because whenever I was on low of my mood elevator while working on these QCs, these blogs have fostered me to try solving the error again and again.

This was the first requirement related to Salesforce Web Services on which I was working from the scratch. I encountered many problems, solved many errors and finally learnt many new concepts on the way.
One of such errors which made me go mad and challenging me everyday was :

System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for elementhttp://west.thomson.com/crm/rocketxsd/4.0/invoice=OpenClearedItems

It is torturing me mentally (being on low mood elevator) since last few days in succession and no progress was made. Lots of email exchange between Dev team and Web Service side, Code debugging and SOAPUI testing many number of times and what not we did. Never I had used Developer Console, Debug Log that many times in my work.

I am going to mention solutions/lessons which I learned while working on QC 3996(Accounts Receivable Data in S2E) & QC 3891(Invoice Image Capture Integration–IXOS) for August Release. With so much consistent and repeatitive effort, the QC finally signed off into QA environment today.


So here I am enumerating some of the concepts which I learned with regard to this QC.


First Learning

After raising a case with Salesforce.com support, this is the response which I got from Salesforce:

xsd:element In Apex code saved using API version 15.0 and later, the ref attribute is also supported with the following restrictions:

And in Invoice WSDL, I find ref being used at:


Later on WSDL was changed considering the limitations under which ref could be used.  Problem solved!

Second Learning

I wanted to open the document in a new tab on clicking commandLink on the VF page. However, it was not allowing me to do so.




  • Reason of the issue:
    • reRender attribute was not allowing to open the document in a new tab but in the same. reRender attribut was removed. Problem solved!

Third Learning

Extensive use of Debug Log, Developer Console, SoapUI for debugging and testing.

Fourth Learning

From Test Classes, we cannot give a Web Service callouts. So in order to cover those piece of code under WebServiceCallout.invoke(), using Test.isRunningTest() methods for getting mock web service responses would help in increasing the test class coverage.

Fifth Learning

More importantly, I get to learn the importance of Collaboration, Teamwork, Positive Intent, Mood Elevator et al. 

Have you ever come across any learning while working. Please do share with us.

 It has been a challenging learning with these QCs 3996 and 3891.

No comments:

Post a Comment

Thank you for visiting. Your comments are highly appreciated.