Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

492
Views
Why are there extra parameters in Webservice when called from Powershell?

I have been passed-on a very simple C# asp.net web service with it's supposed source-code, that has just one public method called Sync(). Also, I am provided a Powershell script that calls this method of Web Service as shown in following code:

$ws = New-WebServiceProxy -uri <http://webservice.svc?wsdl>
$arg1 = $true
$arg2 = $true
$ws.Sync([ref] $arg1, [ref] $arg2)

When I look at the provided source-code, the Sync() method doesn't have any parameters. However, as you can notice that the Powershell is calling the Sync method with two arguments.

And the powershell runs fine with these two arguments being passed. When I remove the arguments from the call, it fails saying Cannot find an overload for "Sync" and the argument count: "0"

When I reverse-engineer the deployed DLL using dotPeek, it also shows the Sync method without any parameters.

This is quite confusing to me as I expected that the Webservice call from PowerShell to have no parameters so not sure why these additional parameters are passed and service call doesn't run without them.

Is this peculiar to Webservice being called from Powershell (that we need to pass additional params) or I am missing something obvious? Any pointers highly appreciated.

EDIT: Adding the wsdl section

<wsdl:operation name="Sync">
  <soap:operation soapAction="http://tempuri.org/ISyncService/Sync" style="document"/>
  <wsdl:input>
    <soap:body use="literal"/>
  </wsdl:input>
  <wsdl:output>
    <soap:body use="literal"/>
  </wsdl:output>
</wsdl:operation>
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!