Jump to:

23480 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » any luck with soap/v1/wsdl

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 789 Views
  • Bambii7
    Avatar
    Community Member
    254 Posts

    any luck with soap/v1/wsdl Link to this post

    Hi all. I've been tiring to play with SOAP all day with little luck.

    The example code
    $c = new SoapClient('http://mysite.com/soap/v1/wsdl');
    echo $c->getXML("MyClassName", 99); // gets record #99 as xml

    Was producing fatal errors.

    I've tried creating a SoapClient in non WSDL mode. I don't really understand it all. But this appears to work. But I think the URI is wrong, and I don't know what the URI would be.

          $c = new SoapClient(null,
          array(
             "location" => "http://localhost/ss/silverstripe-v2.3.4/soap/v1/wsdl",
    "uri" => "",
             'encoding' => SOAP_ENCODED,
             'soap_version' => SOAP_1_1,
             "style" => SOAP_RPC,
             "use" => SOAP_ENCODED,
             "exceptions"=>0,
             )
             );

    When I visit the wsdl I see
    definitions targetNamespace="http://localhost/ss/silverstripe-v2.3.4/SOAPModelAccess/wsdl"
    Wouldn't I want to use SOAPModelAccess/wsdl instead of soap/v1/wsdl when setting up the soap client. It produces the same errors. But I remember reading something about using the same namespace as on the wsdl.

    I'm using windows on my localhost, and PHP 5.2.6. There was a bug with windows PHP and SOAP but I think it's OK now. I've tried making a connection with a SilverStripe install on my Linux host, but exact same issue.

    789 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.