calling a webservice with two date parameters

I am creating a extension (thru integration studio) to access a webservice. I have a structure and action, using "Edit source code .NET" I am calling a webservice. The webservice expects two date parameters and I have to pass them in the .NET code?

Where to declare (on structure or action?) and how to pass the parameters?

hope my question is clear! I can't upload the eSpace file due to security reason.

Hi Jith,

My first question is: is there any specific reason for not accessing the webservice directly through Service Studio? You can access webservices in Service Studio by right-clicking the Web References folder, selecting the "Add Web Reference" option and inserting the webservice WSDL address.

If you must invoke webservices in an extension, you probably should look into how to consume a webservice in c#.

Check this article, for instance, with a small tutorial.

I hope this helps.


Paulo Tavares

yes, i tried that. what i did was, created a action and dragged the web referece actions from the left pane and assigned the required parameter values. my output parameter returns integer value. I assigned the output value into another variable (which is available in the main action).

but, when i run the application, I get the following message.

"The request failed with HTTP status 401: Unauthorized."

Hi Jith,

Could it be that the webservice requires authentication, and you're not authenticated? That usually happens when the webservice requires authentication. Read this article for two possible solutions.


Paulo Tavares
Hi Jith,

If your web reference requires authentication or access trough a proxy you can use the Extension EnhancedWebReferences to add authentication to a web reference created in Service Studio.

João Rosado
The first solution works, but i'm not prefer to set my IIS settings as "anonymous". The second solution, not sure where to have that custom code?

I've downloaded the Web Service extension and changed the flow little bit, i'm not sure doing it correct!

before calling my web reference action, i guess i have to use "SetWebReferenceCredencials" with username and password? what would be appropriate value for "WebReferenceName"?