Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

502
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda