Results 1 to 6 of 6

Thread: getting started with SOAP

  1. #1
    neilmcguigan is offline Junior Member
    Join Date
    Mar 2005
    Posts
    4

    Default getting started with SOAP

    i am using the MS SOAP Toolkit 3 with MS Visual basic, and trying to get started with the SugarCRM's SOAP interface. here is my code:

    Dim soapClient As MSSOAPLib30.SoapClient30
    Set soapClient = New MSSOAPLib30.SoapClient30
    Call soapClient.MSSoapInit("http://sugar/soap.php?wsdl=sugarsoap")
    Dim s As String
    s = soapClient.create_contact("neil", "mypassword", "bob", "loblaws", "bob@loblaws.com")
    MsgBox s
    If (Err.Number <> 0) Then
    MsgBox soapClient.FaultString
    End If

    s is blank and there is nothing in the fault string, and no contact is created. What am I doing wrong? do i have to hash the password? if so, how?

    Thanks!

    Neil M

  2. #2
    neilmcguigan is offline Junior Member
    Join Date
    Mar 2005
    Posts
    4

    Default Re: getting started with SOAP

    well i figured it out myself.

    yes, you do have to hash the password. you can see your own hashed password in the users table, under user_hash

    and you have to create a session first

    Dim createSessionStatus As String
    createSessionStatus = soapClient.create_session("neil", "myPasswordHash")

  3. #3
    neilmcguigan is offline Junior Member
    Join Date
    Mar 2005
    Posts
    4

    Default Re: getting started with SOAP

    PS I would not recommend programming with MSSoapClient3.0, as it does not handle the complex types that sugar SOAP uses very well. use dotnet instead.

  4. #4
    robopak is offline Junior Member
    Join Date
    Jun 2005
    Posts
    3

    Default Re: getting started with SOAP

    Hi,

    I'm trying to use the SugarCRM's SOAP interface (the search service) with Visual Basic .NET, but I don't know
    the correct data type I have to use in the .NET code.

    I really appreciate if you can tell me the correct type.

    Thanks.

  5. #5
    ftreml's Avatar
    ftreml is offline Sugar Community Member
    Join Date
    May 2005
    Location
    Vienna, Austria
    Posts
    399

    Default Re: getting started with SOAP

    Hi,
    Some of our products running on .net access Sugar by using the soap interface. simply use the wsdl tool contained in the SDK for generating the SOAP Stubs using the command line "wsdl http://your-server/sugar/soap.php?wsdl", and the classes are generated for you, including the correct data types. Visual Studio.net has the concept of "Web References" doing essentially the same for you.
    Florian

  6. #6
    robopak is offline Junior Member
    Join Date
    Jun 2005
    Posts
    3

    Default Re: getting started with SOAP

    Now it's working.

    Thanks!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •