Results 1 to 3 of 3

Thread: The trouble with SOAP...

  1. #1
    mkk
    mkk is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Norway
    Posts
    11

    Default The trouble with SOAP...

    Community v4.5.1d

    I've tried connecting to the SOAP API using both nuSoap and php5's soap client, the latter in both wsdl and non-wsdl mode. Nothing seems to work.

    With nuSoap, my calls don't seem to return anything, so I tried with php5. That produced the error message
    " 'location' and 'uri' options are requred in nonWSDL mode ", so I tried connecting in non-wsdl mode (specifying location and uri, style and use). That seemed to get me connected, but my calls produced the error message
    "looks like we got no XML document". __getLastResponse() shows that what was returned was the html presentation of the api (with popouts describing each soap call, i.e. this: https://demo.sugarondemand.com/sugarcrm/soap.php).

    So I have two questions for this forum:
    1) Why are my clients unable to recognize soap.php?wsdl as wsdl?
    2) Why does the php5 client not recognize what it receives as xml OR why does sugar soap send its response as html instead of xml?


    Furthermore:

    I've tried using "http://mkcrm45/soap.php?wsdl" as the location, as opposed to "http://mkcrm45/soap.php" (which is what I used above). In that case, the error message I get is "Wrong Version", and what is returned is a series of empty tablecells. What gives? I've tried to submit the expected soap version (in both the client construct and the login call) as both SOAP_1_1 and SOAP_1_2. Does SugarCRM use a different version than these, or does the problem lurk elsewhere?

    Finally:

    The whole uri-thing is a bit gibberishy to me. I've seen some people use something like "urn:xmethods-delayed-quotes" for other services. What is correct for SugarCRM, and why?

    -Kyrre
    Last edited by mkk; 2007-10-18 at 12:46 PM.

  2. #2
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: The trouble with SOAP...

    Hello Kyrre,

    First off, PHP5's built-in SOAP client will not work with Sugar. This is a known limitation and something we're working toward fixing.

    For nuSOAP... I've never had much trouble using it. You should definitely be connecting to soap.php?wsdl, rather than just soap.php. Can you post an example of the code you're using to connect? Here's a post where I included a simple example using nuSOAP (connecting against Sugar Open Source 4.5.1f):

    http://www.sugarcrm.com/forums/showthread.php?t=26644
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  3. #3
    mkk
    mkk is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Norway
    Posts
    11

    Default Re: The trouble with SOAP...

    Thanks, Julian.

    I decided to implement your code snippet in order to test my server. Apparently, there is some (still unidentified) problems with my localhost server, but I have been able to get things up and running on another server we have.

    One of the things I had to do was make sure nuSoap was not using the name "soapclient" anywhere in nusoap.php, as php5 also uses that name. This requirement is not yet very well documented in the wiki, so I'll make sure to edit the soap pages with that rather vital info.

    The same goes for the current problem with using the php5 client - I'll cling to nuSoap for now, and document that incompatibility on the wiki as well.

    -K

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SOAP login() - Invalid Username/Password.
    By dsandor in forum Developer Help
    Replies: 12
    Last Post: 2010-12-07, 09:13 AM
  2. Soap, Sugar and Python.
    By giblfiz in forum Developer Help
    Replies: 2
    Last Post: 2009-03-24, 09:53 PM
  3. SOAP Performance Issue Loading Accounts
    By artisticlight in forum General Discussion
    Replies: 1
    Last Post: 2007-07-20, 01:39 PM
  4. Soap & New Custom Fields
    By sacramentojoe in forum Developer Help
    Replies: 0
    Last Post: 2007-04-17, 04:04 PM
  5. SOAP and Applescript?
    By mattjones99 in forum Developer Help
    Replies: 5
    Last Post: 2006-02-08, 08:00 PM

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
  •