on 05-02-2016 4:26 PM
Hi experts,
I need your help with this XML ---> XSD generation to use it in my integration flow :
I tested the xml above with SOAP UI and it's working fine, now I need to create an XSD structure and pass the same values in the mapping in my integration flow,
(This is code in case you want to copy it for your reply...)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<urn:update>
<urn:sObjects xsi:type="urn1:Account">
<urn1:Id>001b0000006mKKqAAM</urn1:Id>
<!--You may enter ANY elements at this point-->
<AnnualRevenue>9988</AnnualRevenue>
<Name>Farell Instruments WYNSYS</Name>
</urn:sObjects>
</urn:update>
</soapenv:Body>
</soapenv:Envelope>
I created this XSD format :
(This is code in case you want to copy it for your reply...)
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:enterprise.soap.sforce.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="update">
<xs:complexType>
<xs:sequence>
<xs:element name="sObjects">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="Id"/>
<xs:element type="xs:string" name="Name"/>
</xs:sequence>
<xs:attribute type="xs:string" name="type"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
At this point everything seems alright, but after the deploy I get an error because the type is invalid, so I went back to SOAP UI and deleted the attribute : <urn:sObjects xsi:type="urn1:Account"> and kept only <urn:sObjects>, and I got the same error from HCI !
My requirement now is to pass an attribute with the type Account just like this : <urn:sObjects xsi:type="urn1:Account"> but using XSD, I am total lost I tried several formats but still dont get the right one.
Any idea please ?
Thanks.
BR,
Mohamed Amine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all for your replies.
I proceeded with WSLT Mapping to force adding xsi:type="Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" to the sObjects element.
Thank you very mych.
BR,
Mohamed Amine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mohammed Amine,
Can you enable trace in your integration flow and then share the output before your request/reply step where the call to SFDC is being done. This will help understand what is the attribute causing the issue.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this and let us know the results
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="soapenv:Envelope">
<xs:complexType>
<xs:sequence>
<xs:element name="soapenv:Body">
<xs:complexType>
<xs:sequence>
<xs:element name="urn:update">
<xs:complexType>
<xs:sequence>
<xs:element name="urn:sObjects">
<xs:complexType>
<xs:sequence>
<xs:element name="urn1:Id" type="xs:string"></xs:element>
<xs:element name="AnnualRevenue" type="xs:int"></xs:element>
<xs:element name="Name" type="xs:string"></xs:element>
</xs:sequence>
<xs:attribute name="xsi:type" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="xmlns:soapenv" type="xs:string"></xs:attribute>
<xs:attribute name="xmlns:urn" type="xs:string"></xs:attribute>
<xs:attribute name="xmlns:urn1" type="xs:string"></xs:attribute>
<xs:attribute name="xmlns:xsi" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.