Service fails when called by WS client

A normal flow service fails when it is getting wrapped inside a webservice and then calling that ws from some client or IS. Running standalone flow service returns proper results.

Repro steps:

  1. create a flow service in developer and insert below code

IDataCursor idc = pipeline.getCursor();
Locale curloc = InvokeState.getCurrentLocale();
IDataUtil.put(idc,“curlocale”,curloc.toString());
idc.destroy();

run this service in developer it will returns en_US as locale.

  1. Now create a web service for this flow service and run that from IS, set proper user name and password for WS in developer before running from IS as client. It will return null.

Let me know what can be done to correct here.
Thanks