You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tuncay <tu...@o2.pl> on 2004/07/09 19:28:56 UTC

Design questions

Hello all,

I need to design and implement a bridge like application between a 
legacy banking application and a web service. The banking application is 
written in ADABAS NATURAL and is on a UNIX platform.

Below is a sketch of my current design to explain the situation better:

  +----------+             +----------+              |  
  |   UNIX   |     HTTP    |   Java   |      HTTP    |  Web
  |  ADABAS  |  <------->  |    Web   |   <------->  |  Service
  |  NATURAL |             |    App   |              |
  +----------+             +----------+              |

Because of the inabilities of NATURAL version I wrote a C module that 
opens an HTTP connection to Java Web App and sends web service 
parameters as normal request parameters, and fetches the returned data 
to NATURAL.

Web application receives the parameters, in a large if-else block 
decides which method to call and using Axis generated proxy classes 
invokes the method. By using the returned object it prepares a very 
long  formatted string and sends back. (Btw, Java Web Application is 
another host for security and performance related reasons.)

The number of methods is increasing a lot lately and there are a dozens 
of web services that we need to integrate with the banking application. 
Thus, it is getting difficult and extra boring to manually code method 
invocations. For these reasons I decided to implement a package that 
parses WSDL and automatically invokes methods by using request 
parameters and lots of reflection code. The only part left is generating 
the result string from the object returned by method invocation.

I have several questions:
* Am I on the right way?
* Is using Axis on the web application side favorable?
    * If favorable, should I choose an alternative to use proxy classes?
    * If not, which API should I learn and use?
* And btw, why is parsing a WSDL is so hard?

I'm very new to whole web services stuff. I need your very valuable 
suggestions. For the last couple of days questions preoccupying my mind. :-\

Best regards.
/tb.


Re: Design questions

Posted by "matthew.hawthorne" <ma...@apache.org>.
Tuncay wrote:
> Below is a sketch of my current design to explain the situation better:
> 
>  +----------+             +----------+              |   |   UNIX   |     
> HTTP    |   Java   |      HTTP    |  Web
>  |  ADABAS  |  <------->  |    Web   |   <------->  |  Service
>  |  NATURAL |             |    App   |              |
>  +----------+             +----------+              |
> 
> Because of the inabilities of NATURAL version I wrote a C module that 
> opens an HTTP connection to Java Web App and sends web service 
> parameters as normal request parameters, and fetches the returned data 
> to NATURAL.
> 
> Web application receives the parameters, in a large if-else block 
> decides which method to call and using Axis generated proxy classes 
> invokes the method. By using the returned object it prepares a very 
> long  formatted string and sends back. (Btw, Java Web Application is 
> another host for security and performance related reasons.)


I think you'll want to get rid of the manual WSDL parsing, and also get 
rid of your big if/else block in the webapp.  On the client (NATURAL) 
side, could you use Axis C++, or perhaps a SOAP library for C, Perl, 
Python, etc to just invoke the service methods directly?  I may be 
missing something, but it seems that this would save you a lot of work.

RE: Design questions

Posted by Anne Thomas Manes <an...@manes.net>.
I agree with Matthew. I suggest you call Web services directly from your
Natural app. SOAP engines for C/C++ include:

Axis C++
gSOAP (http://www.cs.fsu.edu/~engelen/soap.html) (GPL)
Systinet Server for C++ (http://www.systinet.com) (commercial)

There's no reason for you to implement your own WSDL parser. (btw -- WSDL
parsing isn't really all that hard (it's no harder than parsing any other
XML document) -- but it's a complex document with many options.)

Anne

-----Original Message-----
From: Tuncay [mailto:tuncay@o2.pl] 
Sent: Friday, July 09, 2004 1:29 PM
To: axis-user@ws.apache.org
Subject: Design questions

Hello all,

I need to design and implement a bridge like application between a 
legacy banking application and a web service. The banking application is 
written in ADABAS NATURAL and is on a UNIX platform.

Below is a sketch of my current design to explain the situation better:

  +----------+             +----------+              |  
  |   UNIX   |     HTTP    |   Java   |      HTTP    |  Web
  |  ADABAS  |  <------->  |    Web   |   <------->  |  Service
  |  NATURAL |             |    App   |              |
  +----------+             +----------+              |

Because of the inabilities of NATURAL version I wrote a C module that 
opens an HTTP connection to Java Web App and sends web service 
parameters as normal request parameters, and fetches the returned data 
to NATURAL.

Web application receives the parameters, in a large if-else block 
decides which method to call and using Axis generated proxy classes 
invokes the method. By using the returned object it prepares a very 
long  formatted string and sends back. (Btw, Java Web Application is 
another host for security and performance related reasons.)

The number of methods is increasing a lot lately and there are a dozens 
of web services that we need to integrate with the banking application. 
Thus, it is getting difficult and extra boring to manually code method 
invocations. For these reasons I decided to implement a package that 
parses WSDL and automatically invokes methods by using request 
parameters and lots of reflection code. The only part left is generating 
the result string from the object returned by method invocation.

I have several questions:
* Am I on the right way?
* Is using Axis on the web application side favorable?
    * If favorable, should I choose an alternative to use proxy classes?
    * If not, which API should I learn and use?
* And btw, why is parsing a WSDL is so hard?

I'm very new to whole web services stuff. I need your very valuable 
suggestions. For the last couple of days questions preoccupying my mind. :-\

Best regards.
/tb.