+ Start a Discussion
steve buikhuizesteve buikhuize 

Apex invocation from Java without using specific wsdl

I have a requirement to be able to invoke Apex Code web services with different class & method names but always the same parameters and return types.

The only wsdls that I can see are the enterprise & partner api wsdl which cannot call apex, the apex wsdl which only allows execute anonymous or a class specific wsdl but its specific and I need a generic version.

In the apex toolkit there is a call "sforce.apex.execute" which does this exact thing.

Does anyone know of a way of making a similar invocation from java or another wsdl/soap client?

It has occurred to me to generate a java client (wsdl2java) and then subclass the required methods to acheive this but I wonder if there is a better way.

Any suggestions are welcome...