Hi Lochana,

I hope you are using EI. As mentioned in the store [1], it is compatible
with ESB 5.0.0 and ESB 4.9.0. As the workaround, you can edit the connector
source to remove the '+' sign in the endpoint at [2] and check with that
modified connector.

[1] https://store.wso2.com/store/assets/esbconnector/
details/3957b581-86e0-4909-ab75-c3cfa2ce6494
[2] https://github.com/wso2-extensions/esb-connector-salesforcebulk/blob/
1400e88feceb5931e28aa353c79a4f1523956945/src/main/resources/
salesforceBulk-jobs/createJob.xml#L52

Thanks

On Mon, Feb 12, 2018 at 10:14 AM, Lochana De Alwis <lochana1...@gmail.com>
wrote:

> Hi Team,
>
> Im using SalesforceBulkApi connector(1.0.3) in WSO2 ESB to upload bulk
> object(Account) data to salesforce. I have created a test proxy service
> which is attached. Im getting a error when testing the proxy service. I
> have attached the axis2.xml and carbon.xml files to see config details.
>
> I have followed below WSO2 articles to configure SalesforceBulkApi.
>
> https://docs.wso2.com/display/ESBCONNECTORS/Working+with+Job
> s+in+SalesforceBulk
>
> *https://docs.wso2.com/display/ESBCONNECTORS/Working+with+Batches+in+SalesforceBulk
> <https://docs.wso2.com/display/ESBCONNECTORS/Working+with+Batches+in+SalesforceBulk>*
>
>
> I have created a test proxy service as following. The below is the proxy
> service sample xml code.
>
> <salesforcebulk.init>
>
>      <apiUrl>{$ctx:apiUrl}</apiUrl>
>
>      <clientId>{$ctx:clientId}</clientId>
>
>      <clientSecret>{$ctx:clientSecret}</clientSecret>
>
>      <hostName>{$ctx:hostName}</hostName>
>
>      <apiVersion>{$ctx:apiVersion}</apiVersion>
>
>      <username>{$ctx:username}</username>
>
>      <password>{$ctx:password}</password>
>
>     </salesforcebulk.init>
>
>
>
> <salesforcebulk.createJob>
>
>             <operation>insert</operation>
>
>         <object>Account</object>
>
>         contentType>CSV</contentType>
>
> </salesforcebulk.createJob>
>
>
> The below Message formaters and builders are enabled in axix2.xml config
> file.
>
> <messageFormatter contentType="text/csv" class="org.wso2.carbon.relay.E
> xpandingMessageFormatter"/>
>
>  <messageFormatter contentType="zip/xml" class="org.wso2.carbon.relay.E
> xpandingMessageFormatter"/>
>
>  <messageFormatter contentType="zip/csv" class="org.wso2.carbon.relay.E
> xpandingMessageFormatter"/>
>
>  <messageFormatter contentType="text/xml" class="org.wso2.carbon.relay.E
> xpandingMessageFormatter"/>
>
>  <messageFormatter contentType="text/html" class="org.wso2.carbon.relay.E
> xpandingMessageFormatter"/>
>
>  <messageFormatter contentType="application/soap+xml"
> class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
>
>  <messageFormatter contentType="application/xml"
> class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
>
>  <messageFormatter contentType="application/x-www-form-urlencoded"
> class="org.apache.synapse.commons.formatters.XFormURLEncodedFormatter"/>
>
>  <messageFormatter contentType="multipart/form-data"
> class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
>
>  <messageFormatter contentType="application/xml"
> class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
>
>  <messageFormatter contentType="text/xml" class="org.apache.axis2.transp
> ort.http.SOAPMessageFormatter"/>
>
>  <messageFormatter contentType="application/soap+xml"
> class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
>
>  <messageFormatter contentType="text/plain" class="org.apache.axis2.format
> .PlainTextFormatter"/>
>
>
>
>
>
>  Message Builders in axix2.xml file.
>
>  <messageBuilder contentType="text/csv" class="org.wso2.carbon.relay.B
> inaryRelayBuilder"/>
>
>  <messageBuilder contentType="zip/xml" class="org.wso2.carbon.relay.B
> inaryRelayBuilder"/>
>
>  <messageBuilder contentType="zip/csv" class="org.wso2.carbon.relay.B
> inaryRelayBuilder"/>
>
>  <messageBuilder contentType="text/xml" class="org.wso2.carbon.relay.B
> inaryRelayBuilder"/>
>
>  <messageBuilder contentType="text/html" class="org.wso2.carbon.relay.B
> inaryRelayBuilder"/>
>
>  <messageBuilder contentType="application/soap+xml"
> class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
>
>  <messageBuilder contentType="text/plain" class="org.wso2.carbon.relay.B
> inaryRelayBuilder"/>
>
>  <messageBuilder contentType="application/xml"
> class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
>
>  <messageBuilder contentType="application/x-www-form-urlencoded"
> class="org.apache.synapse.commons.builders.XFormURLEncodedBuilder"/>
>
>  <messageBuilder contentType="multipart/form-data"
> class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
>
>  <messageBuilder contentType="text/plain" class="org.apache.axis2.format
> .PlainTextBuilder"/>
>
>  <messageBuilder contentType="application/json"
> class="org.apache.synapse.commons.json.JsonStreamBuilder"/>
>
>  <messageBuilder contentType="application/xml"
> class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
>
>
>
> *But when testing the proxy service below error is generating. Could you
> please check why is that error generating.     <error
> xmlns="http://www.force.com/2009/06/asyncapi/dataload
> <http://www.force.com/2009/06/asyncapi/dataload>">*
>
> *   <exceptionCode>InvalidJob</exceptionCode>*
>
> *   <exceptionMessage>Unable to parse Job</exceptionMessage>*
>
> *</error>*
>
>
>
> I have tested the mentioned request on Postman Rest API and it's worked
> fine.
>
> *Post Request*
> https://domain/services/async/42/job
> <https://cs88.salesforce.com/services/async/42/job>
>
>
>
> *Body*
> <?xml version="1.0" encoding="UTF-8"?>
>
> <jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload";>
>
>  <operation>insert</operation>
>
>  <object>Account</object>
>
>  <contentType>CSV</contentType>
>
> </jobInfo>
>
>
> *Headers*
>
> X-SFDC-Session: 00D9E0000000gzL!AQQAQHpz8X2OBagK7kJiIatng.rY
> hpqxvLpihFIEiVoqUrKx05YXAATKto3oeHCi993ylSa_rmsgbWWk5vb7wIWXMl2aH6pS
>
> Here is sample Response of when creating a Salesforcefoce bulk job from
> Postman Rest API.
>
>
>
> Regads,
> Prasan De Alwis​
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Shakila Sasikaran
Software Engineer
Mobile :+94 (0) 77 526 6848 <+94%2077%20526%206848>
shak...@wso2.com
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to