*hi, I'm trying to connect to the sandbox adwords to understand it better,
but from the following error:*
AxisFault
>>>>>>>>>>>>>> faultCode: {http://xml.apache.org/axis/}HTTP
>>>>>>>>>>>>>> faultSubcode:
>>>>>>>>>>>>>> faultString: (502)Bad Gateway
>>>>>>>>>>>>>> faultActor:
>>>>>>>>>>>>>> faultNode:
>>>>>>>>>>>>>> faultDetail:
>>>>>>>>>>>>>> {}:return code: 502
>>>>>>>>>>>>>> <!DOCTYPE html>
>>>>>>>>>>>>>> <html lang=en>
>>>>>>>>>>>>>> <meta charset=utf-8>
>>>>>>>>>>>>>> <meta name=viewport content="initial-scale=1,
>>>>>>>>>>>>>> minimum-scale=1, width=device-width">
>>>>>>>>>>>>>> <title>Error 502 (Server Error)!!1</title>
>>>>>>>>>>>>>> <style>
>>>>>>>>>>>>>> *{margin:0;padding:0}html,code{font:15px/22px
>>>>>>>>>>>>>> arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7%
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}*
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> body{background:url(//www.google.com/images/errors/robot.png)
>>>>>>>>>>>>>> 100% 5px
>>>>>>>>>>>>>> no-repeat;padding-right:205px}p{margin:11px 0
>>>>>>>>>>>>>> 22px;overflow:hidden}ins{color:#777;text-decoration:none}a
>>>>>>>>>>>>>> img{border:0}@media screen and
>>>>>>>>>>>>>> (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
>>>>>>>>>>>>>> </style>
>>>>>>>>>>>>>> <a href=//www.google.com/><img
>>>>>>>>>>>>>> src=//www.google.com/images/errors/logo_sm.gif
>>>>>>>>>>>>>> alt=Google></a>
>>>>>>>>>>>>>> <p><b>502.</b> <ins>That’s an
>>>>>>>>>>>>>> error.</ins>
>>>>>>>>>>>>>> <p>The server encountered a temporary error and could
>>>>>>>>>>>>>> not complete your request.<p>Please try again in 30
>>>>>>>>>>>>>> seconds.
>>>>>>>>>>>>>> <ins>That’s all we know.</ins>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> {http://xml.apache.org/axis/}HttpErrorCode:502
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> (502)Bad Gateway
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> com.google.api.adwords.lib.AdWordsHttpSender.invoke(AdWordsHttpSender.java:60)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>>>>>>>>>>>>>> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> org.apache.axis.client.Call.invokeEngine(Call.java:2784)
>>>>>>>>>>>>>> at org.apache.axis.client.Call.invoke(Call.java:2767)
>>>>>>>>>>>>>> at org.apache.axis.client.Call.invoke(Call.java:2443)
>>>>>>>>>>>>>> at org.apache.axis.client.Call.invoke(Call.java:2366)
>>>>>>>>>>>>>> at org.apache.axis.client.Call.invoke(Call.java:1812)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> com.google.api.adwords.v201209.cm.CampaignServiceSoapBindingStub.get(CampaignServiceSoapBindingStub.java:1157)
>>>>>>>>>>>>>> at Main.main(Main.java:43)
>>>>>>>>>>>>>> javax.xml.rpc.ServiceException:
>>>>>>>>>>>>>> java.net.MalformedURLException: no protocol:
>>>>>>>>>>>>>> v201209/api/adwords/mcm/v201209/ManagedCustomerService
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> com.google.api.adwords.v201209.mcm.ManagedCustomerServiceLocator.getPort(ManagedCustomerServiceLocator.java:82)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> com.google.api.adwords.lib.AdWordsServiceFactory.getConfiguredStub(AdWordsServiceFactory.java:165)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> com.google.api.adwords.lib.AdWordsServiceFactory.generateServiceStub(AdWordsServiceFactory.java:95)
>>>>>>>>>>>>>> at
>>>>>>>>>>>>>> com.google.api.adwords.lib.AdWordsUser.getService(AdWordsUser.java:272)
>>>>>>>>>>>>>> at Main.main(Main.java:55)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
*follow my java code:*
*obs: my email is an MCC adwords and lacks billing settings.*
>> import com.google.api.adwords.lib.AdWordsService;
>>>>>>>>>>>>>> import com.google.api.adwords.lib.AdWordsUser;
>>>>>>>>>>>>>> import com.google.api.adwords.v201209.cm.ApiException;
>>>>>>>>>>>>>> import com.google.api.adwords.v201209.cm.CampaignPage;
>>>>>>>>>>>>>> import
>>>>>>>>>>>>>> com.google.api.adwords.v201209.cm.CampaignServiceInterface;
>>>>>>>>>>>>>> import com.google.api.adwords.v201209.cm.Selector;
>>>>>>>>>>>>>> import com.google.api.adwords.v201209.mcm.ManagedCustomerPage;
>>>>>>>>>>>>>> import
>>>>>>>>>>>>>> com.google.api.adwords.v201209.mcm.ManagedCustomerServiceInterface;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> import java.rmi.RemoteException;
>>>>>>>>>>>>>> import java.util.HashMap;
>>>>>>>>>>>>>> import java.util.Map;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> import javax.xml.rpc.ServiceException;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> public class Main {
>>>>>>>>>>>>>> public static Map<String, Object> authProps = new
>>>>>>>>>>>>>> HashMap<String, Object>();
>>>>>>>>>>>>>> static {
>>>>>>>>>>>>>> authProps.put("email", "myEmail");
>>>>>>>>>>>>>> authProps.put("password", "MyPass");
>>>>>>>>>>>>>> authProps.put("useragent", "MyName");
>>>>>>>>>>>>>> authProps.put("developerToken", "MyEmail++MyCode");
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>> public static void main(String[] args) {
>>>>>>>>>>>>>> AdWordsUser user = new
>>>>>>>>>>>>>> AdWordsUser(authProps).generateClientAdWordsUser(null);
>>>>>>>>>>>>>> user.useSandbox(true) ;
>>>>>>>>>>>>>> CampaignServiceInterface campaignService = null;
>>>>>>>>>>>>>> try {
>>>>>>>>>>>>>> campaignService =
>>>>>>>>>>>>>> user.getService(AdWordsService.V201209.CAMPAIGN_SERVICE);
>>>>>>>>>>>>>> } catch (ServiceException e2) {
>>>>>>>>>>>>>> // TODO Auto-generated catch block
>>>>>>>>>>>>>> e2.printStackTrace();
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>> try {
>>>>>>>>>>>>>> CampaignPage campaignPage =
>>>>>>>>>>>>>> campaignService.get(new Selector());
>>>>>>>>>>>>>> } catch (ApiException e1) {
>>>>>>>>>>>>>> // TODO Auto-generated catch block
>>>>>>>>>>>>>> e1.printStackTrace();
>>>>>>>>>>>>>> } catch (RemoteException e1) {
>>>>>>>>>>>>>> // TODO Auto-generated catch block
>>>>>>>>>>>>>> e1.printStackTrace();
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> try {
>>>>>>>>>>>>>> ManagedCustomerServiceInterface service =
>>>>>>>>>>>>>> user.getService(AdWordsService.V201209.MANAGED_CUSTOMER_SERVICE,"v201209")
>>>>>>>>>>>>>> ;
>>>>>>>>>>>>>> Selector selector = new Selector();
>>>>>>>>>>>>>> selector.setFields(new String[]{"Login",
>>>>>>>>>>>>>> "CustomerId", "Name"}) ;
>>>>>>>>>>>>>> try {
>>>>>>>>>>>>>> ManagedCustomerPage managedCustomerPage =
>>>>>>>>>>>>>> service.get(selector) ;
>>>>>>>>>>>>>> } catch (ApiException e) {
>>>>>>>>>>>>>> e.printStackTrace();
>>>>>>>>>>>>>> } catch (RemoteException e) {
>>>>>>>>>>>>>> e.printStackTrace();
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>> } catch (ServiceException e) {
>>>>>>>>>>>>>> e.printStackTrace();
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
*you know what I'm doing wrong?* *I'm just doing this code to understand the
adwords api.
Thanks
*
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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