You need to sign in to do that
Don't have an account?
Gabriel Turkadze
Generate Apex classes from xsd
Hello guys,
Glas to see you here, I'm making saleforce integration from 3rd party app, I made callout and got
response xml schema (xsd), was trying to generate classes from wsdl but seems like response does
not has wsdl tags.
This response has metadata information about model classes (entities). I want somehow parse xml (xsd) and register custom objects. Please help me , how can I do it?
thanks
Glas to see you here, I'm making saleforce integration from 3rd party app, I made callout and got
response xml schema (xsd), was trying to generate classes from wsdl but seems like response does
not has wsdl tags.
This response has metadata information about model classes (entities). I want somehow parse xml (xsd) and register custom objects. Please help me , how can I do it?
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType id="id425f2cd2-975b-4f10-a56c-9dd6dfd16b39" name="TRule_Action_Activ_Entity"> <xs:annotation> <xs:documentation>Marks an Entity as available in the structure</xs:documentation> <xs:appinfo>Base:022a1daf-7ee8-4c2e-959c-c330416e05c5</xs:appinfo> </xs:annotation> <xs:complexContent mixed="false"> <xs:extension base="TRule_Activate_Action"> <xs:sequence> <xs:element id="id102ca5af-93a8-4a87-923a-a9207b6f5def" name="Entity" type="xs:string"> <xs:annotation> <xs:documentation>The Entity in the structure to be activated</xs:documentation> <xs:appinfo>Domain:Tier 2</xs:appinfo> </xs:annotation> </xs:element> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType>
thanks
James Loghry
Can you clarify what you're trying to do? It's not very clear. Are you trying to generate Apex classes based on the schema / xsd from the 3rd party ap? The easiest way to do this is with a WSDL instead of the xsd file, and then use WSDL2Apex to generate your classes. If the WSDL approach doesn't work, then take a look at using the Tooling API (a REST API that can either be called from Salesforce/Apex or from your third party app even), which can create Apex classes for you.
Gabriel Turkadze
Yes, I'm trying to generate apex classes from xsd, wsdl generation is not working because api from 3rd party app returns xml schema file not wsdl.
I have no access on 3rd party app.
Thanks
Gabriel Turkadze
Any updates here? Basically my goal is integrate metadata from third party app and I have only API url which return xsd file which I provided in my original post (short version), can someone tell me strategy how to create custom objects from this xsd (which contains metadata information) please?