Posts

Showing posts with the label ios

SAP Netweaver Gateway OData Sybase Unwired Server

Image
SAP Mobility is hot and many organisations are experimenting or even implementing mobile solutions for their enterprise users. With the new OData features in SUP 2.0 it has become easy to expose your SAP data to mobile devices. In this blog we will show you the steps needed to make connection through SUP with a Netweaver Gateway OData service. In this post I will show how to setup Sybase Unwired Platform to accept clients making OData requests to Netweaver Gateway. Also how to setup the reference application to test your setup. Setting up Sybase Unwired Platform For this post we’re going to use the demo SAP Netweaver Gateway provided by SAP ( ES Workplace ) . You have to create an ES Workplace user account, because SUP doesn't like the default given username with the @ sign in it. Then login to the Sybase Control Center and go to the security tab. Start by creating a new security profile. Just press new and give it a name. No additional settings required he...

Working with JSON & PhoneGap Application

I Love to use JSON objects especially when working with PhoneGap Applications. I find it very comforting while transferring data from client to server and vice versa. I will explain through a simple example how I use JSON to ease the client-server data transmission. Example will be, a client asking for the details of the Employee working in the Accounts department. Basic Algo for the Example will be as follows, Client will make an Ajax request, asking for the Details of Employees working in an Accounts Department. On receiving the Request, Server will fetch all the details of the Employees working in Accounts form Database, convert these details to an Json Objects and send back to the Client. Client on Receiving the Response from the server will parse the JSON objects and convert the data in local JS variables and render the data at client side, i.e. in a table grid etc. as per requirements.  At the client Side, Include the following js files, json2.js...

Extending HTML5 Mobile Apps with C++ in MoSync

Invoke C++ Code from JavaScript The following example code is based on the HTML5/JS/C++ Hybrid Project Template . This template illustrates how to invoke custom C++ code from JavaScript. The UI has buttons for making the device vibrate and beep. To create a project based on this template, launch MoSync SDK, and create an app in the Eclipse-based IDE, using the HTML5/JS/C++ Hybrid Project template. Then you will get the source code discussed below. The template app uses the Wormhole C++ library (classes HybridMoblet and MessageStream) and the JavaScript libraries included in the file wormhole.js (all included with the application template). Sending String Messages It is good to know that two message formats are supported by Wormhole: JSON messages and String stream messages. The example we discuss here uses String streams. String streams are a performant way of sending messages from JavaScript to C++. This method is generally faster than JSON messages (on some platfor...

Creating the User Interface for iOS to work with Sybase Unwired Platform

Use Interface Builder to create and configure the user interface for the SUP101 application. The SUP101 iOS Object API example project contains the source code for the user interface for the sample application. Although the user interface is built automatically when you add the source files to the Xcode project, you can walk through the rest of the tasks and view the source code to see how to use Interface Builder to build the sample application. Viewing the SubscribeController View Controller A view controller functions as the root view screen for the SUP101 mobile application. Creating the MenuListController Create the menu list view. Creating the CustomerListController Create the customer list view. Adding the DetailController and Configuring the View Create the DetailController.xib.

Viewing the CallbackHandler and ApplicationCallbackHandler Files for ios

Look at CallBackHandler and ApplicationCallbackHandler files in Xcode. CallbackHandler is a subclass of SUPDefaultCallbackHandler , and listens for events sent from the server. It also implements the SUPApplicationCallback protocol to get connection, registration, and device state change notifications. The header, CallbackHandler.h , is referenced in a number of classes in this application, so create it first. You can create new Objective-C class files from the main menu: File > New > New File . ApplicationCallbackHandler is a subclass of SUPApplicationDefaultCallback , and it gets connection, registration, and device state change notifications. There are two threads involved in the SUP101 application—the main thread, which is driven by the client application user interface controller, and the mobile object client access thre...

Registering the Application Connection in Sybase Control Center

Register the iPhone simulator in Sybase Control Center. Prerequisites Connect to Sybase Control Center. Task Log in to Sybase Control Center using the credentials you indicated during installation. In Sybase Control Center, select View > Select > Unwired Server Cluster Management View . In the left pane, select Applications . In the right pane, click Application Connections . Click Register . In the Register Application Connection window, enter the required information: User name – user1 Template – SUP101_admin Application ID – SUP101 Security configuration – admin Logical role – leave blank or use the logical role when you assigned to this user during the deployment to Server Domain – default Activation code length – 3 Activation expiration (hours) – 72 Specify activation code – 123 Click OK .