<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Getting username in SOE, ArcGIS Server 10.2 in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/getting-username-in-soe-arcgis-server-10-2/m-p/131375#M5022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While in SOE I'm trying to get a username of the user that is using my service through getServerUserInfo of &lt;A href="http://resources.arcgis.com/en/help/arcobjects-java/api/arcobjects/com/esri/arcgis/system/ServerUtilities.html#getServerUserInfo()" title="http://resources.arcgis.com/en/help/arcobjects-java/api/arcobjects/com/esri/arcgis/system/ServerUtilities.html#getServerUserInfo()"&gt;ServerUtilities (ArcObjects Java API)&lt;/A&gt; but I'm getting java.lang.RuntimeException: AutomationException. I was just trying to do what's in this article &lt;A href="http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/index.html#/What_s_new_in_Server_Object_Extensions_at_ArcGIS_Server_10_1/00010000075m000000/" title="http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/index.html#/What_s_new_in_Server_Object_Extensions_at_ArcGIS_Server_10_1/00010000075m000000/"&gt;ArcObjects Help for Java developers&lt;/A&gt; :&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline; font-size: 12.8000001907349px;"&gt;How to access user information in SOEs?&lt;/STRONG&gt;&lt;SPAN style="white-space: normal; font-size: 12.8000001907349px; line-height: 19.2000007629395px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;...&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: monospace, 'Courier New', Courier; font-size: 14.0799999237061px;"&gt;IServerUserInfo userInfo = ServerUtilities.getServerUserInfo(); &lt;SPAN class="kwrd" style="font-size: 14.0799999237061px; color: #7f0055; font-weight: bold;"&gt;if&lt;/SPAN&gt; (userInfo != &lt;SPAN class="kwrd" style="font-size: 14.0799999237061px; color: #7f0055; font-weight: bold;"&gt;null&lt;/SPAN&gt;){ String userName = userInfo.getName(); IEnumBSTR roles = userInfo.getRoles(); String role = roles.next(); &lt;SPAN class="kwrd" style="font-size: 14.0799999237061px; color: #7f0055; font-weight: bold;"&gt;while&lt;/SPAN&gt; (role != &lt;SPAN class="kwrd" style="font-size: 14.0799999237061px; color: #7f0055; font-weight: bold;"&gt;null&lt;/SPAN&gt;){ role = &lt;SPAN class="str" style="font-size: 14.0799999237061px; color: #2a00ff;"&gt;", "&lt;/SPAN&gt; + roles.next(); } }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stacktrace:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Daemon System Thread [Thread-13] (Suspended (exception AutomationException))&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;NativeObjRef.nativeVtblInvokeNative(Rpc, byte[], String, int, String, Param[], Object[], int) line: not available [native method]&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;NativeObjRef.a(Rpc, byte[], String, int, String, Param[], Object[], int) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;NativeObjRef.a(Rpc, Uuid, AuthInfo) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;IEnvironmentManagerProxy(Dispatch).vtblInvoke(String, int, Object[]) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;IEnvironmentManagerProxy.getEnvironment(IUID) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;EnvironmentManager.getEnvironment(IUID) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;ServerUtilities.getServerUserInfo() line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;MyApp.getUserCredentials() line: 193&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody has any idea why it throws exception? Thanks in advance for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Apr 2015 14:10:10 GMT</pubDate>
    <dc:creator>AlexeyVinokurov</dc:creator>
    <dc:date>2015-04-10T14:10:10Z</dc:date>
    <item>
      <title>Getting username in SOE, ArcGIS Server 10.2</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/getting-username-in-soe-arcgis-server-10-2/m-p/131375#M5022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While in SOE I'm trying to get a username of the user that is using my service through getServerUserInfo of &lt;A href="http://resources.arcgis.com/en/help/arcobjects-java/api/arcobjects/com/esri/arcgis/system/ServerUtilities.html#getServerUserInfo()" title="http://resources.arcgis.com/en/help/arcobjects-java/api/arcobjects/com/esri/arcgis/system/ServerUtilities.html#getServerUserInfo()"&gt;ServerUtilities (ArcObjects Java API)&lt;/A&gt; but I'm getting java.lang.RuntimeException: AutomationException. I was just trying to do what's in this article &lt;A href="http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/index.html#/What_s_new_in_Server_Object_Extensions_at_ArcGIS_Server_10_1/00010000075m000000/" title="http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/index.html#/What_s_new_in_Server_Object_Extensions_at_ArcGIS_Server_10_1/00010000075m000000/"&gt;ArcObjects Help for Java developers&lt;/A&gt; :&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline; font-size: 12.8000001907349px;"&gt;How to access user information in SOEs?&lt;/STRONG&gt;&lt;SPAN style="white-space: normal; font-size: 12.8000001907349px; line-height: 19.2000007629395px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;...&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: monospace, 'Courier New', Courier; font-size: 14.0799999237061px;"&gt;IServerUserInfo userInfo = ServerUtilities.getServerUserInfo(); &lt;SPAN class="kwrd" style="font-size: 14.0799999237061px; color: #7f0055; font-weight: bold;"&gt;if&lt;/SPAN&gt; (userInfo != &lt;SPAN class="kwrd" style="font-size: 14.0799999237061px; color: #7f0055; font-weight: bold;"&gt;null&lt;/SPAN&gt;){ String userName = userInfo.getName(); IEnumBSTR roles = userInfo.getRoles(); String role = roles.next(); &lt;SPAN class="kwrd" style="font-size: 14.0799999237061px; color: #7f0055; font-weight: bold;"&gt;while&lt;/SPAN&gt; (role != &lt;SPAN class="kwrd" style="font-size: 14.0799999237061px; color: #7f0055; font-weight: bold;"&gt;null&lt;/SPAN&gt;){ role = &lt;SPAN class="str" style="font-size: 14.0799999237061px; color: #2a00ff;"&gt;", "&lt;/SPAN&gt; + roles.next(); } }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stacktrace:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Daemon System Thread [Thread-13] (Suspended (exception AutomationException))&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;NativeObjRef.nativeVtblInvokeNative(Rpc, byte[], String, int, String, Param[], Object[], int) line: not available [native method]&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;NativeObjRef.a(Rpc, byte[], String, int, String, Param[], Object[], int) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;NativeObjRef.a(Rpc, Uuid, AuthInfo) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;IEnvironmentManagerProxy(Dispatch).vtblInvoke(String, int, Object[]) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;IEnvironmentManagerProxy.getEnvironment(IUID) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;EnvironmentManager.getEnvironment(IUID) line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;ServerUtilities.getServerUserInfo() line: not available&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;MyApp.getUserCredentials() line: 193&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody has any idea why it throws exception? Thanks in advance for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 14:10:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/getting-username-in-soe-arcgis-server-10-2/m-p/131375#M5022</guid>
      <dc:creator>AlexeyVinokurov</dc:creator>
      <dc:date>2015-04-10T14:10:10Z</dc:date>
    </item>
  </channel>
</rss>

