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
alexpalexp 

SOAP::Lite and stubmaker.pl

Hi,

I ran stubmaker.pl that comes with SOAP::Lite on http://www.sforce.com/us/docs/sforce.wsdl. Resulting
class was sfconnector.pm. I just tried login.

It simple as:

use sfconnector qw (:all);
my $result = login ( $ver, $usr, $pass );

Seems to work fine. Just wondering if anyone has
played around with this and ran into any issues.
Or is there something I should know about.

Cheers.
adamgadamg

That sounds pretty cool - i'll have to check that out.

Note that you will likely encounter issues creating the complex structures assosiated with queries, although that will be addressed in relatively soon in a future release.

andyandy
I have been able to login successfully using the created file "sfconnector.pm", but can't figure out how to take the next step. I'll also go ahead and admit that I'm a web services novice, but generally a quick study.

After executing the login function, I receive a valid response.

my $response = login ($ver, $usr, $pass);

I am able to print out the server_url, userID, and session_id variables from the $response above. However, when I try to use the SOAP examples in the sforce api document, I can't seem to get SOAP::Lite to make a valid call. For example, in an attempt to mock the example in the api document, I execute:

my $response2 = describe ("account");

The XML generated (using debug mode in SOAP::Lite) looks as follows:

< SOAP-ENV:Body>
< namesp2:describe xmlns:namesp2="sfconnector:SalesforceConnector">
account< /type>
< /namesp2:describe>
< /SOAP-ENV:Body>


But the returned SOAP object indicates that describe doesn't exist:

< soap:Body>
< soap:Fault>
< faultcode>1113< /faultcode>
< faultstring>unknown method name describe< /faultstring>
< /soap:Fault>
< /soap:Body>


NOTE: I've added spaces to the XML after each "
Any suggestions/hints? I'm also not sure how I'm supposed to pass the session_id back with the describe call.

Many thanks,
Andy

Message Edited by andy on 10-02-2003 01:01 PM

ochangochang

I'm having the same issue, I get the same error: 1113 - unknown method name describe. I'm allowing the sid cookie to be set from the SOAP response, does the session_id SOAP header also need to be set, or is the cookie sufficient?

thanks,
oliver

DevAngelDevAngel

Hi ochang,

After logging in, you recieve a url in the login response.  You need to make all other calls to this url, not the url you used for login.

 

 

ochangochang

great that worked, thanks!

oliver