title: Deploying a Worklight application to production environment
body: <p>I did a worklight app with worklight6.0.0, which has some http adapters that works fine with my liberty profile in eclipse.</p>
  
  <p>now i want to transport this app to a websphere 8.0.0.6 environment, but when i did that i recieve this message in the catlog:</p>
  
  <pre><code>info: {"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"ajjqfhmo88gqmm955r2p22vq7j"}}}*/
  
  error: defaultOptions:onFailure Procedure invocation error.
  </code></pre>
  
  <p>and this is another error:</p>
  
  <pre><code>[Http://190.246.205.5:9081/WorklightPocProj/apps/services/../../invoke] failure. state: 500, response: The server was unable to process the request from the application. Please try again later.
  
  defaultOptions:onFailure The server was unable to process the request from the application. Please try again later.
  </code></pre>
  
  <p>I put a call on the wlinit to a dummy adapter and the response is correctly,  this error that the app give to me happens just after i call this method:</p>
  
  <p>handler.submitAdapterAuthentication(invocationData, {});</p>
  
  <p>So I've change the worklight.properties and redeploy the .war, then, I've deploy that .war on the WAS and install the all.wlapp and all the .adapter files.
  and i can see all the file deployed in my worklight console, and my android app connects to the worklight server correctly </p>
  
  <p>In this .war, i have another app (a facebook app) which doesnt have any adapter and works fine.</p>
  
  <p>This is my code realm:</p>
  
  <pre><code>&lt;securityTests&gt;
      &lt;!-- 
      &lt;customSecurityTest name="WorklightConsole"&gt;
          &lt;test realm="WorklightConsole" isInternalUserID="true"/&gt;
      &lt;/customSecurityTest&gt;
  
      &lt;mobileSecurityTest name="mobileTests"&gt;
          &lt;testAppAuthenticity/&gt; 
          &lt;testDeviceId provisioningType="none" /&gt;
          &lt;testUser realm="myMobileLoginForm" /&gt;
      &lt;/mobileSecurityTest&gt;
  
      &lt;webSecurityTest name="webTests"&gt;
          &lt;testUser realm="myWebLoginForm"/&gt;
      &lt;/webSecurityTest&gt;
  
      &lt;customSecurityTest name="customTests"&gt;
          &lt;test realm="wl_antiXSRFRealm" step="1"/&gt;
          &lt;test realm="wl_authenticityRealm" step="1"/&gt;
          &lt;test realm="wl_remoteDisableRealm" step="1"/&gt;
          &lt;test realm="wl_anonymousUserRealm" isInternalUserID="true" step="1"/&gt;
          &lt;test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" step="2"/&gt;
      &lt;/customSecurityTest&gt;
      --&gt;
      &lt;customSecurityTest name="SubscribeServlet"&gt;
          &lt;test realm="SubscribeServlet" isInternalUserID="true"/&gt;
      &lt;/customSecurityTest&gt; 
      &lt;customSecurityTest name="SimpleAuthAdapterTest"&gt;
          &lt;test realm="SimpleAuthRealm" isInternalUserID="true" /&gt;
  
      &lt;/customSecurityTest&gt;       
  
  &lt;/securityTests&gt; 
  
  &lt;realms&gt;
      &lt;realm name="SampleAppRealm" loginModule="StrongDummy"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.FormBasedAuthenticator&lt;/className&gt;
      &lt;/realm&gt;
  
      &lt;realm name="WorklightConsole" loginModule="requireLogin"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.FormBasedAuthenticator&lt;/className&gt;
          &lt;onLoginUrl&gt;/console&lt;/onLoginUrl&gt;
      &lt;/realm&gt;
      &lt;realm name="SimpleAuthRealm" loginModule="SimpleAuthLoginModule"&gt;
          &lt;className&gt;com.worklight.integration.auth.AdapterAuthenticator&lt;/className&gt;
          &lt;parameter name="login-function" value="SimpleAuthAdapter.onAuthRequired" /&gt;
          &lt;parameter name="logout-function" value="SimpleAuthAdapter.onLogout" /&gt;
      &lt;/realm&gt;
      &lt;realm name="SubscribeServlet" loginModule="rejectAll"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.HeaderAuthenticator&lt;/className&gt;          
      &lt;/realm&gt;
      &lt;!-- For websphere --&gt;
      &lt;!-- realm name="WASLTPARealm" loginModule="WASLTPAModule"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.WebSphereFormBasedAuthenticator&lt;/className&gt;
          &lt;parameter name="login-page" value="/login.html"/&gt;
          &lt;parameter name="error-page" value="/loginError.html"/&gt;
      &lt;/realm --&gt;
  &lt;/realms&gt;
  
  &lt;loginModules&gt;
  &lt;loginModule name="SimpleAuthLoginModule"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.NonValidatingLoginModule&lt;/className&gt;
      &lt;/loginModule&gt;
      &lt;loginModule name="StrongDummy"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.NonValidatingLoginModule&lt;/className&gt;
      &lt;/loginModule&gt;
  
      &lt;loginModule name="requireLogin"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.SingleIdentityLoginModule&lt;/className&gt;
      &lt;/loginModule&gt;
  
      &lt;loginModule name="rejectAll"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.RejectingLoginModule&lt;/className&gt;
      &lt;/loginModule&gt;
  
      &lt;!-- For websphere --&gt;
      &lt;!-- loginModule name="WASLTPAModule"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.WebSphereLoginModule&lt;/className&gt;
      &lt;/loginModule --&gt;
  
      &lt;!-- For enabling SSO with no-provisioning device authentication --&gt;
      &lt;!-- &lt;loginModule name="MySSO" ssoDeviceLoginModule="WLDeviceNoProvisioningLoginModule"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.NonValidatingLoginModule&lt;/className&gt;
      &lt;/loginModule&gt; --&gt;
      &lt;!-- For enabling SSO with auto-provisioning device authentication --&gt;
      &lt;!-- &lt;loginModule name="MySSO" ssoDeviceLoginModule="WLDeviceAutoProvisioningLoginModule"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.NonValidatingLoginModule&lt;/className&gt;
      &lt;/loginModule&gt; --&gt;
  &lt;/loginModules&gt;
  </code></pre>
  
  <p>and this is my a part of my ChallengeHandler code:</p>
  
  <pre><code>var handler = WL.Client.createChallengeHandler("SimpleAuthRealm");
  var busyInd;
  function login() {
  busyInd = new WL.BusyIndicator('content', {
      text : 'Verificando credenciales...'
  });
  busyInd.show();
  
  var username = $('#AuthUsername').val();
  var password = $('#AuthPassword').val();
  usuario1 = username;
  password1 = password;
  var invocationData = {
      adapter : "SimpleAuthAdapter",
      procedure : "submitAuthentication",
      parameters : [ "Basic " + Base64.encode(username + ":" + password),
              username ]
  };
  
  handler.submitAdapterAuthentication(invocationData, {});
  };
  </code></pre>
  
  <p>Is there something that I'm missing or I'm doing wrong?</p>