i am calling the webservice by using callopeartion.if the webservice not found
i am getting transport error.how to overcome this by displaying custom error message.
You will need to specify willHandleError: true on your RPCRequest, using the second signature described in the docs here: http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#classMethod..DMI.call.
You can then override your DataSource’s transformResponse() method to handle any errors, as described in the docs here: http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#method..DataSource.transformResponse
Transport Error
Code:
var EmailDs = isc.WebService.get(WebSvcNamespace);
EmailDS.callOperation(
“Config_GetStatusList”,
{
DistrictCode:Dcode,
Admissions:1,
General:1,
ModifiedBy:StaffID,
SerialNo:SerialNo,
UUID:SessionID,
Res:DBRes
},
“//Status|//default:Res[text()=‘-100’]”,
“CallbackGetStatusList(data, xmlDoc, rpcResponse,wsRequest)”
);
function CallbackGetStatusList(scdata,xmlDoc,rpcResponse,wsRequest)
{
alert(“scdata”+scdata);
alert(“xmlDoc”+xmlDoc);
alert(“rpcResponse”+ rpcResponse.httpResponseCode);
alert(“wsRequest”+wsRequest);
}
The Problem is that when i try to call a webservice if there is any error in webservice or error in passing parameter or Time out i get Transport Error - 500 . This message confuses the user scan please tel me how to handle this.
If there is 500 error then call back function wont work. Can you please tel me how handle it..
The willHandleError:true property (previously mentioned) is the right approach. You can passed it via the “requestProperties” argument of callOperation.