Hi, I tried it works fine for the asmx (simple web services) but for WCf do we need to do some thing different.
Can the Same work for the WCF services as i get the error for the WCF service also. i just created the Simple WCF service in .net and tried to access. but was not successful.
Error:
$Url = "http://localhost:4637/WCFService2/Service.svc"
$webclient = new-object System.Net.WebClient
$soapMessage = @"
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:GetData>
<!--Optional:-->
<tem:value>hji</tem:value>
</tem:GetData>
</soap:Body>
</soap:Envelope>
"@
$webclient.headers.Add("SOAPAction","http://localhost:4637/WCFService2/Service.svc/GetData")
$webclient.headers.Add("Content-Type", "text/xml; charset=utf-8")
$result = ([XML]$webclient.UploadString($Url, $soapMessage))#.envelope.body.GetWeatherByPlaceNameResponse.GetWeatherByPlaceNameResult
$result