This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Services and the fly likes Design Suggestions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Design Suggestions" Watch "Design Suggestions" New topic
Author

Design Suggestions

Shiv Kalyan
Greenhorn

Joined: Apr 23, 2003
Posts: 6
Well Can any one provide some valuable suggestions , requirement :
Application 'A' needs to provide an Interface to External Applications 'B','C','D','E' etc. These are Black Boxs to one Another.
And there are custom conditions for each of the Application 'B',
Application 'C' and these custom conditions are optional.
Whats the best way to provide such generic interfaces . Applications are web based. And there should not be any compile time dependencies between the applications for the interface to be provided.
Shiv Kalyan
Greenhorn

Joined: Apr 23, 2003
Posts: 6
Hey Gurus , any Help
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I'll first quote our bartenders:
We ain't got many rules 'round these parts, but we do got one. Please change your change your display name to comply with The JavaRanch Naming Policy.
Now to your question. Yes, you could expose the component(s) as web services using WSDL without creating compile-time dependencies. You can generate the necessary classes from that WSDL document at any side or just use dynamic invocation (no statically generated classes).


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Shiv Kalyan
Greenhorn

Joined: Apr 23, 2003
Posts: 6
Thanks Lasse, Can you please provide WSDL sample implementation details.
Shiv Kalyan
Greenhorn

Joined: Apr 23, 2003
Posts: 6
Any Pointers to the Implementation Details
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Thanks Lasse, Can you please provide WSDL sample implementation details.

I'm afraid not. The reasons being (a) I don't know what kind of interface to describe with the WSDL document, and (b) the sample would be very verbose (takes "too much" time), and finally (c) you'll understand WSDL and web services better by reading a tutorial written by a real author (instead of trying to figure out what someone posted on a bb).
Having that said, here's how it works in general:
- Each application publishes an WSDL (XML) document to a web server accessible over HTTP, which describes in a platform-independent way about the services provided and what kind of XML messages the services expects as input and what kind of XML messages it produces as output
- A client of an application fetches the WSDL document and generates the plumbing code using tools such as wsdl2java, VS.NET web reference wizard, etc.
- The client application makes calls to these classes (Java, C#, C++, whatever was generated) which connect to the web service using the directions given by the WSDL document
Now, there are no compile-time dependencies here (as I understand them). You have one WSDL document and you can generate/write each side (client, server) independently without knowing anything about each other. The WSDL document acts as the contract, just like IDL is the contract in the CORBA world.
I hope that was even remotely helpful but I doubt it
You really should grab a tutorial or a web services book...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Design Suggestions