Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

New-WebServiceProxy Conversion Error

$
0
0

Hi Guys

I am just trying to send a XML to a webservice method and getting the follow error :

[xml] $Xml = get-content c:\test\testxml.xml

$svc = New-WebServiceProxy -Uri "http://xxx/yyy/Service?WSDL"

$svc.MyMethod($XML)

 receberEvento : Cannot convert argument "0", with value: "System.Xml.XmlDocument", for "receberEvento" to type "Microsoft.PowerShell.Commands.NewWebserviceProxy.Autogenerate
dTypes.WebServiceProxy1ReceptorEventosWebService_WSDL.eventoRecebido": "Cannot convert the "System.Xml.XmlDocument" value of type "System.Xml.XmlDocument" to type "Microsoft
.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1ReceptorEventosWebService_WSDL.eventoRecebido"."
 
At C:\Users\solidq\AppData\Local\Temp\2\e9d04281-dcd9-4273-b61b-50e36e488e00.ps1:3 char:19
+ $svc.receberEvento <<<< ($XMLEvent)
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Anyone now what is happening ? Tkx a LOT 


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>