You won’t get it from the getTransportInfo service, however you can do it with a java service.
You can use my package here
and the service is
pub.flow.session: getSessionID
the output also includes the userID associated with current call.
the java code is
public static final void getSessionID (IData pipeline)
throws ServiceException
{
// --- <<IS-START(getSessionID)>> ---
// @sigtype java 3.5
// [o] field:0:required sessionID
// [o] field:0:required userID
// [o] field:0:required uniqueID
String sessionId = null;
String name = null;
if (Service.getSession() != null)
{
try {
sessionId = Service.getSession().getSessionID();
name = Service.getSession().getUser().getName();
} catch (Exception e) {
throw new RuntimeException("Unable to retrieve the session ID : " + e);
}
}
IDataCursor c = pipeline.getCursor();
IDataUtil.put(c, "sessionID", sessionId);
if (name != null && !name.equals("Default") && !name.equals("webTaskUser"))
IDataUtil.put(c, "userID", name);
IDataUtil.put(c, "uniqueID", sessionId + getNextCount());
c.destroy();
// --- <<IS-END>> ---
}
enjoy
John.
#webMethods-io-Integration#API-Management#webМethods-cloud#Service-Designer#Integration-Server-and-ESB#API-Gateway#webMethods