Results 1 to 3 of 3

Thread: run webservice by PostString in b4a

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2018
    Posts
    25

    Question run webservice by PostString in b4a

    hello

    i write a webservice and upload it to my host, by asp.net. it works fine.
    now i want to use it by B4A.
    i write bellow lines. but job1.Success is false. why?



    Dim job1 As HttpJob
    job1.Initialize("", Me)
    Dim ConString As String = "Data Source= ASPNETDB3.mssql.somee.com;Initial Catalog=ASPNETDB3;User ID=a;Password=***;"
    job1.PostString("http://mywebsite.com/MYServices2.asmx?op=insert_into_test_tbl2","conString =" & ConString & "&name=" & "a" & "&grade=" & 3)
    Wait For (job1) JobDone(job1 As HttpJob)
    If job1.Success Then
    a=job1.GetString
    End If
    job1.Release


    thanks

  2. #2
    Member
    Join Date
    Dec 2010
    Posts
    41

    Re: run webservice by PostString in b4a

    You probably need to set the content type and maybe other headers. It depends on your server configuration.

    https://www.b4x.com/android/forum/th...39413/#content

  3. #3
    Member
    Join Date
    Dec 2010
    Posts
    41

    Re: run webservice by PostString in b4a

    You probably need to set the content type and maybe other headers. It depends on your server configuration.

    https://www.b4x.com/android/forum/th...39413/#content

Tags for this Thread

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