Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Call INVALID_TYPE: Must send a concrete entity type #37

Closed
scolladon opened this issue Mar 23, 2016 · 8 comments
Closed

Create Call INVALID_TYPE: Must send a concrete entity type #37

scolladon opened this issue Mar 23, 2016 · 8 comments
Labels

Comments

@scolladon
Copy link
Contributor

Hello,

I have an issue while trying to create ApexClassMember :
System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: INVALID_TYPE: Must send a concrete entity type. faultcode=sf:INVALID_TYPE faultactor=

Here is the code :
List<ToolingAPIWSDL.ApexClassMember> lACM = new List<ToolingAPIWSDL.ApexClassMember>(); for(ToolingAPI.ApexClass aAC : apexClasses){ // ApexClasses are previously fetched with a query call which is ok ToolingAPIWSDL.ApexClassMember aACM = new ToolingAPIWSDL.ApexClassMember(); aACM.Body = aAC.Body; aACM.ContentEntityId = aAC.Id; aACM.MetadataContainerId = aSR.id; // Come from lACM.add(aACM); } tooling.create(lACM); // This call generate the error

Is there anything wrong with the code ?
How should I do ?

Regards

@afawcett
Copy link
Owner

Its likely because its not passing xsi:type="ApexClassMember" when the ApexClassMember is serialised to XML. The SOAP edition of this wrapper is still partly complete by the looks of it. I would recommend you take a look at the REST edition branch, https://github.com/afawcett/apex-toolingapi/tree/apex-toolingapi-rest/src/classes.

@afawcett afawcett added the bug label Mar 23, 2016
@scolladon
Copy link
Contributor Author

Ok sure,

The main reason why I do not want to use the rest api for this feature is I
cannot create multiple element with one callout using the rest.
What changes has to be done to make it works ?
I can do the development and create a pull request if you explain me

On mer. 23 mars 2016 at 14:22, Andrew Fawcett notifications@github.com
wrote:

Its likely because its not passing xsi:type="ApexClassMember" when the
ApexClassMember is serialised to XML. The SOAP edition of this wrapper is
still partly complete by the looks of it. I would recommend you take a look
at the REST edition branch,
https://github.com/afawcett/apex-toolingapi/tree/apex-toolingapi-rest/src/classes.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#37 (comment)

@afawcett
Copy link
Owner

If you take a look at the types in the Apex Metadata API, MetadataService.cls you'll see a type member variable defined, also needed is type_att_info as defined here.

@scolladon
Copy link
Contributor Author

Ok thanks,
I will try a pull request and see with you is there are no side effects

On Fri, Mar 25, 2016 at 7:36 AM Andrew Fawcett notifications@github.com
wrote:

If you take a look at the types in the Apex Metadata API,
MetadataService.cls you'll see a type member variable defined
https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataService.cls#L8373,
also needed is type_att_info as defined here
https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataService.cls#L8469
.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#37 (comment)

@afawcett afawcett closed this as completed Apr 1, 2016
@scolladon
Copy link
Contributor Author

Bonjour afawcett/apex-toolingapi,
Sebastien Colladon vous a laissé un message sur IQ Elite
Cliquez ici a.iqelite.com/j/z8pJaH/haq/?hg=BLWDpeq7cT pour lire votre message

L'équipe d'IQ Elite


Ce message est destiné à reply@reply.github.com. Si vous ne souhaitez pas recevoir d'autres messages de la part de IQ Elite, veuillez cliquer sur ce lien : a.iqelite.com/common/unsubscribe/?code=5746a04e&email=reply@reply.github.com.&hg=BLWDpeq7cT

IQ Elite est un service de IQ Elite S.L., dont le siège se trouve à : C/ Gran De Gràcia 15, 1a 1a, 08012 Barcelone, Espagne.

@scolladon
Copy link
Contributor Author

Bonjour afawcett/apex-toolingapi,
Sebastien Colladon vous a laissé un message sur IQ Elite
Cliquez ici a.iqelite.com/j/z8pJaH/xlt/?hg=BLWDpeq7cT pour lire votre message

L'équipe d'IQ Elite


Ce message est destiné à reply@reply.github.com. Si vous ne souhaitez pas recevoir d'autres messages de la part de IQ Elite, veuillez cliquer sur ce lien : a.iqelite.com/common/unsubscribe/?code=7e5c3aa2&email=reply@reply.github.com.&hg=BLWDpeq7cT

IQ Elite est un service de IQ Elite S.L., dont le siège se trouve à : C/ Gran De Gràcia 15, 1a 1a, 08012 Barcelone, Espagne.

@scolladon
Copy link
Contributor Author

Bonjour afawcett/apex-toolingapi,

Sebastien Colladon vous a laissé un message sur IQ Elite

Cliquez ici a.iqelite.com/j/z8pJaH/xlt/?hg=4VsBvcJRlT pour lire votre message

L'équipe d'IQ Elite


Ce message est destiné à reply@reply.github.com. Si vous ne souhaitez pas recevoir d'autres messages de la part de IQ Elite, veuillez cliquer sur ce lien : a.iqelite.com/common/unsubscribe/?code=7e5c3aa2&email=reply@reply.github.com.&hg=4VsBvcJRlT

IQ Elite est un service de IQ Elite S.L., dont le siège se trouve à : C/ Gran De Gràcia 15, 1a 1a, 08012 Barcelone, Espagne.

@scolladon
Copy link
Contributor Author

Bonjour afawcett/apex-toolingapi,

Sebastien Colladon vous a laissé un message sur IQ Elite

Cliquez ici a.iqelite.com/j/z8pJaH/haq/?hg=SlG7xbHLKj pour lire votre message

L'équipe d'IQ Elite


Ce message est destiné à reply@reply.github.com. Si vous ne souhaitez pas recevoir d'autres messages de la part de IQ Elite, veuillez cliquer sur ce lien : a.iqelite.com/common/unsubscribe/?code=5746a04e&email=reply@reply.github.com.&hg=SlG7xbHLKj

IQ Elite est un service de IQ Elite S.L., dont le siège se trouve à : C/ Gran De Gràcia 15, 1a 1a, 08012 Barcelone, Espagne.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants