RE: changing the axis2/c message encoding

2009-07-23 Thread Haszlakiewicz, Eric
-Original Message-
From: Haszlakiewicz, Eric [mailto:ehas...@transunion.com] 

I want to change the character encoding that axis2/c uses to send
messages to ISO-8859-1.  I am using adb generated code to send and
receive the requests.  I figured there'd probably be something 
I can set
either in the axis2_stub_t service object, or maybe in axis2_options_t,
but I can't find anything that looks appropriate.  
How do I do this?

eric


anyone?  I looked through the sources a bit, and it seems that there is
an encoding parameter in the msg_ctx that ends up being used to send the
request, but I don't know how to set that.  This is what my code does
now:

axis2_stub_t *my_service = axis2_stub_create_MyService(env,
axis_cfg.client_home, axis_cfg.address);
axis2_options_t *opts = axis2_stub_get_options(an_service, env);
axis2_options_set_timeout_in_milli_seconds(opts, env, axis_cfg.timeout);
adb_my_req_t *my_req = adb_my_req_create(env);
...etc... fill in my_req
adb_addrnorm_response_t *response;
response = axis2_stub_op_MyService_someOp(my_service, env, my_req);


eric


RE: changing the axis2/c message encoding

2009-07-23 Thread Haszlakiewicz, Eric
-Original Message-
From: Haszlakiewicz, Eric [mailto:ehas...@transunion.com] 

I want to change the character encoding that axis2/c uses to send
messages to ISO-8859-1.  I am using adb generated code to send and
receive the requests.  I figured there'd probably be something 
I can set
either in the axis2_stub_t service object, or maybe in 
axis2_options_t,
but I can't find anything that looks appropriate.  
How do I do this?

eric


anyone?  I looked through the sources a bit, and it seems that there is
an encoding parameter in the msg_ctx that ends up being used 
to send the
request, but I don't know how to set that.  This is what my code does
now:

axis2_stub_t *my_service = axis2_stub_create_MyService(env,
axis_cfg.client_home, axis_cfg.address);
axis2_options_t *opts = axis2_stub_get_options(an_service, env);
axis2_options_set_timeout_in_milli_seconds(opts, env, 
axis_cfg.timeout);
adb_my_req_t *my_req = adb_my_req_create(env);
...etc... fill in my_req
adb_addrnorm_response_t *response;
response = axis2_stub_op_MyService_someOp(my_service, env, my_req);


Well, I traced through things a bit more.  It seems that the encoding is
set in axis2_http_transport_sender_invoke() using either any previously
set value in the axis2_msg_ctx_t object, or by grabbing a charset
property from some kind of axis2_ctx_t object.  I have no idea where the
axis2_ctx_t object comes from (it's not the one I tried to set by going
through adb stub=svc_client=svc_ctx=axis2_svc_ctx_get_base()), and it
looks like I *can't* set things in the msg_ctx ahead of time because
it's not even allocated yet.
msg_ctx seems to be created in
axis2_svc_client_send_receive_with_op_qname (svc_client.c:715), but
nothing sets the charset after that point.  
- stub function
 - axis2_svc_client_send_receive_with_op_qname
  - axis2_op_client_execute
copies over some things from op_client to msg_ctx, but not
charset (axis2_msg_ctx_set_options(msg_ctx, env, op_client-options);)
- axis2_op_client_two_way_send
  - axis2_engine_send
- axis2_http_transport_sender_invoke

The axis2_engine_send function seems to invokes phases, so maybe I can
hack something in here to set the charset in the msg_ctx?  I found some
general documentation about how phases and flows work in axis2, but I'm
not quite sure how to go about implementing a phase.  Can someone point
me towards an example?  Does this even sound like a reasonable way to
get the encoding set?  It seems like it's way harder than it should be.

eric


RE: changing the axis2/c message encoding

2009-07-23 Thread Haszlakiewicz, Eric
-Original Message-
From: Haszlakiewicz, Eric [mailto:ehas...@transunion.com] 

I want to change the character encoding that axis2/c uses to send
messages to ISO-8859-1.  I am using adb generated code to send and
receive the requests.  I figured there'd probably be something 
I can set
either in the axis2_stub_t service object, or maybe in 
axis2_options_t,
but I can't find anything that looks appropriate.  
How do I do this?
...snip...
The axis2_engine_send function seems to invokes phases, so 
maybe I can
hack something in here to set the charset in the msg_ctx?  I found some
general documentation about how phases and flows work in axis2, but I'm
not quite sure how to go about implementing a phase.  Can someone point
me towards an example?  Does this even sound like a reasonable way to
get the encoding set?  It seems like it's way harder than it should be.

well, to response to my own email yet again, I used the addressing
module from the axis2c sources as an example and managed to create my
own module that sets the encoding in the msg_ctx and actually sends a
request with Content-Type: text/xml;charset=ISO-8851-1 in the headers.
Unfortunately, the server side still had a problem deserializing the
request.  I guess this isn't something that has been tested much, and
I'm probably in for a world of pain to get it working. :(

eric


changing the axis2/c message encoding

2009-07-21 Thread Haszlakiewicz, Eric

I want to change the character encoding that axis2/c uses to send
messages to ISO-8859-1.  I am using adb generated code to send and
receive the requests.  I figured there'd probably be something I can set
either in the axis2_stub_t service object, or maybe in axis2_options_t,
but I can't find anything that looks appropriate.  
How do I do this?

eric


axis2/c and json

2009-07-09 Thread Haszlakiewicz, Eric

I've been looking at getting axis2/c working with json encoding instead
of xml.  There is a rather old jira (AXIS2C-683) that had some
not-quite-working code in it that I've started playing around with.
Before I spend too much more time getting that functional, I figured I
should ask:  is there already working support for using JSON that I
haven't found?

eric


RE: nightly build failing? (trying to solve some memory leaks)

2009-06-09 Thread Haszlakiewicz, Eric

-Original Message-
From: Supun Kamburugamuva [mailto:supu...@gmail.com] 
Sent: Wednesday, June 03, 2009 11:04 PM
To: Apache AXIS C User List
Subject: Re: nightly build failing? (trying to solve some memory leaks)

Hi Eric,
 
You need to go inside modules/tool/axis2-aar-maven-plugin, 
modules/tool/axis2-mar-maven-plugin directories and build them 
first, before building Axis2.
 
Supun


Don't tell me, I'm not trying to build it.  I was just looking for the
snapshot build for that day, and the standard build appears to be
broken.  (it's still broken as of right now, but the 3 week old snapshot
seems to work for me)  

eric


RE: nightly build failing? (trying to solve some memory leaks)

2009-06-09 Thread Haszlakiewicz, Eric
-Original Message-
From: uthaiyashan...@gmail.com 

On Wed, Jun 3, 2009 at 9:09 PM, Haszlakiewicz, Eric
ehas...@transunion.com wrote:

 I'm trying to track down some memory leaks I'm seeing (just a
 axis2_stub_create_foo() immediately followed by 
axis2_stub_free() leaks
 memory),


Can you give some more details about the leak, so that we can have a
look? We haven't come across such problem upto this time. Possibly it
might have been introduced recently.

I updated to Axis2c-1.6.0, and AXIS2-NIGHTLY-367, and the memory leaks
went away.  Now I'm just getting a core dump in
axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync() on the first
request sent through, but only sometimes.  I'll start a separate thread
for that issue.

We have forwarded your mail to Axis2/Java list. They will help us to
fix the problem.
ok, thanks.

eric


core dumps in axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync()

2009-06-09 Thread Haszlakiewicz, Eric

I'm running axis as a module in Apache httpd 2.2.9, running in pre-fork
mode.  Occasionally, when I start up the server, the first request sent
causes the httpd process to crash.  Has anyone seen anything like this
before?  I don't have much time to debug this right now, but here's some
possibly useful info:

httpd crashes with a SIGSEGV.  Running gdb on the core dump:
(gdb) where
#0  0x in ?? ()
#1  0x00625ced in
axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync (
msg_recv=0x8aa9d78, env=0x8ab5490, msg_ctx=0x8ab5560,
new_msg_ctx=0x8ab6a40) at raw_xml_in_out_msg_recv.c:209
#2  0x0062580a in axis2_msg_recv_invoke_business_logic
(msg_recv=0x1671a4,
env=0x8ab5490, in_msg_ctx=0x8ab5560, out_msg_ctx=0x8ab6a40)
at msg_recv.c:481
etc...

line 209 of raw_xml_in_out_msg_recv.c is:
   result_node = AXIS2_SVC_SKELETON_INVOKE(svc_obj, env, om_node,
new_msg_ctx);

That macro does:
#define AXIS2_SVC_SKELETON_INVOKE(svc_skeleton, env, node, msg_ctx) \
  ((svc_skeleton)-ops-invoke (svc_skeleton, env, node, msg_ctx))

(gdb) print svc_obj
$1 = (axis2_svc_skeleton_t *) 0x8aaa9b8
(gdb) print svc_obj[0].ops[0]
$10 = {init = 0, invoke = 0, on_fault = 0, free = 0, init_with_conf = 0}

So, something didn't get initialized properly.
If I restart apache, even without changing anything, things work fine.

eric


nightly build failing? (trying to solve some memory leaks)

2009-06-03 Thread Haszlakiewicz, Eric

I'm trying to track down some memory leaks I'm seeing (just a
axis2_stub_create_foo() immediately followed by axis2_stub_free() leaks
memory), and I thought I'd try out the latest axis2/java snapshot
because I noticed some problems in the generated C code.

However, the build has been failing for two weeks with the same error:

[INFO] Internal error in the plugin manager getting plugin
'org.apache.axis2:axis2-aar-maven-plugin': Failed to create plugin
container for plugin 'Plugin [org.apache.axis2:axis2-aar-maven-plugin]':
Error starting container
No such file or directory

Is anyone going to fix that, or do I need to figure out how to build
things myself?

eric


RE: troubles with skeleton generation tools from wsdl

2009-02-11 Thread Haszlakiewicz, Eric
-Original Message-
From: Philippe Torrelli [mailto:philippe.torre...@alcatel-lucent.fr] 
needs, and I'm
now trying to 
implement little key parts of our stuff with axis2c and having 
hard time
with it.

This is with axis2c 1.5.0, installed on a linux pc  from the 
binary tarball
available on apache axis2c website
(http://apache.crihan.fr/dist/ws/axis2/c/1_5_0/axis2c-bin-1.5.0
-linux.tar.gz
). 

I try to generate a skeleton for web service  out of an 
existing wsdl, with
complextypes,  
 multiple(optional) occurrences and here are my results :

- tried with wsdl2c and an axis 1.3 java distribution. It did create a
I then found different messages suggesting wsdl2c and 
wsdl2java are now the
same, ( it's just my understanding ) so downloaded the latests 
axis2java
nightly build available, and gave a try to wsdl2java, which 
generated java
Yes, you'll definitely want to use a current snapshot of the java code.
There are lots of fixes that have gone in since 1.3.  I got my copy from
from http://builder.wso2.org/browse/AXIS2-NIGHTLY

My command line 
/wsdl2java.sh -o test -ss -sd -l c  -uw -d adb -g  -uri 
Resource.wsdl 
just creates a java code tree for me.

I used these commands:

For client code:
axis2.sh org.apache.axis2.wsdl.WSDL2C -uri
${.CURDIR}/../wsdl/addrnorm.wsdl
-d adb -u -o ${.CURDIR}/generated

For server code:
axis2.sh org.apache.axis2.wsdl.WSDL2C -uri
${.CURDIR}/../wsdl/addrnorm.wsdl
-d adb -u -ss -sd -o ${.CURDIR}/generated

axis2.sh is a script that is included with the axis java code.

You'll want to adjust the -d option if you're using something other that
adb.

eric


RE: special character escaping in adb requests

2009-02-02 Thread Haszlakiewicz, Eric

(I'm switching this thread to the axis-c-dev list, because that seems
more appropriate for the level of detail I'm asking about)

So if axutil_stream_write actually writes the xml out, why does the
generated foo_serialize() function return a node, and why does that get
passed to axis2_svc_client_send_receive_with_op_qname?  Is that actually
necessary for something, or would it work to pass a NULL there, or some
other dummy node?

eric

-Original Message-
From: Dimuthu Gamage [mailto:dimut...@gmail.com] 
Sent: Saturday, January 31, 2009 2:36 AM
To: Apache AXIS C User List
Subject: Re: special character escaping in adb requests

Hi Eric,

Yea we have the stream write function which directly write the 
xml in the generated code. So fixing it axiom_node_serialize 
is not enough, we have to change the generated code a little 
bit. But for your custom need it is better setting data after 
escaping special characters.



On Sat, Jan 31, 2009 at 3:25 AM, Haszlakiewicz, Eric 
ehas...@transunion.com wrote:



   hmm... I had assumed that the adb code would just generate an
   appropriately structured axiom_node_t, and it seems 
like it does return
   a node, but it's also generating xml directly and 
writing it out (with
   axutil_stream_write).  huh?  I think I'm missing 
something with how this
   works.
   
   I tried to read through the 
axis2_svc_client_send_receive_with_op_qname
   call that uses the axiom_node_t (which is called from 
the stub myOp
   call), hoping that that might provide some insight, but 
quickly got
   lost.  It seems the figuring out what this code does 
will take more time
   than I have available right now. :(
   

   -Original Message-
   From: Haszlakiewicz, Eric [mailto:ehas...@transunion.com]
   Sent: Friday, January 30, 2009 3:04 PM
   To: Apache AXIS C User List
   
   Subject: RE: special character escaping in adb requests
   
   
   Until you try to send some data that contains ]].  There is
   no way to
   avoid to the need to escape the data.  This should be 
handled by the
   serialization methods.  I'm very surprised that it 
isn't.  I haven't
   looked at the code that does the serialization yet, 
but if there's a
   general axion serialize-an-element routine, this 
probably won't be too
   hard to fix.
   
   -Original Message-
   From: Dumindu Pallewela [mailto:pallew...@gmail.com]
   Sent: Friday, January 30, 2009 12:27 PM
   To: Apache AXIS C User List
   Subject: Re: special character escaping in adb requests
   
   Does AXIOM support CDATA sections?
   
   If so I think this can simply be solved by using a 
CDATA section.
   
   Thanks,
   Dumindu.
   
   On Fri, Jan 30, 2009 at 9:20 AM, Dimuthu Gamage
   dimut...@gmail.com wrote:
Unfortunately we don't have such a function in the axutil
   yet. But it is
trival to implement.
I just did a google and found this, [1]. We can use the
   algorithm for the
parse data.
   
   
[1] http://www.hdfgroup.org/HDF5/XML/xml_escape_chars.htm
   
Thanks
Dimuthu
   
On Thu, Jan 29, 2009 at 10:48 PM, Haszlakiewicz, Eric
ehas...@transunion.com wrote:
   
hmm... well that sucks.  Is there an axis function to do
   this easily, or
do I need to find one somewhere else?
   
Also, how do I know what kind of escaping to do?  It's
   possible to have
axis send the request as a soap doc, or as a json message,
   so I can't
use the same escaping for each, right?
   
eric
   
-Original Message-
From: Dimuthu Gamage [mailto:dimut...@gmail.com]
Sent: Wednesday, January 28, 2009 9:01 PM
To: Apache AXIS C User List
Subject: Re: special character escaping in adb requests

Hi Eric,
Unfortunately You have to set the texts after 
escaping these
characters at least for now. It is apparently a bug. (we
should do it inside). Can you please raise a JIRA 
issue on that.

Thanks
Dimuthu


On Thu, Jan 29, 2009 at 12:48 AM, Haszlakiewicz, Eric
ehas...@transunion.com wrote:



   I have an app that uses adb to construct 
messages to
send to a web
   service.  Everything works fine, unless my data
contains characters like
   '', in which case axis fails to escape 
the characters
and generates
   invalid xml (I'm using xml messages).

   I'm doing things like:

   axis2_stub_t *my_service =
axis2_stub_create_MyService(env, client_home,
   url);
   adb_foo_t *myreq = adb_foo_create(env

RE: special character escaping in adb requests

2009-02-02 Thread Haszlakiewicz, Eric
 

-Original Message-
From: Dimuthu Gamage [mailto:dimut...@gmail.com] 
Sent: Thursday, January 29, 2009 9:50 PM
To: Apache AXIS C User List
Subject: Re: special character escaping in adb requests

Unfortunately we don't have such a function in the axutil yet. 
But it is trival to implement.
I just did a google and found this, [1]. We can use the 
algorithm for the parse data.


[1] http://www.hdfgroup.org/HDF5/XML/xml_escape_chars.htm

Thanks
Dimuthu

Actually, it looks like you _do_ have such a function:
AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axutil_xml_quote_string(
const axutil_env_t *env,
const axis2_char_t *s,
axis2_bool_t quotes);


And it's even actually USED in the generated _serialize functions, but
not in all the places that it should be.  

eric


closing jira issues

2009-02-02 Thread Haszlakiewicz, Eric

If I submitted a issue, and it got fixed in subversion, should I close
it if I know it works in a snapshot build, or leave it alone until the
next release?

eric


RE: special character escaping in adb requests

2009-01-30 Thread Haszlakiewicz, Eric

Until you try to send some data that contains ]].  There is no way to
avoid to the need to escape the data.  This should be handled by the
serialization methods.  I'm very surprised that it isn't.  I haven't
looked at the code that does the serialization yet, but if there's a
general axion serialize-an-element routine, this probably won't be too
hard to fix.

-Original Message-
From: Dumindu Pallewela [mailto:pallew...@gmail.com] 
Sent: Friday, January 30, 2009 12:27 PM
To: Apache AXIS C User List
Subject: Re: special character escaping in adb requests

Does AXIOM support CDATA sections?

If so I think this can simply be solved by using a CDATA section.

Thanks,
Dumindu.

On Fri, Jan 30, 2009 at 9:20 AM, Dimuthu Gamage 
dimut...@gmail.com wrote:
 Unfortunately we don't have such a function in the axutil 
yet. But it is
 trival to implement.
 I just did a google and found this, [1]. We can use the 
algorithm for the
 parse data.


 [1] http://www.hdfgroup.org/HDF5/XML/xml_escape_chars.htm

 Thanks
 Dimuthu

 On Thu, Jan 29, 2009 at 10:48 PM, Haszlakiewicz, Eric
 ehas...@transunion.com wrote:

 hmm... well that sucks.  Is there an axis function to do 
this easily, or
 do I need to find one somewhere else?

 Also, how do I know what kind of escaping to do?  It's 
possible to have
 axis send the request as a soap doc, or as a json message, 
so I can't
 use the same escaping for each, right?

 eric

 -Original Message-
 From: Dimuthu Gamage [mailto:dimut...@gmail.com]
 Sent: Wednesday, January 28, 2009 9:01 PM
 To: Apache AXIS C User List
 Subject: Re: special character escaping in adb requests
 
 Hi Eric,
 Unfortunately You have to set the texts after escaping these
 characters at least for now. It is apparently a bug. (we
 should do it inside). Can you please raise a JIRA issue on that.
 
 Thanks
 Dimuthu
 
 
 On Thu, Jan 29, 2009 at 12:48 AM, Haszlakiewicz, Eric
 ehas...@transunion.com wrote:
 
 
 
I have an app that uses adb to construct messages to
 send to a web
service.  Everything works fine, unless my data
 contains characters like
'', in which case axis fails to escape the characters
 and generates
invalid xml (I'm using xml messages).
 
I'm doing things like:
 
axis2_stub_t *my_service =
 axis2_stub_create_MyService(env, client_home,
url);
adb_foo_t *myreq = adb_foo_create(env);
adb_foo_set_myfield(myreq, env, abcxyz);
adb_fooresp_t *response =
 axis2_stub_op_MyService_myOp(an_service, env,
myreq);
 
The adb code was generated from a wsdl (and xsd) that
 has elements
defined like:
  xs:element name=foo type=xs:string/
and the command used was:
  axis2.sh org.apache.axis2.wsdl.WSDL2C -uri
 myservice.wsdl -d adb -u
-o generated
 
Is there some extra step I need to take to make this
 work right?  Or, is
there some bug that might be fixed in a more recent version?
 
eric
 
 
 
 
 
 --
 Thanks,
 Dimuthu Gamage
 
 http://www.dimuthu.org
 http://www.wso2.org
 
 



 --
 Thanks,
 Dimuthu Gamage

 http://www.dimuthu.org
 http://www.wso2.org




RE: special character escaping in adb requests

2009-01-30 Thread Haszlakiewicz, Eric

hmm... I had assumed that the adb code would just generate an
appropriately structured axiom_node_t, and it seems like it does return
a node, but it's also generating xml directly and writing it out (with
axutil_stream_write).  huh?  I think I'm missing something with how this
works.

I tried to read through the axis2_svc_client_send_receive_with_op_qname
call that uses the axiom_node_t (which is called from the stub myOp
call), hoping that that might provide some insight, but quickly got
lost.  It seems the figuring out what this code does will take more time
than I have available right now. :(

-Original Message-
From: Haszlakiewicz, Eric [mailto:ehas...@transunion.com] 
Sent: Friday, January 30, 2009 3:04 PM
To: Apache AXIS C User List
Subject: RE: special character escaping in adb requests


Until you try to send some data that contains ]].  There is 
no way to
avoid to the need to escape the data.  This should be handled by the
serialization methods.  I'm very surprised that it isn't.  I haven't
looked at the code that does the serialization yet, but if there's a
general axion serialize-an-element routine, this probably won't be too
hard to fix.

-Original Message-
From: Dumindu Pallewela [mailto:pallew...@gmail.com] 
Sent: Friday, January 30, 2009 12:27 PM
To: Apache AXIS C User List
Subject: Re: special character escaping in adb requests

Does AXIOM support CDATA sections?

If so I think this can simply be solved by using a CDATA section.

Thanks,
Dumindu.

On Fri, Jan 30, 2009 at 9:20 AM, Dimuthu Gamage 
dimut...@gmail.com wrote:
 Unfortunately we don't have such a function in the axutil 
yet. But it is
 trival to implement.
 I just did a google and found this, [1]. We can use the 
algorithm for the
 parse data.


 [1] http://www.hdfgroup.org/HDF5/XML/xml_escape_chars.htm

 Thanks
 Dimuthu

 On Thu, Jan 29, 2009 at 10:48 PM, Haszlakiewicz, Eric
 ehas...@transunion.com wrote:

 hmm... well that sucks.  Is there an axis function to do 
this easily, or
 do I need to find one somewhere else?

 Also, how do I know what kind of escaping to do?  It's 
possible to have
 axis send the request as a soap doc, or as a json message, 
so I can't
 use the same escaping for each, right?

 eric

 -Original Message-
 From: Dimuthu Gamage [mailto:dimut...@gmail.com]
 Sent: Wednesday, January 28, 2009 9:01 PM
 To: Apache AXIS C User List
 Subject: Re: special character escaping in adb requests
 
 Hi Eric,
 Unfortunately You have to set the texts after escaping these
 characters at least for now. It is apparently a bug. (we
 should do it inside). Can you please raise a JIRA issue on that.
 
 Thanks
 Dimuthu
 
 
 On Thu, Jan 29, 2009 at 12:48 AM, Haszlakiewicz, Eric
 ehas...@transunion.com wrote:
 
 
 
I have an app that uses adb to construct messages to
 send to a web
service.  Everything works fine, unless my data
 contains characters like
'', in which case axis fails to escape the characters
 and generates
invalid xml (I'm using xml messages).
 
I'm doing things like:
 
axis2_stub_t *my_service =
 axis2_stub_create_MyService(env, client_home,
url);
adb_foo_t *myreq = adb_foo_create(env);
adb_foo_set_myfield(myreq, env, abcxyz);
adb_fooresp_t *response =
 axis2_stub_op_MyService_myOp(an_service, env,
myreq);
 
The adb code was generated from a wsdl (and xsd) that
 has elements
defined like:
  xs:element name=foo type=xs:string/
and the command used was:
  axis2.sh org.apache.axis2.wsdl.WSDL2C -uri
 myservice.wsdl -d adb -u
-o generated
 
Is there some extra step I need to take to make this
 work right?  Or, is
there some bug that might be fixed in a more 
recent version?
 
eric
 
 
 
 
 
 --
 Thanks,
 Dimuthu Gamage
 
 http://www.dimuthu.org
 http://www.wso2.org
 
 



 --
 Thanks,
 Dimuthu Gamage

 http://www.dimuthu.org
 http://www.wso2.org





RE: special character escaping in adb requests

2009-01-29 Thread Haszlakiewicz, Eric

hmm... well that sucks.  Is there an axis function to do this easily, or
do I need to find one somewhere else?

Also, how do I know what kind of escaping to do?  It's possible to have
axis send the request as a soap doc, or as a json message, so I can't
use the same escaping for each, right?

eric

-Original Message-
From: Dimuthu Gamage [mailto:dimut...@gmail.com] 
Sent: Wednesday, January 28, 2009 9:01 PM
To: Apache AXIS C User List
Subject: Re: special character escaping in adb requests

Hi Eric,
Unfortunately You have to set the texts after escaping these 
characters at least for now. It is apparently a bug. (we 
should do it inside). Can you please raise a JIRA issue on that.

Thanks
Dimuthu


On Thu, Jan 29, 2009 at 12:48 AM, Haszlakiewicz, Eric 
ehas...@transunion.com wrote:



   I have an app that uses adb to construct messages to 
send to a web
   service.  Everything works fine, unless my data 
contains characters like
   '', in which case axis fails to escape the characters 
and generates
   invalid xml (I'm using xml messages).
   
   I'm doing things like:
   
   axis2_stub_t *my_service = 
axis2_stub_create_MyService(env, client_home,
   url);
   adb_foo_t *myreq = adb_foo_create(env);
   adb_foo_set_myfield(myreq, env, abcxyz);
   adb_fooresp_t *response = 
axis2_stub_op_MyService_myOp(an_service, env,
   myreq);
   
   The adb code was generated from a wsdl (and xsd) that 
has elements
   defined like:
 xs:element name=foo type=xs:string/
   and the command used was:
 axis2.sh org.apache.axis2.wsdl.WSDL2C -uri 
myservice.wsdl -d adb -u
   -o generated
   
   Is there some extra step I need to take to make this 
work right?  Or, is
   there some bug that might be fixed in a more recent version?
   
   eric
   




-- 
Thanks,
Dimuthu Gamage

http://www.dimuthu.org
http://www.wso2.org




special character escaping in adb requests

2009-01-28 Thread Haszlakiewicz, Eric

I have an app that uses adb to construct messages to send to a web
service.  Everything works fine, unless my data contains characters like
'', in which case axis fails to escape the characters and generates
invalid xml (I'm using xml messages).  

I'm doing things like:

axis2_stub_t *my_service = axis2_stub_create_MyService(env, client_home,
url);
adb_foo_t *myreq = adb_foo_create(env);
adb_foo_set_myfield(myreq, env, abcxyz);
adb_fooresp_t *response = axis2_stub_op_MyService_myOp(an_service, env,
myreq);

The adb code was generated from a wsdl (and xsd) that has elements
defined like:
   xs:element name=foo type=xs:string/
and the command used was:
   axis2.sh org.apache.axis2.wsdl.WSDL2C -uri myservice.wsdl -d adb -u
-o generated

Is there some extra step I need to take to make this work right?  Or, is
there some bug that might be fixed in a more recent version?

eric


RE: nightly axis2/java builds?

2008-10-10 Thread Haszlakiewicz, Eric

Got it, thanks.  Any chance the manual on the website could be updated?

Also, it looks like the API Documentation link (on
http://ws.apache.org/axis2/c/docs/index.html) is broken.  I can download
a build and browse the docs locally, but that's a bit hard to use b/c
the search feature doesn't work.  Can this be fixed?

eric

-Original Message-
From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2008 7:32 AM
To: Apache AXIS C User List
Subject: Re: nightly axis2/java builds?

Hi,

Please get the nightly build from 
http://builder.wso2.org/browse/AXIS2-NIGHTLY


Thanks
Dimuthu


On Fri, Oct 10, 2008 at 4:59 AM, Haszlakiewicz, Eric 
[EMAIL PROTECTED] wrote:



   I'm trying to get the most recent code for axis2/java 
for the wsdl2c
   tool but I'm having problems.  The link to the nightly 
builds in the
   axi2c manual goes to a directory
   (http://people.apache.org/dist/axis2/nightly/) that 
only appears to have
   axis2/c builds.
   
   I'm able to browse the repository
   
(http://svn.apache.org/viewvc/webservices/axis2/trunk/java/) but when I
   try to checkout a copy with svn I get this error:
   svn ls 
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/
   svn: Repository moved temporarily to
   '/viewvc/webservices/axis2/trunk/java/'; please relocate
   
   eric
   
   
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
   




-- 
Thanks,
Dimuthu Gamage

http://www.dimuthu.org
http://www.wso2.org



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



problem with WSDL2C generated code and empty elements

2008-10-09 Thread Haszlakiewicz, Eric

I have an element in my schema that is defined like so:
xs:simpleType name=foo-type
xs:restriction base=xs:string
xs:minLength value=0/
xs:maxLength value=10/
/xs:restriction
/xs:simpleType
...
xs:element name=myelem type=tns:foo-type minOccurs=1
maxOccurs=1/

I have code that generates responses with this element in it using the
adb methods, and that seems to work fine, at least some of the time.
I'm running into problems when the length of the string is 0.  The
element is created, and returned to the client, but the generated
adb_foo_type_deserialize function doesn't handle it correctly.  I think
the fix is fairly simple:

...snip...
text_node = axiom_node_get_first_child(parent, env);
if (text_node 
axiom_node_get_node_type(text_node, env) == AXIOM_TEXT)
   {
  axiom_text_t *text_element =
(axiom_text_t*)axiom_node_get_data_element(text_node, env);
  if(text_element  axiom_text_get_value(text_element, env))
  {
   text_value =
(axis2_char_t*)axiom_text_get_value(text_element, env);
   status =
adb_address_line_type_deserialize_from_string(_address_line_type, env,
text_value, parent);
   }
   }
...snip...

turns into:
text_node = axiom_node_get_first_child(parent, env);
axiom_text_t *text_element;
if (text_node 
axiom_node_get_node_type(text_node, env) == AXIOM_TEXT)
  text_element =
(axiom_text_t*)axiom_node_get_data_element(text_node, env);

   if(text_element  axiom_text_get_value(text_element, env))
  text_value = (axis2_char_t*)axiom_text_get_value(text_element,
env);
   else
  text_value = ;

   status =
adb_address_line_type_deserialize_from_string(_address_line_type, env,
text_value, parent);


Does that make sense?  Should I submit the patch to the stylesheet used
by WSDL2C as a axis2/c bug or a axis2/java bug?

eric

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



nightly axis2/java builds?

2008-10-09 Thread Haszlakiewicz, Eric

I'm trying to get the most recent code for axis2/java for the wsdl2c
tool but I'm having problems.  The link to the nightly builds in the
axi2c manual goes to a directory
(http://people.apache.org/dist/axis2/nightly/) that only appears to have
axis2/c builds.

I'm able to browse the repository
(http://svn.apache.org/viewvc/webservices/axis2/trunk/java/) but when I
try to checkout a copy with svn I get this error:
svn ls http://svn.apache.org/viewvc/webservices/axis2/trunk/java/
svn: Repository moved temporarily to
'/viewvc/webservices/axis2/trunk/java/'; please relocate

eric

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