Web Service Not Working [modified]
-
Good people, Hello. Our webservice is not working. We should be receiving information via an HTTP POST. However, nothing is working. Below are the code files. Let me know what you think. Thanks in advance for any help or information you can provide. (By the way, some information (e.g. class names, connection strings, etc...) has been removed or changed in order to hide any sensitive information.
Imports System.Web.Mail
Imports System.Data
Imports System.Data.SqlClient
Imports System.IOPartial Class hbcertification
Inherits System.Web.UI.Page
Public strBody As String = ""
Public sqlInsertStr As String = ""
Public errStr As String = ""
Public txn_id, first_name, last_name, address_street, address_city, address_state, address_zip, address_country, address_phone, payer_email, Price, key, invoice, payment_date, mc_fee, buyer_ip As String
Dim myConn As New SqlConnection(ConfigurationSettings.AppSettings("ConnectionInfo"))
'*******************************************************************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
strBody += "Test email sent.Customer name: " & Request("first_name") & " " & Request("last_name")
strBody += "
Reg Key: " & Request("key") & "Transaction ID: " & Request("txn_id") & "
Tran Type: " & Request("txn_type")updateFile(Server.MapPath("log.txt"), strBody) txn\_id = Request("txn\_id") first\_name = Request("first\_name") last\_name = Request("last\_name") address\_street = Request("address\_street") address\_city = Request("address\_city") address\_state = Request("address\_state") address\_zip = Request("address\_zip") address\_country = Request("address\_country") address\_phone = Request("address\_phone") payer\_email = Request("payer\_email") Price = Request("Price") key = Request("key") invoice = Request("invoice") payment\_date = Request("payment\_date") mc\_fee = Request("mc\_fee") buyer\_ip = Request("buyer\_ip") If Request("first\_name") <> "" And Request("last\_name") <> "" Then SendMail("jamesrobertson@hotmail.com", "feedback@morris.com", strBody, "Software Order Notification", "sales@morris.com") Else Response.Write("
Email not sent. Name missing.")
End If
Dim sItem As String
Response.Write(" -
Good people, Hello. Our webservice is not working. We should be receiving information via an HTTP POST. However, nothing is working. Below are the code files. Let me know what you think. Thanks in advance for any help or information you can provide. (By the way, some information (e.g. class names, connection strings, etc...) has been removed or changed in order to hide any sensitive information.
Imports System.Web.Mail
Imports System.Data
Imports System.Data.SqlClient
Imports System.IOPartial Class hbcertification
Inherits System.Web.UI.Page
Public strBody As String = ""
Public sqlInsertStr As String = ""
Public errStr As String = ""
Public txn_id, first_name, last_name, address_street, address_city, address_state, address_zip, address_country, address_phone, payer_email, Price, key, invoice, payment_date, mc_fee, buyer_ip As String
Dim myConn As New SqlConnection(ConfigurationSettings.AppSettings("ConnectionInfo"))
'*******************************************************************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
strBody += "Test email sent.Customer name: " & Request("first_name") & " " & Request("last_name")
strBody += "
Reg Key: " & Request("key") & "Transaction ID: " & Request("txn_id") & "
Tran Type: " & Request("txn_type")updateFile(Server.MapPath("log.txt"), strBody) txn\_id = Request("txn\_id") first\_name = Request("first\_name") last\_name = Request("last\_name") address\_street = Request("address\_street") address\_city = Request("address\_city") address\_state = Request("address\_state") address\_zip = Request("address\_zip") address\_country = Request("address\_country") address\_phone = Request("address\_phone") payer\_email = Request("payer\_email") Price = Request("Price") key = Request("key") invoice = Request("invoice") payment\_date = Request("payment\_date") mc\_fee = Request("mc\_fee") buyer\_ip = Request("buyer\_ip") If Request("first\_name") <> "" And Request("last\_name") <> "" Then SendMail("jamesrobertson@hotmail.com", "feedback@morris.com", strBody, "Software Order Notification", "sales@morris.com") Else Response.Write("
Email not sent. Name missing.")
End If
Dim sItem As String
Response.Write("Can you please post just the webservice implementation instead of all? Right now, i don't see any webservice present... is there any? You need to have
WebMethods
in order to call webservice methods. Kindly re-check and update the question with it. -
Can you please post just the webservice implementation instead of all? Right now, i don't see any webservice present... is there any? You need to have
WebMethods
in order to call webservice methods. Kindly re-check and update the question with it.Thank you so much for replying. I have cleaned up the code to only include the web service code-behind and related ASP/XML code. Thanks in advance for any insight you can provide.