on 06-01-2015 7:48 AM
Hello,
We followed these steps for deployment of hybrid application in smp 3.0 server, we are getting some error.Please find attachment for detailed error analysis.
Step 1:installed JDK, and set it to environment variable
Step 2 : installed apache ant, and set it to environment variable
Step 3: installed node.js, and set it to environment variable
Step 4: installed cordova, And set it to environment variable
Step 5: installed ADT Plugins in Ecllipse
Step 6: In Management cockpit
a) Create new application- given ID, Name, and Type of application (Hybrid).
b) On selecting application specified Back-End Point and Authentication
c) Go to APP SPECIFIC SETTINGS then upload that Myapp zip.
d) Deployed it.
Step 7: Now,in Command Prompt
a) cordova create <foldername> <application id> <AppName>
b) cd <foldername>
c) cordova platform add android
d)cordova –d plugin C:\SAP\MobileSDK3\KapselSDK\plugins\logon
e) Downloaded register.html from SCN and replaced with index.html in WWW folder and generated apk.
f) We are getting error while opening apk on mobile device that is “SAP is not defined” .
Step 8: Created one folder that is Myapp/android/.
This android folder contains www folder and config.xml file
Step 9: Now compressed Myapp folder.
Step 10: In Management cockpit
a) Create new application- given ID, Name, and Type of application (Hybrid).
b) On selecting application specified Back-End Point and Authentication
c) Go to APP SPECIFIC SETTINGS then upload that Myapp zip.
d) Deployed it.
Step 11: Opened this link on https://host:port/Admin/kapsel/jaxrs/KapselApp/app-id.
a) Got the logon screen.
b) After specifying User name & Password, its showing error sap is not defined.
I just tried Logon plugin. I am able to register with SDK SP08 PL01 being on SMP3 sever SP07 PL02. I suggest you to upgrade SMP server and SDK to latest version and then try. I looked at xml file also. This is my finding which is same as mine (default one).
HTTP port:8080
HTTPS port:8081 (one way communication)
HTTPS Admin port: 8083 (for Admin cockpit and GW cockpit)
HTTPS Port: 8082 (mutual authentication)
I still wonder howcome you are able to execute https://smphost:8083
Nevertheless update this post once you are done with server and SDK upgrade.
Regards,
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All the steps are mentioned here Registering using the Logon Plugin
Hi Sumit,
You can't register app from a browser using the Kapsel login plugin. You could register only from your Cordova app.
SMP SP07 supports both fresh installation and upgrade from previous installation for SMP 3.0.x. So it should support upgrade of SP03 to SP07. Double check you downloaded the right file.
Regards,Midhun
SAP Technology RIG
yes, you can upgrade directly from SP03
Once done, you have to upgrade cordova version to 4.2.0 also. Please follow the steps mentioned Back to Getting Started With Kapsel and Logon
I will look at the index.html file again and get back to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you tell us what is SMP server and SMP Mobile SDK version you are working with? Can you follow below steps once and let us know if you still see same error
1. cordova -d create C:\Kapsel_Projects\LogonDemo com.mycompany.logon LogonDemo "{\"plugin_search_path\":\"C:/SAP/MobileSDK3/KapselSDK/plugins/\"}"
2. cd C:\Kapsel_Projects\LogonDemo
3. cordova -d platform add android
4.cordova -d plugin add com.sap.mp.cordova.plugins.logon
5. Replace index.html file
6. cordova -d prepare
7. Use Android IDE to deploy and run the project
Regards,
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumit,
Are you sure that you added all the required plugins to the project? You could find the list of cordova plugins by executing the command: cordova plugins
Make sure you didn't miss the below steps:
- Add the Logon plugin and optionally the console plugin so that the results of console.log can be seen when run on an iOS device in the All Output view.
cordova -d plugin add com.sap.mp.cordova.plugins.logon
cordova -d plugin add org.apache.cordova.console
- Note, it is possible to use Cordova 4.3.0 with SP08 of the SDK but it requires using the following format when adding Kapsel plugins.
-
cordova plugin add com.sap.mp.cordova.plugins.logon --searchpath C:\SAP\MobileSDK3\KapselSDK\plugins or cordova plugin add C:\SAP\MobileSDK3\KapselSDK\plugins\logon --searchpath C:\SAP\MobileSDK3\KapselSDK\plugins or cordova plugin add com.sap.mp.cordova.plugins.logon --searchpath %KAPSEL_HOME%\plugins
Follow this blog to try it from Rest client:
Provide index.html file
Regards,Midhun
SAP Technology RIG
Just to confirm, can you check if you are able to hit http://smpserverhost:8080 in the browser? I assume you have configured application with a defined App ID in admin cockpit.
Regards,
JK
By looking at index2.PNG, you have used port "8083", you should use either 8080 (http) or 8081 (https)
in index3.PNG, you mentioned
(device.platform == "window")
it should be windows
DeviceType | Device |
---|---|
Android | Android Devices |
Blackberry | Blackberry devices |
iOS | iOS devices |
iPad | Apple iPad |
iPhone | Apple iPhone |
iPod | Apple iPod |
Windows | includes desktop or servers with Windows OS such as Windows XP, Windows Vista, Windows 7, and Windows Server series OS |
Windows8 | includes Windows desktop version |
WinPhone8 | includes Windows mobile |
Please correct it and then try.
Regards,
JK
We applied same but our management cockpit running 8083 port.
Management cockpit always run on Admin port that is 8083 (sometime 8084 if 8083 is occupied by some other service)
for registration/on-boarding, you have to use 8080 (HTTP)
If you are testing the app in the mobile, can you make sure that you are able to access http://smpserverhost:8080 in the mobile browser
Regards,
JK
oh.. i got it now. In your case 8083 is oneWaySSL port (HTTPS) >> by default, it is 8081
from your code can you modified ?
"serverHost": "smp server FQDN", //Place your SMP 3.0 server name here
"https": "TRUE",
"serverPort": "8083",
FQDN: fully qualified domain name. xx.xx.com
If you have access to SMP server machine, can you tell about port used in smpConnectorName="noSSL under C:\SAP\MobilePlatform3\Server\config_master\org.eclipse.gemini.web.tomcat\default-server.xml
For me, its 8080
<Connector acceptCount="100" connectionTimeout="20000" enableLookups="false" maxThreads="250" port="8080" protocol="HTTP/1.1"
redirectPort="8081" server="SAP" smpConnectorName="noSSL" />
You are working on first release of SMP server version, latest SMP server version is 3.0 SP07 with SMP Mobile SDK SP08. If possible, upgrade it to latest to avail new features and functionality.
Regards,
JK
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.