You need to sign in to do that
Don't have an account?
Roopa
How to invoke Webservice (WSDL created from APEX class) from java
Hi,
In our application, the WSDL file has been created from Apex class.
I have created client stubs out of this WSDL. How can I invoke the Webservice from a
stand-alone java application?
Also, How can I download the Salesforce library files related to apex classes?
Thanks in advance.
set the session header (get a session from a webtab merge field or similar, or call login in the enterprise or partner apis)
call the method(s) on your stub.
Would you please provide more detail around setting the session header using a session obtained via the partner API. I too am trying to call an Apex Web Service from an application that's successfully calling Partner APIs. So far I haven't had any success calling the Apex web services.
Thanks,
Cliff
apexBinding.SessionHeader = new apex.SessionHeader();
apexBinding.SessionHeader.sessionId = loginResult.sessionId;
If you're using a tool like Axis 1.x where the headers are automatically mapped onto the stub for you, you'll need to make sure to get the SessionHeader namespace URI correct, check the WSDL, its different for every one.
Thanks for the quick reply. I'm using Java but at this point .NET sure looks appealing :smileywink:
Here's what I'm running right now (note that at this point in the code I have already successfully called a method on the Partner API). PledgeUtils is my Apex class with the webservice methods exposed.
When I call a method on the PledgeUtils I'm encountering the following exception:
Any guidance you can provide would be greatly appreciated.
Thanks,
Cliff
Message Edited by CliffA on 08-21-2008 10:18 PM
with this line:
It's working now....
Thanks for setting me on the right course!
-Cliff
Thanks again for your help - it was invaluable