Results 1 to 3 of 3

Thread: XMLHTTP Get Method & WebService (also Posted in Classic Visual Basic)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2004
    Posts
    308

    XMLHTTP Get Method & WebService (also Posted in Classic Visual Basic)

    Hey Chaps.

    Any ideas why I can't consume a .Net WebService using the XMLHTTP ??

    The code below doesn't work & I don't understand why as, in reality, all the WebService is returning is an XML string ??

    VB Code:
    1. Dim x As New MSXML2.DOMDocument30
    2. Dim h As New MSXML2.XMLHTTP30
    3.  
    4. h.open "GET", "http://localhost/SPXTEST/Service1.asmx/HelloWorld", False
    5.  
    6. x.Load h.responseXML


    I know you should consume using SOAP etc etc but I don't want the aggro....

    Thanks

    Chubby.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: XMLHTTP Get Method & WebService (also Posted in Classic Visual Basic)

    But a Web Service expects a POST request with a special message. A SOAP request, to be precise.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2004
    Posts
    308

    Re: XMLHTTP Get Method & WebService (also Posted in Classic Visual Basic)

    Agreed, but I don't want to got to the effort of forcing SOAP in this design since I know precisely each time what the XML will be returning and I've no need of marshalling and minimal parsing. I've discovered the resolution though as I placed resolved in the other forum:

    [Pah ! What a resolution ! I found out that both the methods HTTPPost & HTTPGet are commented out in the Machine.Config files for the .Net Framework. I can only suppose this is to force you into uisng WSDL instead of HTTP Gets & Posts for .Net... Anyhoo I uncommented them and away I go...

    Man does that save some pain.... ]

    Cheers.

    Chubby.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width