Skip to content

Instantly share code, notes, and snippets.

@isa
Created February 11, 2012 00:49
Show Gist options
  • Save isa/1794653 to your computer and use it in GitHub Desktop.
Save isa/1794653 to your computer and use it in GitHub Desktop.
new-webserviceproxy
$service = new-webserviceproxy -uri http://xxx/service?wsdl -Namespace com
$request = new-object com.ExecuteTestsResponseType
$service.executeTests($request)
you get this:
Cannot convert argument "0", with value: "com.ExecuteTestsRequestType", for "executeTests" to type "com.ExecuteTestsRequestType": "Cannot convert the "com.ExecuteTestsRequestType" value of type "com.ExecuteTestsRequestType" to type "com.ExecuteTestsRequestType"."
At line:1 char:18
+ $xxx.executeTests <<<< ($request)
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument
and executeTests has this definition when you look with get-member
com.ExecuteTestsResponseType, 7bdd0btm, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null executeTests(com.ExecuteTestsRequestType, 7bdd0btm, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null ExecuteTestsRequest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment