For Programmers: Free Programming Magazines  


Home > Archive > ASP > January 2006 > Web Services from ASP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Web Services from ASP
Jimbo

2006-01-20, 7:55 am

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


Martin Honnen

2006-01-20, 6:56 pm



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.


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Michael D. Kersey

2006-01-21, 3:55 am

Jimbo wrote:
> 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
Jimbo

2006-01-24, 7:55 am

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.

"Martin Honnen" <mahotrash@yahoo.de> wrote in message
news:uWI%23jqdHGHA.3728@tk2msftngp13.phx.gbl...
>
>
> Jimbo wrote:
>
>
>
> 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
>
>
> 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.
>
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/



Jimbo

2006-01-24, 7:55 am

OK,

I've sorted this using a DOMDocument object.

Jimbo.

"Jimbo" <jimbo@nospam.none> wrote in message
news:dr4vpm$q1t$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
> 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.
>
> "Martin Honnen" <mahotrash@yahoo.de> wrote in message
> news:uWI%23jqdHGHA.3728@tk2msftngp13.phx.gbl...
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com