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
NikkiNikki 

XMLRPC in java

I recently upgraded code to version 2.0 of the salesforce api.  I downloaded the sfdcdemo.java file from the sforce website, edited the sfdcdemo.prop file to add my account info and compiled and ran the code.  I got the following error, having made no changes to the .java file:

Login call successful, session_id: 968xRtb75xQWzUYYCSwNN7xPWOZdR2dQRopgHDRrp3o4l
VM5Ug95efG6fnr1Ydvqyn_r7bSk1w.hZfYqaLHMKvbtzKggVlhL

Describe Params
[{version=2.0, type=global}]

Exception in thread "main" helma.xmlrpc.XmlRpcException: unknown method name des
cribe
        at helma.xmlrpc.XmlRpcClient$Worker.execute(XmlRpcClient.java:174)
        at helma.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:79)
        at helma.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:64)
        at sfdcdemo.main(sfdcdemo.java:183)

I encounter the unknown method exception with the search and logout methods as well. 

 

 

DevAngelDevAngel
This error is typically caused by not directing you calls to the correct server.  The login response contains the url of the server to use for ALL calls other than login.  Please check that you are doing this.
NikkiNikki

Works like a champ, thank you!

 

DevAngelDevAngel
N E Time
plpl

 

Hi,

 where downloaded the sfdcdemo.java file from the sforce website,

plpl

Hi,

 

    where in sforce.com to download sfdcdemo.java .

 

thanks

NikkiNikki
I looked all over trying to find where I got it, with no success.  I have a zip file with the code that I would be happy to email to you.  Looking at the mod dates on the files shows they haven't been touched for over a year.  Perhaps this example wasn't meant to be used with the new version of the API?
plpl

Hi,

Could you email me the zip file. I have the zip file which works if I put the version number 1.7.  I am wondering what version number you use. If I use version number 2.0, the url return from login call is https://...

I got the error "unkrown protocol https" . Do you have the same problem?, Do you know why.

my email address is pei.lei@aptsoft.com

 

Thank you very very much.

peilei

 

NikkiNikki

Peilei,

The zip file is on it's way via email.  I haven't seen the unknown protocol error.  Hopefully the file I sent you works.  I made some changes based on the devAngels' suggestion in this same thread.

Cheers,  Nikki