Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Calling webservice from PowerShell

$
0
0

Hello!

I am trying to call a webservice from PowerShell and have a parameter-problem.

When using the webservice from WFC Test Client I can see that the method I want to use has two parameters.
 
The first parameter  languageid has Type = Language Type
The second parameter seriesid   has Type = System.String[]

When using WFC test Client I choose one of two languages using dropdown. For the second parameter seriesid I give a number, for the number of strings and then fill in appropriate values.

When clicking Invoke I get the desired result.

When trying to do the same thing from PowerShell, I don't get any result (but no error either).

In Powershell I do like this (although it is not exactly correct below):

---------------------------------------------------------------------------
$svc = New-WebServiceProxy –Uri 'https://aaa.bbbb.se/xWS/wsdl/xWS_ssl.wsdl'

$strCurrencies = @('EUR','USD','GBP')

$svc.getExchangeRates('sv', $strCurrencies)
---------------------------------------------------------------------------

I don't get any error, but no real result either. It looks like if I give length=0 for seriesid, when using WFC test Client.

To me it seems like the webservice can't "see" that there are three values in parameter strCurrencies.

Can you tell me whats wrong?

BR

/LennartO


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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