I am writing a powershell script that will ping a soap web service every 10 minutes so that it is hot and lively, so performance will increase. We tried many methods in IIS with the application pool timeout and just created http req for wsdl. But it seems to us that we should make a real request that goes to the sql server, and idle for 90 minutes will make it slow for requirements.
I need to build a rather complex search object in order to be able to do an intelligent search that will store a cached and hot servicelayer. Soap request should look like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fund="http://www.example.com/cmw/fff/fund" xmlns:tcm="http://www.example.com/cmw/fff/"> <soapenv:Body> <fund:Get> <fund:inputDTO> <fund:Fund> <fund:Identity> <fund:Isin>SE9900558666</fund:Isin> <fund:FundBaseCurrencyId>SEK</fund:FundBaseCurrencyId> </fund:Identity> </fund:Fund> <fund:InputContext> <tcm:ExtChannelId>Channelman</tcm:ExtChannelId> <tcm:ExtId>Rubberduck</tcm:ExtId> <tcm:ExtPosReference>Rubberduck</tcm:ExtPosReference> <tcm:ExtUser>Rubberduck</tcm:ExtUser> <tcm:LanguageId>809</tcm:LanguageId> </fund:InputContext> </fund:inputDTO> </fund:Get> </soapenv:Body> </soapenv:Envelope>`
I am trying to use New-WebServiceProxy, which works so elegantly in this powershellguy example . I create my own objects like this one from technet .
The powershell code I've tried so far is this:
$fundSrvc = New-WebServiceProxy -uri http://myColdServer:82/WSFund.svc?wsdl -NameSpace "tcm"
The error message does not make sense to me. It sounds like this: Cannot convert the "tcm.FundInput" value of type "tcm.FundInput" to type "tcm.FundInput"
Cannot convert argument "0", with value: "tcm.FundInput", for "Get" to type "tcm.FundInput": "Cannot convert the "tcm.FundInput" value of type "tcm.FundInput" to type "tcm.FundInput"." At C:\scripts\Service-TestTCM6.ps1:31 char:14 + $fundSrvc.Get <<<< ($myFundGoofer) + CategoryInfo : NotSpecified: (:) [], MethodException + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument
source share