I am attempting to use the AddClientLinks API call to link to client Bing accounts. However, it is failing with the error: "Internal system error. Chack the SOAP fault details for more information" (there doesn't actually appear to be any more information in the "SOAP fault details". If I change the API call to use the ClientAccountId instead of ClientAccountNumber, then the API call works just fine. The Bing Ads API docs (https://msdn.microsoft.com/en-us/library/bing-ads-customer-management-clientlink(v=msads.90).aspx) say: "When adding a client link, either the ClientAccountId or ClientAccountNumber is required, but specifying both will cause the operation to fail." Therefore, I don't understand why the AddClientLinks API call fails when I send the ClientAccountNumber, but it succeeds when I send the ClientAccountId. Here is the SOAP request that is failing:ID: 20 Address: https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v9/CustomerManagementService.svc Encoding: UTF-8 Http-Method: POST Content-Type: text/xml Headers: {Accept=[*/*], SOAPAction=["AddClientLinks"], User-Agent=[BingAdsSDKJava 10.4.13]} Payload:<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <AuthenticationToken xmlns="https://bingads.microsoft.com/Customer/v9"> Blah </AuthenticationToken> <CustomerAccountId xmlns="https://bingads.microsoft.com/Customer/v9">-9223372036854775808</CustomerAccountId> <CustomerId xmlns="https://bingads.microsoft.com/Customer/v9">***</CustomerId> <DeveloperToken xmlns="https://bingads.microsoft.com/Customer/v9">Blah</DeveloperToken> </SOAP-ENV:Header> <soap:Body> <AddClientLinksRequest xmlns="https://bingads.microsoft.com/Customer/v9" xmlns:ns2="https://bingads.microsoft.com/Customer/v9/Entities" xmlns:ns3="https://adapi.microsoft.com" xmlns:ns4="https://bingads.microsoft.com/Customer/v9/Exception" xmlns:ns5="http://schemas.datacontract.org/2004/07/System.Collections.Generic" xmlns:ns6="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns7="http://schemas.microsoft.com/2003/10/Serialization/"> <ClientLinks> <ns2:ClientLink> <ns2:ClientAccountId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/> <ns2:ClientAccountNumber>***</ns2:ClientAccountNumber> <ns2:ManagingCustomerId>***</ns2:ManagingCustomerId> <ns2:ManagingCustomerNumber xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/> <ns2:Note>Finch is requesting access to your Bing account(s)</ns2:Note> <ns2:Name>Finch Client Link</ns2:Name> <ns2:InviterEmail>***</ns2:InviterEmail> <ns2:InviterName>Finch</ns2:InviterName> <ns2:InviterPhone>***</ns2:InviterPhone> <ns2:IsBillToClient>true</ns2:IsBillToClient> <ns2:StartDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/> <ns2:Status xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/> <ns2:Timestamp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/> <ns2:ForwardCompatibilityMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/> </ns2:ClientLink> </ClientLinks> </AddClientLinksRequest> </soap:Body></soap:Envelope>Here is the response: -------------------------------------- 2017-06-01 00:19:32.476 INFO --- [nio-8080-exec-5] o.a.c.s.C.I.ICustomerManagementService : Inbound Message ---------------------------- ID: 20 Response-Code: 500 Encoding: UTF-8 Content-Type: text/xml; charset=utf-8 Headers: {Cache-Control=[private], Content-Length=[720], content-type=[text/xml; charset=utf-8], Date=[Thu, 01 Jun 2017 06:19:31 GMT], Server=[Microsoft-IIS/8.5], X-AspNet-Version=[4.0.30319], X-Powered-By=[ASP.NET]} Payload: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body> <s:Fault> <faultcode>s:Client</faultcode> <faultstring xml:lang="en-US">Internal system error. Check the SOAP fault details for more information</faultstring> <detail> <ApiFault xmlns="https://bingads.microsoft.com/Customer/v9" xmlns:a="https://bingads.microsoft.com/Customer/v9/Exception" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <TrackingId xmlns="https://adapi.microsoft.com">eed5d0ac-1a4e-41db-8885-ce33178eebea</TrackingId> <a:OperationErrors> <a:OperationError> <a:Code>-1</a:Code> <a:Details/> <a:Message>An internal error has occurred.</a:Message> </a:OperationError> </a:OperationErrors> </ApiFault> </detail> </s:Fault></s:Body></s:Envelope>I can't really change my code to use ClientAccountId instead of ClientAccountNumber. Why does the exact same AddClientLinks API call fail when using ClientAccountNumber but succeeds when using ClientAccountId?Thanks in advance for your help,Jon 解决方案 这篇关于使用ClientAccountNumber时,AddClientLinks API调用失败并出现内部错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-11 16:27