function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
adamgadamg 

Perl & PHP Samples from Dreamforce

The Perl & PHP examples for the new API are available on here; http://www.majordojo.com/salesforce/.

Adam

Ron HessRon Hess

These modules look good ,

the login.pl example appears to be zero length when I download the gzip and unpack on win32 ?

I would also like to be able to access the enterprise WSDL , (currently this codes talks to aspen.salesforce.com?)

if anyone has extended, or plans to tweak this code to talk to the production, enterprise WSDL, please post back here !

Thanks !

WebHeadWebHead

I have downloaded your sample, and installed it on a test server here.

I installed apache 2.0, php 4.3.4 (--with-zlib) and all the other dependancies to make this example work.

It seems to be working correctly, however, when i try to log in with my Developer's account login, it fails telling me:

Error: user not valid

Any Ideas on why this might be happening?  Any ideas are welcome

Thanks

WebHeadWebHead

ok, i've gotten this part of my dilemna figured out... after looking at the source code for a while, and the api reference, i realized that the namespace was wrong.  fixed that, and now i get the error:

Error: couldn't build response

Any help on this would be greatly appreciated. Thanks

adamgadamg

Hi WebHead -

These samples were built against the new API, which you'll have saturday morning.

I should have been more clear - sorry.

Adam

WebHeadWebHead
No problem, thanks for the update, i'll await the new API and then try again.
laurentblaurentb

Hi Adam,

Do i get it right, the 2.5 API will be available the 11/22/2003 ?

Also where could we find the 2.5 WSDL (I got the 2.0 from http://www.sforce.com/us/docs/sforce20.wsdl, but noticed some diff, login for example uses 3 more params)

Thanks,

Laurent

 

adamgadamg
The 2.5 WSDL will be generated for each organization, and will be available within the new setup area of salesforce.com Winter '04.  As such, it won't be available until this weekend when we upgrade everyone.  That said, I'd recommend taking a look at the new doc, as it probably answers most of your questions.
WebHeadWebHead
Being new to Salesforce, I think i must be overlooking something. I see that the sample login script is being passed to the partner namespace, so i changed that to enterprise, i've downloaded my enterprise wsdl from the new interface, and i get the following error:

Error: Destination URL not reset. The URL returned from login must be set in the SforceService

I've been through the class generated from PEAR's genproxy.php, however i cannot see how to add this to the header (or even whether i should).

I have tried to add an item to the sample's SalesforceClient constructor as follows:

class SalesforceClient extends WebService_SforceService_Soap
{
function SalesforceClient($sessionId="",$ServerURL="") {
$this->WebService_SforceService_Soap();
if (isset($sessionId) && $sessionId != "") {
$header = new SOAP_Header(
'{urn:enterprise.soap.sforce.com}SessionHeader',
NULL,
array('sessionID' => $sessionId,
'ServerUrl' => $ServerURL),
0);
$this->addHeader($header);

}
}

But this addition has not helped either.
('ServerUrl' => $ServerURL)

If anyone can point out what it is i am overlooking, i would greatly appreciate it.

Thanks in advance
adamgadamg
I'm not an expert on the PHP samples, but I think you should be using the partner WSDL as described in the original code. (The reason being that the PHP SOAP samples use a weakly typed means of accessing the data rather than the strongly typed model of the Enterprise WSDL.)