Web Services from ASP

J

Jimbo

Hi,

I have a .net web service which has a method that takes an xml string as its
argument. I want to call this webservice method from ASP (classic) using a
mehtod other than the SOAP toolkit.

Can it be done simply by using the MSXML2.ServerXMLHTTP object? If so, how
do I specify the arguments to my method.

Service is e.g. http://a.b.c/service.asmx
Method is method
parameter is p1
argument is a1

Many thanks for any help on this,

Jimbo
 
M

Martin Honnen

Jimbo wrote:

I have a .net web service which has a method that takes an xml string as its
argument. I want to call this webservice method from ASP (classic) using a
mehtod other than the SOAP toolkit.

Use the SOAP toolkit. If you can't use the SOAP toolkit on the real
server then for a start use it on your development server and have a
look at the SOAP request it generates (SOAP is XML), then make sure you
send that XML with
Can it be done simply by using the MSXML2.ServerXMLHTTP object?

MSXML2.ServerXMLHTTP and its send method. You also need to set the SOAP
action as a HTTP request header with the setRequestHeader method before
you call send.
 
M

Michael D. Kersey

Jimbo said:
Hi,

I have a .net web service which has a method that takes an xml string as its
argument. I want to call this webservice method from ASP (classic) using a
mehtod other than the SOAP toolkit.

Can it be done simply by using the MSXML2.ServerXMLHTTP object? If so, how
do I specify the arguments to my method.

Service is e.g. http://a.b.c/service.asmx
Method is method
parameter is p1
argument is a1

Many thanks for any help on this,

Jimbo
You can download the free PDF version of
"XML Programming: Web Applications and Web Services
With JSP and ASP"
from http://apress.com/free/

Some other free books available there:
* Google, Amazon, and Beyond: Creating and Consuming Web Services
* Practical Common Lisp
* A Programmer’s Introduction to PHP 4.0
* Writing Perl Modules for CPAN
* Programming VB.NET: A Guide For Experienced Programmers
* COM and .NET Interoperability
* Dissecting a C# Application: Inside SharpDevelop
 
J

Jimbo

Martin,

That's great, thanks. I can now communicate with my service correctly.

I have one further problem. One of the parameters to my service is a string
which is actually an xml document. This is giving me a problem when I send
using MSXML2.ServerXMLHTTP because SOAP doesn't like the special characters
in the xml of the variable xmlVariable as below;

<xmlVariable>string</xmlVariable>

Is there a way of sending this variable without causing such problems.

Many thanks,

Jimbo.
 
J

Jimbo

OK,

I've sorted this using a DOMDocument object.

Jimbo.

Jimbo said:
Martin,

That's great, thanks. I can now communicate with my service correctly.

I have one further problem. One of the parameters to my service is a
string which is actually an xml document. This is giving me a problem when
I send using MSXML2.ServerXMLHTTP because SOAP doesn't like the special
characters in the xml of the variable xmlVariable as below;

<xmlVariable>string</xmlVariable>

Is there a way of sending this variable without causing such problems.

Many thanks,

Jimbo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top