Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

calling by reference and passing string array from Dynamo to Jaguar

2 posts in General Discussion (old) Last posting was on 2000-03-02 13:25:02.0Z
HONGILDONG Posted on 2000-03-01 18:45:33.0Z
Newsgroups: sybase.public.easerver
From: "HONGILDONG" <wer@penta.co.kr>
Subject: calling by reference and passing string array from Dynamo to Jaguar
Date: Thu, 2 Mar 2000 03:45:33 +0900
Lines: 111
MIME-Version: 1.0
Content-Type: text/plain; charset="EUC-KR"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 210.108.181.174
Message-ID: <347_FxtOU86g$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27415
Article PK: 158817

I saw some articles in this news group
about calling by reference and
passing string array from Dynamo to Jaguar
using Dave Wold's JavaWrappers.ssc.

When I tested them, all of them didn't work.

I found a mistake about calling by reference.

--------------------------------------
Dave Wolf's codes.

var user = document.value.user
var password = document.value.password
var passkey = ""
userLogonStatus = comp.of_login (user, password, passkey)

holder = java.CreateObject("org.omg.CORBA.StringHolder","passkey");
helper = new JavaFieldHelper(holder);
value = helper.getString("value");
document.writeln ( value );

Above codes didn't work properly.
--------------------------------------
I modified above codes like followings.

var user = document.value.user
var password = document.value.password
var passkey = ""
holder = java.CreateObject("org.omg.CORBA.StringHolder","passkey");
userLogonStatus = comp.of_login (user, password, holder)

helper = new JavaFieldHelper(holder);
value = helper.getString("value");
document.writeln ( value );
--------------------------------------

But I wasn't able to get it to work about passing string array.

Dave Wolf's codes are followings.

import JavaWrappers.ssc;

array = new JavaArrayHelper("java.lang.String",2);
array[0] = "Dave";
array[1] ="Wolf";
array = array.save();

And I made some codes like followings.

<HTML>
<TITLE>arg_test.stm</TITLE>
<BODY>
<H1>call example with string array argument from dynamo to jaguar</H1>

<!--SCRIPT
import( site.GetRootDocument().location + "/system/JavaWrappers.ssc" );
comp = java.CreateComponent
( "arg_test/n_arg_test", "iiop://wer.penta.co.kr:9100", "jagadmin", "" );
if (comp == null)
{
document.writeln( "Error1 : " + site.GetErrorInfo() );
return;
}

myarr = new JavaArrayHelper("java.lang.String", 2);
myarr[0] = "bbb";
myarr[1] = "bbb";
myarr = myarr.save();

ss = comp.of_stringarray( myarr, 2 );
if (ss == null)
{
document.writeln( "Error2 : " + site.GetErrorInfo() );
return;
}

document.writeln("return : " + ss + "<br>" );
-->

</BODY>
</HTML>

But my codes always generate error.
---------------------------------------------------
Followings are error messages.

Invalid object for method of_stringarray near line 21 in
"/dw_bmt/pass_array_to_jag.stm"

call example with string array argument from dynamo to jaguar

Error2 : Invalid object for method of_stringarray near line 21Invalid object for
method of_stringarray near line 21
----------------------------------------------------

What is my mistakes?

OS : WinNT 4.0 (ServicePack 6, OptionPack 4)
Jaguar : 3.01 (Build 30033)
Dynamo : 3.0.1.694 GA

I tested also above on EAServer 3.5 Developer Edition, Small Business Edition and
Enterprise Edition.
But results are same.

How can I pass string array argument from Dynamo to Jaguar?

Thanks for reading.


Dave Wolf [Sybase] Posted on 2000-03-02 13:25:02.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: calling by reference and passing string array from Dynamo to Jaguar
Date: Thu, 2 Mar 2000 08:25:02 -0500
Lines: 125
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: PPPa10-ResaleAnnapolis1-1R7308.saturn.bbn.com 4.48.176.71
Message-ID: <347_7Mgk$sEh$GA.201@forums.sybase.com>
References: <347_FxtOU86g$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27345
Article PK: 158756

Please contact support, there is a known bug with passing arrays in some
releases of 3.0 and 3.5.

Dave Wolf
Internet Applications Division

"HONGILDONG" <wer@penta.co.kr> wrote in message
news:FxtOU86g$GA.251@forums.sybase.com...
> I saw some articles in this news group
> about calling by reference and
> passing string array from Dynamo to Jaguar
> using Dave Wold's JavaWrappers.ssc.
>
> When I tested them, all of them didn't work.
>
> I found a mistake about calling by reference.
>
> --------------------------------------
> Dave Wolf's codes.
>
> var user = document.value.user
> var password = document.value.password
> var passkey = ""
> userLogonStatus = comp.of_login (user, password, passkey)
>
> holder = java.CreateObject("org.omg.CORBA.StringHolder","passkey");
> helper = new JavaFieldHelper(holder);
> value = helper.getString("value");
> document.writeln ( value );
>
> Above codes didn't work properly.
> --------------------------------------
> I modified above codes like followings.
>
> var user = document.value.user
> var password = document.value.password
> var passkey = ""
> holder = java.CreateObject("org.omg.CORBA.StringHolder","passkey");
> userLogonStatus = comp.of_login (user, password, holder)
>
> helper = new JavaFieldHelper(holder);
> value = helper.getString("value");
> document.writeln ( value );
> --------------------------------------
>
> But I wasn't able to get it to work about passing string array.
>
> Dave Wolf's codes are followings.
>
> import JavaWrappers.ssc;
>
> array = new JavaArrayHelper("java.lang.String",2);
> array[0] = "Dave";
> array[1] ="Wolf";
> array = array.save();
>
> And I made some codes like followings.
>
> <HTML>
> <TITLE>arg_test.stm</TITLE>
> <BODY>
> <H1>call example with string array argument from dynamo to jaguar</H1>
>
> <!--SCRIPT
> import( site.GetRootDocument().location +
"/system/JavaWrappers.ssc" );
> comp = java.CreateComponent
> ( "arg_test/n_arg_test", "iiop://wer.penta.co.kr:9100",
"jagadmin", "" );
> if (comp == null)
> {
> document.writeln( "Error1 : " + site.GetErrorInfo() );
> return;
> }
>
> myarr = new JavaArrayHelper("java.lang.String", 2);
> myarr[0] = "bbb";
> myarr[1] = "bbb";
> myarr = myarr.save();
>
> ss = comp.of_stringarray( myarr, 2 );
> if (ss == null)
> {
> document.writeln( "Error2 : " + site.GetErrorInfo() );
> return;
> }
>
> document.writeln("return : " + ss + "<br>" );
> -->
>
> </BODY>
> </HTML>
>
> But my codes always generate error.
> ---------------------------------------------------
> Followings are error messages.
>
> Invalid object for method of_stringarray near line 21 in
> "/dw_bmt/pass_array_to_jag.stm"
>
> call example with string array argument from dynamo to jaguar
>
> Error2 : Invalid object for method of_stringarray near line 21Invalid
object for
> method of_stringarray near line 21
> ----------------------------------------------------
>
> What is my mistakes?
>
> OS : WinNT 4.0 (ServicePack 6, OptionPack 4)
> Jaguar : 3.01 (Build 30033)
> Dynamo : 3.0.1.694 GA
>
> I tested also above on EAServer 3.5 Developer Edition, Small Business
Edition and
> Enterprise Edition.
> But results are same.
>
> How can I pass string array argument from Dynamo to Jaguar?
>
> Thanks for reading.
>
>