2013-05-13 59 views
-1

我試圖調用de GetVerifiedStatus API。 我在Windows 7上使用服務器。 任何人都可以幫助我PLZ。 這是我的代碼:經典的ASP和PayPal API SOAP

Dim objXMLHTTP : set objXMLHTTP = Server.CreateObject("Msxml2.XMLHTTP.3.0") 
Dim strRequest, strResult, strURL 

strURL = "https://svcs.paypal.com/AdaptiveAccounts/GetVerifiedStatus" 

strRequest ="<?xml version=""1.0"" encoding=""utf-8""?>" _ 
& "<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope/""   xmlns:SOAP-ENC=""http://schemas.xmlsoap.org/soap/encoding/""" _ 
& "  xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">" _ 
& " <SOAP-ENV:Header>" _ 
& "   <RequesterCredentials xmlns=""urn:ebay:api:PayPalAPI""  xsi:type=""ebl:CustomSecurityHeaderType"">" _ 
& "   <Credentials xmlns=""urn:ebay:apis:eBLBaseComponents"" xsi:type=""ebl:UserIdPasswordType"">" _ 
& "    <Username>XXXX</Username>" _ 
& "    <Password>XXXX</Password>" _ 
& "    <Signature>XXXX</Signature>" _ 
& "    <Subject>XXXX</Subject>" _ 
& "   </Credentials>" _ 
& "   </RequesterCredentials>" _ 
& "  </SOAP-ENV:Header>" _ 
& "  <SOAP-ENV:Body>" _ 

& "     <Version xmlns=""urn:ebay:apis:eBLBaseComponents"">98.0</Version>" _ 
& "     <emailAddress xs:""string"">[email protected]</emailAddress>" _ 
& "     <firstName xs:""string"">John</firstName>" _ 
& "     <lastName xs:""string"">Vegas</lastName>" _ 
& "     <matchCriteria xs:""string"">NAME</matchCriteria>" _ 
& "     <requestEnvelope common:""RequestEnvelope"">" _ 
& "      <detailLevel xs:""string"">ReturnAll</detailLevel>" _ 
& "      <errorLanguage xs:""string"">en_US</errorLanguage>" _ 
& "     </requestEnvelope>" _ 

& "  </SOAP-ENV:Body>" _ 
& "</SOAP-ENV:Envelope>" 

objXMLHTTP.open "post", "" & strURL & "", False 

objXMLHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8" 
objXMLHTTP.setRequestHeader "Content-Length", Len(strRequest) 

objXMLHTTP.setRequestHeader "SOAPAction", strURL 

objXMLHTTP.send(strRequest) 
strResult = objXMLHTTP.responseText 

response.write strResult 

林接收此錯誤:

msxml3.dll erro '800c0008' 

Failed to download the specified resource 

在objXMLHTTP.send(strRequest)線。 當我將我的http對象更改爲MSXML2.ServerXMLHTTP時,返回一個錯誤,表示: 需要認證才能完成客戶端身份驗證。

Tks。

回答