You need to sign in to do that
Don't have an account?
Need a help webservice callout exception
Hi I am struggling with the below exception..
System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor=
Class.WSDL2ApexVenki.Venki.sayHello: line 62, column 1 Class.VenkiController.: line 4, column 1
My classes are:
global
classVenki {
webService
staticstring sayHello() {
return'Hello World!';
}
}
Controller Class:
public
classVenkiController {
WSDL2ApexVenki.Venki stub =
newWSDL2ApexVenki.Venki();
String uname=
'Fine test';
publicString getUname() {
returnuname;
}
publicvoidsetUname(String username){
uname=username;
}
publicString getHelloWorld() {
string result;
WSDL2ApexVenki.Venki stub =
newWSDL2ApexVenki.Venki();
setUname(stub.sayHello());
returnuname;
}
}
Visual force page:
<
apex:pagecontroller="VenkiController"tabStyle="Account">
<
apex:form>
<
script>functionshow()
{
testHello();
}
</
script>
<
apex:actionFunctionname="testHello"action="{!getHelloWorld}"/>
<
h1> Testing! </h1>
<
apex:commandbuttononclick="show()"/>
<
apex:outputTextvalue="{!uname}"id="out"/>
</
apex:form>
</
apex:page>
Please help.