6/7/2025 5:21:35 AM
|
|
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!
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
|
|
|
|
SLX -> .Net Plugin -> WebServices
Posted: 09 May 07 5:40 AM
|
fiogf49gjkf0d Hi guys,
I'm battling here, to get to a WebService. I haven't used the XMLDOC method to call a WebService, as i'm not so sure how it works.
What i have done, is created a .net Plugin to expose the Webservices. I'm using VB.net. Not sure if i'm missing something, but get the following error: ClassName "clsAMLInterface" not found.
This is my .net code:
Imports AMLInterface.AMLInterface Imports System.Collections Imports System.Data Imports Sage.SalesLogix.NetExtensions Imports System.Runtime.InteropServices
Namespace slxWebservice Public Class clsAMLInterface Function getBusinessUnitList() Dim x As Array x = CType(My.WebServices.AMLInterfaceService.getBusinessUnitList(), Array) Return x End Function End Class
End Namespace
This is SLX code:
loader = Application.Managed.Create("AMLInterface","clsAMLInterface") set x = Application.Managed.Run (loader,"")
What am i doing wrong. Dont really get the C# code examples. The return type for the Method in the WebService is an Custom datatype
Any help will be appreciated.
Rgds, D |
|
|
|
Re: SLX -> .Net Plugin -> WebServices
Posted: 09 May 07 7:38 AM
|
fiogf49gjkf0d Ok,
i've tried to simplify this problem, but 1st just trying to get a value back from my .dll
My .net Code:
Imports AMLInterface.AMLInterface Imports System.Collections Imports System.Data Imports Sage.SalesLogix.NetExtensions Imports System.Runtime.InteropServices
Namespace slxWebservice Public Class Class1 Inherits Sage.SalesLogix.NetExtensions.BaseRunnable
Public Overrides Function Run(ByVal Args() As Object) As Object Dim x As Integer x = 10 Return x End Function
End Class End Namespace
My SLX Code:
Sub Button1Click(Sender) dim loader dim i stop loader = Application.Managed.Create("ClassLibrary1","slxWebservice.Class1") i = Application.Managed.Run(loader, "Hello") msgbox i
End Sub
When i created the object, my Loader value stays blank. No error this time. What am i missing. Please help.
|
|
|
|
Re: SLX -> .Net Plugin -> WebServices
Posted: 23 May 07 2:46 PM
|
fiogf49gjkf0d Hmmm looks like you might be missing a few things.
First you have the interopservices, but you left off the Public Class....
If you are going to be making HTTP calls you are really passing through some application boundaries and should need (in the first example, but not the second):
Public Class Jason Inherits System.MarshalByRefObject Implements IRunnable
I know you are using BaseRunnable, which shouldnt be an issue, but these are tried and tested examples from the DEV 7.0 book we use for training in Scottsdale. I know the code in this book on page 350 works I am trying to give you a quick answer to get you working.
Your Application.Managed.Create("ClassLibrary1","slxWebservice.Class1") line can be ok, but this should really be checked since the projectname and namespace are different, which is something you might have changed yourself in testing. Normally I would see in a simple example Application.Managed.Create("AssemblyName","AssemblyName.ClassName") because the Assembly and Project would be named the same, but againt this is highly changeable and yours could be completely correct. |
|
|
|
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!
|
|
|
|
|
|
|
|