This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Mainframe client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Mainframe client" Watch "Mainframe client" New topic
Author

Mainframe client

Karthikeyan Rajendraprasad
Ranch Hand

Joined: Apr 16, 2003
Posts: 70
will it be possible to access webservvices from a mainfram system?


Karthikeyan<br />SCJP 1.4, SCWCD.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41076
    
  43
For the most part web services mean sending SOAP over HTTP. So if you can use HTTP to send and receive data, you should be good to go, because SOAP is just XML, which is just text, which you can surely generate and parse on a Mainrrame. An interesting question that arises is: are there libraries that let you deal with SOAP instead of XML (or just text)? But there is no principal obstacle to using web services on a mainframe.


Ping & DNS - my free Android networking tools app
Karthikeyan Rajendraprasad
Ranch Hand

Joined: Apr 16, 2003
Posts: 70
i have the input xml that has to be sent to the webservice. also i have a java program that can put this inside a soap envelope and send it over as a html request..

the thing now is can i call the java program or can i send it directly as a html request ?? or any other simpler way
[ December 02, 2005: Message edited by: Karthikeyan Rajendraprasad ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41076
    
  43
What is the difference between "call the java program" and "send it directly as an HTTP request"? Weren't you thinking of using Java for sending the HTTP request? The HttpUrlConnection class can do this.
Karthikeyan Rajendraprasad
Ranch Hand

Joined: Apr 16, 2003
Posts: 70
thats what the java program does... im not sure whether i can run my java program on the mainframe system..
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
What kind of mainframe? Big IBM iron can run *nix Java partitions alongside CICS regions or batch COBOL. You can do inter-region communication of some kind between COBOL and Java.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
if you do not need immediate reply, you can run a mainframe application to download or ftp a file to unix. creation of that file in unix will trigger an application, which can call the web services.

you can then upload to mainframe another file which contains the reply of the webservice.

quite crude. i wonder if ibm mq can do that, synchronously, with mvs as client.
Santhosh Nair
Greenhorn

Joined: Dec 02, 2005
Posts: 5
Web services can be accessed from mainframe through MQSeries. What we did on a recent project was to create request and response queues in MQ. A CICS application wrote messages to the queue and as soon as a message was created on the queue a message driven bean was triggered which inturn called a stateless session bean which then invoked the web service ( we used Java web services developer pack to create the web services client ). As soon as we got the reply from the web service the session bean returned the object to MDB and it creates a record on the reply MQ Queue. The CICS application then read the data from MQ Queue and dispalyed it. The response time was pretty good ( round trip time from M/F was less than 15 seconds ).
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
but 15 seconds is like forever. why did it take so long
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
at the point of view of the mvs programmer, it is synchronous?
Santhosh Nair
Greenhorn

Joined: Dec 02, 2005
Posts: 5
13 seconds was a worst case scenario. Average was about 4 to 5 seconds. We had set the timeout to 15 seconds.
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
The java part is straightforward. For the mvs part, is it like this:

A cics program is provided to mvs programmer, as an interface to any web service that the java system is ready to connect to.

The mvs programmer merely Links to this interface cics program, and probably passes the web service identification, and some parameters. and this same interface program also listens for the reply on the reply mq. and returns the reply.

is it like that?
Santhosh Nair
Greenhorn

Joined: Dec 02, 2005
Posts: 5
In our case the user interface was provided by CICS. The mainframe programmer wrote MQ calls from the CICS program to put data into the mq queue and retreive data from the queue adnd display that back on CICS screens. A separate infrastrcuture group helped us with creating the MQ Queues. I think CICS systems group also did some configurations for MQ Queues. Mainframe just passed the commarea and it was java layers responsibility to convert that to XML and back to commarea from the XML that we got from the web service. If you already have the XML then you can just pass that on through the commarea and java layer can call the web service after incuding that in the SOAP message.
[ December 12, 2005: Message edited by: Santhosh Nair ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Mainframe client
 
Similar Threads
Reading VSAM
Should i change my job????
stale jdbc Connection
OO vs Procedural?
FTP upload