生产MobileFirst 7 Server从Worklight 6.2升级,适配器调用无法正常工作

时间:2021-09-26 22:10:41

We have a MobileFirst application that worked with Worklight 6.2 server - production also. We are using a http adapter: <connectionPolicy xsi:type="http:HTTPConnectionPolicyType">

我们有一个MobileFirst应用程序,它也可以与Worklight 6.2服务器一起使用。我们使用的是http适配器:

Currently we are changing the production server to 7.0.0. On Development Server we could test our application and all the functionalities were OK. We'we created the .war with the production server on build configuration and uploaded together with the android .wlapp . Now we receive 404 when the application tries to call any adapter function on production server. invokeProcedure onFailure returns UNEXPECTED_ERROR. This is with:

目前我们正在将生产服务器更改为7.0.0。在Development Server上,我们可以测试我们的应用程序,所有功能都可以。我们在构建配置上使用生产服务器创建了.war,并与android .wlapp一起上传。现在,当应用程序尝试调用生产服务器上的任何适配器函数时,我们会收到404 invokeProcedure onFailure返回UNEXPECTED_ERROR。这是:

  • Server version: 7.0.0.00.20150312-0731
  • 服务器版本:7.0.0.00.20150312-0731

  • Project WAR version: 7.0.0.00.20150402-2001
  • Project WAR版本:7.0.0.00.20150402-2001

  • Adapter name: XXXXX. Version: 7.0.0.00.20150402-2001
  • 适配器名称:XXXXX。版本:7.0.0.00.20150402-2001

  • Application: XXXXX-android-0.9.7, Version: 7.0.0.00.20150402-2001
  • 应用:XXXXX-android-0.9.7,版本:7.0.0.00.20150402-2001

We have no security enabled in the application. Is there something that must be enabled on Server in order to allow old type adapters call?
When we've tested with upgraded MobileFirst Development Studio 7.0.0.00.20150430 as development platform - same server version, and we got same 404 (Context not found), but there tries to connect with authorization/v1/clients/instance instead of /apps/services/api/XXXXX/android/query

我们在应用程序中未启用安全性。是否必须在服务器上启用某些东西以允许旧类型适配器调用?当我们使用升级的MobileFirst Development Studio 7.0.0.00.20150430作为开发平台进行测试时 - 相同的服务器版本,我们得到相同的404(未找到上下文),但尝试连接authorization / v1 / clients / instance而不是/应用程序/服务/ API / XXXXX /安卓/查询

Should a Server upgrade solve this problem? We've noticed that there are updates available.

服务器升级应解决此问题吗?我们注意到有可用的更新。

The Server is on a https connection, but was same on WL 6.2.

服务器在https连接上,但在WL 6.2上是相同的。

1 个解决方案

#1


By the description in the comments and the supplied messages.log, it is clear that you are attempting to use Application Authenticity Protection.

通过注释和提供的messages.log中的描述,很明显您正在尝试使用应用程序真实性保护。

This feature worked in a certain way in v6.2 and it works in a different way in v6.3 and above.
From the comments it appears you are only adding the publickSigningKey - this is no longer enough.

此功能在v6.2中以某种方式工作,并且在v6.3及更高版本中以不同的方式工作。从评论看来,你只是添加了publickSigningKey - 这已经不够了。

See the updated Application Authenticity Protection tutorial for steps to follow: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/authentication-security/application-authenticity-protection/

有关要遵循的步骤,请参阅更新的应用程序真实性保护教程:https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/authentication-security/application-authenticity-protection/

General steps to follow:

一般步骤如下:

  1. Setup authenticationConfig.xml with the security test
  2. 使用安全性测试设置authenticationConfig.xml

  3. Add the security test to the environment node in application-descriptor.xml
  4. 将安全性测试添加到application-descriptor.xml中的环境节点

  5. Add the publicSigningKey to the <publicSigningKey> element
  6. 将publicSigningKey添加到 元素

  7. Add the application package name <packageName> element
  8. 添加应用程序包名称 元素

I believe you are missing step 4.
Note that you also able to now enable the Extended Authenticity mode; follow the instructions in the tutorial.

我相信您错过了第4步。请注意,您现在还可以启用扩展真实性模式;按照教程中的说明进行操作。

Note about step 3: obviously the same keystore used to generate the publicSigningKey must be used when you export the signed .apk file... otherwise there will be a mismatch and the authenticity challenge will fail.

关于步骤3的注意事项:显然,在导出签名的.apk文件时,必须使用用于生成publicSigningKey的相同密钥库...否则将出现不匹配,并且真实性质询将失败。


In your authenticationConfig.xml, make sure you have the securityTest available (= not commented out like in the file you've supplied in the comments below.

在您的authenticationConfig.xml中,确保您可以使用securityTest(=未在下面的注释中提供的文件中注释掉。

In your application-descriptor.xml, you are missing the securityTest attribute in the Android environment element: <android version="0.9.9"> change to <android version="0.9.9" securityTest="customTests">

在您的application-descriptor.xml中,您缺少Android环境元素中的securityTest属性: 更改为

#1


By the description in the comments and the supplied messages.log, it is clear that you are attempting to use Application Authenticity Protection.

通过注释和提供的messages.log中的描述,很明显您正在尝试使用应用程序真实性保护。

This feature worked in a certain way in v6.2 and it works in a different way in v6.3 and above.
From the comments it appears you are only adding the publickSigningKey - this is no longer enough.

此功能在v6.2中以某种方式工作,并且在v6.3及更高版本中以不同的方式工作。从评论看来,你只是添加了publickSigningKey - 这已经不够了。

See the updated Application Authenticity Protection tutorial for steps to follow: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/authentication-security/application-authenticity-protection/

有关要遵循的步骤,请参阅更新的应用程序真实性保护教程:https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/authentication-security/application-authenticity-protection/

General steps to follow:

一般步骤如下:

  1. Setup authenticationConfig.xml with the security test
  2. 使用安全性测试设置authenticationConfig.xml

  3. Add the security test to the environment node in application-descriptor.xml
  4. 将安全性测试添加到application-descriptor.xml中的环境节点

  5. Add the publicSigningKey to the <publicSigningKey> element
  6. 将publicSigningKey添加到 元素

  7. Add the application package name <packageName> element
  8. 添加应用程序包名称 元素

I believe you are missing step 4.
Note that you also able to now enable the Extended Authenticity mode; follow the instructions in the tutorial.

我相信您错过了第4步。请注意,您现在还可以启用扩展真实性模式;按照教程中的说明进行操作。

Note about step 3: obviously the same keystore used to generate the publicSigningKey must be used when you export the signed .apk file... otherwise there will be a mismatch and the authenticity challenge will fail.

关于步骤3的注意事项:显然,在导出签名的.apk文件时,必须使用用于生成publicSigningKey的相同密钥库...否则将出现不匹配,并且真实性质询将失败。


In your authenticationConfig.xml, make sure you have the securityTest available (= not commented out like in the file you've supplied in the comments below.

在您的authenticationConfig.xml中,确保您可以使用securityTest(=未在下面的注释中提供的文件中注释掉。

In your application-descriptor.xml, you are missing the securityTest attribute in the Android environment element: <android version="0.9.9"> change to <android version="0.9.9" securityTest="customTests">

在您的application-descriptor.xml中,您缺少Android环境元素中的securityTest属性: 更改为