You need to sign in to do that
Don't have an account?
Doug Schmidt
Is there a SOAP equivalent of RestRequest.remoteAddress?
My custom app would like to know the public IP address of the client making a custom SOAP web service call.
I see that the RestRequest (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_restrequest.htm#apex_methods_system_restrequest) class exposes both a remoteAddress and headers property.
I'm looking for something similar in a custom SOAP web service. Is there an equivalent?
So if my API wanted to send a different response if called from a well-known IP (for example, Google's DNS), I would expect the code to look something like this:
Is that possible? I can't find any documentation that says it is possible from SOAP, only from REST, and that seems rather unfortunate.
I see that the RestRequest (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_restrequest.htm#apex_methods_system_restrequest) class exposes both a remoteAddress and headers property.
I'm looking for something similar in a custom SOAP web service. Is there an equivalent?
So if my API wanted to send a different response if called from a well-known IP (for example, Google's DNS), I would expect the code to look something like this:
webservice static string MyCustomApi(MyRequest request) { return (SoapContext.Request.remoteAddress == "8.8.8.8") ? "Hello Google DNS" : "Hello, someone other than Google"; }
Is that possible? I can't find any documentation that says it is possible from SOAP, only from REST, and that seems rather unfortunate.
If there is a login you could use the LoginHistory to find the IP used during the login.