Welcome! Log In Create A New Profile

Advanced

Web service with optional parameters

Posted by Juliano Sippel.pcs.crosspost 
Juliano Sippel.pcs.crosspost
Web service with optional parameters
July 28, 2008 06:03PM
Product: WinDev 12

Hi,

I am having problems with the webservice I've created with windev. The web service is used by third parties usually calling it from a .NET client application.
It works perfectly if all parameters of my global procedure are passed with some content on it. But if one parameter is left in blank I can't read the other parameter after that.

Ex:
PROCEDURE MyWebService(sUserName = "", sCustomerForename = "", sCustomerSurname = "")
sRes is string = sUserName + " & " + sCustomerForename + " & " + sCustomerSurname
RESULT sRes



Calling webservice using a Windev client application:
sResult is string = MyWebService("UserNameTest","FisrtNameTest","SurnameTest") //This works fine
sResult is string = MyWebService("UserNameTest","","SurnameTest") //This works fine too


Calling webservice using .net client application (c#):
sResult.Text = webS.MyWebService("UserNameTest","FisrtNameTest","SurnameTest") //This works fine and results UserNameTest & FirstNameTest & SurnameTest
sResult.Text = webS.MyWebService("UserNameTest","","SurnameTest") //This doesn't work returning UserNameTest & <sCustomerSurname>SurnameTest</sCustomerSurname></MyWebService></soap:Body></soap:Envelope>> &
sResult.Text = webS.MyWebService("UserNameTest","FisrtNameTest","") //This doesn't work and results UserNameTest & FisrtNameTest & </GetPremium></soap:Body></soap:Envelope>elope>I>

Anyone have experienced any similar problem?
All I need to know is how to do so that my procedure can handle optional parameters.


Thank you

Regards,
Juliano.

Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: