2015-03-30 69 views
0

我無法從iOS本機應用程序連接到我的MobileFirst服務器。 我在worklight.plist中更改主機,wlServerContext和端口。 我在服務器的控制檯上傳.wlapp和.adapter。如何連接到雲中的開發服務器

這是在日誌中我的應用程序:

2015-03-30 14:34:31.119 El_Universal_Demo[696:146217] Connecting to server and initializing push notification ... 
2015-03-30 14:34:31.125 El_Universal_Demo[696:146217] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:69 :: { 
"application id" = "El_Universal_Demo"; 
"application version" = "1.0"; 
environment = iOSnative; 
host = "198.11.212.197"; 
platformVersion = "7.0.0.0"; 
port = 8080; 
protocol = http; 
wlServerContext = "/wladmin"; 
wlUid = "wY/mbnwKTDDYQUvuQCdSgg=="; 
} 
2015-03-30 14:34:31.160 El_Universal_Demo[696:146217] [WARN] [USER_CERT_AUTH] + [WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.eluniversal.El-Universal-Demo 
2015-03-30 14:34:31.173 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] +[WLAFHTTPClientWrapper requestWithURL:] in WLAFHTTPClientWrapper.m:46 :: Request url is http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init 
2015-03-30 14:34:31.202 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:141 :: Request timeout is 60.000000 
2015-03-30 14:34:31.206 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:220 :: Sending request (http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init) with headers: 
{ 
"Accept-Language" = es; 
"User-Agent" = "El_Universal_Demo/1 (iPhone; iOS 8.1.2; Scale/2.00)/WLNativeAPI/7.0.0.0"; 
"X-Requested-With" = XMLHttpRequest; 
"x-wl-app-version" = "1.0"; 
"x-wl-clientlog-appname" = "El_Universal_Demo"; 
"x-wl-clientlog-appversion" = "1.0"; 
"x-wl-clientlog-deviceId" = "A6042553-8580-4365-A69C-6731388D6A56"; 
"x-wl-clientlog-env" = iOSnative; 
"x-wl-clientlog-model" = "iPhone6,1"; 
"x-wl-clientlog-osversion" = "8.1.2"; 
"x-wl-device-id" = "A6042553-8580-4365-A69C-6731388D6A56"; 
"x-wl-platform-version" = "7.0.0.0"; 
} 
You can see the request body in the Analytics platform logs. 
    2015-03-30 14:34:31.219 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper start] in WLAFHTTPClientWrapper.m:297 :: Starting the request with URL  http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/i nit 
2015-03-30 14:34:31.225 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:230 :: waiting for response... (Thread=<NSThread: 0x17007f3c0>{number = 1, name = main}) 
2015-03-30 14:34:31.231 El_Universal_Demo[696:146217] url a cargar (null) 
2015-03-30 14:34:31.288 El_Universal_Demo[696:146217] APNS Token : <9f662f33 5de5971b 5371851e 7d91fc17 f6f83d55 a9c913f6 973eec67 2e10c365> 
2015-03-30 14:34:31.289 El_Universal_Demo[696:146217] APNS Token : <9f662f33 5de5971b 5371851e 7d91fc17 f6f83d55 a9c913f6 973eec67 2e10c365> 
2015-03-30 14:34:31.476 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:324 :: Request Failed 
2015-03-30 14:34:31.480 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:325 :: Response Status Code : 404 
2015-03-30 14:34:31.484 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:326 :: Response Error : Expected status code in (200-299), got 404 
    2015-03-30 14:34:31.501 El_Universal_Demo[696:146217] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:466 :: Status code='404' error='Expected status code in (200-299), got 404' response='' 
    2015-03-30 14:34:31.508 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:469 :: Response Header: { 
Connection = "Keep-Alive"; 
"Content-Language" = "en-US"; 
"Content-Length" = 0; 
Date = "Mon, 30 Mar 2015 20:34:44 GMT"; 
"Keep-Alive" = "timeout=10, max=100"; 
"X-Powered-By" = "Servlet/3.0"; 
} 
Response Data: 
2015-03-30 14:34:31.514 El_Universal_Demo[696:146217] [ERROR] [WL_CLIENT] - [WLClient onInitRequestFailure:userInfo:] in WLClient.m:1060 :: onInitRequestFailure 

我需要測試基於標記的通知的例子。我的例子在本地工作,但我想用雲中的開發服務器進行測試,如果我的應用程序沒有連接,我不能這樣做。

我正在使用MobileFirst 7.0

問候。

+0

是'wladmin'項目的名稱是什麼? init路徑看起來像'http:// //apps/services/api///init' – 2015-03-30 22:23:41

+0

定義「雲」。 – 2015-03-31 00:02:15

+0

wladmin是我的服務器上下文根,我想解釋的是,我有一個基於標籤的推送通知在iOS上的本地api項目,這是在我的本地機器上工作,但是當我嘗試在公共服務器上發佈時在軟層上我不能將我的應用程序連接到MFP服務器,我已經使用服務器參數更改了worklight.plist,並且它不能連接到服務器 – 2015-03-31 01:25:35

回答

0

你說它在本地工作。你可以花費那個嗎?
您確定在您放置在worklight.plist中的設置中?

http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init 

該IP地址對我來說看起來是本地的而非遠程(「在雲中」)。驗證您的設置。

0

謝謝,這個問題已解決。 我不得不重新安裝我的服務器中的所有安裝配置,並再次上傳運行時(.war),wlapp和適配器。

此外,在我在eclipse中部署我的本機應用程序的時候,有些時候在控制檯中出現了關於文件.war中的問題的錯誤。

所以我不得不讓其他工作空間和驗證我的本地應用程序的設置。 (worklight.plist)

我現在的問題是,當我運行適配器的通知但是其他主題時,我沒有收到iPhone中的任何通知。

[1] How to invoke the url or link of an adapter

問候