Questions tagged [new-webserviceproxy]
24 questions
7
votes
1 answer
Why is powershell adding additional parameters to Web Service Method Signatures
I'm trying to use Powershell to ping a couple of WCF Webservices from the command line. e.g.
I have an WCF Operation
[OperationContract]
string DoWork(string name);
And I can call that with Powershell using.
$proxy = New-WebServiceProxy -Uri…

Eoin Campbell
- 43,500
- 17
- 101
- 157
4
votes
2 answers
Powershell don't catch exception from NewWebServiceProxy
I have a problem with catching exception from NewWebServiceProxy cmdlet
try {
$myService = New-WebServiceProxy -Uri "http://localhost/someservice.svc"
}
catch {
Write-Log ([string]::Format("Error : {0}", $_.Exception.Message))
}
When I run…

Zabaa
- 327
- 1
- 4
- 16
2
votes
1 answer
DataPower WebServiceProxy selection of data
i'm looking for solution for a problem. I will start with a example: we have a SOAP webservice that returns userData (userName + userAddress), I'm using Web Service Proxy to extract the UserData, but then I want to receive only userName - this needs…

voidmat
- 113
- 3
- 12
2
votes
0 answers
PowerShell: New-WebServiceProxy Error
I'm writing a script that loops through a list of machines and returns various things about that machine. One of the things I return is a Dell Service Tag pulled from WMI. I then use the service tag and create a New-WebServiceProxyobject to return…

apples
- 137
- 2
- 6
- 16
2
votes
1 answer
PSH Runspaces + New-WebServiceProxy = 2 connection limit?
I require a high performing script calling an in-house web service. So I wrote a powershell script to create runspace threads which each make a request to a common Web Service proxy object (New-WebServiceProxy).
I figured out that regardless of the…

David H
- 23
- 3
1
vote
1 answer
Sending named variables to SOAP via New-WebServiceProxy in Powershell
Please forgive any errors in terminology, I am self taught :)
I am using New-WebServiceProxy to interact with a SOAP API.
Everything works when variables are at a single level, as long as they are entered in the correct order they are parsed…

David T
- 25
- 3
1
vote
0 answers
PowerShell New-WebServiceProxy doesn't fetch all methods
Im coding a PS script to check the state of a windows service and want to call a specific web service method in certain cases:
$wsdl = "https://webservice-page/wsdl.php?user"
$webserviceUser = "user"
$webservicePassword = "password"
$userId =…

MyNameIsLinuxx
- 63
- 1
- 9
1
vote
0 answers
How do I pass username and password in SecuredAuthenticationSoapHeader using PowerShell?
I have a SOAP method called AuthenticateUser() that is defined in C# like this
[WebMethod(Description = "Returns a token string given a username and password.")]
[System.Web.Services.Protocols.SoapHeader(nameof(AuthenticationHeader))]
…

erotavlas
- 4,274
- 4
- 45
- 104
1
vote
0 answers
Powershell soap using New-WebServiceProxy namespace and object issue
I'm trying to write a soap request in powershell the service is up I can request it with soapui.
After reading this and this, I don't manage to put my paramater in the ns.param object.
I don't even manage to create the ns.param object.
I try to be…

EMR
- 11
- 2
1
vote
1 answer
ConvertFrom-JSON won't accept convertto-json with children when working with WebServiceProxy
I am pulling data from an API using the New-WebServiceProxy in PowerShell 4.0 and then piping it out to a JSON file for review and import on another API service (same API version, etc, just a different host).
$tasklist.Taskconfig |…

AskJarv
- 184
- 3
- 15
1
vote
1 answer
How can I use System.Net.WebClient like PowerShell New-WebServiceProxy?
The issue I am having connecting to a service via PowerShell, versus using C#, is that the service is expecting a key passed in the header.
I can use new-WebServiceProxy with the URI and have it pass the default credentials. I can then get the…

user3377627
- 363
- 3
- 7
- 22
1
vote
1 answer
Powershell: invoking New-WebServiceProxy ruins following Invoke-WebRequest
The story so far: i'm writing a 'create-new-user' PoSh script, among all else i need it to:
create WebServiceProxy object as variable (since Cisco UCM we use utilizes SOAP requests to interact with it)
pull a PHP script on our Intranet website to…

Arseny V.
- 13
- 4
1
vote
1 answer
Use Powershell to retrieve number from a sequence using web request
I have a very specific problem I have been trying to work out. I'm using a PowerShell script to name newly imaged computers during the imaging proceess, and I need to grab a newly generated number from a sequence. I use SCCM 2012 R2 for this,…

TheloniusFunk
- 11
- 1
1
vote
3 answers
PowerShell: Exception calling "GetListItems" with "7" argument(s)
Attempting to Get List Items from SharePoint using PowerShell.
I used the example from here Windows PowerShell Blog, modified it to use with my site. Now I get the following error:
Exception calling "GetListItems" with "7" argument(s): "Exception of…

SuperSooty
- 81
- 4
- 9
1
vote
1 answer
Powershell WCF service DateTime property always DateTime.Min (01.01.0001)
i've detected a strange behavior calling a WCF Service from a Powershell script. Using the command 'New-WebServiceProxy' from Powershell 2.0 get's you the abillity to send requests to a Webservice from a PS script. But i got some problems with…

uernst
- 13
- 2