in

 

Business Services Toolkit for PHP?

Last post 09-29-2008 10:12 PM by david_hazlett. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-18-2008 1:07 AM

    Business Services Toolkit for PHP?

    Hi,

    Just bought Daptiv, and am working on itegrating it with our in-house systems.  We're not a Windows shop, so I'm wondering if anyone has created an equivalent to the Business Services Toolkit for PHP or Perl.

    If not, does anyone know what the URL is for the WSDL for the underlying SOAP service, and any details on any special authentication requirements?

    Many thanks,
    Stu

  • 09-29-2008 10:12 PM In reply to

    Re: Business Services Toolkit for PHP?

     The following snippet should get you going:

     

    $client = new SoapClient("http://yourdaptivserver.daptiv.com/service/businessServices/default.asmx?WSDL",
                                array("trace" => 1) );

    $strHeaderComponent_BasicSecurityToken = "<BasicSecurityToken xmlns=\"http://www.eproject.com/webservice/BusinessServices\"><Username>youruserid</Username><Password>yourpassword</Password><Created>".gmstrftime("%Y-%m-%dT%I:%M:%SZ")."</Created></BasicSecurityToken>";
    $objVar_BasicSecurityToken_Inside = new SoapVar($strHeaderComponent_BasicSecurityToken, XSD_ANYXML, null, null, null);
    $objHeader_BasicSecurityToken = new SoapHeader("xmlns=http://www.eproject.com/webservice/BusinessServices",
                                                       "BasicSecurityToken",
                                                       $objVar_BasicSecurityToken_Inside);

    And a typical call looks like this (the first array() is replaced with parameters if necessary just like other PHP SOAP calls - some experimentation is required with wireshark to get this right):

    $result = $client->__soapCall("GetResourceManagers", array(), array(), $objHeader_BasicSecurityToken);

     Do a print_r on $result to decode it and go from there.  Save the $objHeader_BasicSecurityToken and use it for each call.

     - Dave

Page 1 of 1 (2 items)

Navigate: Home | Blogs | Forums | Solution Library  Get Help:  Contact | Feedback | FAQ   Terms of Use:  Terms & Conditions | Privacy Policy