I'm trying to use the Salesforce.com SOAP API. The login call returns a session ID that should be set in the SOAP header of subsequent calls. After much searching, I found an example of how to do this, but it doesn't seem to work - I assume the soap4r api has changed since the example was written.
Can anybody provide a short description of how this is done?
I know about ClientAuthHeaderHandler, but I can't figure out how it's supposed to be used.
but I'm producing this: <sessionid>vWBLOmDK9MI6Xv9U4eTDteaH1xyGi1</sessionid>
I figure I have to use "XSD::QName.new" somewhere, but everywhere I've tried gives incorrect results (and I obviously don't understand how these classes are used).
> def on_simple_outbound
> if @sessionid
> { "sessionid" => @sessionid }
> end
> end
> def on_simple_inbound(my_header, mustunderstand)
> @sessionid = my_header["sessionid"]
> end
> end
> ----
> It still doesn't work (invalid session id), possibly because the
> request should resemble this (from the Salesforce.com documentation):
> <ns2:sessionId
There were a number of problems with the code I posted earlier, including the case of off sessionId. I had figured those out, but I still needed your little snippet to put the rest together. I'm using the partner WSDL, although the example I had cut from the documentation uses the enterprise WSDL. I think they're the same except the enterprise WSDL is more strongly typed.
By the way, I had tried earlier to import the WSDL, but it I kept getting errors (I can't remember exactly, something about nil values I think). If you think this should work I can try again and post the results.
ami.gang...@gmail.com wrote:
> It worked! Thanks a million!
Good to hear.
> By the way, I had tried earlier to import the WSDL, but it I kept
> getting errors (I can't remember exactly, something about nil values I
> think). If you think this should work I can try again and post the
> results.
Thanks in advance. Please show me the results. Early snapshot versions
have many problems about parsing full(?) featured XML Schema definition
(+WSDL). I wrote many code in this half of a year but test is still not
enough.
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)