• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Help me in understanding Web Services

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am new to the world of web services. I need to learn it using a simple example. i want to use sun application server. And can any one tell me whether i could access a existing application which is developed in c & c++ or not. if yes please give some idea.

Thanks in advance.
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For learning basics of webservices http://www.w3schools.com/webservices/default.asp

Documentation on how to run webservices in S.A.S - http://docs.sun.com/source/816-7152-10/index.html

If you find S.A.S complex, then you can try running simple examples using Apache Axis (http://ws.apache.org/axis) and Tomcat. Apache Axis also have C++ implementation of SOAP.

>>could access a existing application which is developed in c & c++ or not
This is possible, provided how and what you want to access. Could you please explain more about your system setup and requirements.
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I started off with this :

http://java.sun.com/developer/technicalArticles/J2EE/j2ee_ws/

was very helpful getting me to understand what a webservice actually is.

Cheers,
Su Yeu.
 
Barun Das
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thank u all. And Mr. Balaji actually i have an application running in my machine. the application is developed using C, C++, and little bit of java also. Its a standalone application accessing a central database. Now i have to expose some methods of that application so that some of our client can access it on the net. i have decided to do it with web services but i dont know how to implement it. can you give me some idea. do i have to deploy my existing application as a web application? i didn't find any article which says i can access method of a object which is not deployed in any application server. i am not having a clear idea of web services. So i need some help.

And thanks again for your quick reply.
 
Barun Das
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Su Yeu,

I checked the link and its good and easy to understand. But my problem lies somewhere else. i am searching for a solution last two three days but couldn't find any. if you have any idea then please share.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This might be what you're looking for:


http://www.roguewave.com/products/leif/


A robust container for hosting C++ Web services and Servlet servers

Automatic generation of C++ server skeletons built to run inside the LEIF container

Automatic generation of Web service clients from WSDL

Easy-to-use XML-to-C++ data binding utility
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have an application written in C, C++ and Java, some functionality of which you want to expose as a Java web service - did I get that right?
Converting the app to a web app will not help with this. Does this app have an API that you can use, either in Java, or in C (which you could access via JNI) ? Because if it does not, how would you access its functionality?
 
Barun Das
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Yes Mr. Ulf Dittmer. Actually the business logic of my application is written with C & C++ and the front end is developed using java swing. I used native methods to access business logic from Java classes. My application works fine. My problem is that its a huge standalone application. And I cant change my application code and its not deployed in any application server. I want to expose some of the methods of my application to web services so that one external client can access some portion of my existing business logic through internet. I dont want to give him any extra GUI. Only he has to send data as SOAP and the gets the result. I want to know whether i can do with the web services or not and if yes please give me some idea.

Thanking You.
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Barun Das:
Actually the business logic of my application is written with C & C++ and the front end is developed using java swing. I used native methods to access business logic from Java classes.


Option1:
Given the above two facts, i would use the same native methods inside my javawebservices methods to access business logic and returns result.

//** sample code **//
public class someName
{
public string callBusinessLogic1(string input)
{
return (callC++BusinessLogic1_using_Native_method());
}
}
The outside world will see only the java webservices.

Option2:
Can you use C++ implementation of Apache Axis to expose your methods as webservices?
 
Barun Das
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

The problem is that my application is installed in a machine not in
a application server and i cant play with my existing code. So how
can I develop web services using those methods that are there in that
application. How will I be able to call them. Is there anyway to call
them?
reply
    Bookmark Topic Watch Topic
  • New Topic