Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Webservice from HP C

 
Jörg Mohren
Advisor

Calling Webservice from HP C

Hello everybody

I look after an older application written in HP-C (formerly Dec-C). To attach this application to the new world, I need to call webservices directly from the C-Code. I have no experience in webservices at all.
The application runs on OpenVMS 8.3.

Anybody already tried this?

Thanks a lot in advance!
2 REPLIES 2
Hoff
Honored Contributor

Re: Calling Webservice from HP C

Big topic area. Small text input box.

Forget about the C code (for now) as you have control over that part and can apparently change it as required. (And you're probably more comfortable there, too.)

Gain some details around what widget(s) are you connecting into, and what are its connection requirements, and where in the whole disconnected morass of the web the C code will sit in relation to the web server? There are various constructs called "web services", and some have specific considerations. And C code can be fit into the whole morass in various spots.

Depending on you prefer to learn, OReilly has various books on the general topic of web services.

SOAP and REST are two of the basic mechanisms in wide use.

There is some recently-posted information on gSOAP around; there's a port of that underway. There's also AMQP information at that site.

Another potential option is Apache Axis.

And it is feasible to connect Java to C and C to Java, which means you can connect into the HP/Sun Java web services implementations.

Some of the many, many, many URLs:

http://ws.apache.org/
http://www.johndapps.com/
http://oreilly.com/
Brett Cameron
Occasional Visitor

Re: Calling Webservice from HP C

Jörg,

From what you have said, it sounds like there is already a Web service in existance that you need to call from your C program. If this is the case, then gSOAP would certainly be worth a look (see http://www.johndapps.com/). With any luck the creators of the Web service you need to call will be able to provide you with a WSDL file (Web Service Definition) that defines the interface, whereupon you can use the tools provided by gSOAP (wsdl2h and soapcpp2) to generate C stubs that can be linked into your existing C application to call the service. The fact that your application is written in C should make things reasonably easy (famous last words)! ... we have people happily using gSOAP to call Web services from their old OpenVMS COBOL and Fortran applications.