[Openroad-users] OR App Server from within C#
Pete Rabjohns
PRabjohns at atex.com
Tue Feb 26 22:12:38 EST 2008
Working with strings now (after abstracting the OR layer into it's own
class) but integers fail with below.
General failure in Web Method
Put an element into the value safearray failed.
at ORRSOLib.ORPDOClass.SetAttribute(String AttributeName, Object&
AttributeValue)
at MatrixWS.OpenROAD.AddInput(String paramName, String paramType,
Object paramValue) in C:\TEMP\WSGen\MatrixWebService\OpenROAD.cs:line 40
at MatrixSOA.Subscriberdetails(Subscriberdetails_Input oInput) in
C:\TEMP\WSGen\MatrixWebService\MatrixSOA.asmx.cs:line 20</resulttext>
________________________________
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of
Neil.Warnock at luminary.co.uk
Sent: 25 February 2008 17:59
To: openroad-users at peerlessit.com
Subject: Re: [Openroad-users] OR App Server from within C#
Hi Pete,
Maybe the problem is one of boxing params into objects? See the UKIUA
site /conference/Autumn2005/NeilWarnock_1005.pdf slide 16.
...
try {
/* declare params to pass */
pdo.DeclareAttribute("hellostring", "STRING");
pdo.DeclareAttribute("counter" , "INTEGER");
/* set params to pass - use object references */
Object objStr = "Hello AppServer from C#!");
pdo.SetAttribute("hellostring", ref objStr);
Object objInt = 99;
pdo.SetAttribute("counter", ref objInt);
/* Make call - passing an object reference */
Object objPDO = pdo;
rso.CallProc("HelloWorld", null, ref objPDO);
/* process values in the byref pdo */
Console.WriteLine("hellostring = {0}",
pdo.GetAttribute("hellostring").ToString());
Console.WriteLine("counter = {0}",
pdo.GetAttribute("counter").ToString());
HTH
Neil Warnock
Luminary - An Ingres Company
Tel: +44 (0)845 371 4090
Mob: +44 (0)771 265 0291
Email: Neil.Warnock at luminary.co.uk
For more information on Luminary go to http://www.luminary.co.uk
<http://www.luminary.co.uk/>
Luminary Solutions Limited Registered in England No 4854134 VAT Reg No.
829 3166 13
Registered Office: Lacon House, Theobald's Road, London, WC1X 8RW
________________________________
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Pete
Rabjohns
Sent: Monday, February 25, 2008 11:56 AM
To: International OpenROAD Users
Subject: [Openroad-users] OR App Server from within C#
Hi,
Anyone get any examples of calling OR4.1 App Server objects from within
c#?
I'm having problems getting the correct data type into the SetAttribute
method of the ParameterData object.
Regards,
Pete
Pete Rabjohns
Systems Architect
Atex
Email: pete.rabjohns at atex.com
Web: http://www.atex.com <http://www.atex.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080226/c3f33ff0/attachment.html
More information about the Openroad-users
mailing list