Re: Client crashed while recieving response

2007-09-26 Thread Dimuthu Gamage
Download the latest axis2/java snapshot from,
http://people.apache.org/dist/axis2/nightly/axis2-SNAPSHOT-bin.zip

Thanks
Dimuthu


On 9/27/07, Sathya Raghunathan <[EMAIL PROTECTED]> wrote:
>
>
> Hi Dimuthu,
>
> I am working with axis2-1.3 version. So what is the latest now?
>
> Thanks
> Sathya
> 
> From: Dimuthu Gamage [EMAIL PROTECTED]
> Sent: Thursday, September 27, 2007 10:22 AM
> To: Apache AXIS C User List
> Subject: Re: Client crashed while recieving response
>
> Hi Sathya,
>
> Since your service is running fine, the error should be in the deserialize
> logic. And there were some bugs in the deserialize logic. But I think in the
> latest axis2/java source svn, these bugs are fixed.  (At least current test
> cases are working fine)
>
> And AFIK the second problem (The server crash) was also  a known one, not
> keeping copy of strings inside adb objects. That is also fixed in the latest
> svn.
>
> Thanks
> Dimuthu
>
> On 9/25/07, Sathya Raghunathan <[EMAIL PROTECTED] [EMAIL PROTECTED]>> wrote:
> Hi Dimuthu,
>
> I am forwarding this mail, because there was a failure in delivery last
> time.
>
> Thanks for the explanation. I understood the concept behind recreating an
> adb object at the client side. The only thing is, when i access the output
> message from the test client code, the client crashes
>
> I checked with the tcpmon utility.  From the tcpmon, I am able to see the
> input message value and the output message field's values in the xml format.
> I have also attached the sample of the tcpmon.log.
>
> So, i believe that my service is working. But why am i not able to print
> the value in the test client code?
> Issue No 1:
>
> In my test client code (attached parse_client.c)
> I am printing the value of a field in output message as below.
> printf ("The address =
> %u\n",adb_pInterchange_get_pInterchange(parse_res,env)); This printf gives
> address as 0.
>
> And the client code crashed at the next printf because this address is  0
> and i am dereferencing it.
> printf("The internal intref number = %u\n",
> adb_INTERCHANGE_get_internal_intref_no(adb_pInterchange_get_pInterchange(parse_res,env),env));
> // Crashed here
>
> and the gdb output is below. If you can see _INTERCHANGE=0x0. It is
> strange.
> 0x0041257f in adb_INTERCHANGE_get_internal_intref_no
> (_INTERCHANGE=0x0, env=0x698340) at adb_INTERCHANGE.c:1811
> 1811return _INTERCHANGE-> attrib_internal_intref_no;
> (gdb) where
> #0  0x0041257f in adb_INTERCHANGE_get_internal_intref_no
> (_INTERCHANGE=0x0, env=0x698340) at adb_INTERCHANGE.c:1811
> #1  0x0045b9f3 in main (argc=1, argv=0x7fff8906) at
> parse_client.c:47
>
> Issue No 2:
>
> The server still runs at this point. Now the second time i run the client,
> the server crashes. The gdb output for this is
>
> 0x00313da77180 in strlen () from /lib64/libc.so.6
> (gdb) where
> #0  0x00313da77180 in strlen () from /lib64/libc.so.6
> #1  0x2af14c13 in axutil_strlen (s=0x60  bounds>) at string.c:475
> #2  0x2c0a83cf in adb_INTERCHANGE_serialize
> (_INTERCHANGE=0x71edb0, env=0x7112b0, parent=0x71f260, has_parent=1)
> at adb_INTERCHANGE.c:1379
> #3  0x2c0edd81 in adb_pInterchange_serialize
> (_pInterchange=0x71ecf0, env=0x7112b0, parent=0x71b390, has_parent=0)
> at adb_pInterchange.c:282
> #4  0x2c0f43de in axis2_svc_skel_ParseMessage_invoke
> (svc_skeleton=0x71c880, env=0x7112b0, content_node=0x71ac30,
> msg_ctx=0x71b220) at axis2_svc_skel_ParseMessage.c:159
> #5  0x2b37e337 in
> axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync (msg_recv= optimized out>, env=0x7112b0,
> msg_ctx=0x71df40, new_msg_ctx=0x71b220) at
> raw_xml_in_out_msg_recv.c:209
> #6  0x2b37e001 in axis2_msg_recv_receive_impl (msg_recv=0x6f5e20,
> env=0x7112b0, msg_ctx=0x71df40,
> callback_recv_param=) at msg_recv.c:304
> #7  0x2b3770f5 in axis2_engine_receive (engine=0x71aab0,
> env=0x7112b0, msg_ctx=0x71df40) at engine.c:288
> #8  0x2aab87af in
> axis2_http_transport_utils_process_http_post_request (env=0x7112b0,
> msg_ctx=0x71df40,
> in_stream=, out_stream=,
> content_type=0x71c6c0 "text/xml;charset=UTF-8",
> content_length=, soap_action_header=0x712d10,
> request_uri=0x71e0b0 " http://127.0.0.1:9090/axis2/services/parseMessage <
> http://127.0.0.1:9090/axis2/services/parseMessage> ") at
> http_transport_utils.c:485
> #9  0x2aab690a in axis2_http_worker_process_request
> (http_worker=0x712180, env=0x7112b0, svr_conn=0x71c9c0,
> simple_request=0x71b650) at http_worker.c:299
> #10 0x2b7dbeae in axis2_svr_thread_worker_func (thd=0x71c970,
> data=0x71c990) at http_svr_thread.c:256
> #11 0x00313ea061c5 in start_thread () from /lib64/libpthread.so.0
> #12 0x00313dad062d in clone () from /lib64/libc.so.6
>
> Let me know if you need any further information from me.
>
> Thanks
> Sathya
>
> --

RE: Client crashed while recieving response

2007-09-26 Thread Sathya Raghunathan

Hi Dimuthu,

I am working with axis2-1.3 version. So what is the latest now?

Thanks
Sathya

From: Dimuthu Gamage [EMAIL PROTECTED]
Sent: Thursday, September 27, 2007 10:22 AM
To: Apache AXIS C User List
Subject: Re: Client crashed while recieving response

Hi Sathya,

Since your service is running fine, the error should be in the deserialize 
logic. And there were some bugs in the deserialize logic. But I think in the 
latest axis2/java source svn, these bugs are fixed.  (At least current test 
cases are working fine)

And AFIK the second problem (The server crash) was also  a known one, not 
keeping copy of strings inside adb objects. That is also fixed in the latest 
svn.

Thanks
Dimuthu

On 9/25/07, Sathya Raghunathan <[EMAIL PROTECTED]> 
wrote:
Hi Dimuthu,

I am forwarding this mail, because there was a failure in delivery last time.

Thanks for the explanation. I understood the concept behind recreating an adb 
object at the client side. The only thing is, when i access the output message 
from the test client code, the client crashes

I checked with the tcpmon utility.  From the tcpmon, I am able to see the input 
message value and the output message field's values in the xml format. I have 
also attached the sample of the tcpmon.log.

So, i believe that my service is working. But why am i not able to print the 
value in the test client code?
Issue No 1:

In my test client code (attached parse_client.c)
I am printing the value of a field in output message as below.
printf ("The address = %u\n",adb_pInterchange_get_pInterchange(parse_res,env)); 
This printf gives address as 0.

And the client code crashed at the next printf because this address is  0 and i 
am dereferencing it.
printf("The internal intref number = %u\n", 
adb_INTERCHANGE_get_internal_intref_no(adb_pInterchange_get_pInterchange(parse_res,env),env));
 // Crashed here

and the gdb output is below. If you can see _INTERCHANGE=0x0. It is strange.
0x0041257f in adb_INTERCHANGE_get_internal_intref_no (_INTERCHANGE=0x0, 
env=0x698340) at adb_INTERCHANGE.c:1811
1811return _INTERCHANGE-> attrib_internal_intref_no;
(gdb) where
#0  0x0041257f in adb_INTERCHANGE_get_internal_intref_no 
(_INTERCHANGE=0x0, env=0x698340) at adb_INTERCHANGE.c:1811
#1  0x0045b9f3 in main (argc=1, argv=0x7fff8906) at 
parse_client.c:47

Issue No 2:

The server still runs at this point. Now the second time i run the client, the 
server crashes. The gdb output for this is

0x00313da77180 in strlen () from /lib64/libc.so.6
(gdb) where
#0  0x00313da77180 in strlen () from /lib64/libc.so.6
#1  0x2af14c13 in axutil_strlen (s=0x60 ) 
at string.c:475
#2  0x2c0a83cf in adb_INTERCHANGE_serialize (_INTERCHANGE=0x71edb0, 
env=0x7112b0, parent=0x71f260, has_parent=1)
at adb_INTERCHANGE.c:1379
#3  0x2c0edd81 in adb_pInterchange_serialize (_pInterchange=0x71ecf0, 
env=0x7112b0, parent=0x71b390, has_parent=0)
at adb_pInterchange.c:282
#4  0x2c0f43de in axis2_svc_skel_ParseMessage_invoke 
(svc_skeleton=0x71c880, env=0x7112b0, content_node=0x71ac30,
msg_ctx=0x71b220) at axis2_svc_skel_ParseMessage.c:159
#5  0x2b37e337 in 
axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync (msg_recv=, env=0x7112b0,
msg_ctx=0x71df40, new_msg_ctx=0x71b220) at raw_xml_in_out_msg_recv.c:209
#6  0x2b37e001 in axis2_msg_recv_receive_impl (msg_recv=0x6f5e20, 
env=0x7112b0, msg_ctx=0x71df40,
callback_recv_param=) at msg_recv.c:304
#7  0x2b3770f5 in axis2_engine_receive (engine=0x71aab0, env=0x7112b0, 
msg_ctx=0x71df40) at engine.c:288
#8  0x2aab87af in axis2_http_transport_utils_process_http_post_request 
(env=0x7112b0, msg_ctx=0x71df40,
in_stream=, out_stream=, 
content_type=0x71c6c0 "text/xml;charset=UTF-8",
content_length=, soap_action_header=0x712d10,
request_uri=0x71e0b0 " http://127.0.0.1:9090/axis2 /services/parseMessage 
 ") at 
http_transport_utils.c:485
#9  0x2aab690a in axis2_http_worker_process_request 
(http_worker=0x712180, env=0x7112b0, svr_conn=0x71c9c0,
simple_request=0x71b650) at http_worker.c:299
#10 0x2b7dbeae in axis2_svr_thread_worker_func (thd=0x71c970, 
data=0x71c990) at http_svr_thread.c:256
#11 0x00313ea061c5 in start_thread () from /lib64/libpthread.so.0
#12 0x00313dad062d in clone () from /lib64/libc.so.6

Let me know if you need any further information from me.

Thanks
Sathya

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED]



 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipi

Re: Client crashed while recieving response

2007-09-26 Thread Dimuthu Gamage
Hi Sathya,

Since your service is running fine, the error should be in the deserialize
logic. And there were some bugs in the deserialize logic. But I think in the
latest axis2/java source svn, these bugs are fixed.  (At least current test
cases are working fine)

And AFIK the second problem (The server crash) was also  a known one, not
keeping copy of strings inside adb objects. That is also fixed in the latest
svn.

Thanks
Dimuthu

On 9/25/07, Sathya Raghunathan <[EMAIL PROTECTED]> wrote:
>
> Hi Dimuthu,
>
> I am forwarding this mail, because there was a failure in delivery last
> time.
>
> Thanks for the explanation. I understood the concept behind recreating an
> adb object at the client side. The only thing is, when i access the output
> message from the test client code, the client crashes
>
> I checked with the tcpmon utility.  From the tcpmon, I am able to see the
> input message value and the output message field's values in the xml format.
> I have also attached the sample of the tcpmon.log.
>
> So, i believe that my service is working. But why am i not able to print
> the value in the test client code?
> Issue No 1:
>
> In my test client code (attached parse_client.c)
> I am printing the value of a field in output message as below.
> printf ("The address =
> %u\n",adb_pInterchange_get_pInterchange(parse_res,env)); This printf gives
> address as 0.
>
> And the client code crashed at the next printf because this address is  0
> and i am dereferencing it.
> printf("The internal intref number = %u\n",
> adb_INTERCHANGE_get_internal_intref_no(adb_pInterchange_get_pInterchange(parse_res,env),env));
> // Crashed here
>
> and the gdb output is below. If you can see _INTERCHANGE=0x0. It is
> strange.
> 0x0041257f in adb_INTERCHANGE_get_internal_intref_no
> (_INTERCHANGE=0x0, env=0x698340) at adb_INTERCHANGE.c:1811
> 1811return _INTERCHANGE-> attrib_internal_intref_no;
> (gdb) where
> #0  0x0041257f in adb_INTERCHANGE_get_internal_intref_no
> (_INTERCHANGE=0x0, env=0x698340) at adb_INTERCHANGE.c:1811
> #1  0x0045b9f3 in main (argc=1, argv=0x7fff8906) at
> parse_client.c:47
>
> Issue No 2:
>
> The server still runs at this point. Now the second time i run the client,
> the server crashes. The gdb output for this is
>
> 0x00313da77180 in strlen () from /lib64/libc.so.6
> (gdb) where
> #0  0x00313da77180 in strlen () from /lib64/libc.so.6
> #1  0x2af14c13 in *axutil_strlen *(s=0x60  bounds>) at string.c:475
> #2  0x2c0a83cf in *adb_INTERCHANGE_serialize*(_INTERCHANGE=0x71edb0, 
> env=0x7112b0, parent=0x71f260, has_parent=1)
> at adb_INTERCHANGE.c:1379
> #3  0x2c0edd81 in adb_pInterchange_serialize
> (_pInterchange=0x71ecf0, env=0x7112b0, parent=0x71b390, has_parent=0)
> at adb_pInterchange.c:282
> #4  0x2c0f43de in axis2_svc_skel_ParseMessage_invoke
> (svc_skeleton=0x71c880, env=0x7112b0, content_node=0x71ac30,
> msg_ctx=0x71b220) at axis2_svc_skel_ParseMessage.c:159
> #5  0x2b37e337 in
> axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync (msg_recv= optimized out>, env=0x7112b0,
> msg_ctx=0x71df40, new_msg_ctx=0x71b220) at
> raw_xml_in_out_msg_recv.c:209
> #6  0x2b37e001 in axis2_msg_recv_receive_impl (msg_recv=0x6f5e20,
> env=0x7112b0, msg_ctx=0x71df40,
> callback_recv_param=) at msg_recv.c:304
> #7  0x2b3770f5 in axis2_engine_receive (engine=0x71aab0,
> env=0x7112b0, msg_ctx=0x71df40) at engine.c:288
> #8  0x2aab87af in
> axis2_http_transport_utils_process_http_post_request (env=0x7112b0,
> msg_ctx=0x71df40,
> in_stream=, out_stream=,
> content_type=0x71c6c0 "text/xml;charset=UTF-8",
> content_length=, soap_action_header=0x712d10,
> request_uri=0x71e0b0 " http://127.0.0.1:9090/axis2/services/parseMessage
> ") at
> http_transport_utils.c:485
> #9  0x2aab690a in axis2_http_worker_process_request
> (http_worker=0x712180, env=0x7112b0, svr_conn=0x71c9c0,
> simple_request=0x71b650) at http_worker.c:299
> #10 0x2b7dbeae in axis2_svr_thread_worker_func (thd=0x71c970,
> data=0x71c990) at http_svr_thread.c:256
> #11 0x00313ea061c5 in start_thread () from /lib64/libpthread.so.0
> #12 0x00313dad062d in clone () from /lib64/libc.so.6
>
> Let me know if you need any further information from me.
>
> Thanks
> Sathya
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Question on user defined faults and multithreading (Please clarify this urgently for me)

2007-09-26 Thread Sathya Raghunathan
Hi

1) I can understand that multithreading is taken care of by
axis2_http_server after reading one of the mailing lists. For a new request,
a worker thread is created. I would like to know if the number of threads
can be configured or not.
Should i modify any parameter in the httpd.conf for this?

2) I read from one of your mailing list that user defined soap faults can be
sent as an element as part of soap Body by using the
AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_FAILURE); and
   AXIS2_ERROR_SET_ERROR_NUMBER(env->error, AXIS2_ERROR_FOO);

But how and where can we create this AXIS2_ERROR_FOO with a custom error
message? Which function to call, to create the error number for
AXIS2_ERROR_FOO? I saw that axis error.c file has all the axis related error
messages defined. Similarly where to define the the AXIS2_ERROR_FOO?

Please clarify

Thank you so much for all the support you have given till now

Regards
Sathya

On 9/26/07, Sathya Raghunathan <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> 1) How to build a multithreaded service using axis2c? Can wsdl2c tool
> generate C code with multithreading functionality? If not, what is the way
> to implement multithreading?
> 2) Can we give user defined faults in wsdl file? How will wsdl2c generate
> code corresponding to the faults? Will the code generate any structures for
> these fault types? I have an example wsdl for this. But i am not able to
> generate code, because wsdl2c errors out saying "No element type is defined
> for message faultMethodRequest"
> Please clarify.
>
>
> Below is the wsdl for user defined faults service which takes a single
> integer and generates faults based on that integer value:
>
>
> http://schemas.xmlsoap.org/wsdl/"; 
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
> " xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="
> http://www.roguewave.com/rwsf/webservice/fault"; 
> targetNamespace="http://www.roguewave.com/rwsf/webservice/fault
> " name="Fault">
>   
> 
>   
>   
> 
>   
>   
> 
>   
>   
> 
> 
>   
>   
> 
>   
>   
>   
>   
> 
>   
>   
>  transport="http://schemas.xmlsoap.org/soap/http"/
> >
> 
>   
>   
> http://www.roguewave.com/rwsf/webservice/"/
> >
>   
>   
> http://www.roguewave.com/rwsf/webservice/"/
> >
>   
>   
> 
>   
>   
> 
>   
> 
>   
>   
> 
>   http://localhost:8090/fault/Fault"/
> >
> 
>   
> 
>
>
> Thanks
> Sathya
>
>
>


RE: Compiling and runtime errors WSDL2C

2007-09-26 Thread Callner, David A.
Is anyone going to look at this?  I would really appreciate it.  I'd
hate to have to scratch using Axis2/C.




From: Callner, David A. [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 25, 2007 8:34 AM
To: Apache AXIS C User List
Subject: RE: Compiling and runtime errors WSDL2C


Attached is the schema.  Thanks for your help.




From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 20, 2007 12:34 AM
To: Apache AXIS C User List
Subject: Re: Compiling and runtime errors WSDL2C


Hi David,
This should be most probably due to an unsupported
schema by wsdl2c templates. 
We dont have access to the schema at
http://shag.mitre.org:28080/SoaCenter/SoaSimRegistry?xsd=1 which is
imported by the wsdl.

So please send us the schema, so we can exactly figure
out the problem.

Thanks,
Dimuthu



On 9/19/07, Callner, David A. <[EMAIL PROTECTED]>
wrote: 

NOTE: I am creating a client wsdl2c -uri
SoaSimRegistry.wsdl -d adb -u
-l c

Axis2-1.3/Java and axis2c-bin-1.0.0-linux/C

I'm getting the following compile time errors.
After running the
WSDL2C I get compile time errors of first_node
= parent.  first_node is 
not defined in the function.   This is for all
requests that do not
have data in the response (void), and it
happens in the deserialize
generetaed routines.  Ok so I fixed those
compile errors by commenting
out the lines first_node = parent.  Now I'm
getting runtime errors with 
the requests.  Keep in mind that I am able to
run the wsdl2java.sh code
and everything works good so I know that the
problem lies in the wsdl2c
generated code.

I'm sure the last lines output will tell you
where in the generated 
code the error is happening.  I'm assuming that
most generated code is
very similar.  Let me know if you need further
information.

The log is below and the WSDL is attached:


[Wed Sep 19 11:24:18 2007] [debug] phase.c(113)
axis2_handler_t
*request_uri_based_dispatcher added to the
index 0 of the phase
Transport
[Wed Sep 19 11:24:18 2007] [debug] phase.c(113)
axis2_handler_t
*soap_message_body_based_dispatcher added to
the index 0 of the phase 
Dispatch
[Wed Sep 19 11:24:18 2007] [debug] phase.c(113)
axis2_handler_t
*addressing_based_dispatcher added to the index
1 of the phase Dispatch
[Wed Sep 19 11:24:18 2007] [debug] phase.c(113)
axis2_handler_t 
*soap_action_based_dispatcher added to the
index 2 of the phase
Dispatch
[Wed Sep 19 11:24:18 2007] [debug] phase.c(113)
axis2_handler_t
*dispatch_post_conditions_evaluator added to
the index 0 of the phase
PostDispatch
[Wed Sep 19 11:24:18 2007] [debug] phase.c(113)
axis2_handler_t
*context_handler added to the index 1 of the
phase PostDispatch
[Wed Sep 19 11:24:18 2007] [debug]
conf_builder.c(220) no custom
dispatching order found continue with default
dispatching order 
[Wed Sep 19 11:24:18 2007] [debug]
conf_builder.c(326) module
addressing found in axis2.xml
[Wed Sep 19 11:24:18 2007] [debug]
class_loader.c(135) Object loaded
successfully
[Wed Sep 19 11:24:18 2007] [debug]
class_loader.c(135) Object loaded 
successfully
[Wed Sep 19 11:24:18 2007] [debug]
dir_handler.c(192) No files in the
path
/home/dcallner/axis2c-bin-1.0.0-linux/services.
[Wed Sep 19 11:24:18 2007] [debug]
dep_engine.c(1042)
axis2_dep_engine_load_module_dll: DLL path is :


/home/dcallner/axis2c-bin-1.0.0-linux/modules/addressing/libaxis2_mod_a
ddr.so
 

Re: adb with base64Binary and xmime.xsd - little howto

2007-09-26 Thread Mark Nüßler

hello users,

in the little howto i mentioned
to replace "xs:int" with "xs:base64Binary",
but you have to replace it with "xmime:base64Binary".

sorry for this.

@royston, can't say something to this,
maybe any of the project-developers ?

mfg derMark




Royston Day schrieb:

Hi all,


hello users,



because i concentrate on codegeneration and
and sending files, i just want to give
back some of my knowlegde, since it's working.



i don't explain how to generate and implement,
i just explain, how i create a wsdl for this
purpose.



thx to Dimuthu Chathuranga this little howto
was possible, hope some of you will find
this useful.



mfg derMark


I've been using the axutil base64 libraries recently and came across a
issue in the base64.c source file (located in .../util/src/base64.c),
in the following function which is used by the axutil base64 binary
library to calculate the number of encoded bytes:

AXIS2_EXTERN int AXIS2_CALL axutil_base64_decode_len(const char *bufcoded)
{
int nbytesdecoded;
register const unsigned char *bufin;
register int nprbytes;

bufin = (const unsigned char *) bufcoded;
while (pr2six[*(bufin++)] <= 63);

nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;

nbytesdecoded = ((nprbytes + 3) / 4) * 3;

return nbytesdecoded + 1;
}

I believe that this calculation of the number of encoded bytes is
incorrect and have applied a quick fix as follows:

AXIS2_EXTERN int AXIS2_CALL axutil_base64_decode_len(const char *bufcoded)
{
int nbytesdecoded;
register const unsigned char *bufin;
register int nprbytes;

bufin = (const unsigned char *) bufcoded;
while (pr2six[*(bufin++)] <= 63);

nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;

nbytesdecoded = ((nprbytes >> 2) * 3);

if (nprbytes & 0x03) nbytesdecoded += (nprbytes & 0x03) - 1;

return nbytesdecoded;
}

I hope this is of some help.

Best regards,

Royston


- - -

Royston Day, Software Engineer
MPC Data Limited
e-mail: [EMAIL PROTECTED]   web: www.mpc-data.co.uk
tel:  +44 (0) 1225 710600 fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710634


MPC Data Limited is a company registered in England and Wales with
company number 05507446

Registered Address: County Gate, County Way, Trowbridge, Wiltshire,
BA14 7FJ VAT no: 850625238

The information in this email and in the attached documents is
confidential and may be legally privileged. Any unauthorized review,
copying, disclosure or distribution is prohibited and may be unlawful.
It is intended solely for the addressee. Access to this email by
anyone else is unauthorized. If you are not the intended recipient,
please contact the sender by reply email and destroy all copies of the
original message. When addressed to our clients any opinions or advice
contained in this email is subject to the terms and conditions
expressed in the governing contract.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: adb with base64Binary and xmime.xsd - little howto

2007-09-26 Thread Royston Day
Hi all,

> hello users,

> because i concentrate on codegeneration and
> and sending files, i just want to give
> back some of my knowlegde, since it's working.

> i don't explain how to generate and implement,
> i just explain, how i create a wsdl for this
> purpose.

> thx to Dimuthu Chathuranga this little howto
> was possible, hope some of you will find
> this useful.

> mfg derMark

I've been using the axutil base64 libraries recently and came across a
issue in the base64.c source file (located in .../util/src/base64.c),
in the following function which is used by the axutil base64 binary
library to calculate the number of encoded bytes:

AXIS2_EXTERN int AXIS2_CALL axutil_base64_decode_len(const char *bufcoded)
{
int nbytesdecoded;
register const unsigned char *bufin;
register int nprbytes;

bufin = (const unsigned char *) bufcoded;
while (pr2six[*(bufin++)] <= 63);

nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;

nbytesdecoded = ((nprbytes + 3) / 4) * 3;

return nbytesdecoded + 1;
}

I believe that this calculation of the number of encoded bytes is
incorrect and have applied a quick fix as follows:

AXIS2_EXTERN int AXIS2_CALL axutil_base64_decode_len(const char *bufcoded)
{
int nbytesdecoded;
register const unsigned char *bufin;
register int nprbytes;

bufin = (const unsigned char *) bufcoded;
while (pr2six[*(bufin++)] <= 63);

nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;

nbytesdecoded = ((nprbytes >> 2) * 3);

if (nprbytes & 0x03) nbytesdecoded += (nprbytes & 0x03) - 1;

return nbytesdecoded;
}

I hope this is of some help.

Best regards,

Royston


- - -

Royston Day, Software Engineer
MPC Data Limited
e-mail: [EMAIL PROTECTED]   web: www.mpc-data.co.uk
tel:  +44 (0) 1225 710600 fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710634


MPC Data Limited is a company registered in England and Wales with
company number 05507446

Registered Address: County Gate, County Way, Trowbridge, Wiltshire,
BA14 7FJ VAT no: 850625238

The information in this email and in the attached documents is
confidential and may be legally privileged. Any unauthorized review,
copying, disclosure or distribution is prohibited and may be unlawful.
It is intended solely for the addressee. Access to this email by
anyone else is unauthorized. If you are not the intended recipient,
please contact the sender by reply email and destroy all copies of the
original message. When addressed to our clients any opinions or advice
contained in this email is subject to the terms and conditions
expressed in the governing contract.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axis2C: compile error - 'struct' type redefinition

2007-09-26 Thread Michael Mole
Let me first correct myself from before.  The two conflicting headers are 
dirent.h and axis2_util.h.

The following is a code snippet that will fail.  Unfortunately, I can't 
just take out the #include  statement because my real code isn't 
including it directly.  It's really buried deep within a chain of includes 
of other headers (i.e. I include foo1.hxx which includes foo2.hxx which 
includes dirent.h)

// Foo.hxx
#ifndef FOO_HXX
#define FOO_HXX

class Foo
{
public:
   Foo();
   ~Foo();

private:

};

#endif


// Foo.cxx
#include "Foo.hxx"

#include 
#include 
 

Foo::Foo()
{
}

Foo::~Foo()
{
}


Thanks,
Mike

Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710



Samisa Abeysinghe <[EMAIL PROTECTED]> 
09/26/2007 06:38 AM
Please respond to
"Apache AXIS C User List" 


To
Apache AXIS C User List 
cc

Subject
Re: Axis2C: compile error - 'struct' type redefinition






Can you send the program source so that I would try to compile and see.

Samisa...

Michael Mole wrote:
>
> I am getting some compile errors that I cannot resolve.  I'm wondering 
> if this is a known issue or if I'm doing something wrong.  Here is the 
> scenario:
>
> I have a C++ class that includes , , and 
> .
> It also includes sys/types.h
> When I compile it's complaining about these struct redefinitions.  I'm 
> wondering if these structs are defined properly or am I missing some 
> flag when I build?
>
> Here are the actual errors:
>
> 
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(30)
 

> : error C2011: 'dirent' :
> 'struct' type redefinition
> \atria\nt\include\dirent.h(16) : see declaration of 'dirent'
> 
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(48)
 

> : error C2371: 'DIR' : red
> efinition; different basic types
> \atria\nt\include\dirent.h(27) : see declaration of 'DIR'
> 
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(56)
 

> : error C2373: 'opendir' :
>  redefinition; different type modifiers
> \atria\nt\include\dirent.h(29) : see declaration of 'opendir'
> 
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(62)
 

> : error C2373: 'closedir'
> : redefinition; different type modifiers
> \atria\nt\include\dirent.h(32) : see declaration of 'closedir'
> 
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(69)
 

> : error C2373: 'readdir' :
>  redefinition; different type modifiers
> \atria\nt\include\dirent.h(30) : see declaration of 'readdir'
> 
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(80)
 

> : error C2556: 'int rewind
> dir(DIR *)' : overloaded function differs only by return type from 
> 'void rewinddir(DIR *)'
> \atria\nt\include\dirent.h(31) : see declaration of 'rewinddir'
> 
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(80)
 

> : error C2373: 'rewinddir'
>  : redefinition; different type modifiers
> \atria\nt\include\dirent.h(31) : see declaration of 'rewinddir'
>
> Thanks,
> Mike
>
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710 


-- 
Samisa Abeysinghe - Apche Axis2/C
"
http://ws.apache.org/axis2/c/?Apache Axis2/C The Web Services Engine
"


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Question on reading from configuration files

2007-09-26 Thread Sathya Raghunathan
Hi

My c application has an init function which has to be called once when the
service comes up. It reads from a set of configuration files and stores all
these details in memory until the life of the service, so that all the
threads have access to them.
If i have to convert this c application into a web services, how and Where
exactly in the generated code can this init function be called?

Please clarify

Thanks
Sathya


Re: Question on memory allocation / deallocation for AXIS_MALLOC

2007-09-26 Thread Sathya Raghunathan
I am seeing that there is a function call adb_pInterchange_free() that the
wsdl2c code generator has generated. But where exactly should we call this?
The service function has to return the object. After this, where can the
memory be deallocated?

Thanks
Sathya

On 9/26/07, Sathya Raghunathan <[EMAIL PROTECTED]> wrote:

> Hi
>
> I have a question on memory allocation and deallocation:
>
> Suppose in my service function, I have created an object of a particular
> type (for ex: adb_pInterchange_t* myInt = adb_pInterchange_create(env);)
>
> This particular function uses AXIS_MALLOC to allocate memory for that
> particular object.
> _pInterchange = (adb_pInterchange_t *) AXIS2_MALLOC(env->allocator,
> sizeof(adb_pInterchange_t));
>
> After returning this as the soap response message, how will memory be
> deallocated? Is it taken care of automatically ? Or since we create this
> object inside the service function to fill the business logic, should we
> deallocate it manually ? If so, where exactly should we deallocate this
> memory?
>
> Please clarify.
>
> Thanks
> Sathya
>


Question on memory allocation / deallocation for AXIS_MALLOC

2007-09-26 Thread Sathya Raghunathan
Hi

I have a question on memory allocation and deallocation:

Suppose in my service function, I have created an object of a particular
type (for ex: adb_pInterchange_t* myInt = adb_pInterchange_create(env);)

This particular function uses AXIS_MALLOC to allocate memory for that
particular object.
_pInterchange = (adb_pInterchange_t *) AXIS2_MALLOC(env->allocator,
sizeof(adb_pInterchange_t));

After returning this as the soap response message, how will memory be
deallocated? Is it taken care of automatically ? Or since we create this
object inside the service function to fill the business logic, should we
deallocate it manually ? If so, where exactly should we deallocate this
memory?

Please clarify.

Thanks
Sathya


Question on user defined faults and multithreading

2007-09-26 Thread Sathya Raghunathan
Hi

1) How to build a multithreaded service using axis2c? Can wsdl2c tool
generate C code with multithreading functionality? If not, what is the way
to implement multithreading?
2) Can we give user defined faults in wsdl file? How will wsdl2c generate
code corresponding to the faults? Will the code generate any structures for
these fault types? I have an example wsdl for this. But i am not able to
generate code, because wsdl2c errors out saying "No element type is defined
for message faultMethodRequest"
Please clarify.


Below is the wsdl for user defined faults service which takes a single
integer and generates faults based on that integer value:


http://schemas.xmlsoap.org/wsdl/"; xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="
http://www.roguewave.com/rwsf/webservice/fault"; targetNamespace="
http://www.roguewave.com/rwsf/webservice/fault"; name="Fault">
  

  
  

  
  

  
  


  
  

  
  
  
  

  
  
http://schemas.xmlsoap.org/soap/http"/>

  
  
http://www.roguewave.com/rwsf/webservice/"/>
  
  
http://www.roguewave.com/rwsf/webservice/"/>
  
  

  
  

  

  
  

  http://localhost:8090/fault/Fault"/>

  



Thanks
Sathya


Re: Axis2C: compile error - 'struct' type redefinition

2007-09-26 Thread Samisa Abeysinghe

Can you send the program source so that I would try to compile and see.

Samisa...

Michael Mole wrote:


I am getting some compile errors that I cannot resolve.  I'm wondering 
if this is a known issue or if I'm doing something wrong.  Here is the 
scenario:


I have a C++ class that includes , , and 
.

It also includes sys/types.h
When I compile it's complaining about these struct redefinitions.  I'm 
wondering if these structs are defined properly or am I missing some 
flag when I build?


Here are the actual errors:

c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(30) 
: error C2011: 'dirent' :

'struct' type redefinition
\atria\nt\include\dirent.h(16) : see declaration of 'dirent'
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(48) 
: error C2371: 'DIR' : red

efinition; different basic types
\atria\nt\include\dirent.h(27) : see declaration of 'DIR'
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(56) 
: error C2373: 'opendir' :

 redefinition; different type modifiers
\atria\nt\include\dirent.h(29) : see declaration of 'opendir'
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(62) 
: error C2373: 'closedir'

: redefinition; different type modifiers
\atria\nt\include\dirent.h(32) : see declaration of 'closedir'
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(69) 
: error C2373: 'readdir' :

 redefinition; different type modifiers
\atria\nt\include\dirent.h(30) : see declaration of 'readdir'
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(80) 
: error C2556: 'int rewind
dir(DIR *)' : overloaded function differs only by return type from 
'void rewinddir(DIR *)'

\atria\nt\include\dirent.h(31) : see declaration of 'rewinddir'
c:\axis2c-src-1.1.0\build\deploy\include\platforms\windows\axutil_dir_windows.h(80) 
: error C2373: 'rewinddir'

 : redefinition; different type modifiers
\atria\nt\include\dirent.h(31) : see declaration of 'rewinddir'

Thanks,
Mike

Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710 



--
Samisa Abeysinghe - Apche Axis2/C
"http://ws.apache.org/axis2/c/?Apache Axis2/C The Web Services Engine";


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with SVC client send_receieve method

2007-09-26 Thread Dumindu Pallewela
Hi Murali,

This doesn't seem to me as a problem with ssl client. It rather is
something to do with your rampart configuration.

AFAIK, it is not correct to set the user name in axis2.xml. It has
to be done with security policy.

HTH,
Dumindu.

Murali Konnipati wrote:
> 
> 
> Hi Dumindu,
> 
> Thank you very much for your reply.
> As per your email, i enabled https transportsender in my
> axis2.xml. Even then, i am facing the same problem..
> 
> I am attaching the log file & configuration file for your
> reference. Please check the same and let me know, if i am making any
> mistake in the configuration.
> 
> 
> Thanks & Regards,
> 
> Murali Krishna K
> 
> 
> -Original Message-
> From: Dumindu Pallewela
> To: Apache AXIS C User List
> Sent: 9/25/07 4:58 PM
> Subject: Re: Problem with SVC client send_receieve method
> 
> Murali Konnipati wrote:
>> But in the code, i have set the SERVER_CERT parameter. Do i need to
> set
>> in the axis2.xml configuration file as well ..
> 
> No you don't :)
> 
> But you need to have the following:
> 
> 
> HTTP/1.1
> 
> 
> Regards,
> Dumindu.
> 
>  <>
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




signature.asc
Description: OpenPGP digital signature