如何在新API中获取客户管理服务? [英] How to get Customer Management Service in the new API?

查看:81
本文介绍了如何在新API中获取客户管理服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我是AdCenter API的新手。我目前正在更新与新API版本8版本3相对应的代码。由于我使用的是Java,因此我抓住了WSDL代码并从wsdl生成了Jars作为我的库。


我发现在新的软件包中没有CustomerServiceLocator,它曾用于获取客户管理服务。有没有其他方式来获得服务? (Campaign Service中的问题相同)。


以下是获取CustomerManagementService的代码:




CustomerManagementServiceLocator customerManagementServiceLocator = new CustomerManagementServiceLocator();


customerManagementServiceLocator.setBasicHttpBinding_ICustomerManagementServiceEndpointAddress(adCenterCredentials

.getCustomerManagementUrl());


ICustomerManagementService customerManagementService = customerManagementServiceLocator.getBasicHttpBinding_ICustomerManagementService();

BasicHttpBinding_ICustomerManagementServiceStub stub =(BasicHttpBinding_ICustomerManagementServiceStub)customerManagementService;

stub.setTimeout(timeoutMillis);

stub.setHeader(namespace," ApplicationToken","");

stub.setHeader(namespace," DeveloperToken",adCenterCredentials.getDeveloperToken());

stub.setHeader(namespace," UserName",adCenterCre dentials.getUserName());

stub.setHeader(namespace," Password",adCenterCredentials.getPassword());




有人能告诉我在新API中该怎么办?

解决方案

嗨SaraSemplest,


请按照Java开始使用的说明进行操作:


msdn.microsoft.com /.../ cc728898(v = msads.80)的.aspx


如果您仍遇到问题,请随时与支持部门联系以获取进一步的帮助。  可以通过电话,电子邮件或IM联系他们:

advertising.microsoft.com/.../contact-sales-and-support
 


我希望这有帮助!


Hi there,

I'm a newbie to the AdCenter API. I'm  currently updating my code corresponding to the new API release Version 8 Release 3. Since I'm using Java, I grabbed the WSDL code and generated Jars from wsdl as my libraries.

I found that there's no CustomerServiceLocator, which used to be used to get Customer Management Service, in the new package. Is there an alternative way to get the service? (Same problem in Campaign Service).

Below is my code to get the CustomerManagementService:

CustomerManagementServiceLocator customerManagementServiceLocator = new CustomerManagementServiceLocator();

customerManagementServiceLocator.setBasicHttpBinding_ICustomerManagementServiceEndpointAddress(adCenterCredentials
.getCustomerManagementUrl());

ICustomerManagementService customerManagementService = customerManagementServiceLocator.getBasicHttpBinding_ICustomerManagementService();
BasicHttpBinding_ICustomerManagementServiceStub stub = (BasicHttpBinding_ICustomerManagementServiceStub) customerManagementService;
stub.setTimeout(timeoutMillis);
stub.setHeader(namespace, "ApplicationToken", "");
stub.setHeader(namespace, "DeveloperToken", adCenterCredentials.getDeveloperToken());
stub.setHeader(namespace, "UserName", adCenterCredentials.getUserName());
stub.setHeader(namespace, "Password", adCenterCredentials.getPassword());

Could anyone tell me what should I do in the new API?

解决方案

Hi SaraSemplest,

Please follow the instructions for getting started with Java here:

msdn.microsoft.com/.../hh219123.aspx

Included in this walk through is a guide on how to add the WSDL using WSDL2Java.  Be sure to use–a switch as described here:

1. Run the following command at the command prompt to access the WSDL:

java org.apache.axis.wsdl.WSDL2Java -a <URL of an adCenter WSDL>

Here is a Campaign Management Java sample for which a similar coding technique could be used for CustomerManagement:

msdn.microsoft.com/.../cc728898(v=msads.80).aspx

If you are still running into issues, please feel free to contact support for further assistance.  They can be reached via phone, email, or IM here: advertising.microsoft.com/.../contact-sales-and-support  

I hope this helps!


这篇关于如何在新API中获取客户管理服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆