473,789 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2810
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
implementati on 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 interoperabilit y 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.comw rote:
>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
implementatio n 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 interoperabilit y 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
implementati on 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 interoperabilit y 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
13386
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: <%@ WebService Language="vb" Codebehind="ConfigureAlarms.asmx.vb" Class="SyPixx.Web.ClearService.ConfigureAlarms" %>
0
975
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 upload but am lost in how to implement this. basic information: My Url looks like this "http://144.115.108.xxx/webservice1/myvirtual/videofiles/" I want to be able to upload a large binary file to my server called
8
4014
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 specific business needs When such a lock is made for a transaction (this code is in the web service) and the handhelds are terminated abnormally (cold booted or battery low), the lock still remains. The Web service's connection to oracle is still...
1
1892
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 a global instance of the webservice accesible from all projects to avoid the creation of the webservice instance each time a project calls the same service. Do you know My object in Visual Basic .NET 2005? Something similar but with more than one...
14
8443
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 myFile As StreamReader = File.OpenText("/abc/MyFile.txt") Dim line As String = myFile.ReadLine
4
3341
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 creating a new domain). I tried to create a Virtual directory inside my stf site so that I would access it like: www.stf.com/stage/. I run as www.stfstage.com fine and have for a long time.
7
2162
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>; } ....a templated meth...
0
2084
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 found out, that I have to add some Registry-Keys and in the key HKEY_CLASSES_ROOT\CLSID\{myUID}\InprocServer32 I can set the name of my dll that implements the IShellFolder.
2
2514
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 downloads data from a web site. Unfortunately the application has a fixed timeout and the web server regularly exceeds this, causing the application to shut the connection and subsequently not receive any data. The desktop application also uploads...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10412
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9021
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.