cancel
Showing results for 
Search instead for 
Did you mean: 

BSL as a Web Service. How to get the client Hostname?

Former Member
0 Kudos

Hi group,

Is it possible to read the calling client computer name from within a Transaction execution when called as a Web Service (HTTP GET)?

Some function that would return the same as

Request.ServerVariables["REMOTE_HOST"]

or

req.getRemoteHost();

from an HTTP Web Server.

Thanks,

Francois.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Francois,

To read session variables in a transaction one needs to look at the AutoBind property of the Xacute connector. This needs to be set true.

I believe if the hostname is defined as a user session variable (I guess in UME for 12.x) then what you are trying to accomplish can be achieved, though I have some doubts around if this'll behave the same if called as web service (I think an Xacute quey will work).

Hope this gives you some pointers.

Goodluck.

Thanks

Udayan

Former Member
0 Kudos

Not sure if this is the best approach but what I've done in the past is write a JSP page to that the client calls to resolve the host name, then I pass that as a transaction parameter to BLS.

To simply get IP address, that is a system parameter that can be read with /XMII/PropertyAccessServlet?Mode=Retrieve&PropName=IP

Answers (2)

Answers (2)

neha1620
Explorer
0 Kudos

Hi Experts,

I tried XML query approch but I do not get server details.

Can someone help me here?

Thanks,

Neha

Former Member
0 Kudos

Thanks Doug,

I followed your advice with a slight modification as the name of the parameter is Machine instead of IP.

/XMII/PropertyAccessServlet?mode=Retrieve&PropName=Machine&Content-Type=text/xml

I accessed this system parameter by using the string above as the URL of an XML Query action block from within my existing BSL transactions. This aligns better with our current way of exposing the our MII transactions as Web Services.

Using the XAcute query as proposed by Udayan also works but this would have meant exposing a new interface ( XAcute Query instead of the transaction default Web Service via the /Runner URL).

Thank you both.