Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - ASP/ASP.NET/Web Services/Other
Forum to discuss building external web applications for SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ASP/ASP.NET/Web Services/Other | New ThreadView:  Search:  
 Author  Thread: Calling .Net web services from SLX
Jon Hillyer
Posts: 2
 
Calling .Net web services from SLXYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Apr 07 1:46 PM
fiogf49gjkf0d
Can anyone point me in the right direction on how to call a .Net web service and get the coresponding response.

The request I need to make (from the .ASMX) is:

POST /SLI/SLI.ASMX HTTP/1.1
Host: 10.100.100.20
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://theserver/ValidateLogin"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ValidateLogin xmlns="http://theserver/">
<validateLogin>
<LOGIN_ID>string</LOGIN_ID>
<ASSWORD>string</PASSWORD>
</validateLogin>
</ValidateLogin>
</soap:Body>
</soap:Envelope>

The response will be:
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://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ValidateLoginResponse xmlns="http://theserver/">
<ValidateLoginResult>
<LOGIN_RESULT>string</LOGIN_RESULT>
<LOGIN_MESSAGE>string</LOGIN_MESSAGE>
<customer_Details>
<TITLE>string</TITLE>
<FIRSTNAME>string</FIRSTNAME>
<SURNAME>string</SURNAME>
</customer_Details>
</ValidateLoginResult>
</ValidateLoginResponse>
</soap:Body>
</soap:Envelope>

Any ideas?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Calling .Net web services from SLXYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Apr 07 2:43 PM
Take a look at this thread here: http://www.slxdeveloper.com/forum.aspx?forumid=4001&postid=6138

It gives two approaches to doing this. The only difference between your webservice and the scenarios mentioned is you'll need to account for the differences in parsing the XML result to get your values.

Make sense?
[Reply][Quote]
Jon Hillyer
Posts: 2
 
Re: Calling .Net web services from SLXYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 07 3:51 AM
fiogf49gjkf0d
Thanks Ryan. We've just come across a small issue. The header we need to send looks like this...

POST /SLI/SLI.ASMX HTTP/1.1
Host: 10.100.100.20
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://theserver/ValidateLogin"

The code looks like...

set oXMLDoc = CreateObject("Msxml2.DOMDocument")
set oXMLHTTP = CreateObject("Msxml2.XMLHTTP.3.0")
oXMLHTTP.onreadystatechange = getRef("HandleStateChange")
call oXMLHTTP.open("POST", "https://10.100.100.20/SLI/SLI.ASMX/sync_test", false)
call oXMLHTTP.setRequestHeader("Content-Type", "text/xml")

But I don't know how to put the SOAPAction into the header (as I don't think I can do another oXMLHTTP.setRequestHeader).

Any ideas?
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: Calling .Net web services from SLXYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Apr 07 7:52 AM
fiogf49gjkf0d
John,

You are able to call the setRequestHeader more times. Specifically you can call it for each of the header values you want to set.

Mark
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 11:05:09 AM