2014-09-05 66 views
0

我想在application-descriptor.xml中的「worklightServerRootURL」元素中添加指向外部Worklight Server但我收到錯誤「Invalid content was found with元素'worklightServerRootURL'「。請在application-descriptor.xml中參考下面的配置。任何人都知道這個錯誤的解決方案?IBM Worklight application-descriptor.xml配置用於外部worklight服務器

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<application xmlns="http://www.worklight.com/application-descriptor" id="MobileTest" platformVersion="6.2.0.00.20140825-1637"> 
    <displayName>MobileTest</displayName> 
    <description>MobileTest</description> 
    <author> 
     <name>application's author</name> 
     <email>application author's e-mail</email> 
     <homepage>http://mycompany.com</homepage> 
     <copyright>Copyright My Company</copyright> 
    </author> 
    <mainFile>index.html</mainFile> 
    <features/> 
    <thumbnailImage>common/images/thumbnail.png</thumbnailImage> 
    <android version="1.0"> 
     <worklightSettings include="false"/> 
     <security> 
      <encryptWebResources enabled="false"/> 
      <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/> 
      <publicSigningKey/> 
      <packageName/> 
     </security> 
    </android> 
    <worklightServerRootURL>http://${local.IPAddress}:9080/worklight</worklightServerRootURL> 
</application> 

謝謝。

回答

1

application-descriptor.xml中的worklightServerRootURL元素自Worklight 6.0.0.0開始不適用,不應使用,特別是在Worklight 6.2中不適用。

爲了讓構建的應用程序指向不同的遠程Worklight Server,您需要右鍵單擊應用程序文件夾並選擇Run As > Build Settings and Remote Target

在打開的嚮導窗口中,輸入遠程服務器的服務器URL。該值將用於生成的項目中,並且構建的應用程序將嘗試連接到該地址。

輸入路徑後,單擊確定,然後選擇Run As > Run on Worklight Development Server

欲瞭解更多信息,做閱讀工作燈6.2

-1

您可以使用worklight.properties來管理worklight服務器的端點。它位於server/conf目錄中。 這裏面查找行:

publicWorkLightHostname=localhost 
# http or https 
publicWorkLightProtocol=http 
# For default port leave empty 
publicWorkLightPort=10080 

通過更改此設置,您希望在構建應用程序的端點將熟時放入應用程序的端點。此外,裸記住你有

<worklightSettings include="false"/> 

通過這個改變,以真正啓用的應用程序,它可以讓你來點應用到不同的服務器位置後生成的開發商設置。這是用於針對不同端點調試應用程序的一個非常方便的功能。

+0

嗨springdo,後配置工作燈性能並不需要重建所有的服務器.war文件和.wlapp應用程序文件使其工作? – user3479640 2014-09-05 10:13:26

+0

服務器文件夾中的更改自動重建.war文件。 – 2014-09-26 06:34:54

相關問題