Following from here, are a few items I had to research.
First of all issuing the simple
use MicrosoftDynamicsAX
create assembly
[AssemblyClassWithWSMethod]
from 'c:\Users\icordobin\ClassWithWSMethod.dll'
with permission_set = external_access
will raise an error that some settings / rights are not enabled on the server. You will have to run
sp_configure 'show advanced options', 1;
go
reconfigure;
go
sp_configure 'clr
enabled', 1;
go
reconfigure;
go
alter database
MicrosoftDynamicsAX set trustworthy on
create procedure
[CallWSMethod]
@parm1 nvarchar(max),
@parm2 nvarchar(max),
@parm3 bit,
@parmOut nvarchar(max) output
as
external name AssemblyClassWithWSMethod.[AssemblyName.ClassName].MethodName
declare @return_value int,
@parm1 nvarchar(max),
@parm2 nvarchar(max),
@parm3 bit,
@parmOut nvarchar(max)
exec @return_value = [dbo].[CallWSMethod]
@parm1 = '',
@parm2 = '',
@parm3 =
true,
@parmOut = @parmOut output
select @parmOut as
N'@parmOut'
select 'Return Value' = @return_value
GO
No comments:
Post a Comment