Re: possible bug in WSDL2C-generated code

2008-03-12 Thread Carl Lefrançois
 AXIS2_SUCCESS;
 }





2008/3/11, Dimuthu Gamage [EMAIL PROTECTED]:

 Hi Carl,

 If you can send us the relevant generated adb_ file it would be easy
 to track the problem.

 Thanks
 Dimuthu


 On Wed, Mar 12, 2008 at 12:42 AM, Carl Lefrançois
 [EMAIL PROTECTED] wrote:
  Hi all,
 
  After much debugging I have found why an access violation is being
 caused in
  my WSDL2C-generated code.
 
  While processing the following document: (http : // removed due to
 problems
  with my emails being flagged as spam)
 
  ?xml version='1.0' encoding='UTF-8'?
  soapenv:Envelope xmlns:soapenv=schemas.xmlsoap.org/soap/envelope/
  soapenv:Body
   BrokerInformationResponse
  xmlns:xsi=www.w3.org/2001/XMLSchema-instance
 
  xmlns=www.axa.ca/BrokerInformationService/1.0/BrokerInformationResponse
 
   xmlns:xsd=www.w3.org/2001/XMLSchema
  xmlns:soap=schemas.xmlsoap.org/soap/envelope/
   TrackingNumberUNKNOWN/TrackingNumber
  Status
  Status xmlns=ERROR/Status
  Detail xmlns=
   CodeERROR/Code
  DescriptionCould not unbind Request from
  XML!/Description
  /Detail
  /Status
  /BrokerInformationResponse
   /soapenv:Body
  /soapenv:Envelope
 
 
  During construction of the node tree representing this document, an
 om_text
  data element is created to hold the text ERROR in the first Status
  element.  This om_text element is then assigned to the data_element
 member
  of the axiom_node_t representing the first Status element on the
 following
  line:
 
  (line 603 of axiom\src\om\om_text.c:)
  axiom_node_set_data_element((*node), env, om_text);
 
  The node_type element of this node is correctly set to 8 (AXIOM_TEXT).
 
  however during deserialization in the WSDL2C generated code, the same
 data
  element is read into an axiom_element_t * defined as:
   axiom_element_t *current_element = NULL;
 
  in the following line:
  current_element = axiom_node_get_data_element( current_node, env);
 
 
  followed by a call which attempts to read the string value of
  (axiom_element_t *)current_element-ns-prefix:
   qname = axiom_element_get_qname( current_element, env, current_node);
 
  which causes an access violation.
 
  I would like to help with debugging the WSDL2C tool but my time on this
  project doesn't allow it at the moment.  If the information above isn't
  detailed enough I'll gladly clarify so the problem can be fixed.
 
  Carl
 


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




Re: WSDL2C CodeGenerationException

2008-03-12 Thread Carl Lefrançois
Hi Milinda, All

Please ignore this thread.  Dimuthu pointed out that I was using an old
version of the WSDL2C tool and with the snapshot build the WSDL compiles
with no problems.

My apologies!

Carl


possible bug in WSDL2C-generated code

2008-03-11 Thread Carl Lefrançois
Hi all,

After much debugging I have found why an access violation is being caused in
my WSDL2C-generated code.

While processing the following document: (http : // removed due to problems
with my emails being flagged as spam)

?xml version='1.0' encoding='UTF-8'?
soapenv:Envelope xmlns:soapenv=schemas.xmlsoap.org/soap/envelope/
soapenv:Body
BrokerInformationResponse xmlns:xsi=
www.w3.org/2001/XMLSchema-instance
xmlns=
www.axa.ca/BrokerInformationService/1.0/BrokerInformationResponse
xmlns:xsd=www.w3.org/2001/XMLSchema
xmlns:soap=schemas.xmlsoap.org/soap/envelope/
TrackingNumberUNKNOWN/TrackingNumber
Status
Status xmlns=ERROR/Status
Detail xmlns=
CodeERROR/Code
DescriptionCould not unbind Request from
XML!/Description
/Detail
/Status
/BrokerInformationResponse
/soapenv:Body
/soapenv:Envelope


During construction of the node tree representing this document, an om_text
data element is created to hold the text ERROR in the first Status
element.  This om_text element is then assigned to the data_element member
of the axiom_node_t representing the first Status element on the following
line:

(line 603 of axiom\src\om\om_text.c:)
axiom_node_set_data_element((*node), env, om_text);

The node_type element of this node is correctly set to 8 (AXIOM_TEXT).

however during deserialization in the WSDL2C generated code, the same data
element is read into an axiom_element_t * defined as:
axiom_element_t *current_element = NULL;

in the following line:
current_element = axiom_node_get_data_element( current_node, env);


followed by a call which attempts to read the string value of
(axiom_element_t *)current_element-ns-prefix:
qname = axiom_element_get_qname( current_element, env, current_node);

which causes an access violation.

I would like to help with debugging the WSDL2C tool but my time on this
project doesn't allow it at the moment.  If the information above isn't
detailed enough I'll gladly clarify so the problem can be fixed.

Carl


re possible bug in WSDL2C-generated code

2008-03-11 Thread Carl Lefrançois
Hi all,

In my last email I mentioned an om_text data element.  Though the variable
is called om_text, the type is actually axiom_text defined in om_text.c line
38.

Carl


problem with deserialize response using WSDL2C generated code

2008-03-10 Thread Carl Lefrançois
Hello group,

I am getting an access violation on a call to axiom_element_get_qname()

This call results from a call to Deserialize in WSDL2C generated code while
processing the following document:

?xml version='1.0' encoding='UTF-8'?
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:Body
BrokerInformationResponse xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
xmlns=
http://www.axa.ca/BrokerInformationService/1.0/BrokerInformationResponse;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
TrackingNumberUNKNOWN/TrackingNumber
Status
Status xmlns=ERROR/Status
Detail xmlns=
CodeERROR/Code
DescriptionCould not unbind Request from
XML!/Description
/Detail
/Status
/BrokerInformationResponse
/soapenv:Body
/soapenv:Envelope


While stepping through the code, I see the string UNKNOWN extracted from
the TrackingNumber node.  The access violation happens when
axiom_element_get_qname() is called during processing of the Status node
that follows.

The call stack shows:

axiom_element_get_qname()   (called on first Status node)
axutil_string_get_buffer(om_namespace-prefix, env);   ** here
om_namespace-prefix  == 0x005
axutil_string_get_buffer()   ** access violation atreturn
string-buffer;because string == om_namespace-prefix


I am using the WSDL2C from the nightly distribution date March 10th and the
latest Axis2 revision from SVN.

Any thoughts on how to resolve this problem?


Carl


WSDL2C CodeGenerationException

2008-03-06 Thread Carl Lefrançois
Hello group,

while attempting to use the WSDL2C tool there is a CodeGenerationException.
I am not understanding the output: can someone say if it appears to be a bug
in the code generator or a problem with the WSDL file?

What element seems to be the problem in the WSDL?  The WSDL is tested using
a validator which should imply that the structure is correct.

Do I start from the last .xsd retrieved before the exception?


output:

C:\ws\axis_svn\tools\codegen\javatoolWSDL2C.bat -uri x.wsdl -d adb -u
C:\ws\axis_svn\tools\codegen\javatoolecho off
Retrieving schema at '../../../xsd/...snip
snip many more retrieving schema...

Exception in thread main
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
CodeGenerationEngine.java:265)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:31)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(
SimpleDBExtension.java:53)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
CodeGenerationEngine.java:218)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(
SimpleDBExtension.java:50)
... 3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException:
java.lang.NullPointerException
at org.apache.axis2.schema.writer.CStructWriter.write(
CStructWriter.java:200)
at org.apache.axis2.schema.SchemaCompiler.writeComplexType(
SchemaCompiler.java:934)
at
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
SchemaCompiler.java:920)
at org.apache.axis2.schema.SchemaCompiler.processSchema(
SchemaCompiler.java:865)
at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:518)
at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:478)
at org.apache.axis2.schema.SchemaCompiler.process(
SchemaCompiler.java:1899)
at org.apache.axis2.schema.SchemaCompiler.processParticle(
SchemaCompiler.java:1788)
at org.apache.axis2.schema.SchemaCompiler.processComplexContent(
SchemaCompiler.java:1126)
at org.apache.axis2.schema.SchemaCompiler.processContentModel(
SchemaCompiler.java:1077)
at org.apache.axis2.schema.SchemaCompiler.processComplexType(
SchemaCompiler.java:993)
at
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
SchemaCompiler.java:914)
at org.apache.axis2.schema.SchemaCompiler.processSchema(
SchemaCompiler.java:865)
at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:518)
at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:478)
at org.apache.axis2.schema.SchemaCompiler.process(
SchemaCompiler.java:1899)
at org.apache.axis2.schema.SchemaCompiler.processParticle(
SchemaCompiler.java:1788)
at org.apache.axis2.schema.SchemaCompiler.processComplexType(
SchemaCompiler.java:977)
at
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
SchemaCompiler.java:914)
at org.apache.axis2.schema.SchemaCompiler.processSchema(
SchemaCompiler.java:865)
at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:518)
at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:478)
at org.apache.axis2.schema.SchemaCompiler.process(
SchemaCompiler.java:1899)
at org.apache.axis2.schema.SchemaCompiler.processParticle(
SchemaCompiler.java:1788)
at org.apache.axis2.schema.SchemaCompiler.processComplexType(
SchemaCompiler.java:977)
at
org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(
SchemaCompiler.java:886)
at org.apache.axis2.schema.SchemaCompiler.processSchema(
SchemaCompiler.java:867)
at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:518)
at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:489)
at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:302)
at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:284)
at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:284)
at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:284)
at org.apache.axis2.schema.SchemaCompiler.compile(

can't find codegen source files referenced by provided vc workspaces

2008-02-26 Thread Carl Lefrançois
the   axis2c\ides\vc\axis2c\codegen\   directory holds some visual studio
2005 project files.  In these project files there are references to C source
files that do not exist in the wso2-wsf-c-src-1.2.0.zip source archive.

an example from the codegen\w2c\w2c.vcproj file:

RelativePath=..\..\..\..\..\tools\codegen\src\wsdl2code.c

on my workstation, the only thing in   \tools\codegen\   is the javatool
directory.

I checked the SVN repository at [1] and see the same thing.

1. http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/

Where can these *.c files be downloaded from?


function parameter different from declaration parameter

2008-02-26 Thread Carl Lefrançois
when compiling the Axis2/C source I get many C4028 warnings formal
parameter x different from declaration

in the example below, the declared parameter is const int and the function
declares it as int.

declaration:  (\include\axis2_callback.h)
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_callback_report_error(
axis2_callback_t * callback,
const axutil_env_t * env,
const int exception);

function:   (\src\core\clientapi\callback.c)
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_callback_report_error(
axis2_callback_t * callback,
const axutil_env_t * env,
int exception)
{
axis2_callback_set_error(callback, env, exception);
return callback-on_error(callback, env, exception);
}


Is there a reason for this difference?  I am asking before I try changing
the declarations to see if they help me solve my debugging problem.

Thanks in advance!


[AXIS2C] trouble debugging under windows

2008-02-22 Thread Carl Lefrançois
For several days I have been struggling to enable line by line debugging in
visual C 6.0.

An example of the problem is that while stepping through code, when
attempting to step into a call to the client API, the debugger shows the
wrong lines of code and wrong call stack.

steps taken to resolve:

-make sure all modules are compiled with the same compiler and linker
options
-create new workspaces for each module
-take options directly from makefile provided in /build/win32
-replace LF line endings with windows-style CRLF line endings in .c and .h
sources (supposed to affect C preprocessor line count)

so far in all cases the behaviour is the same: I can step through my code
but not into any client API DLLs.

My hope in sending this message is that someone using the same environment
can confirm they are able to debug properly in client API DLLs (or any Axis2
DLL for that matter).

So far aside from work environment compatibility problems, the experience
with Axis2C is very positive.

Thanks in advance for any advice you may give me!
Carl


Re: iconv version mismatch

2008-02-19 Thread Carl Lefrançois
Thank you for your messages, Mark and Samisa

What is a jira and how do I raise one?  I will go ahead and do that for the
documentation bug about the iconv version.

Thanks for your assurance that the access violation is not related to
iconv.  This morning I cleaned and extracted the source a second time and
went through the install process again to make sure I did not miss any small
details.  The access violation is still there so I must assume there is
something incompatible with my system.  (I did a system-wide search for the
dlls Axis2c depends on and found no conflicting versions)

I am using winxp sp2 and the ms visual c++ 6.0 compiler.  I may be able to
try the suggested vs 2005 exp compiler but I am limited to a standard
corporate environment.

What I have tried so far:
-debug = 0(default) and debug = 1 in the root\build\win32\configure.in,
building with root\build\win32\build.bat: no errors during build but
access violation on launch (even of axis2_http_server.exe -h)

-debug = 1(default) and debug = 0, with_mysql = 1(default) and with_mysql =
0, with_tcp = 1 (default) and with_tcp = 0 in the root\configure.in,
building with root\build.bat: gives the following errors
=
apache2_out_transport_info.c
..\..\src\core\transport\http\server\apache2\axis2_apache2_out_transport_info.h(33)
: fatal error C1083: Cannot open include file: 'httpd.h': No such file or
directory
apache2_stream.c
..\..\src\core\transport\http\server\apache2\apache2_stream.h(25) : fatal
error C1083: Cannot open include file: 'httpd.h': No such file or directory
apache2_worker.c
..\..\src\core\transport\http\server\apache2\apache2_stream.h(25) : fatal
error C1083: Cannot open include file: 'httpd.h': No such file or directory
mod_axis2.c
..\..\src\core\transport\http\server\apache2\mod_axis2.c(19) : fatal error
C1083: Cannot open include file: 'httpd.h': No such file or directory
=
Apache is not mentioned as a dependency in the install guide.


Attaching a debugger on the access violation after launching
axis2_http_server.exe -h gives this call stack:

0002()
axis2_getopt(int * (void)* 0x0002, char * const * * (void)* 0x006215f0,
const char * 0x0040442c) line 71 + 3 bytes
main(int 2, char * * 0x006215f0) line 119 + 18 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 7c816fd7()

The instruction pointer is at line
if (optind = __argc || *(pos = __argv[optind]) != '-')
In getopt_windows.c with optind at 1.


Any suggestions on what may be wrong with my configuration are welcome :)

I will go back to using the executables from the axis2c binary
distribution.  So far I have succeeded in adding a custom service to the
server and have consumed it with a custom client.  There is a pesky access
violation resulting from axis2_svc_client_free() that I can hopefully track
down once I get debug versions of the client dlls running.


Sorry for the long message and thanks in advance for any help that might be
forthcoming.

Carl


problem building debug version of Axis2/C on Win32

2008-02-18 Thread Carl Lefrançois
Hello group,
I ran into a configuration problem when building the debug version of
Axis2/C under Win32 Visual C 6.0 after setting DEBUG=1 on line 30 of
\axis2c\build\win32\configure.in

attempting nmake install with this configuration gives a LNK1146 error no
argument specified with option /INCREMENTAL


line 180 of file \axis2c\build\win32\makefile reads:
LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL

in the msdn documentation I found
(link: http://msdn2.microsoft.com/en-us/library/4khtbfyf(vs.80).aspx )
/INCREMENTAL is implied when /DEBUG is specified.

so I removed /INCREMENTAL from line 180 of the makefile and now the nmake
finishes.

Hope this helps


iconv version mismatch

2008-02-18 Thread Carl Lefrançois
In the axis2c\build\win32\configure.in file, the following line indicates
that iconv version 1.9.2 is expected.

ICONV_BIN_DIR = E:\iconv-1.9.2.win32

however the rest of the documentation refers to iconv version 1.9.1.

Which iconv version is the right one?

build works fine with either version, but I am get an access violation on
launch of axis2_http_server.exe in both cases.  This problem may be
unrelated however so I will continue troubleshooting.