Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: How to call webservice from lan client
Manikanda
Posts: 3
 
How to call webservice from lan clientYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 15 9:14 AM

Is it possible to call a webservice directly from the LAN client? I have web service like  http://localhost:1229/Token.asmx?op=Add .


My web method name is Add.I want to acces this web service  nad call this method from Saleslogix Architect .


Please help me.Thanks in advance.

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to call webservice from lan clientYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 15 9:32 AM

Yes, you can call a web service from a SLX script. SLX scripts are just VBScript. So you can create objects such as XMLHttp to make the calls. If you google "call web service from vbscript" any of those examples you'll find will work in a SLX script just fine. https://www.google.com/search?btnG=1&pws=0&q=call+web+service+from+vbscript&gws_rd=ssl

[Reply][Quote]
Manikanda
Posts: 3
 
Re: How to call webservice from lan clientYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Sep 15 7:53 AM

Hi Ryan,


Thanks For your reply.


I have tired below two links but my code is not working.You have any working code.


https://social.msdn.microsoft.com/Forums/en-US/4f00c08e-0188-48ac-9bd8-78607c8fbfb9/call-a-web-service-from-client-vbscript?forum=asmxandxml 


http://itknowledgeexchange.techtarget.com/vbscript-systems-administrator/consuming-and-using-a-web-service-from-within-vbscript-to-create-a-whois-tool/


Please guide me.


Thanks in advance,


Mani

[Reply][Quote]
Lee Harris
Posts: 23
 
Re: How to call webservice from lan clientYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Sep 15 11:05 AM

Hi Mani,


You will need to edit this code to meet your requirements but it should act as a good starting point. I have used this in the past to query a web service and return a response (this will be set to HTTPPost). 


You may also need to write an additional function to handle the response you get back depending on what your service is returning. Also note that HTTPPost uses a POST request, if you need to perform a GET then just change this value in the function (I have not tried this myself so can't say for sure if it'll work).


 


 


Sub QueryWebService

 


Dim postURL, strQueryString, httpResponse


 


postURL = "http://localhost:1229/Token.asmx"


strQueryString = "op=Add"


Set httpResponse = HTTPPost(postURL, strQueryString)


 


End Sub


 


Function HTTPPost(sUrl, sRequest)


Dim oHTTP


 


    set oHTTP = CreateObject("Microsoft.XMLHTTP")


    oHTTP.open "POST", sUrl,false


    oHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"


    oHTTP.setRequestHeader "Content-Length", Len(sRequest)


    oHTTP.send sRequest


    HTTPPost = oHTTP.responseText


 


End Function


 


 


 


Hope this helps.


 


Lee

[Reply][Quote]
Manikanda
Posts: 3
 
Re: How to call webservice from lan clientYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Oct 15 9:52 AM

Hi Harris,


Thanks. Now i am able to call the webservice from SLX architect.


Thanks,


Mani

[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/22/2024 10:02:09 AM