+ Start a Discussion

Error using 'Generate from WSDL' with Zuora WSDL 22.0

I imported Zuora WSDL v22.0 into my Dev Org using 'Generate from WSDL' and received a compile error on the 'core' API file. The first two (Object API and Fault API) went fine. I received an unexpected token on the word 'update' and expect I would receive one on 'delete' which occurs further down the file. So Zuora has update and delete methods and so does Salesforce - this can't be the first time. - Given that Zuora is at API 22 and SF is at API 19 this has to be something new? I have contacted Zuora but think this is more of an SF issue. The WSDL is copied below for reference. is too large to be included.


Ideas? I'd love to hear from SF reps on this.





Imran MohammedImran Mohammed

This is because update and delete are reserved keywords in Apex.

Thats why you are getting error.




I am alos getting this error for update and delete operation for a different WSDL. Can you please tell me how can we resolve this error?





I am guessing you have already figured this out, but the issue is that Apex cannot properly digest the Zuora WSDL. The reason for this is that Zuora's  objects have a hierarchy (inheritance) model, and every object is of type (extends) zObject.  This is just like Salesforce, where all objects extend sObject.  The parent object (zObject) contains the Id field, which I think is missing from your stub code, and thus, delete() and update() fail.


Unfortunately, this is a shortcoming of Apex.  Case in point, try importing the SFDC WSDL into Apex.  You'll get the same error.  Apex just cannot handle inheritance. 


There is a workaround, though, which is to manually update your stub calls.  Howerver, even better, Zuora has already done this.  Just contact them, and they'll give you their Apex stubs, which they have created for Apex users.




Could you please provide a link for zuora wsdl? its too important for me.




Could you please provide a link for zuora wsdl?

Could you please give some statements regarding to how to use zuora in salesforce?

My Req is,

The billing system, Zuora, does not synchronize the data with Salesforce. It receives a one-time push of the contact info but we need to keep the cotnact info synchronized. We've been told that in order to push contact changes, we need to setup coding using the API from salesforce to Zuora.