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
yhyh 

ERROR 1112

I wrote a small program to login and then do a sfdc.describe.  Everything works fine, and i can actually output the fields coming back.  However, when i move this code into a servlet( same exact code ) and the code is executed from a servlet, i get the following error:

org.apache.xmlrpc.XmlRpcException: user not valid

I also checked the error code and it is 1112 ( invalid login )

Why is it working when it's running as a standalone program but not working when i'm in a servlet?  Anyone else encounter this?

I'm using apache's XmlRpcClient class.

 

 

 

DevAngelDevAngel

Hi yh,

You will need to verify that you are sending the message correctly.  The best way to do this is using Apache Axis' TcpMon utility.  This will allow you to capture and view the XML RPC messages that you are sending indepentdent of the way your code is running.

XML RPC is NOT the sanctioned implementation for sforce by the way.  You should be using SOAP.

fouloxfoulox

I see that you are using tcpmon, just as an fyi, I think I found a better method for logging my soap messages.  With my method I produce a log file with a properly formatted xml for every soap request and response that is handled by my clients.

I followed the instructions laid out by Tom Jordahl in the axis message boards:

http://marc.theaimsgroup.com/?l=axis-user&m=105044044621780&w=2

From there I simply made a few changes to his SOAPMonitor to class to use log4j logging instead of System.print.out statements, and I used dom4j's OutputFormat.createPrettyPrint(), to create a pretty format for the soap responses.

If my code is of interest to people I'll pass it on to Dave, and he could make it available.

Ollie.ax81Ollie.ax81
Yes indeed I would be interested in that code.