Results 1 to 4 of 4

Thread: post to .net webservice using inet control[resolved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    Resolved post to .net webservice using inet control[resolved]

    I am trying to use a .net webservice in a vb6 app, but without using a control i have to then put on the client machines.

    i have tried posting data to the webservice using the inet control but i keep getting a malformed url error, i'm not sure if im even posting to the correct place

    Code:
        
        wsurl = "http://localhost/Email/Email.asmx/SendEmail"
        postdata = "isHTML=true&[email protected]&[email protected]&Subject=this is a test email&Body=this is the body of the test email&applicationName=testapp2&emailID=test2"
        Inet1.Execute wsurl, "POST", postdata
    Last edited by sagey; May 31st, 2005 at 11:06 AM. Reason: [resolved]

  2. #2
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Re: post to .net webservice using inet control

    VB Code:
    1. wsurl = "http://localhost/Email/Email.asmx/SendEmail"
    2.     postdata = "isHTML=true&[email protected]&[email protected]&Subject=this is a test email&Body=this is the body of the test email&applicationName=testapp2&emailID=test2"
    3.     Inet1.Execute wsurl, "POST", postdata

    I remember encountering something roughly the same not so long ago, the spaces in the strings are fine as they are automatically transformed to +'s along the way.
    But, when you are querying the Sendemail part you are adding your string to the URL without sending it as a query... here is how i believe it should look -

    VB Code:
    1. wsurl = "http://localhost/Email/Email.asmx/SendEmail?" 'note the ? to  show a query
    2.     postdata = "isHTML=true&[email protected]&[email protected]&Subject=this is a test email&Body=this is the body of the test email&applicationName=testapp2&emailID=test2"
    3.     Inet1.Execute wsurl, "POST", postdata

    If it helps Rate me, if not, then sorry, but i tried
    Zeegnahtuer?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    Re: post to .net webservice using inet control [resolved]

    The problem was me being ****e.

    i had not dimmed the variable so i was getting an error because of them.
    now sorted

  4. #4
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Re: post to .net webservice using inet control [resolved]

    Quote Originally Posted by sagey
    The problem was me being ****e.

    i had not dimmed the variable so i was getting an error because of them.
    now sorted
    Glad to hear it, please add the green Checkmark to your thread and tag the subject with [resolved]
    Zeegnahtuer?

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