Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Sync of Pods Compiled for Correct OS and Version of the M-Biz Client

3 posts in General Discussion Last posting was on 2008-04-13 15:56:58.0Z
jasvinder.bahra Posted on 2008-04-10 09:19:29.0Z
Sender: 556c.47fdd650.1804289383@sybase.com
From: jasvinder.bahra@civica.co.uk
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Sync of Pods Compiled for Correct OS and Version of the M-Biz Client
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <47fddba1.55cb.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Apr 2008 02:19:29 -0700
X-Trace: forums-1-dub 1207819169 10.22.241.41 (10 Apr 2008 02:19:29 -0700)
X-Original-Trace: 10 Apr 2008 02:19:29 -0700, 10.22.241.41
Lines: 42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1180
Article PK: 9288

We have an application in the field which uses a number of
POD files (DLL files that allow the M-Biz Client to access
operating system level functionality).

We have to cater for four different Microsoft operating
systems: Windows (WIN32), Windows Mobile 2003, Windows
Mobile 5 and Windows Mobile 6. We also have to cater for
two different versions of the M-Business Client - version
6.2 (build 3027) and version 6.7 (build 54).

When we compile the POD files in Visual Studio, we have to
specify target versions of both the M-Business Client (so
the appropriate POD libraries are used) and the operating
system (for obvious reasons).

To date, when setting up the M-Business Anywhere channels,
we have set up a different channel for each POD file, with a
collection of channels assigned to a group - i.e. "Our
Application (WIN32) (M-Biz 6.2)", "Our Application (WIN32)
(M-Biz 6.7)", etc.

As I was reading the M-Business Application Developer
Documentation, I came across a section titled "Using
M-Business Client HTTP request headers to customise
content". In it, it detailed a number of HTTP headers that
are accessible on the server-side including "User-Agent",
"X-AvantGo-DeviceOS", "X-AvantGo-Version". Assuming i'm
understanding this right, it should be possible to setup a
single M-Business Anywhere channel which points to a ASP or
JSP page (whichever webserver, as long as it allows access
to the HTTP headers posted by the M-Business Client), and
then using the headers I previously mentioned, do a simple
IF... THEN... ELSE statement set containing empty hyperlinks
to the appropriate POD files.

This would mean that we would only have to setup ONE channel
group on the M-Business Anywhere server - when an M-Business
Client performed an application synchronisation, it would
automatically get the correct version of the POD files.

Is this technique recommended? Has anyone else done
anything similar?


Jeff Albion (Sybase iAnywhere) Posted on 2008-04-10 16:20:51.0Z
From: "Jeff Albion (Sybase iAnywhere)" <firstname.lastname@ianywhere.com>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Sync of Pods Compiled for Correct OS and Version of the M-Biz Client
References: <47fddba1.55cb.1681692777@sybase.com>
In-Reply-To: <47fddba1.55cb.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47fe3e63$1@forums-1-dub>
Date: 10 Apr 2008 09:20:51 -0700
X-Trace: forums-1-dub 1207844451 10.22.241.152 (10 Apr 2008 09:20:51 -0700)
X-Original-Trace: 10 Apr 2008 09:20:51 -0700, vip152.sybase.com
Lines: 72
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1181
Article PK: 17904

Jasvinder,

I haven't tried it myself or really know of any other customer who has
set it up that way, but it does sound like it would be a viable option.

However, what's probably easier to manage in your code is to make use of
the URL macros that are outlined just below that section in the
documentation. (i.e. AG_DEVICEOS, AG_DEVICEPROCESSOR, AG_CLIENTVERSION,
AG_USER). I believe a combination of AG_DEVICEOS and AG_CLIENTVERSION
should be sufficient for your purposes.

See:
http://www.ianywhere.com/developer/product_manuals/mbusiness_anywhere/67/en/html/mba_appdeven67/appdev-ad-custom-url-macros.html

This way, your HTML controls the behaviour instead of the web server
properties. Doing it this way will allow you to change web servers down
the road without changing code and without trying to duplicate the
original set up.

---

If you're keen on trying out the custom header stuff, and you're running
your web application on Apache, there's mod_rewrite which can redirect
on the HTTP headers (See:
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteRule).

I know similar solutions exist for the other web servers out there,
although I personally haven't experimented with them myself.

Here's an example for httpd.conf that will switch on HTTP_USER_AGENT
strings:

<IfModule rewrite_module>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.+Firefox.*$ [NC]
RewriteRule ^/BrowserRedirect(/|)$ /BrowserRedirect/firefox.html [L]
RewriteCond %{HTTP_USER_AGENT} ^.+MSIE.*$ [NC]
RewriteRule ^/BrowserRedirect(/|)$ /BrowserRedirect/msie.html [L]
</IfModule>

So, in my case, if I went to http://www.myserver.com/BrowserRedirect/,
if I used MSIE I'd get the MSIE page, and if if I used Firefox, I'd get
the Firefox page.

You can access any of the HTTP headers in mod_rewrite by using:

%{HTTP:header}

where header can be any HTTP MIME-header name.

Example: %{HTTP:Proxy-Connection} is the value of the HTTP header
''Proxy-Connection:''. Similar references can be made to the M-Business
headers.

---

Let us know how your testing goes with this technique.

Regards,

jasvinder.bahra@civica.co.uk wrote:
> Is this technique recommended? Has anyone else done
> anything similar?

--
Jeff Albion, Product Support Analyst
Sybase iAnywhere

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs :
http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0


"Paul Horan[TeamSybase]" Posted on 2008-04-13 15:56:58.0Z
From: "Paul Horan[TeamSybase]" <phoran AT sybase DOT com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
References: <47fddba1.55cb.1681692777@sybase.com> <47fe3e63$1@forums-1-dub>
Subject: Re: Sync of Pods Compiled for Correct OS and Version of the M-Biz Client
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48022d4a$1@forums-1-dub>
Date: 13 Apr 2008 08:56:58 -0700
X-Trace: forums-1-dub 1208102218 10.22.241.152 (13 Apr 2008 08:56:58 -0700)
X-Original-Trace: 13 Apr 2008 08:56:58 -0700, vip152.sybase.com
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1183
Article PK: 9290


"Jeff Albion (Sybase iAnywhere)" <firstname.lastname@ianywhere.com> wrote in
message news:47fe3e63$1@forums-1-dub...
> Jasvinder,
>
> I haven't tried it myself or really know of any other customer who has set
> it up that way, but it does sound like it would be a viable option.
>
> However, what's probably easier to manage in your code is to make use of
> the URL macros that are outlined just below that section in the
> documentation. (i.e. AG_DEVICEOS, AG_DEVICEPROCESSOR, AG_CLIENTVERSION,
> AG_USER). I believe a combination of AG_DEVICEOS and AG_CLIENTVERSION
> should be sufficient for your purposes.

And another technique is to write the channel URLs with the macros in them
(a pretty cool feature I just discovered).
So, instead of creating 4 different channels, one for each OS, you can
create 1 channel like this:

http://myServer:port/myWebApp/AG_DEVICEOS/main.html

When a Win32 device syncs, they'll get the pages from the myWebApp/WIN32_OS
folder. A WinCE device will get the pages in the WINCE_OS folder, and so
on.

Paul Horan[TeamSybase]