3 messages in com.googlegroups.adwords-apiProblem accessing webservice JDK1.5/A...| From | Sent On | Attachments |
|---|---|---|
| rohit | 28 May 2006 07:21 | |
| Richard Jones | 28 May 2006 07:54 | |
| Patrick Chanezon | 30 May 2006 10:09 |
| Subject: | Problem accessing webservice JDK1.5/Axis1.4![]() |
|---|---|
| From: | rohit (rohi...@gmail.com) |
| Date: | 05/28/2006 07:21:30 AM |
| List: | com.googlegroups.adwords-api |
Hi,
I'm trying to use Adwords Webservice using Java(JDK1.5)/Axis1.4. The problem is each time I call the service, I keep getting - "The request did not contain a header named 'email'" error message; this despite that I'm setting the email & other info in the header. Here's the sample code -
--------------------------------------------------------------------------------------- static final String email = "x....@gmail.com"; static final String password = "secret"; static final String useragent = "Java AdWords API Demo"; static final String token = "xxxx";
static final String keywordtest = "flowers";
// The namespace used for API headers. private static final String apiNS = "https://adwords.google.com/api/adwords/v2";
public static void main(String args[]) throws Exception { // Get Axis to give us a stub for the service TrafficEstimatorInterface estimatorService = new
TrafficEstimatorService_ServiceLocator().getTrafficEstimatorService();
// Set the authentication request headers ((Stub) estimatorService).setHeader(apiNS, "email", email); ((Stub) estimatorService).setHeader(apiNS, "password",
password); ((Stub) estimatorService).setHeader(apiNS, "useragent",
useragent); ((Stub) estimatorService).setHeader(apiNS, "token", token);
--------------------------------------------------------------------------------------- Please advise some solution.
Regards, Rohit




