Hi Eric ,

If you could help me because I am really stuck with this issue

On Feb 18, 3:33 pm, ranjit singh <[email protected]> wrote:
> Hi Eric,
>
> I am using the following class
>
> import com.google.api.adwords.v13.AccountInterface;
> import com.google.api.adwords.v13.AccountServiceLocator;
>
> import org.apache.axis.client.Stub;
>
> /**
>  * This code sample retrieves the loginemailaddress for each account
> managed
>  * by the effective user.
>  */
> public class GetClientAccounts {
>   // Provide AdWords login information.
>         private static final Stringemail= "[email protected]";
>           private static final String password = "ranjit123";
>          //private static final String clientEmail =
> "[email protected]";
>           private static final String useragent =
>               "my application";
>           private static final String developerToken =
> "[email protected]++usd";
>
>   private static final String namespace =
>       "https://sandbox.google.com/api/adwords/v12";;
>
>   public static void main(String[] args) {
>     try {
>       // Set up service connection.
>       AccountInterface service =
>           new AccountServiceLocator().getAccountService();
>
>       // Define SOAP headers.
>       ((Stub) service).setHeader(namespace, "email",email);
>       ((Stub) service).setHeader(namespace, "password", password);
>       ((Stub) service).setHeader(namespace, "useragent", useragent);
>       ((Stub) service).setHeader(namespace, "developerToken",
> developerToken);
>     //  ((Stub) service).setHeader(
>       //    namespace, "applicationToken", applicationToken);
>
>       // BEGIN AccountService.getClientAccounts: v13
>       // Get client accounts.
>       String[] loginEmails = service.getClientAccounts();
>       // END AccountService.getClientAccounts: v13
>
>       // Display login emails.
>       if (loginEmails != null) {
>         for (String login : loginEmails) {
>           System.out.println("Loginemailis \"" + login + "\".");
>         }
>       }
>     } catch(Exception e) {
>       e.printStackTrace();
>     }
>   }
>
> }
>
> but i am getting the following error :
>
> {https://adwords.google.com/api/adwords/v13}fault:
>      <ns1:code>1</ns1:code>
>      <ns1:message>The request did not contain aheadernamed 'email'.</
> ns1:message>
>
> The request did not contain aheadernamed 'email'.
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce 
> ssorImpl.java:
> 39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru 
> ctorAccessorImpl.java:
> 27)

-- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en.

Reply via email to