473,473 Members | 1,563 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SOAP to webservice

Dear All,

I am writing an application which needs to send some XML in a SOAP envelope
to a Java webservice. I have absolutely no idea where to begin. Can anyone
possibly point me to a good place to read about how to go about doing this?
I've not dealt with XML much in the past.

Also, instead of creating an XML document every time with nodes which are
the same, but some different values, is there a way of templating that XML?
ie. I store an XML document and replace some information in the XML before
sending. Is this a common practise?

Thanks in advance.

Steve
Nov 18 '05 #1
2 1193
If the Java app builder has a WSDL file for their service, you can use
WSDL.exe to set up the interface and simply code as if you were coding
against a local method. This is the ideal.

If not, you can still set it up, but you will have to look at the parameters
and set up the WSDL yourself. One way to accomplish this is to mimic the
service on your side, matching the params. Dump your WSDL and change the web
address to the location of their service. You can then create your web
reference with WSDL.EXE and roll.

What I am saying is if the doc is something like this:

<values>
<userName>gbworld</username>
....
<values>

wrapped up in a SOAP envelope, you can allow .NET to control the creation of
SOAP and simply send the values you need. The less you have to mess with the
envelope creation, the better. This will not work in all cases, but you can
start with this method and see if it works, as it is much easier than hand
coding. As long as they use the standards, and have WSDL (or can create
WSDL), you are golden.

If you particularly like pain, you can also create your own SOAP wrapper
class and open a socket to send the SOAP envelope to the Java server. I am
not fond of this methodology, although the learning experience might make it
worthwhile. ;-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"None" <no****@spam.org> wrote in message
news:NN*******************@news-server.bigpond.net.au...
Dear All,

I am writing an application which needs to send some XML in a SOAP envelope to a Java webservice. I have absolutely no idea where to begin. Can anyone possibly point me to a good place to read about how to go about doing this? I've not dealt with XML much in the past.

Also, instead of creating an XML document every time with nodes which are
the same, but some different values, is there a way of templating that XML? ie. I store an XML document and replace some information in the XML before
sending. Is this a common practise?

Thanks in advance.

Steve

Nov 18 '05 #2
Hi Greg,

Thanks for the information. Unfortunately they do not have the WSDL
available for me. I'm kinda blind on this. I know the exact information
required for the SOAP header etc. Do you know of any "SOAP wrapper"
resources on the internet I might be able to read up on? I've spent the
entire last week on this and I'm really stuck. I think I've been going up
the wrong path. I have been trying the HttpWebRequest class and sending an
XML document I've manually put together for testing, but I want to be able
to generate this a little more elegantly ;)

Any help would be greatly appreciated!!!

Steve
"Cowboy (Gregory A. Beamer) [MVP]" <No************@comcast.netNoSpamM> wrote
in message news:#e**************@tk2msftngp13.phx.gbl...
If the Java app builder has a WSDL file for their service, you can use
WSDL.exe to set up the interface and simply code as if you were coding
against a local method. This is the ideal.

If not, you can still set it up, but you will have to look at the parameters and set up the WSDL yourself. One way to accomplish this is to mimic the
service on your side, matching the params. Dump your WSDL and change the web address to the location of their service. You can then create your web
reference with WSDL.EXE and roll.

What I am saying is if the doc is something like this:

<values>
<userName>gbworld</username>
...
<values>

wrapped up in a SOAP envelope, you can allow .NET to control the creation of SOAP and simply send the values you need. The less you have to mess with the envelope creation, the better. This will not work in all cases, but you can start with this method and see if it works, as it is much easier than hand
coding. As long as they use the standards, and have WSDL (or can create
WSDL), you are golden.

If you particularly like pain, you can also create your own SOAP wrapper
class and open a socket to send the SOAP envelope to the Java server. I am
not fond of this methodology, although the learning experience might make it worthwhile. ;-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"None" <no****@spam.org> wrote in message
news:NN*******************@news-server.bigpond.net.au...
Dear All,

I am writing an application which needs to send some XML in a SOAP

envelope
to a Java webservice. I have absolutely no idea where to begin. Can

anyone
possibly point me to a good place to read about how to go about doing

this?
I've not dealt with XML much in the past.

Also, instead of creating an XML document every time with nodes which are the same, but some different values, is there a way of templating that

XML?
ie. I store an XML document and replace some information in the XML before sending. Is this a common practise?

Thanks in advance.

Steve


Nov 18 '05 #3

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

Similar topics

0
by: Oliver Hirschi | last post by:
Hi, I am really confused. I try to call a soap-method on a server with one parameter and I like to get the return-parameter of this method, but I get ever the following exception by invoking the...
15
by: MR | last post by:
i need to develop a SOAP client, Since I have never personally done one I would like to make sure that I am going about it correctly. The client is a Windows (probably 2k3) application that...
0
by: Hans Kesting | last post by:
Hi, I'm trying to create a client for some webservice. BUT I have only limited information: * no WSDL available ("expected Q1-06") (it seems to be written in Java) * I don't have access (yet)...
0
by: Nalla | last post by:
Hi, I have a requirement to call webservices from my old C++ application.So first I tried with Vc++.net as follows.....There are 2 approach Dotnet frame work and soaptoolkit 3.0 I am not able to...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
1
by: George Homorozeanu | last post by:
Hi, I programmed a WebService that has a function that takes an untyped DataSet as parameter and fills the data in a database. The WebService is programmed under .Net. Some guys are doing the...
0
by: abhi | last post by:
Hi Folks, I have deployed a simple web-service on IIS which takes one input and returns a string output. Here is the code for my webservice. **Code Starts** Public Function HelloWorld(ByVal A...
6
by: Peter van der veen | last post by:
Hi I have the following problem. I'm calling a webservice from within a VB.net 2005 Windows program. For this i got a WSDL file and loaded that in VB. Until now i just call the webservice and...
6
by: John | last post by:
I'm trying to call a Webservice (Non-.NET) That requires the insertion of security credentials into the SOAP header. Up until know I've been creating Dynamic proxy classes to call web services and...
15
by: =?Utf-8?B?ZG91Zw==?= | last post by:
I hadn't had a class yet and I had some MS help on this to set up, but I wrote a .Net WS that creates a proxy class response using SOAP. Works fine. And in kind of a good way, the IDE has hidden...
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
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,...
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...
1
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...
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.