空洞的回应?这是什么意思 [英] Empty response? What does it means
问题描述
我使用凭据发送以下SOAP请求:
< env:Envelope xmlns:xsi =" http:// www。 w3.org/2001/XMLSchema-instance"的xmlns = QUOT; HTTPS://bingads.microsoft.com/CampaignManagement/v9 <跨度> " xmlns:env =" http://schemas.xmlsoap.org/soap/envelope/">
< env:Header xmlns =" https://guideads.microsoft.com/CampaignManagement/v9">
< Action> GetCampaignsByAccountId< / Action>
< ApplicationToken>< / ApplicationToken>
< AuthenticationToken>< / AuthenticationToken>
< CustomerAccountId> 1234567< / CustomerAccountId>
< CustomerId> 12345678< / CustomerId>
< DeveloperToken> 1234XXX1234XXX1234< / DeveloperToken>
<密码> 12341234< /密码>
< UserName> myusername< / UserName>
< / env:标题>
< env:Body xmlns =" https://guideads.microsoft.com/CampaignManagement/v9">
< GetCampaignsByAccountIdRequest>
< AccountId> 1234567< / AccountId>
< / GetCampaignsByAccountIdRequest>
< / env:Body>
< / env:Envelope>
使用以下VBScript :
Dim oHTTPConn
设置oHTTPConn = CreateObject(" Msxml2.ServerXMLHTTP.3.0")
oHTTPConn.open" https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc" ;, URL,False
oHTTPConn.setRequestHeader" Content-键入","" application / soap + xml" b
oHTTPConn.send RequestXML
responseXML = oHTTPConn.responseText
设置oHTTPConn =没什么
结果为空。 wscript或服务器没有错误。
我是bing ads api的新手,我不知道如何处理这个问题。它是凭证错误还是XML格式。没有错误。
我不知道如何调试它。请帮助
我'我不确定这里发生了什么。但对于初学者来说,看起来你对oHTTPConn.open的调用是错误的。我认为它应该是这样的:
oHTTPConn" POST"," https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc" ;,false
您的Content-Type应为"text / xml; charset = utf8"
如果这没有帮助,我的下一个建议是使用Fiddler来查看发送和返回的内容。
<希望有所帮助!
I sending following SOAP request with my credentials:
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://bingads.microsoft.com/CampaignManagement/v9" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v9">
<Action>GetCampaignsByAccountId</Action>
<ApplicationToken></ApplicationToken>
<AuthenticationToken></AuthenticationToken>
<CustomerAccountId>1234567</CustomerAccountId>
<CustomerId>12345678</CustomerId>
<DeveloperToken>1234XXX1234XXX1234</DeveloperToken>
<Password>12341234</Password>
<UserName>myusername</UserName>
</env:Header>
<env:Body xmlns="https://bingads.microsoft.com/CampaignManagement/v9">
<GetCampaignsByAccountIdRequest>
<AccountId>1234567</AccountId>
</GetCampaignsByAccountIdRequest>
</env:Body>
</env:Envelope>
Using following VBScript:
Dim oHTTPConn
Set oHTTPConn = CreateObject("Msxml2.ServerXMLHTTP.3.0")
oHTTPConn.open "https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc", URL, False
oHTTPConn.setRequestHeader "Content-Type", "application/soap+xml"
oHTTPConn.send RequestXML
responseXML = oHTTPConn.responseText
Set oHTTPConn = Nothing
The result is empty. No errors from wscript or server.
I'm new to bing ads api, and I have no idea what to do with this. Is it credential wrong or XML format. NO ERRORS.
I have no idea how to debug it. Please help
I'm not sure what's going on here. But for starters, it looks like your call to oHTTPConn.open is wrong. I believe it should be something like:
oHTTPConn "POST", "https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc", false
And your Content-Type should be "text/xml; charset=utf8"
If that doesn't help, my next suggestion would be to use Fiddler to see what gets sent and returned on the wire.
Hope that helps!
这篇关于空洞的回应?这是什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!