tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alicia Sánchez-Mora" <aliciasm...@gmail.com>
Subject Re: Inicialization of an UnsignedByte variable
Date Thu, 15 Feb 2007 12:10:58 GMT
 Hello again,

ok, maybe I am not in the appropiate mailing list, but maybe you have a
clue. I have exposed my problem in other mailing lists, the axis one, but I
got no answer. I tried waht you propoused but nothing works. I explain here
my problem in more detail and maybe you can help me.

I have a Java client that has to call some services implemented in C++. For
my alication I use axis/tomcat, for the C++ services gsoap is used. The
method in Java is implemented as follows:

*public* String reqAuthI1 (String src, String dst, RegOpts opts){
final int puzzle = 10;
final int signblob = 1;
final int result = 1;
*final* UnsignedByte ptr = *new*  UnsignedByte("this is a test") ;
*final* Base64  blob = *new* Base64 (ptr, 10, *"id"*, *"type"*, *"options"*
);

Sde_ServiceLocator sdeservice = *new* Sde_ServiceLocator();
sdeservice.setsdeEndpointAddress(*"http://127.0.0.1:7700"*);
Sde_cmd_executor executor = sdeservice.getsde();
String result_respAuthI1 = executor.respAuthI1(src, dst, puzzle, blob,
signblob, result);

*return* dummy_result;

}


The UnsignedByte class is within this package org.apache.axis.types. As you
can see I can pass to the constructor a String or a Long. If I pass a String
tomcat trows a NumberFromatException. So what I did was to create a custom
class UnsignedByte in yhis way

public class UnsignedByte{

private String str;
public UnsignedByte (String str){
this.str = str;
}

}


Now, the problem is that when I call the function respAuthI1,  in the server
side the blob length is cero. I do not have a clue where the problem comes
from. IAny idea?

Thanks in advance



On 2/14/07, Christopher Schultz <chris@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> David,
>
> David Delbecq wrote:
> > Well, your question should probably go to appropriate mailing list. I
> > don't know what libraries your found your UnsignedByte Object in, but
> > it's that library's mailing list which is appropriate for your question.
> >
> > Not knowing anything about your library, i'll dare to guess that "abc"
> > is not in the range of 'unsigned byte' which typically is [0,255]
>
> Yeah. If you are trying to convert 0xabc into a single unsigned byte, it
> just ain't gonna fit. That's two bytes right there, buddy.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF00gg9CaO5/Lv0PARAgAyAJkB1qA4bvAF1W5rhklltLGdrIVR/QCcCF2L
> /ulsy2Sk4lK28t4l5zcnz0o=
> =0b8S
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message