473,396 Members | 2,129 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.

Populate web service response from xml file

Hi,

I will implement a mock web service for internal testing of a client
application we're developing. We do not want to hard code the answers, but
instead store the possible answers as XML data/files in a database. Each web
service method could have several possible answers which should be chosen
depending on the in parameters.

I would like input/ideas on an easy way of populating the web service
methods responses from the stored xml data. Or should we approach it
differently?

Thanks,
Magnus
Jan 23 '08 #1
5 1457
"Magnus" <Ma****@discussions.microsoft.comwrote in message
news:6A**********************************@microsof t.com...
Hi,

I will implement a mock web service for internal testing of a client
application we're developing. We do not want to hard code the answers, but
instead store the possible answers as XML data/files in a database. Each
web
service method could have several possible answers which should be chosen
depending on the in parameters.

I would like input/ideas on an easy way of populating the web service
methods responses from the stored xml data. Or should we approach it
differently?
This isn't very difficult. What have you tried?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Jan 23 '08 #2
=?Utf-8?B?TWFnbnVz?= <Ma****@discussions.microsoft.comwrote in
news:6A**********************************@microsof t.com:
I will implement a mock web service for internal testing of a client
application we're developing. We do not want to hard code the answers,
but instead store the possible answers as XML data/files in a
database. Each web service method could have several possible answers
which should be chosen depending on the in parameters.

I would like input/ideas on an easy way of populating the web service
methods responses from the stored xml data. Or should we approach it
differently?
What sort fo XML are you returning? The entire SOAP message ... or just the
return data?

If it's just the return data, this is very simple to do.

--
sp**********@rogers.com (Do not e-mail)
Jan 23 '08 #3
I can choose to implement it either in Java or C#, so right now I'm looking
at Java using JAXB and JAX-WS. I just wanted to know if there existed some
similar way to do it using C#/.NET.

"John Saunders [MVP]" wrote:
"Magnus" <Ma****@discussions.microsoft.comwrote in message
news:6A**********************************@microsof t.com...
Hi,

I will implement a mock web service for internal testing of a client
application we're developing. We do not want to hard code the answers, but
instead store the possible answers as XML data/files in a database. Each
web
service method could have several possible answers which should be chosen
depending on the in parameters.

I would like input/ideas on an easy way of populating the web service
methods responses from the stored xml data. Or should we approach it
differently?

This isn't very difficult. What have you tried?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Jan 23 '08 #4
"Magnus" <Ma****@discussions.microsoft.comwrote in message
news:B1**********************************@microsof t.com...
>I can choose to implement it either in Java or C#, so right now I'm looking
at Java using JAXB and JAX-WS. I just wanted to know if there existed some
similar way to do it using C#/.NET.
Like I said. It's pretty trivial. In fact, it's so trivial, that I hesitate
to provide sample code, since the sample will be so close to the final code
you need.

So, have you tried this at all? How would you do this in Java?

I apologize if I'm wrong, but I get the impression that you want us to "do
your homework for you". This is because, if you had started on this, you
might well have finished by now.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Jan 23 '08 #5
"John Saunders [MVP]" <john.saunders at trizetto.comwrote in
news:Ow**************@TK2MSFTNGP05.phx.gbl:
Like I said. It's pretty trivial. In fact, it's so trivial, that I
hesitate to provide sample code, since the sample will be so close to
the final code you need.
No joking - but I think the OP probably has zero web services experience,
hence the question. But just looking at the Hello World example that comes
with the basic VS.NET web services template should be enough to get the OP
rolling.

--
sp**********@rogers.com (Do not e-mail)
Jan 23 '08 #6

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

Similar topics

1
by: mohit | last post by:
I am struggling for long time to display a GIF file on an ASP page. I have tried to return a GIF file in few formats from a webservice. Webservice returns the images as MemoryStream.GetBuffer()....
2
by: Paul Hale | last post by:
I have a vb.net web service and client that are both working fine. If someone wanted to consume our web service using .NET, no problem. Im a little confused on how non .NET clients would use the...
5
by: Gardar | last post by:
I have a .net webservice, developed with c++ managed extensions. The websrvice returns an xml-document with a reference to a server side xml-stylesheet in the format <?xml-stylesheet href =...
3
by: Jerome Cohen | last post by:
AI am trying to call a third-party web service. this service expects an XML fragment that contains the request plus other parameter. adding the web reference created the syntax below(reference.vb)....
4
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and...
3
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
4
by: | last post by:
Hi all, I want to create a method that does the following: 1) Programmatically instantiate a new XmlDataSource control 2) For each file in a named directory, make a "FileSystemItem" element 3)...
0
by: =?Utf-8?B?TWFnbnVz?= | last post by:
Hi, I will implement a mock web service for internal testing of a client application we're developing. We do not want to hard code the answers, but instead store the possible answers as XML...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.