I need some direction as to how to send form data from my web page form to an ASMX web service using Javascript/Ajax. A developer has given me an https link to the service that he programmed using C#. I'm not very familiar with C# but I believe I should be able to post using AJAX? Any explanation of this process and/or links to information or tutorials would be appreciated.
Example URI: http://ift.tt/1baqZmG
On the asmx page I need to call the SetAccountPassword operation which is what is called when the user submits their information in the Registration form. They are then sent a confirmation email to the email they submitted in the form.
This is an example of the SOAP request and response for the page:
SetAccountPassword
Test
The test form is only available for requests from the local machine.
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /CRMDEMO/CRMService.asmx HTTP/1.1
Host: test.azurewebsites.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "urn:http://ift.tt/1b4ISTs"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://ift.tt/ra1lAU" xmlns:xsd="http://ift.tt/tphNwY" xmlns:soap="http://ift.tt/sVJIaE">
<soap:Body>
<SetAccountPassword xmlns="urn:services.website.com">
<AuthCode>string</AuthCode>
<EmailAddress>string</EmailAddress>
<AccountCode>string</AccountCode>
<NewPassword>string</NewPassword>
<ConfirmPassword>string</ConfirmPassword>
</SetAccountPassword>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://ift.tt/ra1lAU" xmlns:xsd="http://ift.tt/tphNwY" xmlns:soap="http://ift.tt/sVJIaE">
<soap:Body>
<SetAccountPasswordResponse xmlns="urn:services.website.com">
<SetAccountPasswordResult>base64Binary</SetAccountPasswordResult>
</SetAccountPasswordResponse>
</soap:Body>
</soap:Envelope>
Aucun commentaire:
Enregistrer un commentaire