Web Services from ASP

Discussion in 'ASP General' started by Jimbo, Jan 20, 2006.

  1. Jimbo

    Jimbo Guest

    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
     
    Jimbo, Jan 20, 2006
    #1
    1. Advertisements

  2. 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/
     
    Martin Honnen, Jan 20, 2006
    #2
    1. Advertisements

  3. 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
     
    Michael D. Kersey, Jan 21, 2006
    #3
  4. Jimbo

    Jimbo Guest

    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" <> wrote in message
    news:uWI%...
    >
    >
    > 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/
     
    Jimbo, Jan 24, 2006
    #4
  5. Jimbo

    Jimbo Guest

    OK,

    I've sorted this using a DOMDocument object.

    Jimbo.

    "Jimbo" <> wrote in message
    news:dr4vpm$q1t$-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" <> wrote in message
    > news:uWI%...
    >>
    >>
    >> 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/

    >
    >
     
    Jimbo, Jan 24, 2006
    #5
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nick
    Replies:
    1
    Views:
    6,626
    Alvin Bruney - ASP.NET MVP
    Sep 12, 2005
  2. Anup
    Replies:
    1
    Views:
    2,919
    Mark Rae
    May 9, 2006
  3. imlakhani

    Web Services Restful Services

    imlakhani, Dec 16, 2009, in forum: Java
    Replies:
    1
    Views:
    532
    Jeffrey H. Coffield
    Dec 16, 2009
  4. va
    Replies:
    0
    Views:
    276
  5. John
    Replies:
    4
    Views:
    645
Loading...

Share This Page