You need to sign in to do that
Don't have an account?
Ashwin
I read lot of discussions in the forum and there seem to be no problems of this sort. Can anyone point me where I am going wrong?
wsdl2apex setting inputHttpHeaders
Hi all,
I am new to salesforce and am using this tutorial to invoke a webservice.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm
My wsdl2Apex has
public Map<String,String> inputHttpHeaders_x;
in the DocSamplePort class.
public class test {
docSample.DocSamplePort stub = new docSample.DocSamplePort();
stub.inputHttpHeaders_x = new Map<String, String>();
}
And I get the following error while making a inputHttpHeaders_x object which is
| Error: Compile Error: unexpected token: '=' at line 3 column 24 |
I read lot of discussions in the forum and there seem to be no problems of this sort. Can anyone point me where I am going wrong?
Thanks in Advance.
public class test {
docSample.DocSamplePort stub = new docSample.DocSamplePort();
stub.inputHttpHeaders_x = new Map<String, String>();
}
Would be:
public class test {
public void callService(){
docSample.DocSamplePort stub = new docSample.DocSamplePort();
stub.inputHttpHeaders_x = new Map<String, String>();
}
}
I am still trying to figure out how to call the method :D. Any suggestions?