我與worklight6.0.0工作燈的應用程序,其中有一些HTTP適配器在Eclipse中我的自由的個人資料正常工作。部署工作燈應用到生產環境
現在我想這個應用程序傳輸到WebSphere 8.0.0.6環境,但是當我這樣做,我在收到目錄下載此消息:
info: {"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"ajjqfhmo88gqmm955r2p22vq7j"}}}*/
error: defaultOptions:onFailure Procedure invocation error.
,這是另一個錯誤:
[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.
我穿上wlinit一個電話到虛擬適配器和反應是正確的,這個錯誤的程序給我恰好就在我調用這個方法:
handler.submitAda pterAuthentication(invocationData,{});
因此,我更改了worklight.properties並重新部署了.war,然後,我在WAS上部署了該.war,並安裝了all.wlapp和所有.adapter文件。 我可以看到部署在我的工作燈控制檯中的所有文件,我的Android應用程序連接到工作燈服務器正確
在此的.war,我還有一個應用程序(如Facebook應用程序),它可是沒有任何適配器和正常工作。
這是我的代碼境界:
<securityTests>
<!--
<customSecurityTest name="WorklightConsole">
<test realm="WorklightConsole" isInternalUserID="true"/>
</customSecurityTest>
<mobileSecurityTest name="mobileTests">
<testAppAuthenticity/>
<testDeviceId provisioningType="none" />
<testUser realm="myMobileLoginForm" />
</mobileSecurityTest>
<webSecurityTest name="webTests">
<testUser realm="myWebLoginForm"/>
</webSecurityTest>
<customSecurityTest name="customTests">
<test realm="wl_antiXSRFRealm" step="1"/>
<test realm="wl_authenticityRealm" step="1"/>
<test realm="wl_remoteDisableRealm" step="1"/>
<test realm="wl_anonymousUserRealm" isInternalUserID="true" step="1"/>
<test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" step="2"/>
</customSecurityTest>
-->
<customSecurityTest name="SubscribeServlet">
<test realm="SubscribeServlet" isInternalUserID="true"/>
</customSecurityTest>
<customSecurityTest name="SimpleAuthAdapterTest">
<test realm="SimpleAuthRealm" isInternalUserID="true" />
</customSecurityTest>
</securityTests>
<realms>
<realm name="SampleAppRealm" loginModule="StrongDummy">
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
</realm>
<realm name="WorklightConsole" loginModule="requireLogin">
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
<onLoginUrl>/console</onLoginUrl>
</realm>
<realm name="SimpleAuthRealm" loginModule="SimpleAuthLoginModule">
<className>com.worklight.integration.auth.AdapterAuthenticator</className>
<parameter name="login-function" value="SimpleAuthAdapter.onAuthRequired" />
<parameter name="logout-function" value="SimpleAuthAdapter.onLogout" />
</realm>
<realm name="SubscribeServlet" loginModule="rejectAll">
<className>com.worklight.core.auth.ext.HeaderAuthenticator</className>
</realm>
<!-- For websphere -->
<!-- realm name="WASLTPARealm" loginModule="WASLTPAModule">
<className>com.worklight.core.auth.ext.WebSphereFormBasedAuthenticator</className>
<parameter name="login-page" value="/login.html"/>
<parameter name="error-page" value="/loginError.html"/>
</realm -->
</realms>
<loginModules>
<loginModule name="SimpleAuthLoginModule">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule>
<loginModule name="StrongDummy">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule>
<loginModule name="requireLogin">
<className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
</loginModule>
<loginModule name="rejectAll">
<className>com.worklight.core.auth.ext.RejectingLoginModule</className>
</loginModule>
<!-- For websphere -->
<!-- loginModule name="WASLTPAModule">
<className>com.worklight.core.auth.ext.WebSphereLoginModule</className>
</loginModule -->
<!-- For enabling SSO with no-provisioning device authentication -->
<!-- <loginModule name="MySSO" ssoDeviceLoginModule="WLDeviceNoProvisioningLoginModule">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule> -->
<!-- For enabling SSO with auto-provisioning device authentication -->
<!-- <loginModule name="MySSO" ssoDeviceLoginModule="WLDeviceAutoProvisioningLoginModule">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule> -->
</loginModules>
,這是我的我的ChallengeHandler代碼的一部分:
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, {});
};
有什麼我失蹤或者我做錯了嗎?發生這個錯誤是因爲應用程序安全是在爲服務器上啓用無需設置在web.xml文件中的任何角色: