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!
		
			 | 
		
			
		
			 | 
				
					Calling .Net web services from SLX  
						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? | 
				 
					 | 
				 
			  | 
		
			 |  | 
		
			 | 
				
					Re: Calling .Net web services from SLX  
						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? | 
				 
					 | 
				 
			  | 
		
			 | 
				
					Re: Calling .Net web services from SLX  
						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 | 
				 
					 | 
				 
			  | 
		
			 |