2017-02-17 10 views
0

私は、このWebサービスを使用したい:Webサービス(checkVatService)PowerShellの

http://ec.europa.eu/taxation_customs/vies/services/checkVatService 方法:POST のContent-Typeがapplication/xmlの

これが私の要求される:

<?xml version="1.0" encoding="UTF-8"?> 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ec.europa.eu:taxud:vies:services:checkVat:types"> 
<soapenv:Header/> 
<soapenv:Body> 
    <urn:checkVat> 
     <urn:countryCode>ES</urn:countryCode> 
     <urn:vatNumber>A28017895</urn:vatNumber> 
    </urn:checkVat> 
</soapenv:Body> 

wsdlはここにあります:http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

xmlリクエストをpowershellで送信し、そこで応答を得るにはどうすればよいですか?

ありがとうございます。

答えて

0

これを処理するにはInvoke-Webrequestを使用できるはずです。ただ、POSTに-Methodスイッチを設定し、身体

+0

私はこれをしようとすると、私はこのエラーが出るようにXMLを提供します。 起動-WebRequestクラス:Internet Explorerのエンジンが利用できない、またはInternet Explorerのため、応答内容を解析できません最初の起動設定が完了していません。 UseBasicParsingパラメーターを指定して、やり直してください。 – TripelM

+0

「This Link」(https://stackoverflow.com/questions/38005341/the-response-content-cannot-be-parsed-because-the-internet-explorer-engine-is-no)によると、 ' - UseBasicParsing'スイッチを使用して、この問題を修正する必要があります。 IEを開いて初期設定を完了することも同様に機能するはずです。 –

+0

それは働いた:)ありがとう。 – TripelM