function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
trick.ax1374trick.ax1374 

visualforce page and calling webservcies

Hi Friends,

 

I am calling websrevices to validate customers phine numbers.


All I want to do is :-
1)Have a text field on the visual foce page and command button named check. User enter's phone number in the field and clicks on the check command button.Behind the scenes I want to ensure that textfield value,which is phone number is extracted and passed to the called fucntion named phone ,I have my Apex code which is caling webservices has been mentioned below.Can somebody throw some light on it?

 

How to do it through visualforce page?

 

public class phone
{
string c;

public wwwStrikeironComPhone1.SIWsOutputOfPhoneValResult phone(string p)
{

this.c=p;
wwwStrikeironComPhone1.PhonevalSoap temp=new wwwStrikeironComPhone1.PhonevalSoap();
temp.licenseinfo= new wsStrikeironComPhone.LicenseInfo();
//j=new wsStrikeironComPhone.LicenseInfo();
//temp=j;
//wwwwstrikeironcom.phionevalsoap temp=new wwwstrikeironcom.phineval();
//temp.licenseinfo=new wsstrikeironcom.licenseinfo();
temp.licenseinfo.registereduser=new wsStrikeironComPhone.registereduser();
temp.licenseinfo.registereduser.userid='chinglish1234@gmail.com';
temp.licenseinfo.registereduser.password='strike957';
wwwStrikeironComPhone1.SIWsOutputOfPhoneValResult myresponse=new wwwStrikeironComPhone1.SIWsOutputOfPhoneValResult();
myresponse=temp.validatenumber(p);
system.debug('The phone number is'+myresponse);
return myresponse;
}
}

 

 

 Thanks,

Trick