Here, *objects *is the XML element. So escape those characters in the
value of *objects* as follows.

<objects>
    &lt;values&gt;
        &lt;sObject&gt;
            &lt;Description&gt;CreatedfromBulkAPI&lt;/Description&gt;
            &lt;Name>BulkApI1&lt;/Name&gt;
            &lt;Phone&gt;12345&lt;/Phone&gt;
        &lt;/sObject&gt;
    &lt;/values&gt;
</objects>


On Wed, Feb 28, 2018 at 1:18 PM, Lochana De Alwis <[email protected]>
wrote:

> Hi Shakila,
>
> Normally, we used those characters on inside XML values, not to the tags
> right.
> As an example,
> <value>5 &lt; 10</value>
>
> Could you send me a sample way of adding &lt; and &gt; to below Object
> data XML.
>
>           <objects>
>             <values>
>                  <sObject>
>                    <Description>CreatedfromBulkAPI</Description>
>                    <Name>BulkApI1</Name>
>            <Phone>12345</Phone>
>                   </sObject>
>         </values>
>            </objects>
>
> Regards,
> Prasan De Alwis
>
> On Tue, Feb 27, 2018 at 5:55 PM, Shakila Sasikaran <[email protected]>
> wrote:
>
>> Hi Lochana,
>>
>> Could you please escape the less-than (<) and greater-than (>) characters
>> by &lt; and &gt; respectively and try?
>>
>> Thanks
>>
>> On Tue, Feb 27, 2018 at 5:24 PM, Lochana De Alwis <[email protected]>
>> wrote:
>>
>>> Hi Team,
>>>
>>> Im using SalesforceBulkApi connector(1.0.3) in WSO2 ESB(4.9.0) to upload
>>> bulk object(Account) data to salesforce. I have created a test proxy
>>> service to upload Account data to Salesforce..
>>> Im having trouble to save the proxy server in when objects are added to
>>> the addBatch.
>>> Below is the sample proxy service I have created to addBatch.
>>>
>>> I have followed below WSO2 articles to configure AddBatch in
>>> SalesforceBulkApi.
>>>
>>> https://docs.wso2.com/display/ESBCONNECTORS/Working+with+Bat
>>> ches+in+SalesforceBulk
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <proxy xmlns="http://ws.apache.org/ns/synapse";
>>>        name="SalesforceAddBatch"
>>>        transports="https,http"
>>>        statistics="disable"
>>>        trace="disable"
>>>        startOnLoad="true">
>>>    <target>
>>>       <inSequence>
>>>          <salesforcebulk.addBatch>
>>>             <apiUrl>https://ap2.salesforce.com</apiUrl>
>>>             <apiVersion>34.0</apiVersion>
>>>             <accessToken>5Aep861TSESvWeug_xOdumSVTdDsD7OrADzhKVu9YrPFLB1
>>> zce_I21345lnWIBR7uaGvedTTXJ4uPswE676H2pQpCZ</accessToken>
>>>             <refreshToken>5Aep861TSESvWeug_wHqvFVePrOMjj7CUFncs.cGdlPln6
>>> 8mKYpAbAJ9l7A5FTFsmqFY8Jl0m6fkIMWkIKc4WKL</refreshToken>
>>>            <clientId>3MVG9ZL0ppGP5UrDGNWmP9oSpiNtudQv6b06Ru7K6UPW5xQhd
>>> 6vakhfjA2HUGsLSpDOQmO8JGozttODpABcnY</clientId>
>>>             <clientSecret>5437293348319318299</clientSecret>
>>>             <intervalTime>1000000</intervalTime>
>>>             <registryPath>connectors/SalesforceBulk</registryPath>
>>>             <contentType>text/csv</contentType>
>>>             <jobId>75028000000McSwAAK</jobId>
>>>             *<objects>*
>>> *              <values>*
>>> *                 <sObject>*
>>> *                   <Description>Created from Bulk API</Description>*
>>> *                   <Name>BulkApI1</Name>*
>>> *            <Phone>12345</Phone>*
>>> *            <Website>http://www.google.com
>>> <http://www.google.com></Website>*
>>> *            <OwnerId>0059E000001Gd3BQAS</OwnerId>*
>>> *            </sObject>*
>>> *            <sObject>*
>>> *                   <Description>Created from Bulk API</Description>*
>>> *                   <Name>BulkApI2</Name>*
>>> *            <Phone>12345</Phone>*
>>> *            <Website>http://www.google.com
>>> <http://www.google.com></Website>*
>>> *            <OwnerId>0059E000001Gd3BQAS</OwnerId>*
>>> *            </sObject>*
>>> *         </values>*
>>> *           </objects>*
>>>          </salesforcebulk.addBatch>
>>>          <respond/>
>>>          <log level="full"/>
>>>       </inSequence>
>>>       <outSequence>
>>>          <log/>
>>>          <send/>
>>>       </outSequence>
>>>    </target>
>>>    <description/>
>>> </proxy>
>>>
>>> When I saving the proxy service, it is saved as following.
>>>
>>>  <salesforcebulk.addBatch>
>>>             <apiUrl>https://ap2.salesforce.com</apiUrl>
>>>             <apiVersion>34.0</apiVersion>
>>>             <accessToken>5Aep861TSESvWeug_xOdumSVTdDsD7OrADzhKVu9YrPFLB1
>>> zce_I21345lnWIBR7uaGvedTTXJ4uPswE676H2pQpCZ</accessToken>
>>>             <refreshToken>5Aep861TSESvWeug_wHqvFVePrOMjj7CUFncs.cGdlPln6
>>> 8mKYpAbAJ9l7A5FTFsmqFY8Jl0m6fkIMWkIKc4WKL</refreshToken>
>>>             <clientId>3MVG9ZL0ppGP5UrDGNWmP9oSpiNtudQv6b06Ru7K6UPW5xQhd6
>>> vakhfjA2HUGsLSpDOQmO8JGozttODpABcnY</clientId>
>>>             <clientSecret>5437293348319318299</clientSecret>
>>>             <intervalTime>1000000</intervalTime>
>>>             <registryPath>connectors/SalesforceBulk</registryPath>
>>>             <contentType>text/csv</contentType>
>>>             <jobId>75028000000McSwAAK</jobId>
>>>       *      </sObject>*
>>>   </salesforcebulk.addBatch>
>>>
>>> Upload Object data XML is missing after it's saved in ESB. Could someone
>>> please help me what is wrong with adding Objects.
>>>
>>> Regards,
>>> Prasan De Alwis
>>> 0774747163
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Shakila Sasikaran
>> Software Engineer
>> Mobile :+94 (0) 77 526 6848 <+94%2077%20526%206848>
>> [email protected]
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>>
>
>


-- 
Shakila Sasikaran
Software Engineer
Mobile :+94 (0) 77 526 6848
[email protected]
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to