我正试图通过Webservice检查VIES的欧洲增值税号码:
凭借我的拙劣知识,我建立了以下例程:<%
strEnvelope="<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:urn=""urn:ec.europa.eu:taxud:vies:services:checkVat:types"">"
strEnvelope=strEnvelope&"<soapenv:Header/>"
strEnvelope=strEnvelope&"<soapenv:Body>"
strEnvelope=strEnvelope&"<urn:checkVat>"
strEnvelope=strEnvelope&"<urn:countryCode>DE</urn:countryCode>"
strEnvelope=strEnvelope&"<urn:vatNumber>247856515</urn:vatNumber>"
strEnvelope=strEnvelope&"</urn:checkVat>"
strEnvelope=strEnvelope&"</soapenv:Body>"
strEnvelope=strEnvelope&"</soapenv:Envelope>"
set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
objHTTP.open "post", "http://ec.europa.eu/taxation_customs/vies/services/checkVatService"
objHTTP.setRequestHeader "Content-Type", "text/xml"
objHTTP.setRequestHeader "SOAPMethodName", "checkVat"
objHTTP.send strEnvelope
strReturn = objHTTP.responseBody
response.write strReturn
%>
但我得到了这个答案
猼慯㩰湅敶潬数ç æ±ç®çŒºæ…¯ãµ°æ ¢ç‘´ã©°â¼¯æ³æ•¨æ…⹳浸ç¬æ…¯â¹°ç‰¯â½§æ½³ç¡æ”¯ç™®æ±¥ç¯â½¥ã¸¢çŒ¼æ…¯ã©°æ½‚祤㰾档æ¥å™«ç‘¡æ•’ç³æ¹¯æ•³ç æ±ç®âˆ½ç‰µã©®æ¥æ”®ç‰µç¯â¹¡ç•¥çºç¡¡æ‘µç˜ºæ•©ã©³æ•³ç™²æ©ç¥æŒºæ•¨æ£æ…–㩴祴数≳㰾潣湵牴ä¹æ‘¯ã¹¥ä•„⼼潣湵牴ä¹æ‘¯ã¹¥ç˜¼ç‘¡ç•Žæ‰ç‰¥ãˆ¾ãœ´ã”¸ã”¶ã”±â¼¼æ…¶ä¹´æµµæ•¢ã¹²çˆ¼ç…¥æ•µç‘³æ…„整㈾㄰ⴷ㜰ã„⬵㈰〺㰰爯煥敵瑳慄整㰾慶楬㹤牴敵⼼慶楬㹤渼浡㹥â´ã°æ¸¯æµ¡ã¹¥æ„¼æ‘¤æ•²ç³â´¾â´â¼¼æ‘¡ç‰¤ç¥ã¹³â¼¼æ¡£æ¥å™«ç‘¡æ•’ç³æ¹¯æ•³ã°¾çŒ¯æ…¯ã©°æ½‚祤㰾猯慯㩰湅敶潬数> 猼慯㩰湅敶潬数ç æ±ÂçÂ®çŒºæ…¯ãµ°æ ¢ç‘´ã©°â¼¯æ³敨æ…Â⹳浸ç¬慯⹰牯⽧潳ç¡æâ€Â¯Ã§â„¢Â®Ã¦Â±Â¥Ã§Â¯â½¥ã¸¢çŒ¼æ…¯ã©°æ½‚祤㰾档æ¥噫瑡敒ç³湯敳ç æ±Âç®∽牵㩮æÂ¥æâ€Â®Ã§â€°ÂµÃ§Â¯â¹¡ç•¥çº硡摵瘺敩㩳敳癲æ©ç¥挺敨æ£慖㩴祴数≳㰾潣湵牴ä¹摯㹥䕄⼼潣湵牴ä¹摯㹥瘼瑡畎æ‰Â牥㈾㜴ãâ€Â¸Ã£â€Â¶Ã£â€Â±Ã¢Â¼Â¼Ã¦â€¦Â¶Ã¤Â¹Â´Ã¦ÂµÂµÃ¦â€¢Â¢Ã£Â¹Â²Ã§Ë†Â¼Ã§â€¦Â¥Ã¦â€¢ÂµÃ§â€˜Â³Ã¦â€¦â€žÃ¦â€¢Â´Ã£Ë†Â¾Ã£â€žÂ°Ã¢Â´Â·Ã£Å“°ã„Â⬵㈰〺㰰爯煥敵瑳慄整㰾慶楬㹤牴敵⼼慶楬㹤渼浡㹥â´Âã°Â港浡㹥愼摤敲ç³ⴾâ´Â⼼摡牤ç¥㹳⼼档æ¥噫瑡敒ç³湯敳㰾猯慯㩰潂祤㰾猯慯㩰湅敶潬数>
可以提供一些提示吗?
由于
答案 0 :(得分:2)
响应的文本表示形式位于responseText
属性中,因此:
strReturn = objHTTP.responseText