• Naved_GESDOM
  • 0 Points
  • Member since 2011

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 4

how to deploy form sandbox to production please help

is any shortest way to that


Hi Guys,

I am attempting to call a simple web service that I have written in Apex from a Java Program.

The steps I have taken so far.

1. Create a webservice method inside a global class. (compiles ok).
2. Generate wsdl files for both my WebService and the org.
3. Install Apache Axis
4. Use Axis to generate proxy stubs (runs ok - and generates Java source files.)
5. Compile All Java sources generated (all compile first time without changes).
6. Construct Client code (as shown below).

import com.sforce.soap.schemas._class.MyWebService.*;
import java.net.*;

public class TestCall{


 public static void main(String[] args){

  System.out.println("start of program");

                 //        SoapBindingStub  binding = (SoapBindingStub) new SforceServiceLocator().getSoap();

   MyWebServiceBindingStub stub =
                              new MyWebServiceBindingStub
                               (new URL("https://na1-api.salesforce.com/services/Soap/class/MyWebService"),null);
   //com.sforce.soap.schemas._class.MyWebService.MyWebServicePortType pt =
                                //  stub.getMyWebService();
   System.out.println("about to make call");
  catch(Exception e){
   System.out.println("exception thrown");



7. The code above compiles fine.
8. On running I get:

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session.

Can you please tell me where I am going wrong. (While I still have some hair left to pull out please :)  )

Thank you , in advance.

Kevin Wright.

Hello.  I have a project where people's main contact and email information is stored in a custom object, not in Contact.  The client now wants me to write Apex code to bring some of the same email functionality  as with contacts - custom button emails, triggered emails, activity tracking.  I've already written some basic functions and they work.

Before I start writing my own activity creation/closing routines - I see there are setSaveAsActivity and setTargetObjectID and setWhatId methods available, but the doc says these only work for contacts leads and users.  Is that correct?  I can't use setTargetObjectID to my custom object in order to auto-create an activity?