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
runawaydogrunawaydog 

need help with sessionheader axis 1.2

I am trying to connect to sforce using axis 1.2.1 and jdk1.5

I was reading the blog and it says

_SessionHeader has been changed to SessionHeader

however...i am still getting cannot find symbol...

am i missing something??

here are my imports; same as the quickstart

the imports compile correctly with no code, however trouble comes when i put in the login code from quickstart and both _SessionHeader to SessionHeader would give me cannot find symbol

import java.io.BufferedReader;
import java.io.IOException;
import com.sforce.soap.enterprise.sobject.*;
import com.sforce.soap.enterprise.*;
import com.sforce.soap.enterprise.Error;
import javax.xml.rpc.*;

import org.apache.axis.client.CommonsHTTPSender;

import java.rmi.*;
import com.sforce.soap.enterprise.fault.*;

i ran wsdl2java on my own developer wsdl

also if i am builing my own jar can i just copy and paste

org\apache\axis\client directory from quickstart to my own?

 

Message Edited by runawaydog on 09-16-2005 01:41 PM

runawaydogrunawaydog

i noticed that i have no

SessionHeader or _SessionHeader under the directory

com\sforce\soap\enterprise

while _SessionHeader does exist in the quickstart.......

 

did i use the wsdl2java incorrectly?......

java -classpath .;.\axis.jar;.\anix-ant.jar;.\commons-discovery.jar;.\commons-logging.jar;.\jaxrpc.jar;.\log4j-1.2.8.jar;.\saaj.jar;.\wsdl4j.jar;.\mail.jar;.\activation.jar org.apache.axis.wsdl.WSDL2Java enterprise.wsdl

SuperfellSuperfell
You need to use the -a switch as well, then you'll get a SessionHeader class (axis 1.2), or _SessionHeader (axis 1.1)
runawaydogrunawaydog

woohoo, thank you! =)

 

also if i am builing my own jar can i just copy and paste

org\apache\axis\client directory from quickstart to my own?

client-config.wsdd and CommonsHTTPSender.java

or are there any settings that needs to be adjusted

Message Edited by runawaydog on 09-16-2005 02:01 PM

rsonirsoni
Simon,

Could you please tell me what would I need to do to see the _SessionHeader classes in IBM WSAD 5.1.2. I am using the 6.0 APIs and have been able to successfully login. I however am stuck as I cannot see the _SessionHeader object.

Cheers
SuperfellSuperfell
If that version uses Axis 1.1, look for a _SessionHeader class, if it uses Axis 1.2 or greater, look for a SessionHeader class. Make sure when it runs WSDL2Java that its specifying the -a switch.
rsonirsoni
Thanks for the response. As I do not use Axis the -a switch does not work. However the -all switch for IBM's WSDL2Client generated the SessionHeader object for me.

The second place I am now stuck with is that the SoapBindingStub does not have the setHeader method on it. I am guessing that this is cause I am not using Axis but using the IBM web services client. Could you please let me know what would I need to do in order to set the Session ID in the SOAP header for the IBM SOAP client?

Thanks
RItesh Soni
SuperfellSuperfell
No idea, ask the IBM folks (but i think you'll find WASD is using Axis under the covers)