473,396 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to create virtual webservices?

Hi

I want to create a servlet or something similar by which im able to create
virtual webservices.

Lets say i would like to create a webservice with a method called 'getDate'
which returnes the current date.
This could be done by making a wsdl file (or whatever the name is) and via a
wizard in some java tool make a real webservice. This webservice would be
static since it creates a class in which i can make my code to return the
date. The servlet should be published to a server and the behaviour cant be
changed without compiling the class again and publish again. In that way it
is static.

I would like to implement the same thing, but in af dynamic manner. By this
i mean that i will create the wsdl file dynamically, when a client requests
for that and i would dynamically construct the soap response, when the
client makes a request on my method.

So to the client it should seem exact as a static normal webservice but the
implementation on the server is totally dynamic, and any xml returned from
calls to my 'webservice' should be created dynamically.

Can anyone guide me in how to implement this?

Which .jar files do i need, where do i get them from, which classes can help
create wsdl files and soap webservice responses?
Can it be implementet in a normal servlet or do i have to code my own http
server?

Links to guides would be appreciatet.

Thanks in advance, Benny

Aug 23 '07 #1
4 2784
On Thu, 23 Aug 2007 21:40:37 +0200, "Benny Dein" <no****@nospam.dk>
wrote:
>Hi

I want to create a servlet or something similar by which im able to create
virtual webservices.

Lets say i would like to create a webservice with a method called 'getDate'
which returnes the current date.
This could be done by making a wsdl file (or whatever the name is) and via a
wizard in some java tool make a real webservice. This webservice would be
static since it creates a class in which i can make my code to return the
date. The servlet should be published to a server and the behaviour cant be
changed without compiling the class again and publish again. In that way it
is static.

I would like to implement the same thing, but in af dynamic manner. By this
i mean that i will create the wsdl file dynamically, when a client requests
for that and i would dynamically construct the soap response, when the
client makes a request on my method.

So to the client it should seem exact as a static normal webservice but the
implementation on the server is totally dynamic, and any xml returned from
calls to my 'webservice' should be created dynamically.

Can anyone guide me in how to implement this?

Which .jar files do i need, where do i get them from, which classes can help
create wsdl files and soap webservice responses?
Can it be implementet in a normal servlet or do i have to code my own http
server?

Links to guides would be appreciatet.

Thanks in advance, Benny


That would defeat the purpose of web services. WSDL is meant to be a
binding contract. You think through them and plan them carefully, and
do not alter them without careful planning.
The whole point to interoperability is that someone calling your web
services needs to be able to validate the data going in and coming
back against some kind of schema. If that schema changes often,
you've got problems that won't be solved by implementing web services.

If you really want to make SOA folks cringe, just receive and return a
single string that is just one big wad of XML.. Who knows what they
will pass in... anyone's guess what comes out... good luck with that.

This is why I don't do Java anymore, these kind of solutions folks
pull out of their arse.
Aug 24 '07 #2
On Fri, 24 Aug 2007 00:06:05 -0400, Howard <no**@none.comwrote:
>On Thu, 23 Aug 2007 21:40:37 +0200, "Benny Dein" <no****@nospam.dk>
wrote:
>>Hi

I want to create a servlet or something similar by which im able to create
virtual webservices.

Lets say i would like to create a webservice with a method called 'getDate'
which returnes the current date.
This could be done by making a wsdl file (or whatever the name is) and via a
wizard in some java tool make a real webservice. This webservice would be
static since it creates a class in which i can make my code to return the
date. The servlet should be published to a server and the behaviour cant be
changed without compiling the class again and publish again. In that way it
is static.

I would like to implement the same thing, but in af dynamic manner. By this
i mean that i will create the wsdl file dynamically, when a client requests
for that and i would dynamically construct the soap response, when the
client makes a request on my method.

So to the client it should seem exact as a static normal webservice but the
implementation on the server is totally dynamic, and any xml returned from
calls to my 'webservice' should be created dynamically.

Can anyone guide me in how to implement this?

Which .jar files do i need, where do i get them from, which classes can help
create wsdl files and soap webservice responses?
Can it be implementet in a normal servlet or do i have to code my own http
server?

Links to guides would be appreciatet.

Thanks in advance, Benny



That would defeat the purpose of web services. WSDL is meant to be a
binding contract. You think through them and plan them carefully, and
do not alter them without careful planning.
The whole point to interoperability is that someone calling your web
services needs to be able to validate the data going in and coming
back against some kind of schema. If that schema changes often,
you've got problems that won't be solved by implementing web services.

If you really want to make SOA folks cringe, just receive and return a
single string that is just one big wad of XML.. Who knows what they
will pass in... anyone's guess what comes out... good luck with that.

This is why I don't do Java anymore, these kind of solutions folks
pull out of their arse.

I realize that is somewhat insulting so let me say that last line was
not intended for you specifically.

But don't try to combine polymorphism with web services. Web service
calls are stateless, and conceptually should be separated as far as
possible from generall OOP theory as possible. Yes you use classes,
but regarding your web service contract you shouldn't be thinking
about inheritance or polymorphic solutions to problems.
Aug 24 '07 #3
Howard wrote:
On Thu, 23 Aug 2007 21:40:37 +0200, "Benny Dein" <no****@nospam.dk>
wrote:
>Hi

I want to create a servlet or something similar by which im able to create
virtual webservices.

Lets say i would like to create a webservice with a method called 'getDate'
which returnes the current date.
This could be done by making a wsdl file (or whatever the name is) and via a
wizard in some java tool make a real webservice. This webservice would be
static since it creates a class in which i can make my code to return the
date. The servlet should be published to a server and the behaviour cant be
changed without compiling the class again and publish again. In that way it
is static.

I would like to implement the same thing, but in af dynamic manner. By this
i mean that i will create the wsdl file dynamically, when a client requests
for that and i would dynamically construct the soap response, when the
client makes a request on my method.

So to the client it should seem exact as a static normal webservice but the
implementation on the server is totally dynamic, and any xml returned from
calls to my 'webservice' should be created dynamically.

Can anyone guide me in how to implement this?

Which .jar files do i need, where do i get them from, which classes can help
create wsdl files and soap webservice responses?
Can it be implementet in a normal servlet or do i have to code my own http
server?

Links to guides would be appreciatet.

Thanks in advance, Benny



That would defeat the purpose of web services. WSDL is meant to be a
binding contract. You think through them and plan them carefully, and
do not alter them without careful planning.
The whole point to interoperability is that someone calling your web
services needs to be able to validate the data going in and coming
back against some kind of schema. If that schema changes often,
you've got problems that won't be solved by implementing web services.

If you really want to make SOA folks cringe, just receive and return a
single string that is just one big wad of XML.. Who knows what they
will pass in... anyone's guess what comes out... good luck with that.

This is why I don't do Java anymore, these kind of solutions folks
pull out of their arse.
While I agree that making the contract dynamic defeats the purpose of a
web service I fail to see why this is in any way related to Java?

Silvio Bierman
Aug 24 '07 #4

All the Java developers I ever worked with seemed to get mired down
into bizarre approaches to solutions without ever putting forth effort
to explore the simplest thing that works. Those who abandoned Java in
favor of C# or other languages seem to have a lot less headupthearse
syndrome.
Aug 24 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dotNetDave | last post by:
I keep getting the following error on one of my web service pages: Parser Error Parser Error Message: Could not create type 'SyPixx.Web.ClearService.ConfigureAlarms'. Source Error: Line 1: ...
0
by: Fred Herring | last post by:
I have a client/server application which uses webservices functions to upload large byte arrays to the server and httpwebrequests to download the data files. I would like to use http to also...
8
by: Komandur Kannan | last post by:
We have a smart device application running on handhelds(Symbol MC9000G). The backend is Oracle and a middle tier web services development done in Vb.net. We use pessimistic Locking due to...
1
by: otto | last post by:
I have a technical question about WebServices. I have a solution with several projects (.exe and .dll). Each project have references to several webservices. I want to know if is possible to create...
14
by: j_stus | last post by:
Hi there, I created virtual directory on IIS. Alias Name = "ABC" Then I created simple web site which has just one button. When clicking on that button following code is executed: Dim...
4
by: tshad | last post by:
I have a site www.stf.com and a site www.stfstage.com (where I do all my testing). The problem is that www.stfstage.com is only internal and I need to get access from the outside (without...
7
by: Rob | last post by:
This actually compiles and works but it doesn't seem like the best code, so I was wondering is there another way to do this? template <typename Tvector<T>* addDepth(T) { return new vector<T>;...
0
by: Sascha | last post by:
Hello, I'm trying to implement my own ShellFolder. This folder should represent a virtual folder in the explorer, but the data that will be listet, should be provided by some webservices. I...
2
by: Peter | last post by:
Firstly let me be very clear about this, I do not want to create a web service proxy nor do I want to do anything with web services. Basically, I have a shrink wrapped desktop application which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.