none
Connecting to SalesForce RRS feed

  • Question

  • Hi there,

    I found this post dealing with SalesForce adapter, I understand as well that the TwoConnect Adapter is not as good as I first thought.

    We are using BizTalk Server 2006 R2 and planning to migrate to BizTalk Server 2010 soon.

    The question now is how do we connect to SalesForce from BizTalk Server, discussing with a SF guy, I understood that they have a kind of queue that they call Outbound messages (kind of equivalent of Oracle Advanced Queuing) Could BizTalk Connect to this part of SF with an out of the box solution?

    Do we have to write APex code as in the post? which increases headake...

    I still didn't understand of how could we use the WCF-Custom to communicate with SF? I thought of finding an answer in this codeplex but there were only a presentation

    Any help would be greatly appreciated

    Regards,

    Stefan

    BizTalk Consultant

     

    Thursday, December 9, 2010 12:46 PM

Answers

  • OK, I finally found out the solution, waou and it was not easy, I'll describe the steps on my blog soon http://www.itsconsulting.eu/en/blog

    By the way I was just wondering how come Microsoft is soooo much complicating things, everything is easy with SOAPUI with BizTalk Server with all the options, it might soon become a nightmare specially if you are not doing standard things, furthermore there is nothing non standard with the Webservices of SalesForce, and still we are here trying very hard to make the thing work !

    Any way I am happy now, but I passed 3 days connecting to SalesForce... 3 long days, even with an excellent blog as the one of Steef

    Regads,

    Stefan

    BizTalk

    Thursday, December 16, 2010 2:09 PM

All replies

  • Hi Stefan,

    Concerning use of WCF-Custom and communicating SF you can read both my blog posts called: BizTalk, SalesForce and MSMQ – Part I and Part II.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly

     


    BizTalk
    Thursday, December 9, 2010 12:53 PM
    Moderator
  • Hi Steef,

    Thx for your posts, but it seems they are out of date, because In part I step 3 I cannot find any more Develop Apex Classes, I think I need to do it in the http://developer.salesforce.com part, do you confirm?

     

    The question I am asking my self is, do we need to do custom development on the SalesForce part to integrate BizTalk with SalesForce ? Isn't there any simpler method? because as every BizTalk developper I'm lazy :-)

     

    Regards,

    Stefan

    BizTalk Consultant

    Thursday, December 9, 2010 2:44 PM
  • Hi,

    Yes you need a sandbox environment. I made mistake myself registering for normal (trail) salesforce account. Some of things you see are in Dutch, but with sandbox (i.e. developer sandbox) you should see apex classes. Is there a simpler method, well if you want to communicate with SalesForce through WCF you need to do something with Apex, but is pretty straight forward and simple. You can have a look at developer site. Doing a bit of development is fun!

    Cheers,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Thursday, December 9, 2010 10:28 PM
    Moderator
  • Thx Steef,

    Ideed, I was on the production (trial version), but to create the sandbox login, I need to navigate to Setup -> Data Management -> Sandbox, which I don't have on my trial version.

    So I guess I need to use the official (not trial) version of the company, to create my sandbox and be able to play with it. Apparently I cannot simulate the SalesForce / BizTalk interactions for free :-(

    Anyway thx a lot

    Stefan

    BizTalk

    Friday, December 10, 2010 9:13 AM
  • Steef,

    I am still strugling with the SalesForce stuff, I did almost all what is in your blog, except that I used SalesForce WSDL Partner, but this shouldn't change much.

    As the SalesForce stuff is on the cloud, I need to connect to their Website using https. Could you help me specify on the WCF-WsHttp send port the certificate/thumbprint stuff?

    Thx a lot

    Regards,

    Stefan

    BizTalk

    Wednesday, December 15, 2010 4:40 PM
  • It seems that I have found, I used by mistake the WCF-Custom, but what I need to do is change it WCF-WsHttp, then go to Security tab, Select Transport, then you can specify the Thumbprint, or click on browse.

    Now I am strugling to find what is the SOAPAction of the SalesForce stuff as I have only the WSDL, can I extract it from there? Do I need to specify the Soap action by the way?

    Regards,

    Stefan

    BizTalk

     

    Wednesday, December 15, 2010 4:54 PM
  • Hi Stefan,

    You can only get WSDl. Next step is using the BizTalk WCF Service Consuming Wizard. where you can import metafile like WSDL (option). The BizTalk WCF Service Consuming Wizard creates in your BizTalk project the BizTalk schemas and types necessary to consume WCF services. It also creates two binding files, BizTalkServiceInstance.BindingInfo.xml and BizTalkServiceInstance_Custom.BindingInfo.xml. BizTalkServiceInstance.BindingInfo.xml is a BizTalk binding file that can be imported by the development command-line tool or wizard to configure the send ports with the standard binding WCF adapters—for example, the WCF-NetMsmq and WCF-WSHttp adapters.  BizTalkServiceInstance.BindingInfo.xml is a BizTalk binding file that can be imported by the development command-line tool or wizard to configure the send ports with the WCF-Custom adapter. When you import the generated binding file, it populates the WCF.Action property in the action mapping format. This was also case when I worked with SalesForce (see my blogpost links previous post).

    HTH

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Wednesday, December 15, 2010 6:22 PM
    Moderator
  • Thx Steef for your time,

    Indeed, using your method I could populate the Action Mapping format see below, this was automatically generated by the Wizard on the Binding xml file (I'm using the SalesForce WSDL Partner)

    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Operation Name="query" Action="" /> <-- Many operations of the WSDL partner having all Action="" : is it normal?
    </BtsActionMapping>

    However, I'm still faced with SOAP errors

    <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <faultcode>soapenv:Client</faultcode><faultstring>No operation available for request {}string</faultstring></soapenv:Fault>

    When I call the login, the SalesForce WebService returns two urls

    <metadataServerUrl>https://xxx-api.salesforce.com/services/Soap/m/20.0/00xxxxxxxxxD</metadataServerUrl>
    <serverUrl>https://xxx-api.salesforce.com/services/Soap/u/20.0/00xxxxxxxxxD</serverUrl>

    Both of them return the same SOAPException error, on the SalesForce site, they indicate that the URL is invalid? however with SoapUI it works correctly, what is still missing with my WCF connectivity?

    I really appreciate your help, I'm feeling a bit lonely with my problems without you ;-)

    Regards,
    Stefan

    BizTalk

    Thursday, December 16, 2010 10:17 AM
  • Here are the difference between the two posts SoapUI versus BizTalk WCF-BasicHttpBinding, the post from Biztalk Server I got it by putting Paros Proxy, so it is exaclty what is supposed to be sending to Sales force, I understand better now the error: BizTalk is sending <string> instead of query/queryString

    I'm still invatigating :-(

    BizTalk Server

    POST http://xxx-api.salesforce.com/services/Soap/m/20.0/00xxxxxxxD HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    SOAPAction: "<BtsActionMapping%20xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"%20xmlns:xsd="http://www.w3.org/2001/XMLSchema">%0d%0a%20%20<Operation%20Name="query"%20Action=""%20/>%0d%0a</BtsActionMapping>"
    Host: xxx-api.salesforce.com
    Content-Length: 136
    Expect: 100-continue
    Proxy-Connection: Keep-Alive
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><string>select id, Name from User</string></s:Body></s:Envelope>

    SOAPUI:

    POST https://xxx-api.salesforce.com/services/Soap/u/20.0/00xxxxxxxD HTTP/1.1
    Accept-Encoding: gzip,deflate
    Content-Type: text/xml;charset=UTF-8
    SOAPAction: ""
    User-Agent: Jakarta Commons-HttpClient/3.1
    Host: cs4-api.salesforce.com
    Content-Length: 539

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com">
       <soapenv:Header>
          <urn:SessionHeader>
             <urn:sessionId>xxxxxx</urn:sessionId>
          </urn:SessionHeader>
       </soapenv:Header>
       <soapenv:Body>
          <urn:query>
             <urn:queryString>select id, Name from User </urn:queryString>
          </urn:query>
       </soapenv:Body>
    </soapenv:Envelope>

    Thursday, December 16, 2010 10:51 AM
  • OK, I finally found out the solution, waou and it was not easy, I'll describe the steps on my blog soon http://www.itsconsulting.eu/en/blog

    By the way I was just wondering how come Microsoft is soooo much complicating things, everything is easy with SOAPUI with BizTalk Server with all the options, it might soon become a nightmare specially if you are not doing standard things, furthermore there is nothing non standard with the Webservices of SalesForce, and still we are here trying very hard to make the thing work !

    Any way I am happy now, but I passed 3 days connecting to SalesForce... 3 long days, even with an excellent blog as the one of Steef

    Regads,

    Stefan

    BizTalk

    Thursday, December 16, 2010 2:09 PM
  • Thanks for your posts, but it seems they are out of date, because In part I step 3 I cannot find any more Develop Apex Classes, I think I need to do it in the http://developer.salesforce.com part, do you confirm?

     


    Tuesday, June 11, 2019 3:17 PM
  • This thread is nearly 10 years old.  The API might as well have been Post-It notes... :)

    Current SalesForce is completely different.

    Tuesday, June 11, 2019 4:01 PM
    Moderator