473,842 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help with non WDSL web service

MR
I apologize in advance for re-asking a question that I posed before. I understand a little more than i did before and I am posing 2 specific questions:

I need to write an application that sends orders to a non-Windows web service.

1) I received DTD files for the SOAP messages that I need to send. I was able to convert them to XSD files. Upon examination of the files it is apparent that the XSD does not match the database in any way. so the question is, assuming I have an ADO.NET recordset, what is the best way to build and format the XML message? Do i have to build the XML message element by element and field by field or is there a better way?

2) Unfortunately, this service does not have a WDSL document. In fact when I try to add a web reference to my c# application, i get the following result:

SOAP RPC Router : Sorry, I don't speak via HTTP GET- you have to use HTTP POST to talk to me.

what should be my next (or first) step in setting up the interface with this web service. i cannot use a web reference, so i assume i need to do a lot of hand coding here. where is the best place to start?

i appreciate any suggestions, references or links

thanks

m

PS I am using VS.2003 (would 2005 help in this case?)

Nov 17 '05 #1
5 2324
MR,

1) I would use an XSLT styleshee here to transform your XML into the XML
that the web service requires. You can use the classes in the
System.Xml.Xsl namespace to perform these transformations .

2) If the service does not have a WDSL document, then I don't know if
there is much you can do. I would use the HttpWebRequest class to create a
request, and then set the content of the request to your XML (after setting
the headers appropriately of course). You mentioned that you can't add a
reference. Does the service offer a WSDL document that you can get through
other means? If so, you can use the WSDL.exe utility to generate the proxy
class which you can add to your project.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

P.S. There is nothing in VS.NET 2005 that would make this easier, btw.

"MR" <co******@newsg roup.nospam> wrote in message
news:%2******** *******@TK2MSFT NGP15.phx.gbl.. .
I apologize in advance for re-asking a question that I posed before. I
understand a little more than i did before and I am posing 2 specific
questions:
I need to write an application that sends orders to a non-Windows web
service.
1) I received DTD files for the SOAP messages that I need to send. I was
able to convert them to XSD files. Upon examination of the files it is
apparent that the XSD does not match the database in any way. so the
question is, assuming I have an ADO.NET recordset, what is the best way to
build and format the XML message? Do i have to build the XML message element
by element and field by field or is there a better way?
2) Unfortunately, this service does not have a WDSL document. In fact when I
try to add a web reference to my c# application, i get the following result:
SOAP RPC Router : Sorry, I don't speak via HTTP GET- you have to use HTTP
POST to talk to me.
what should be my next (or first) step in setting up the interface with this
web service. i cannot use a web reference, so i assume i need to do a lot of
hand coding here. where is the best place to start?
i appreciate any suggestions, references or links
thanks
m
PS I am using VS.2003 (would 2005 help in this case?)
Nov 17 '05 #2
> 1) I received DTD files for the SOAP messages that I need to send. I
was able to convert them to XSD files. Upon examination of the files it
is apparent that the XSD does not match the database in any way. so the
question is, assuming I have an ADO.NET recordset, what is the best way
to build and format the XML message? Do i have to build the XML message
element by element and field by field or is there a better way?
You have to build it element by element. The easiest way is to ask the
Server party for an example. You can build a string like that on the fly
using StringBuilder.

After that you could verify your string against the DTD or XSD, but this
is not required.

When the string is done you send it to the webserver using the
HttpWebRequest class. I posted an example earlier, just ask if you would
like to see it posted again.
2) Unfortunately, this service does not have a WDSL document. In fact
when I try to add a web reference to my c# application, i get the
following result:

SOAP RPC Router : Sorry, I don't speak via HTTP GET- you have to use
HTTP POST to talk to me.

what should be my next (or first) step in setting up the interface with
this web service. i cannot use a web reference, so i assume i need to do
a lot of hand coding here. where is the best place to start?

Read the MSDN docs on HttpWebRequest. Read up on XSD and see if you can
create a SOAP message (it's just a string!) that conforms to the XSD/DTD.
See if you can ask the Server party for a working sample. They must have
a test client themselves, right? If you're desperate you can capture the
SOAP conversation using a tool like Ethereal. :)

Greetings,
Wessel
Nov 17 '05 #3

"Wessel Troost" <no*****@like.t he.sun> wrote in message
news:op.suz0j2v jf3yrl7@asbel.. .
1) I received DTD files for the SOAP messages that I need to send. I
was able to convert them to XSD files. Upon examination of the files it
is apparent that the XSD does not match the database in any way. so the
question is, assuming I have an ADO.NET recordset, what is the best way
to build and format the XML message? Do i have to build the XML message
element by element and field by field or is there a better way?

You have to build it element by element. The easiest way is to ask the
Server party for an example. You can build a string like that on the fly
using StringBuilder.


I wouldn't advise doing that. You'll probably get escaping rules and things
wrong. Use an XmlTextWriter at least.

----
Nigel Norris
Nov 17 '05 #4
> I wouldn't advise doing that. You'll probably get escaping rules and
things
wrong. Use an XmlTextWriter at least.


Excuse my ignorance, but what do you mean with escaping rules?

Greetings,
Wessel
Nov 17 '05 #5

"Wessel Troost" <no*****@like.t he.sun> wrote in message
news:op.su1ugko lf3yrl7@asbel.. .
I wouldn't advise doing that. You'll probably get escaping rules and
things
wrong. Use an XmlTextWriter at least.


Excuse my ignorance, but what do you mean with escaping rules?

Greetings,
Wessel


When writing text encoded XML you have to escape reserved characters in the
data (typically '<','>', and'&'), though there are additional characters in
attribute values. XmlTextWriter will deal with all this for you.

If you are writing raw XML, you also need to make sure you understand the
XML encoding rules for all the different data types (e.g. dates,
booleans,..). Not that hard, but you can't just wing it without knowing
something about XML.

Nigel
Nov 17 '05 #6

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

Similar topics

1
1477
by: Steven | last post by:
Hi all My problem is a little lengthy. But please help me. In my application, ADO.NET DataSet object is not getting constructed in the Web Service Web Method called by the Windows Application passing an ADO.NET DataSet Object as a parameter to the Web Method in Web Service Debugging using the Soap Extensions, clearly shows that the Serialized DataSet is passed to the Web Service, but the Web Service Web Method is not
7
1451
by: Douglas Robson | last post by:
Ok, I've removed the MyItem class which is found in References.cs and replaced it with a reference to the namespace that has MyItem in it. I've also got rid of the tag at the top of the MyItem class. the web service works now, only the problem is, it only returns objects which are created by the default constructor. public MyItem getMyItem() {
5
2875
by: Andrew | last post by:
Hey all, Requesting help from the VB.Net gurus in here. I was given a task to write a Windows Service (VB.Net) that would run an external program, and if that program closed for any reason (other than the service being stopped) it would restart it. I have written the service to do just this, and for testing purposes I am running the program Notepad. And I even have it making entries in the System Event Log. However, and this is my...
3
4857
by: Neter Smith | last post by:
I have run into a problem when trying to import a WSDL reference under VS 2003 and 1.1 of the framework. It appears as if it is in the generation of the proxy that things are failing. When I add the reference, I get the following error: C:\Inetpub\wwwroot\WebServices\samples\WSDL\dotnet\OblixSampleForDotNetWSDL\Web References\localhost\Reference.map(1): Custom tool error: Unable to import WebService/Schema. A schema with the namespace...
0
1125
by: Modica82 | last post by:
Hi all, many probably have noticed that i have been posting on here alot lately, and after many informative posts i am getting down and making progress with my web service design, but now again i am stuck! and i ask for your help once again. I was originally planning to send back strings if i needed to return XML data, something i have now found to be frowned at by some developers:
12
5349
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded the custom employee class and have built it as a separate library (employee.dll). This employee.dll is being referenced by both the web service and the windows application. I face the following problem when I send this class to the webservice.
4
6919
by: =?Utf-8?B?Z3Jhenph?= | last post by:
Hello If someone can help me with this it would be greatly appreciated. I’m no web service expert but I don't think i'm trying to do anything too special. I think i must be missing something simple because i have been banging my head against a wall with this for a while now. I have created a web service and a client Win forms application to consume the web service. The problem is i don't know where the web service will be deployed...
1
2457
by: Paul van Brouwershaven | last post by:
Hi All, I'm struggling with the WDSL restrictions in PHP/SOAP for a while know. I would like to create some simple restrictions in my WDSL file. The script are running both on the same server with PHP Version 5.2.6 with the official soap extension. On both my client and server there is some error configuration:
5
3315
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? Why do I need to set a property within my code to the service name? Are all these required or am I just doing this for consistency purposes?
0
9715
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
10944
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...
0
10313
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9453
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
7855
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
5696
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
5884
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4499
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
3144
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.