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
henryCHhenryCH 

Upgraded Email Agent

Hi,

We had implemented some extra functionality into the last version of the Email Agent and since our customers want to have the large attachment handling we decided to implement these functionalities into the new version too. So I started with a retrieve call and was really surprised to find out that the SObject class used in the new Email Agent does not support the get_any() method. That means theres no way to get the returned data from the retrieve API call, at least no documented way. Even the API 8.0 documentation examples use get_any so what was the reason to leave it out?

As a workaround I tried use WSDL2Java with the partner.wsdl file that was located in the Email Agent's root folder, but the output didn't match the contents of the partnerWSDL.jar. What also confused me was the fact that the EmailAgent doesn't use Axis anymore, but Axis is still required if you create the binding stub the old way.

So please, could anybody explain what happened to Email Agent and how standard webservice calls can be implemented?

Thanks in advance,
Henry
henryCHhenryCH
Well, looks like I had to help myself. Just in case somebody cares, here's how I solved my problem. Salesforce.com support confirmed that the latest version of the Email Agent doesn't use Axis anymore. So my workaround was to use Axis 1.4 libraries (had to be something above 1.2 because new Email Agent uses Java 5) and create the stub the old fashioned way. This means that there are some redundant classes in the project now or if this sounds better, two different parallel implementations of the webservice client but at least it works.

I'm a bit disapointed about the missing reaction of the salesforce.com representatives.

Henry
MG ConsultingMG Consulting

Hi,

 

The missing get_any() method is causing quite a bit of pain this week :(

 

I tried your method above, including adding all axis jars to the email agent jar. It compiles perfectly fine but then I get the following runtime error. The class it says it can't find is in axis.jar which is inside the emailagent.jar so I can't figure out why it is complaining about it not being there.

 

I hope maybe someone from Salesforce, or anyone for that matter, can try and give me a hand.

 

There must be some others out there that have sucessfully worked around this get_any() issue.

 

 

Exception in thread "Timer-0" java.lang.NoClassDefFoundError: org/apache/axis/en coding/Serializer at com.sforce.mail.Custom.handleEmailMessages(Custom.java:22) at com.sforce.mail.GenericClient.receive(GenericClient.java:417) at com.sforce.mail.EmailService$EmailWorker.run(EmailService.java:211) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.apache.axis.encoding.Serializer at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 5 more

 

I appreciate any help you cn provide.

 

Thanks a lot,

Mike

 

MG ConsultingMG Consulting

Hi,

 

The NoClassDefFoundError was due to me not putting references to the axis jars in the Email2Case.jar's manifest, stupid me... In any case, I didn't need to make use of this workaround in the end as I figured out this solution.

 

Thanks,

Mike