This imports the classes exposed by the .asmx page, and, allows you to call from the current session. My initial take failed to take advantage of the -Namespace and -Class parameters, so, I was fighting ugly, dynamic type names on top of everything. Hint: use these options.$webservice = New-WebServiceProxy -Uri https://www.super.com/secret/classes.asmx -Namespace WillsWorld -Class IGotClass
Once I have this loaded I figured I could parse the method signatures, and, extract the objects names. The following command got me a good bit along the way, but, again, still was lacking:
Chris Duck, fellow DFW-ite, gave me this alternative which is more to the point and accurate:$webservice |gm -membertype method |select definition |% {($_ -replace "@|{|}|Definition=",) -split |(|)} |where {$_ -match WillsWorld} |select -Unique |sort
$webservice.GetType().Assembly.GetExportedTypes()
0 comments:
Post a Comment