Re: WSDL2C: Deconflicting Duplicate Types and Methods Between WSDLs

2009-12-04 Thread Dimuthu Gamage
Hi,

Unfortunately with the current setup there is no proper way to solve that
conflict. One possible solution is to provide a parameter to set the prefix
as you suggested, but there is no such thing implemented.

Can you please create a jira to implement this option?

Thanks
Dimuthu

On Sat, Oct 31, 2009 at 4:47 PM, Andrew Grissom andrew_gris...@yahoo.comwrote:

 I have a project where I have multiple WSDLs that contain a types with the
 same name, but with different definitions, and methods with the same name
 but different parameters. When I generate the code using:

 WSDL2C -uri MyWSDL1.wsdl -d adb -u -o $OUTPUT_DIR

 Everything is fine if I create separate executables for accessing each
 WSDL.  However, if I compile them together I get numerous duplicate symbols.

 If there a way in WSDLC to have it generate something like:

 adb_prefix_MyType or adb_prefix_MyMethod_create

 instead of:

 adb_MyType or adb_MyMethod_create

 I attempted to use the -p option when starting WSDL2C but it does not
 appear to do anything.

 Am I missing something?




-- 
Thanks,
Dimuthu Gamage

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


Re: WSDL2C: What to do after compiling Axis2 1.4.1. nightly build

2009-05-01 Thread Rajika Kumarasiri
On Sat, May 2, 2009 at 5:18 AM, Sam Carleton scarle...@miltonstreet.comwrote:

 Folks,

hi Sam,



 I am after the latest greatest WSDL2C, which from my understanding is in
 the Axis2/Java nightly build.

 I happen to be one of those C/C++ developers that does not know Java all
 that well.  I have pulled down the code from SVN, installed Maven and the
 JDK.  I have managed to get the nightly build to build, but now what?
 Should I deploy it?  If so how?  If not, what do I set the %AXIS2_HOME% to
 so that the WSDL2C.bat can find the correct code?


WSDL2C tool uses axis2 libs to generate code. You don't have to deploy
axis2- but need to unzip and set the AXIS2_HOME such that it points to the
installation directory of axis2.  If you have a look in the README
file(inside bin/tools/wsdl2c  folder in axis2/c) it has the instructions to
run the tool together with some usage scenarios.

-Rajika



 Sam




-- 
http://wso2.org
http://llvm.org
http://www.minix3.org


Re: WSDL2C: What to do after compiling Axis2 1.4.1. nightly build

2009-05-01 Thread Sam Carleton
Rajika,

I am going off of this email from a week and a half ago, please see my
question below:

On Wed, Apr 22, 2009 at 11:45 PM, Manjula Peiris manj...@wso2.com wrote:

 On Wed, 2009-04-22 at 11:48 -0400, Bennett, Robert P wrote:
 
  
   Major Changes Since Last Release
   
  
  1. XPath support for Axiom XML object model
  2. CGI support
  3. Improvements to MTOM to send, receive very large attachments
  4. Improvements to AMQP transport
  5. Improvements to WSDL2C codegen tool
 
  How are Improvements to WSDL2C codegen tool a major change to Axis2/C
  version 1.6.0?
  Isn't WSDL2C part of the Axis2, which is still 1.4.1?

 The WSDL2C tool is maintained by Axis2/C community. After releasing
 1.5.0 there are some bug fixes and improvements done to the WSDL2C tool.
 Further Axis2/C code also fixed for these changes. You can get these
 latest modifications from an Axis2 nightly build.

 Thanks,
 -Manjula.

Q1: So if I wanted the latest WSDL2C, I need to get from the nightly
build of the project Axis2/Java?

(I have gotten the latest subversion code from the project, installed
mvn, and run mvn install successfully on the Axis2/Java code)

Q2: After running the mvn install, what must I do to use the newly
compiled WSDL2C?

What I don't see is a bin folder in the root of the Axis2/Java
project, what I have is this:

DIR  etc
DIR  legal
DIR  modules
DIR  release-docs
4,506   build.xml
11,359 LICENSE.txt
 1,236  NOTICE.txt
11,091 pom.xml
2,504   README.txt
39,552 release-notes.html

I did read the README.TXT, which is how I knew the correct way to get
mvn to build everything, but it does not talk about what I need to do
to actually use any of the java code.  I am assuming I need to set a
class path or something, but I don't know where I should be setting
the class path, not being a java expert.

Sam


Re: WSDL2C: What to do after compiling Axis2 1.4.1. nightly build

2009-05-01 Thread Rajika Kumarasiri
On Sat, May 2, 2009 at 7:52 AM, Sam Carleton scarle...@gmail.com wrote:

 Rajika,


hi,



 I am going off of this email from a week and a half ago, please see my
 question below:

 On Wed, Apr 22, 2009 at 11:45 PM, Manjula Peiris manj...@wso2.com wrote:
 
  On Wed, 2009-04-22 at 11:48 -0400, Bennett, Robert P wrote:
  
   
Major Changes Since Last Release

   
   1. XPath support for Axiom XML object model
   2. CGI support
   3. Improvements to MTOM to send, receive very large attachments
   4. Improvements to AMQP transport
   5. Improvements to WSDL2C codegen tool
  
   How are Improvements to WSDL2C codegen tool a major change to Axis2/C
   version 1.6.0?
   Isn't WSDL2C part of the Axis2, which is still 1.4.1?
 
  The WSDL2C tool is maintained by Axis2/C community. After releasing
  1.5.0 there are some bug fixes and improvements done to the WSDL2C tool.
  Further Axis2/C code also fixed for these changes. You can get these
  latest modifications from an Axis2 nightly build.
 
  Thanks,
  -Manjula.

 Q1: So if I wanted the latest WSDL2C, I need to get from the nightly
 build of the project Axis2/Java?


Correct.



 (I have gotten the latest subversion code from the project, installed
 mvn, and run mvn install successfully on the Axis2/Java code)

 Q2: After running the mvn install, what must I do to use the newly
 compiled WSDL2C?


You'll find the nightly built of axis2 distribution inside




 What I don't see is a bin folder in the root of the Axis2/Java
 project, what I have is this:


If you carefully read the reply you'll see what I meant is the README file
of WSDL2C which is inside axis2c, not the README file what is in axis2java.



 DIR  etc
 DIR  legal
 DIR  modules
 DIR  release-docs
 4,506   build.xml
 11,359 LICENSE.txt
  1,236  NOTICE.txt
 11,091 pom.xml
 2,504   README.txt
 39,552 release-notes.html

 I did read the README.TXT, which is how I knew the correct way to get
 mvn to build everything, but it does not talk about what I need to do
 to actually use any of the java code.  I am assuming I need to set a
 class path or something, but I don't know where I should be setting
 the class path, not being a java expert.


Ok, try mvn assembly:assembly -Drelease  which will build the axis2/java
distro. inside modules/distribution/target. You need to unzip this and set
AXIS2_HOME varible to this location.
have a look at the shell script (bat script) WSDL2C.sh (in axis2/c distro in
side bin/tools/wsdl2c) to see how things works.
Sam, everhing is there in the documentaion, or the same question most
probably have been asked by another user.

-Rajika



 Sam




-- 
http://wso2.org
http://llvm.org
http://www.minix3.org


Re: WSDL2C exception

2009-04-06 Thread Anil
thanks alot Dimuthu

On Sun, Apr 5, 2009 at 6:18 PM, Dimuthu Gamage dimut...@gmail.com wrote:

 Hi Anil,
 You wsdl should have external wsdls or/and schemas that are imported or
 included. In that case you need to be online when running the tool. That is
 not a requirement of the tool.

 Thanks
 Dimuthu


 On Sun, Apr 5, 2009 at 10:06 AM, Anil anil.pund...@gmail.com wrote:

 I was trying to generate skelton and stub code from a wsdl file using
 WSDL2C.(axis2-1.4.1). It works fine when i am connected to internet. But
 throws exception when i am offline. Is it mandatory to be connected to
 internet when running WSDL2C? or am i missing any of the option in WSDL2C??
 Please guide/coorect me if i am wrong.

 --
 Regards,
 -Anil




 --
 Thanks,
 Dimuthu Gamage

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




-- 
Cheers,
-Anil


Re: WSDL2C exception

2009-04-05 Thread Dimuthu Gamage
Hi Anil,
You wsdl should have external wsdls or/and schemas that are imported or
included. In that case you need to be online when running the tool. That is
not a requirement of the tool.

Thanks
Dimuthu

On Sun, Apr 5, 2009 at 10:06 AM, Anil anil.pund...@gmail.com wrote:

 I was trying to generate skelton and stub code from a wsdl file using
 WSDL2C.(axis2-1.4.1). It works fine when i am connected to internet. But
 throws exception when i am offline. Is it mandatory to be connected to
 internet when running WSDL2C? or am i missing any of the option in WSDL2C??
 Please guide/coorect me if i am wrong.

 --
 Regards,
 -Anil




-- 
Thanks,
Dimuthu Gamage

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


Re: WSDL2C tool

2009-04-04 Thread Dimuthu Gamage
Hi,
When you use -d none the operations are generated as axiom_node input and
axiom_node output. If you want to generate c native types instead of that
drop -d none part in the command (or just -d adb). And possibly add the -uw
flag if you are using a nightly build.

java org.apache.axis2.wsdl.WSDL2C -uri wsdl_file -ss -uw

Thanks
Dimuthu

On Fri, Apr 3, 2009 at 5:10 PM, ramesh Gopal fatuzorin2...@yahoo.comwrote:



 Hello.

 I am having the following wsdl.

 ?xml version=1.0 encoding=UTF-8 ?
 wsdl:definitions targetNamespace=http://xxx/visa_valid; xmlns=
 http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://xxx/visa_valid;
 name=visa_valid xmlns:apachesoap=http://xml.apache.org/xml-soap;
 xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsdl=
 http://schemas..xmlsoap.org/wsdl/; xmlns:wsdlsoap=
 http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema;
 wsdl:types
 schema elementFormDefault=qualified
 targetNamespace=http:/xxx/visa_valid xmlns=
 http://www.w3.org/2001/XMLSchema;
 element name=visa_valid
 complexType
 sequence
 element name=in0 type=xsd:string /
 element name=in1 type=xsd:string /
 element name=in2 type=xsd:string /
 /sequence
 /complexType
 /element
 element name=visa_validresponse
 complexType
 sequence
 element name=out0 type=xsd:string /
 element name=out1 type=xsd:decimal /
 element name=out2 type=xsd:decimal /
 /sequence
 /complexType
 /element
 /schema
 /wsdl:types
 wsdl:message name=visa_validresp
 wsdl:part name=body element=tns:visa_validresponse /
 /wsdl:message
 wsdl:message name=visa_validreq
 wsdl:part name=body element=tns:visa_valid /
 /wsdl:message
 wsdl:portType name=visa_validporttype
 wsdl:operation name=visa_valid
 wsdl:input message=tns:visa_validreq name=visa_validrequest /
 wsdl:output message=tns:visa_validresp name=visa_validresponse /
 /wsdl:operation
 /wsdl:portType
 wsdl:binding name=visa_validsoapbinding type=tns:visa_validporttype
 wsdlsoap:binding style=document transport=
 http://schemas.xmlsoap.org/soap/http; /
 wsdl:operation name=visa_valid
 wsdlsoap:operation soapAction= /
 wsdl:input
 wsdlsoap:body use=literal /
 /wsdl:input
 wsdl:output
 wsdlsoap:body use=literal /
 /wsdl:output
 /wsdl:operation
 /wsdl:binding
 wsdl:service name=ws_visa
 wsdl:port binding=tns:visa_validsoapbinding name=visa_validservice
 wsdlsoap:address location=http://ip:port/axis2/services/ws_visa /
 /wsdl:port
 /wsdl:service
 /wsdl:definitions

 Now when I try to generate the client code using the command:

 java org.apache.axis2.wsdl.WSDL2C -uri wsdl_file -sd -d none

 it generates the client stub.

 However, there is a lot of difference between the WSDL2JAVA and WSDL2C
 tools.

 The WSDL2C generates the code taking a node as an input value. Then it
 becomes imperative that the user forms the xml request and sends it.
 But in WSDL2Java, it just needs a value for input (The value can be either
 a string / integer/ decimal etc value).
 Is this a expected behaviour with WSDL2C 


 Does WSDL2C only cater to SOAP requests ? I dont see any code being
 generated for HTTP / MQ requests ?

 --- On Thu, 2/4/09, ramesh Gopal fatuzorin2...@yahoo.com wrote:

  From: ramesh Gopal fatuzorin2...@yahoo.com
  Subject: WSDL2C tool
  To: Apache AXIS C User List axis-c-user@ws.apache.org
  Date: Thursday, 2 April, 2009, 11:20 AM
 
 
  Hello,
 
  I have used WSDL2C (taking input as a wsdl file) to
  generate the a client code using the command mentioned below
  :
 
  java org.apache.axis2.wsdl.WSDL2C -uri wsdl_file
  -sd -d none
 
  Does the WSDL2C parse the wsdl to a point where it can get
  more information about what the input/output datatypes are
  ???
  input/output message tags are (eg ... if max is an
  input tag does WSDL2C retrieve this information too) 
 
  I have used a Web Services explorer tool on Eclipse, and
  saw that this gets all the specific information from a wsdl
  file.
 
  Its my understanding that expecting the user to know all
  this information from a wsdl (and that too from someone who
  is new to Web service world), how do we see all this
  happening ???
 
  Rgds,
  Ramesh.
 
 
Add more friends to your messenger and
  enjoy! Go to http://messenger.yahoo.com/invite/
 
 


  Add more friends to your messenger and enjoy! Go to
 http://messenger.yahoo.com/invite/




-- 
Thanks,
Dimuthu Gamage

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


Re: WSDL2C tool

2009-04-03 Thread ramesh Gopal


Hello.

I am having the following wsdl.

?xml version=1.0 encoding=UTF-8 ? 
wsdl:definitions targetNamespace=http://xxx/visa_valid; 
xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://xxx/visa_valid; 
name=visa_valid xmlns:apachesoap=http://xml.apache.org/xml-soap; 
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; 
xmlns:wsdl=http://schemas..xmlsoap.org/wsdl/; 
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
wsdl:types 
schema elementFormDefault=qualified targetNamespace=http:/xxx/visa_valid 
xmlns=http://www.w3.org/2001/XMLSchema; 
element name=visa_valid 
complexType 
sequence 
element name=in0 type=xsd:string / 
element name=in1 type=xsd:string / 
element name=in2 type=xsd:string / 
/sequence 
/complexType 
/element 
element name=visa_validresponse 
complexType 
sequence 
element name=out0 type=xsd:string / 
element name=out1 type=xsd:decimal / 
element name=out2 type=xsd:decimal / 
/sequence 
/complexType 
/element 
/schema 
/wsdl:types 
wsdl:message name=visa_validresp 
wsdl:part name=body element=tns:visa_validresponse / 
/wsdl:message 
wsdl:message name=visa_validreq 
wsdl:part name=body element=tns:visa_valid / 
/wsdl:message 
wsdl:portType name=visa_validporttype 
wsdl:operation name=visa_valid 
wsdl:input message=tns:visa_validreq name=visa_validrequest / 
wsdl:output message=tns:visa_validresp name=visa_validresponse / 
/wsdl:operation 
/wsdl:portType 
wsdl:binding name=visa_validsoapbinding type=tns:visa_validporttype 
wsdlsoap:binding style=document 
transport=http://schemas.xmlsoap.org/soap/http; / 
wsdl:operation name=visa_valid 
wsdlsoap:operation soapAction= / 
wsdl:input 
wsdlsoap:body use=literal / 
/wsdl:input 
wsdl:output 
wsdlsoap:body use=literal / 
/wsdl:output 
/wsdl:operation 
/wsdl:binding 
wsdl:service name=ws_visa 
wsdl:port binding=tns:visa_validsoapbinding name=visa_validservice 
wsdlsoap:address location=http://ip:port/axis2/services/ws_visa / 
/wsdl:port 
/wsdl:service 
/wsdl:definitions

Now when I try to generate the client code using the command:

java org.apache.axis2.wsdl.WSDL2C -uri wsdl_file -sd -d none

it generates the client stub.

However, there is a lot of difference between the WSDL2JAVA and WSDL2C tools.

The WSDL2C generates the code taking a node as an input value. Then it becomes 
imperative that the user forms the xml request and sends it.
But in WSDL2Java, it just needs a value for input (The value can be either a 
string / integer/ decimal etc value).
Is this a expected behaviour with WSDL2C 


Does WSDL2C only cater to SOAP requests ? I dont see any code being generated 
for HTTP / MQ requests ?

--- On Thu, 2/4/09, ramesh Gopal fatuzorin2...@yahoo.com wrote:

 From: ramesh Gopal fatuzorin2...@yahoo.com
 Subject: WSDL2C tool
 To: Apache AXIS C User List axis-c-user@ws.apache.org
 Date: Thursday, 2 April, 2009, 11:20 AM
 
 
 Hello,
 
 I have used WSDL2C (taking input as a wsdl file) to
 generate the a client code using the command mentioned below
 :
 
 java org.apache.axis2.wsdl.WSDL2C -uri wsdl_file
 -sd -d none
 
 Does the WSDL2C parse the wsdl to a point where it can get
 more information about what the input/output datatypes are
 ??? 
 input/output message tags are (eg ... if max is an
 input tag does WSDL2C retrieve this information too) 
 
 I have used a Web Services explorer tool on Eclipse, and
 saw that this gets all the specific information from a wsdl
 file.
 
 Its my understanding that expecting the user to know all
 this information from a wsdl (and that too from someone who
 is new to Web service world), how do we see all this
 happening ???
 
 Rgds,
 Ramesh.
 
 
       Add more friends to your messenger and
 enjoy! Go to http://messenger.yahoo.com/invite/
 
 


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/



Re: wsdl2c question

2008-09-04 Thread Dimuthu Gamage
Hi Raghu,

This can be due to 'UserCode' name is used for an element and 2 types (in
different namespaces but with same name) in your WSDL.

Just try to build the adb model depending on what is actually required.

For an example if you generating stub you can start with the
axis2_stub_your_service.h and identify the required adb objects for the
parameter types of the operation. Then follow the header of that perticular
adb object (you only need to concentrate on getters and setters) and
identify the adb object in the parameters of their getters and setters. You
can continue like this until the parameters of getters and setters are
simple types.

Thanks
Dimuthu

On Fri, Sep 5, 2008 at 2:25 AM, Raghu Udupa [EMAIL PROTECTED] wrote:

  Hi,



 I am using wsdl2c tool to generate C code for model object with ADB
 bindings. For each XML element, I see 3 sets of files like

 adb_UserCode.c

 adb_UserCode.h

 adb_UserCode_type0.c

 adb_UserCode_type0.h

 adb_UserCode_type1.c

 adb_UserCode_type1.h



 I would like to know how what each combination of files, adb_UserCode,
 adb_UserCode_type0 and adb_UserCode_type 1 is used for?



 Thanks,

 Raghu




-- 
Thanks,
Dimuthu Gamage

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


RE : RE : RE : RE : WSDL2C deserialisation problem

2008-07-17 Thread Lefrancois, Carl
Hi Dimuthu,

I did try adding those lines to the deserialize function but had the same 
result. As part of the debugging process I downloaded the nightly snapshot 
dated 2008/07/07.  It is possible there has been a fix since then.

I'm not convinced this is a real bug, but I still can't explain what mistake I 
made to get this behaviour.  If no one else is having this problem then it must 
be me :)

Anyway it works with this patch.  The WSDL on the server stays the same and my 
local WSDL used to generate the stubs can have this modification.  Thanks for 
your suggestions.


Carl
-Message d'origine-
De : Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi, juillet 17, 2008 10:46
À : Apache AXIS C User List
Objet : Re: RE : RE : RE : WSDL2C deserialisation problem


Hi Carl,
Again I tried without any elements in the parent type, i.e. only with an 
attribute as in your case. But it was generating correct code and give the 
correct result at running. May be some modification in the latest svn may have 
correct the problem. (i believe some correction done after axis2/java 1.4 
release).

So from your note I saw it works when 

  current_node = first_node;
  is_early_node_valid = AXIS2_FALSE;

is at the start. I think you can just add these lines in the deserialize 
funciton without changing the wsdl. (you may able to debug the logic removing 
the code that handle your fake element from the deserialize logic.

Thanks
Dimuthu


On Wed, Jul 16, 2008 at 8:43 PM, Lefrancois, Carl [EMAIL PROTECTED] wrote:

Hi Dimuthu,

More information on this interesting problem...

I decided to start by modifying the definition of my schema to try and get 
around the current_node initialisation problem.  I changed the definition of 
the base type to this:

   xs:complexType name=ActivityType
   xs:sequence
   xs:element name=deser_test type=xs:int minOccurs=0/
   /xs:sequence
   xs:attribute ref=addDataTypes:ObjectIdentifier use=optional/
   /xs:complexType

I ignore the deser_test element and my source document never contains it, but 
the new generated code for deserialisation contains this:


/*
 * building deser_test element
 */



  current_node = first_node;
  is_early_node_valid = AXIS2_FALSE;


And now my ActivityNumber element is correctly deserialised.

Is there anything more I can do to help debug this behaviour?

-Carl



-Message d'origine-
De : Lefrancois, Carl
Envoyé : mardi, juillet 8, 2008 11:23
À : Apache AXIS C User List
Objet : RE : RE : WSDL2C deserialisation problem


Hi Dimuthu,

the parent type is
   xs:complexType name=ActivityType
   xs:attribute ref=addDataTypes:ObjectIdentifier use=optional/
   /xs:complexType

Please let me know if there is anything else I can send you to help figure this 
out.

I already tried setting

  current_node = first_node;

as described in my last response.  I will try with the

  is_early_node_valid = AXIS2_FALSE; and see if 
it helps.


Carl




-Message d'origine-
De : Dimuthu Gamage [mailto:[EMAIL PROTECTED]
Envoyé : lundi, juillet 7, 2008 21:17
À : Apache AXIS C User List
Objet : Re: RE : WSDL2C deserialisation problem


Hi Carl,
I have a test case with the following schema and it works fine

   xs:complexType name=DiagonalMatrix
   xs:complexContent
   xs:extension base=ax21:Matrix
   xs:sequence
   xs:element name=somejunk minOccurs=0  
type=xs:int/
   xs:element name=diagonal nillable=true 
type=ax21:MatrixRow/
   xs:element name=anotherjunk minOccurs=0  
type=xs:int/
   /xs:sequence
   xs:attribute name=diagonalSum type=xs:int/
   /xs:extension
   /xs:complexContent
   /xs:complexType
   xs:complexType name=Matrix
   xs:sequence
   xs:element minOccurs=0 maxOccurs=unbounded name=rows 
nillable=true type=ax21:MatrixRow/ !-- i removed maxOcccurs=unbounded 
part and checked, it woring too --
   /xs:sequence
   xs:attribute name=rowCount type=xs:int/
   /xs:complexType
   xs:complexType name=MatrixRow
   xs:sequence
   xs:element maxOccurs=unbounded minOccurs=0 
name=columns nillable=true type=xs:int/
   /xs:sequence
   xs:attribute name=columnCount type=xs:int/
   /xs:complexType

I think this is exactly simmilar to your schema (it has elements and an 
attribute), may be the parent type is the different.  Just check whether there 
is special different in 'ActivityType' in your schema with the Matrix type 
here. It s better if you can send

RE : RE : RE : WSDL2C deserialisation problem

2008-07-16 Thread Lefrancois, Carl
Hi Dimuthu,

More information on this interesting problem...

I decided to start by modifying the definition of my schema to try and get 
around the current_node initialisation problem.  I changed the definition of 
the base type to this:

xs:complexType name=ActivityType
xs:sequence
xs:element name=deser_test type=xs:int minOccurs=0/
/xs:sequence
xs:attribute ref=addDataTypes:ObjectIdentifier use=optional/
/xs:complexType

I ignore the deser_test element and my source document never contains it, but 
the new generated code for deserialisation contains this: 

 
 /*
  * building deser_test element
  */
 
 
 
   current_node = first_node;
   is_early_node_valid = AXIS2_FALSE;


And now my ActivityNumber element is correctly deserialised.

Is there anything more I can do to help debug this behaviour?

-Carl



-Message d'origine-
De : Lefrancois, Carl 
Envoyé : mardi, juillet 8, 2008 11:23
À : Apache AXIS C User List
Objet : RE : RE : WSDL2C deserialisation problem


Hi Dimuthu,

the parent type is 
xs:complexType name=ActivityType
xs:attribute ref=addDataTypes:ObjectIdentifier use=optional/
/xs:complexType

Please let me know if there is anything else I can send you to help figure this 
out.

I already tried setting 

   current_node = first_node;

as described in my last response.  I will try with the 

   is_early_node_valid = AXIS2_FALSE; and see 
if it helps.


Carl




-Message d'origine-
De : Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Envoyé : lundi, juillet 7, 2008 21:17
À : Apache AXIS C User List
Objet : Re: RE : WSDL2C deserialisation problem


Hi Carl,
I have a test case with the following schema and it works fine

xs:complexType name=DiagonalMatrix
xs:complexContent
xs:extension base=ax21:Matrix
xs:sequence
xs:element name=somejunk minOccurs=0  
type=xs:int/
xs:element name=diagonal nillable=true 
type=ax21:MatrixRow/
xs:element name=anotherjunk minOccurs=0  
type=xs:int/
/xs:sequence
xs:attribute name=diagonalSum type=xs:int/
/xs:extension
/xs:complexContent
/xs:complexType
xs:complexType name=Matrix
xs:sequence
xs:element minOccurs=0 maxOccurs=unbounded name=rows 
nillable=true type=ax21:MatrixRow/ !-- i removed maxOcccurs=unbounded 
part and checked, it woring too --
/xs:sequence
xs:attribute name=rowCount type=xs:int/
/xs:complexType
xs:complexType name=MatrixRow
xs:sequence
xs:element maxOccurs=unbounded minOccurs=0 
name=columns nillable=true type=xs:int/
/xs:sequence
xs:attribute name=columnCount type=xs:int/
/xs:complexType

I think this is exactly simmilar to your schema (it has elements and an 
attribute), may be the parent type is the different.  Just check whether there 
is special different in 'ActivityType' in your schema with the Matrix type 
here. It s better if you can send that as well.

And normally at the stat of the deserialize, we see the following code segment 
code together, you may give a try with it too.

   current_node = first_node;
   is_early_node_valid = AXIS2_FALSE;

Thanks
Dimuthu


On Tue, Jul 8, 2008 at 2:19 AM, Lefrancois, Carl [EMAIL PROTECTED] wrote:


Hi Dimuthu

Thanks for the quick response.  The schema piece that defines the commercial 
activity type is

   xs:complexType name=CommercialActivityType
   xs:complexContent
   xs:extension base=ActivityType
   xs:sequence
   xs:element name=ActivityNumber 
type=CommercialActivityNumberFormat minOccurs=0/
   xs:element name=RiskPoint 
type=addDataTypes:CodeValueType minOccurs=0/
   xs:element name=DefaultOccupancyPercentage 
type=addDataTypes:PercentageType minOccurs=0/
   xs:element name=RejectingActivity 
type=addDataTypes:BooleanType minOccurs=0/
   xs:element name=LinguisticDescription 
type=addDataTypes:LinguisticDescriptionType minOccurs=0 
maxOccurs=unbounded/
   /xs:sequence
   xs:attribute name=Id type=addDataTypes:IDFormat 
use=optional/
   /xs:extension
   /xs:complexContent
   /xs:complexType


I tried setting current_node = first_node; just after first_node = 
axiom_node_get_first_child(parent, env);  however, the call

Re: WSDL2C deserialisation problem

2008-07-07 Thread Dimuthu Gamage
Hi Carl,
My guess is this has missed the statement current_node = first_node; but it
is just a guess. If you can send us the schema part which correspond to
adb_CommercialActivityType we can find the error in the logic more easily
and find exactly what current_node is.

Thanks
Dimuthu

On Mon, Jul 7, 2008 at 9:39 PM, Lefrancois, Carl 
[EMAIL PROTECTED] wrote:

 Hello List,

 While deserialising my document, I have the following behaviour:

 current_node is initialised to NULL
 An if statement checks current_node to make sure it is not null before
 deserialising a sub-element.
 The sub-element can never be created during deserialisation.

 This is the first ADB object that gives me this problem.  I looked at
 the other files and they have a line like this:

 current_node = first_node;

 Somewhere before the if statement that checks current_node for NULL.
 However in the other files this line comes when deserialising another
 type of sub-element.  This may be a bug in WSDL2C logic.




 Below is a piece of the deserialise function for this element and the
 important lines have ### in front

 Because current node stays null, no qname is set on the line marked
 @@@.

 Then the if statement marked  does not enter and finally the
 sub-element can not get deserialised on the line marked %.

 This code was generated with the latest snapshot downloaded just before
 sending this mail

 Does anyone have an idea how to set the current_node properly for this
 element to deserialise?





axis2_status_t AXIS2_CALL
adb_CommercialActivityType_deserialize(
adb_CommercialActivityType_t* _CommercialActivityType,
const axutil_env_t *env,
axiom_node_t **dp_parent,
axis2_bool_t *dp_is_early_node_valid,
axis2_bool_t dont_care_minoccurs)
{
  axiom_node_t *parent = *dp_parent;

  axis2_status_t status = AXIS2_SUCCESS;

  axiom_attribute_t *parent_attri = NULL;
  axiom_element_t *parent_element = NULL;
  axis2_char_t *attrib_text = NULL;

  axutil_hash_t *attribute_hash = NULL;


  void *element = NULL;

 axis2_char_t* text_value = NULL;
 axutil_qname_t *qname = NULL;

   int i = 0;
   axutil_array_list_t *arr_list = NULL;

   int sequence_broken = 0;
   axiom_node_t *tmp_node = NULL;

axutil_qname_t *element_qname = NULL;

   axiom_node_t *first_node = NULL;
   axis2_bool_t is_early_node_valid = AXIS2_TRUE;
 ###axiom_node_t *current_node = NULL;
   axiom_element_t *current_element = NULL;

AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env-error, _CommercialActivityType,
 AXIS2_FAILURE);



  while(parent  axiom_node_get_node_type(parent, env) !=
 AXIOM_ELEMENT)
  {
  parent = axiom_node_get_next_sibling(parent, env);
  }
  if (NULL == parent)
  {
/* This should be checked before everything */
AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI,
Failed in building adb object for
 CommercialActivityType : 
NULL elemenet can not be passed to
 deserialize);
return AXIS2_FAILURE;
  }


  first_node = axiom_node_get_first_child(parent,
 env);


 parent_element = (axiom_element_t
 *)axiom_node_get_data_element(parent, env);
 attribute_hash =
 axiom_element_get_all_attributes(parent_element, env);



  parent_attri = NULL;
  attrib_text = NULL;
  if(attribute_hash)
  {
   axutil_hash_index_t *hi;
   void *val;
   const void *key;

   for (hi = axutil_hash_first(attribute_hash, env);
 hi; hi = axutil_hash_next(env, hi))
   {
   axutil_hash_this(hi, key, NULL, val);


   if(strstr((axis2_char_t*)key,
 ObjectIdentifier|http://www.axa.ca/add/types/data-types;))

   {
   parent_attri =
 (axiom_attribute_t*)val;
   break;
   }
   }
  }

  if(parent_attri)
  {
attrib_text =
 axiom_attribute_get_value(parent_attri, env);
  }
  else
  {
/* this is hoping that attribute is stored in
 ObjectIdentifier, this happnes when name is in default namespace */
attrib_text =
 axiom_element_get_attribute_value_by_name(parent_element, env,
 ObjectIdentifier);
  }

RE : WSDL2C deserialisation problem

2008-07-07 Thread Lefrancois, Carl

Hi Dimuthu

Thanks for the quick response.  The schema piece that defines the commercial 
activity type is

xs:complexType name=CommercialActivityType
xs:complexContent
xs:extension base=ActivityType
xs:sequence
xs:element name=ActivityNumber 
type=CommercialActivityNumberFormat minOccurs=0/
xs:element name=RiskPoint 
type=addDataTypes:CodeValueType minOccurs=0/
xs:element name=DefaultOccupancyPercentage 
type=addDataTypes:PercentageType minOccurs=0/
xs:element name=RejectingActivity 
type=addDataTypes:BooleanType minOccurs=0/
xs:element name=LinguisticDescription 
type=addDataTypes:LinguisticDescriptionType minOccurs=0 
maxOccurs=unbounded/
/xs:sequence
xs:attribute name=Id type=addDataTypes:IDFormat 
use=optional/
/xs:extension
/xs:complexContent
/xs:complexType


I tried setting current_node = first_node; just after first_node = 
axiom_node_get_first_child(parent, env);  however, the call to 
current_node = axiom_node_get_next_sibling(current_node, env);  set 
current_node to NULL.  

Here is a piece of the XML that I am trying to deserialise:

LiabilityActivities xmlns=
RelatedActivity
ActivityNumber503200/ActivityNumber
/RelatedActivity

So I know the value is there.


Carl



-Message d'origine-
De : Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Envoyé : lundi, juillet 7, 2008 14:41
À : Apache AXIS C User List
Objet : Re: WSDL2C deserialisation problem


Hi Carl,
My guess is this has missed the statement current_node = first_node; but it is 
just a guess. If you can send us the schema part which correspond to 
adb_CommercialActivityType we can find the error in the logic more easily and 
find exactly what current_node is.

Thanks
Dimuthu


On Mon, Jul 7, 2008 at 9:39 PM, Lefrancois, Carl [EMAIL PROTECTED] wrote:

Hello List,

While deserialising my document, I have the following behaviour:

current_node is initialised to NULL
An if statement checks current_node to make sure it is not null before
deserialising a sub-element.
The sub-element can never be created during deserialisation.

This is the first ADB object that gives me this problem.  I looked at
the other files and they have a line like this:

current_node = first_node;

Somewhere before the if statement that checks current_node for NULL.
However in the other files this line comes when deserialising another
type of sub-element.  This may be a bug in WSDL2C logic.




Below is a piece of the deserialise function for this element and the
important lines have ### in front

Because current node stays null, no qname is set on the line marked
@@@.

Then the if statement marked  does not enter and finally the
sub-element can not get deserialised on the line marked %.

This code was generated with the latest snapshot downloaded just before
sending this mail

Does anyone have an idea how to set the current_node properly for this
element to deserialise?





   axis2_status_t AXIS2_CALL
   adb_CommercialActivityType_deserialize(
   adb_CommercialActivityType_t* _CommercialActivityType,
   const axutil_env_t *env,
   axiom_node_t **dp_parent,
   axis2_bool_t *dp_is_early_node_valid,
   axis2_bool_t dont_care_minoccurs)
   {
 axiom_node_t *parent = *dp_parent;

 axis2_status_t status = AXIS2_SUCCESS;

 axiom_attribute_t *parent_attri = NULL;
 axiom_element_t *parent_element = NULL;
 axis2_char_t *attrib_text = NULL;

 axutil_hash_t *attribute_hash = NULL;


 void *element = NULL;

axis2_char_t* text_value = NULL;
axutil_qname_t *qname = NULL;

  int i = 0;
  axutil_array_list_t *arr_list = NULL;

  int sequence_broken = 0;
  axiom_node_t *tmp_node = NULL;

   axutil_qname_t *element_qname = NULL;

  axiom_node_t *first_node = NULL;
  axis2_bool_t is_early_node_valid = AXIS2_TRUE;
###axiom_node_t *current_node = NULL;
  axiom_element_t *current_element = NULL;

   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
   AXIS2_PARAM_CHECK(env-error, _CommercialActivityType,
AXIS2_FAILURE);



 while(parent  axiom_node_get_node_type(parent, env) !=
AXIOM_ELEMENT)
 {
 parent = axiom_node_get_next_sibling(parent, env);
 }
 if (NULL == parent)
 {
   /* This should be checked before everything */
   AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI,
   Failed in building adb object for
CommercialActivityType : 
   NULL elemenet can not be passed to
deserialize

Re: RE : WSDL2C deserialisation problem

2008-07-07 Thread Dimuthu Gamage
Hi Carl,
I have a test case with the following schema and it works fine

xs:complexType name=DiagonalMatrix
xs:complexContent
xs:extension base=ax21:Matrix
xs:sequence
xs:element name=somejunk minOccurs=0
type=xs:int/
xs:element name=diagonal nillable=true
type=ax21:MatrixRow/
xs:element name=anotherjunk minOccurs=0
type=xs:int/
/xs:sequence
xs:attribute name=diagonalSum type=xs:int/
/xs:extension
/xs:complexContent
/xs:complexType
xs:complexType name=Matrix
xs:sequence
xs:element minOccurs=0 maxOccurs=unbounded
name=rows nillable=true type=ax21:MatrixRow/ !-- i removed
maxOcccurs=unbounded part and checked, it woring too --
/xs:sequence
xs:attribute name=rowCount type=xs:int/
/xs:complexType
xs:complexType name=MatrixRow
xs:sequence
xs:element maxOccurs=unbounded minOccurs=0
name=columns nillable=true type=xs:int/
/xs:sequence
xs:attribute name=columnCount type=xs:int/
/xs:complexType

I think this is exactly simmilar to your schema (it has elements and an
attribute), may be the parent type is the different.  Just check whether
there is special different in 'ActivityType' in your schema with the Matrix
type here. It s better if you can send that as well.

And normally at the stat of the deserialize, we see the following code
segment code together, you may give a try with it too.

   current_node = first_node;
   is_early_node_valid = AXIS2_FALSE;

Thanks
Dimuthu

On Tue, Jul 8, 2008 at 2:19 AM, Lefrancois, Carl 
[EMAIL PROTECTED] wrote:


 Hi Dimuthu

 Thanks for the quick response.  The schema piece that defines the
 commercial activity type is

xs:complexType name=CommercialActivityType
xs:complexContent
xs:extension base=ActivityType
xs:sequence
xs:element name=ActivityNumber
 type=CommercialActivityNumberFormat minOccurs=0/
xs:element name=RiskPoint
 type=addDataTypes:CodeValueType minOccurs=0/
xs:element name=DefaultOccupancyPercentage
 type=addDataTypes:PercentageType minOccurs=0/
xs:element name=RejectingActivity
 type=addDataTypes:BooleanType minOccurs=0/
xs:element name=LinguisticDescription
 type=addDataTypes:LinguisticDescriptionType minOccurs=0
 maxOccurs=unbounded/
/xs:sequence
xs:attribute name=Id type=addDataTypes:IDFormat
 use=optional/
/xs:extension
/xs:complexContent
/xs:complexType


 I tried setting current_node = first_node; just after first_node =
 axiom_node_get_first_child(parent, env);  however, the call to
 current_node = axiom_node_get_next_sibling(current_node, env);  set
 current_node to NULL.

 Here is a piece of the XML that I am trying to deserialise:

LiabilityActivities xmlns=
RelatedActivity
ActivityNumber503200/ActivityNumber
/RelatedActivity

 So I know the value is there.


 Carl



 -Message d'origine-
 De : Dimuthu Gamage [mailto:[EMAIL PROTECTED]
 Envoyé : lundi, juillet 7, 2008 14:41
 À : Apache AXIS C User List
 Objet : Re: WSDL2C deserialisation problem


 Hi Carl,
 My guess is this has missed the statement current_node = first_node; but it
 is just a guess. If you can send us the schema part which correspond to
 adb_CommercialActivityType we can find the error in the logic more easily
 and find exactly what current_node is.

 Thanks
 Dimuthu


 On Mon, Jul 7, 2008 at 9:39 PM, Lefrancois, Carl 
 [EMAIL PROTECTED] wrote:

 Hello List,

 While deserialising my document, I have the following behaviour:

 current_node is initialised to NULL
 An if statement checks current_node to make sure it is not null before
 deserialising a sub-element.
 The sub-element can never be created during deserialisation.

 This is the first ADB object that gives me this problem.  I looked at
 the other files and they have a line like this:

 current_node = first_node;

 Somewhere before the if statement that checks current_node for NULL.
 However in the other files this line comes when deserialising another
 type of sub-element.  This may be a bug in WSDL2C logic.




 Below is a piece of the deserialise function for this element and the
 important lines have ### in front

 Because current node stays null, no qname is set on the line marked
 @@@.

 Then the if statement marked  does not enter and finally the
 sub-element can not get deserialised on the line marked %.

 This code was generated

Re: WSDL2C and fault

2008-06-09 Thread Dimuthu Gamage
Hi Frederic,
Usually the case is if you set an error and return NULL from the business
logic, the server should return an fault. (even in in-only messages the
server should be able to respond with faults)  But generated code for WSDL2C
tool currently having problem in returning soap faults. In fact we have some
issues report on that. I will try to fix them soon.

Thanks
Dimuthu

On Mon, Jun 9, 2008 at 8:34 PM, Frederic Heem [EMAIL PROTECTED]
wrote:

 Dear,
 Is it possible to generate a SOAP fault with the code generated by WSDL2C ?
 A fault can be generated for an In-Only message or only for In-Out message ?
 Best Regards,
 Frederic Heem



 __

 --- NOTICE ---

 This  email  and  any  attachments  are  confidential and are intended for
 the
 addressee  only.  If you have received this message by mistake, please
 contact
 us  immediately and  then  delete the message from your system.   You must
 not
 copy, distribute, disclose  or  act upon the contents of this email.
  Personal
 and corporate data submitted will be used in a correct, transparent and
 lawful
 manner. The data collected will be processed in paper or computerized form
 for
 the  performance  of  contractual  and  lawful  obligations as well as for
 the
 effective  management of business relationship.   The data processor is
 Telsey
 S.p.A.   The  data  subject may exercise all the rights set forth in art. 7
 of
 Law  by  Decree  30.06.2003  n.  196   as   reported   in  the  following
  url
 http://www.telsey.com/privacy.asp.


 __
 798t8RfNa6Dl8Ilf

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




Re: WSDL2C is not generating soap 1.2 compliant client stubs for wsdl with soap 1.2 bindings

2008-05-30 Thread naveen bhat
Hello group,

Kindly let me know if my queries are relevant to this forum.
I have not received any response for the query posted below.
Do i need to post this axis2/java forum?
Assistance needed.


On Mon, May 26, 2008 at 4:47 AM, naveen bhat [EMAIL PROTECTED]
wrote:

 Hello group,

 I am using a wsdl with soap 1.2 bindings.I generated
 client stub using three version of axis2/java (1.2/1.3/1.4). In all
 three I found that in the client stub the  call for the operation,let
 say add(for eg) always sets the soap version to AXIS2_SOAP11,but
 actually it should be AXIS2_SOAP12 for a wsdl with soap 1.2 bindings.
 I am not finding any options in WSDL2C tool to generate client code
 for soap 1.2 . I also tried to set the soap version to 1.2 (in main
 function of client) before calling the operation defined in stub ,but
 this did not work as the soap version was reset back to soap 1.1 in
 the stub(let say axis2_stub_op_add() for eg).

 So my question is how do  i use code generator to generate stub which
 can send soap 1.2 compliant message at the client side.

 PS: Following command was used to generate stub
WSDL2C.sh -uri wsdlpath -d adb -u



Re: WSDL2C is not generating soap 1.2 compliant client stubs for wsdl with soap 1.2 bindings

2008-05-30 Thread Dimuthu Gamage
Hi,
Please check the comment
https://issues.apache.org/jira/browse/AXIS2C-1168?focusedCommentId=12601123#action_12601123

Thanks
Dimuthu

On Fri, May 30, 2008 at 4:02 PM, naveen bhat
[EMAIL PROTECTED] wrote:
 Hello Dimuthu,

 I have raised a jira with key AXIS2C-1168 .

 Thanks ,
 Naveen


 On Fri, May 30, 2008 at 1:49 AM, Dimuthu Gamage [EMAIL PROTECTED] wrote:

 Hi naveen,

 In fact looks like this is not possible with the current wsdl2c
 generated code. It just pick the first binding and generate code for
 that.
 Can you please raise a JIRA. I will look in to that asap.

 Thanks
 Dimuthu

 On Fri, May 30, 2008 at 3:06 PM, naveen bhat
 [EMAIL PROTECTED] wrote:
  Hello group,
 
  Kindly let me know if my queries are relevant to this forum.
  I have not received any response for the query posted below.
  Do i need to post this axis2/java forum?
  Assistance needed.
 
 
  On Mon, May 26, 2008 at 4:47 AM, naveen bhat
  [EMAIL PROTECTED]
  wrote:
 
  Hello group,
 
  I am using a wsdl with soap 1.2 bindings.I generated
  client stub using three version of axis2/java (1.2/1.3/1.4). In all
  three I found that in the client stub the  call for the operation,let
  say add(for eg) always sets the soap version to AXIS2_SOAP11,but
  actually it should be AXIS2_SOAP12 for a wsdl with soap 1.2 bindings.
  I am not finding any options in WSDL2C tool to generate client code
  for soap 1.2 . I also tried to set the soap version to 1.2 (in main
  function of client) before calling the operation defined in stub ,but
  this did not work as the soap version was reset back to soap 1.1 in
  the stub(let say axis2_stub_op_add() for eg).
 
  So my question is how do  i use code generator to generate stub which
  can send soap 1.2 compliant message at the client side.
 
  PS: Following command was used to generate stub
 WSDL2C.sh -uri wsdlpath -d adb -u
 
 

 -
 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 : WSDL2C: structure definition is generated in C file so sizeof fails compilation

2008-04-21 Thread Lefrancois, Carl
Hi Alebu,
 
I may be mistaken, but there will be some type redefinition problems if
the struct is defined in a header that is included by many other files.
Is it possible to create an instance of the struct and use sizeof() on
that at run-time?  HTH
 
 

-Message d'origine-
De : alebu [mailto:[EMAIL PROTECTED] 
Envoyé : lundi, avril 21, 2008 08:38
À : Apache AXIS C User List
Objet : WSDL2C: structure definition is generated in C file so
sizeof fails compilation


Hi, I am generating web service using WSDL2C. In generated code
I got such a division of sources:
In header (.h) file i got type declaration like:
typedef struct adb_my_type adb_my_type_t;

But adb_my_type structure is located in source file (.c):
struct adb_my_type {
   // declaration of my_type
};

Such a location of sources creates a problem when I trying to
allocate memory for such a structure.
sizeof(adb_my_type_t) fails with incomplete type ...
As I understand, it happens because compiler can't discover
exact size of structure from header, because actual information
is available only from source file.
I moved declaration to header like:
struct adb_my_type {
   // declaration of my_type
};
typedef struct adb_my_type adb_my_type_t;

And now everything works fine, so I think that it is better to
generate code in such way.
Or maybe there is some motivation to do it like it is made for
now?
If so, then what is that motivation? And how then to get size of
structure?
I think It is code generator bug so thats why I actually write
that letter.
  _  

Ce message est confidentiel, à l'usage exclusif du destinataire
ci-dessus et son contenu ne représente en aucun cas un engagement de la
part de AXA, sauf en cas de stipulation expresse et par écrit de la part
de AXA. Toute publication, utilisation ou diffusion, même partielle,
doit être autorisée préalablement. Si vous n'êtes pas destinataire de ce
message, merci d'en avertir immédiatement l'expéditeur.

This e-mail message is confidential, for the exclusive use of the
addressee and its contents shall not constitute a commitment by AXA,
except as otherwise specifically provided in writing by AXA. Any
unauthorized disclosure, use or dissemination, either whole or partial,
is prohibited. If you are not the intended recipient of the message,
please notify the sender immediately.


RE: RE : WSDL2C: structure definition is generated in C file so sizeof fails compilation

2008-04-21 Thread Kamath, Navin
Hi,

 

The right way to do it is to define it in a header file and provide header 
macro guards inside the header file

 

#ifndef SOME_UNIQUE_IDENTIFIER

#define SOME_UNIQUE_IDENTIFIER

 

// struct defn

//whatever else

 

#endif /*SOME_UNIQUE_IDENTIFIER*/

 

But I am new to Axis2 as well, so better wait for more comments from experts 
before implementing it rapidly

 

Regards,

Navin



From: Lefrancois, Carl [mailto:[EMAIL PROTECTED] 
Sent: 21 April 2008 14:26
To: Apache AXIS C User List
Subject: RE : WSDL2C: structure definition is generated in C file so sizeof 
fails compilation

 

Hi Alebu,

 

I may be mistaken, but there will be some type redefinition problems if the 
struct is defined in a header that is included by many other files.  Is it 
possible to create an instance of the struct and use sizeof() on that at 
run-time?  HTH

 

 

-Message d'origine-
De : alebu [mailto:[EMAIL PROTECTED] 
Envoyé : lundi, avril 21, 2008 08:38
À : Apache AXIS C User List
Objet : WSDL2C: structure definition is generated in C file so sizeof 
fails compilation

Hi, I am generating web service using WSDL2C. In generated code I got 
such a division of sources:
In header (.h) file i got type declaration like:
typedef struct adb_my_type adb_my_type_t;

But adb_my_type structure is located in source file (.c):
struct adb_my_type {
   // declaration of my_type
};

Such a location of sources creates a problem when I trying to allocate 
memory for such a structure.
sizeof(adb_my_type_t) fails with incomplete type ...
As I understand, it happens because compiler can't discover exact size 
of structure from header, because actual information
is available only from source file.
I moved declaration to header like:
struct adb_my_type {
   // declaration of my_type
};
typedef struct adb_my_type adb_my_type_t;

And now everything works fine, so I think that it is better to generate 
code in such way.
Or maybe there is some motivation to do it like it is made for now?
If so, then what is that motivation? And how then to get size of 
structure?
I think It is code generator bug so thats why I actually write that 
letter.






Ce message est confidentiel, à l'usage exclusif du destinataire ci-dessus et 
son contenu ne représente en aucun cas un engagement de la part de AXA, sauf en 
cas de stipulation expresse et par écrit de la part de AXA. Toute publication, 
utilisation ou diffusion, même partielle, doit être autorisée préalablement. Si 
vous n'êtes pas destinataire de ce message, merci d'en avertir immédiatement 
l'expéditeur.

This e-mail message is confidential, for the exclusive use of the addressee 
and its contents shall not constitute a commitment by AXA, except as otherwise 
specifically provided in writing by AXA. Any unauthorized disclosure, use or 
dissemination, either whole or partial, is prohibited. If you are not the 
intended recipient of the message, please notify the sender immediately. 



IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


Re: WSDL2C: structure definition is generated in C file so sizeof fails compilation

2008-04-21 Thread Dimuthu Gamage
Hi alebu,
It is really encouraged to use adb_my_type_create instead of
explicitly using malloc to create the adb objects. I think create/free
function should be completely able to fulfill your needs in managing
object life.

Thanks
Dimuthu

On Mon, Apr 21, 2008 at 6:08 PM, alebu [EMAIL PROTECTED] wrote:
 Hi, I am generating web service using WSDL2C. In generated code I got such a
 division of sources:
 In header (.h) file i got type declaration like:
 typedef struct adb_my_type adb_my_type_t;

 But adb_my_type structure is located in source file (.c):
  struct adb_my_type {
// declaration of my_type
 };

 Such a location of sources creates a problem when I trying to allocate
 memory for such a structure.
 sizeof(adb_my_type_t) fails with incomplete type ...
  As I understand, it happens because compiler can't discover exact size of
 structure from header, because actual information
 is available only from source file.
 I moved declaration to header like:
 struct adb_my_type {
 // declaration of my_type
  };
 typedef struct adb_my_type adb_my_type_t;

 And now everything works fine, so I think that it is better to generate code
 in such way.
 Or maybe there is some motivation to do it like it is made for now?
 If so, then what is that motivation? And how then to get size of structure?
  I think It is code generator bug so thats why I actually write that letter.





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



Re: RE : WSDL2C: structure definition is generated in C file so sizeof fails compilation

2008-04-21 Thread Dimuthu Gamage
Hi Kamath,
Adb headers already follow that and you will never get redefinition
problems including many of them.

Thanks
Dimuthu

On Mon, Apr 21, 2008 at 7:02 PM, Kamath, Navin [EMAIL PROTECTED] wrote:




 Hi,



 The right way to do it is to define it in a header file and provide header
 macro guards inside the header file



 #ifndef SOME_UNIQUE_IDENTIFIER

 #define SOME_UNIQUE_IDENTIFIER



 // struct defn

 //whatever else



 #endif /*SOME_UNIQUE_IDENTIFIER*/



 But I am new to Axis2 as well, so better wait for more comments from experts
 before implementing it rapidly



 Regards,

 Navin

  


 From: Lefrancois, Carl [mailto:[EMAIL PROTECTED]
  Sent: 21 April 2008 14:26
  To: Apache AXIS C User List
  Subject: RE : WSDL2C: structure definition is generated in C file so sizeof
 fails compilation







 Hi Alebu,





 I may be mistaken, but there will be some type redefinition problems if the
 struct is defined in a header that is included by many other files.  Is it
 possible to create an instance of the struct and use sizeof() on that at
 run-time?  HTH








 -Message d'origine-
  De : alebu [mailto:[EMAIL PROTECTED]
  Envoyé : lundi, avril 21, 2008 08:38
  À : Apache AXIS C User List
  Objet : WSDL2C: structure definition is generated in C file so sizeof fails
 compilation

 Hi, I am generating web service using WSDL2C. In generated code I got such a
 division of sources:
  In header (.h) file i got type declaration like:
  typedef struct adb_my_type adb_my_type_t;

  But adb_my_type structure is located in source file (.c):
  struct adb_my_type {
 // declaration of my_type
  };

  Such a location of sources creates a problem when I trying to allocate
 memory for such a structure.
  sizeof(adb_my_type_t) fails with incomplete type ...
  As I understand, it happens because compiler can't discover exact size of
 structure from header, because actual information
  is available only from source file.
  I moved declaration to header like:
  struct adb_my_type {
 // declaration of my_type
  };
  typedef struct adb_my_type adb_my_type_t;

  And now everything works fine, so I think that it is better to generate
 code in such way.
  Or maybe there is some motivation to do it like it is made for now?
  If so, then what is that motivation? And how then to get size of structure?
  I think It is code generator bug so thats why I actually write that letter.




  



 Ce message est confidentiel, à l'usage exclusif du destinataire ci-dessus
 et son contenu ne représente en aucun cas un engagement de la part de AXA,
 sauf en cas de stipulation expresse et par écrit de la part de AXA. Toute
 publication, utilisation ou diffusion, même partielle, doit être autorisée
 préalablement. Si vous n'êtes pas destinataire de ce message, merci d'en
 avertir immédiatement l'expéditeur.

  This e-mail message is confidential, for the exclusive use of the
 addressee and its contents shall not constitute a commitment by AXA, except
 as otherwise specifically provided in writing by AXA. Any unauthorized
 disclosure, use or dissemination, either whole or partial, is prohibited. If
 you are not the intended recipient of the message, please notify the sender
 immediately. 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland



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



Re: WSDL2C

2008-04-04 Thread Dimuthu Gamage
Hi Kamath,

Apparently this is not a problem in the generated code.. Did you
include the generated axis2_stub_Calc2.h in your source. If so did you
set the headers path to the axis2/c headers directory?

Can you try declaring all the types in the first part of the
function?, There are issues in windows if we mix variable declaration
inside function body.

void main()
{
   /* first declaration */
   axutil_env_t *env;
   axs2_stub_t *stub;

   /* then usage*/
   env = ...;
   stub = ...;
}

Hope this will useful in catching the problem.

Thanks
Dimuthu

On Fri, Apr 4, 2008 at 9:34 PM, Kamath, Navin [EMAIL PROTECTED] wrote:
 Thanks Dimuthu. Now I got it to generate some stuff

  I have further questions about the types generated. I am using the
  incantation

  ... -uri calc2.wsdl -ss -sd -g -d adb -f

  Where calc2.wsdl is the wsdl for an extended calculator service (see
  attached)

  I was able to get the code generated. Now I want to write some simple
  client to invoke on add using ADB but couldn't find examples, so used
  the header file to work out a simple client which looks like this...

  snip
 ... // create env etc

 axis2_stub_t* stub = axis2_stub_create_Calc2(
 env, client_home, http://localhost:9090/axis2/services/calc2;
 );

 adb_add_t* in = adb_add_create(env);
 if (stub == NULL)
 {
 return;
 }

 // populate adb_add_t (not done yet)
 adb_addResponse_t* out = axis2_stub_op_Calc2_add(stub, env, in);
 printf(Received: \n);
 printf(adb_addResponse_get_addReturn(out, env));
 ...
  /snip

  Getting the following error

 cl.exe /nologo /D WIN32 /D AXIS2_DECLARE_EXPORT /D
  _WINDOWS /D _M
  BCS axis2_stub_Calc2.c calc2_client.c /I.\..\..\..\include /c
  axis2_stub_Calc2.c
  calc2_client.c
  calc2_client.c(50) : error C2275: 'axis2_stub_t' : illegal use of this
  type as a
  n expression
 ..\..\..\include\axis2_stub.h(54) : see declaration of
  'axis2_stub_t'

  I can see that the internal structures are defined in c files. If so,
  how can the type definitions be pulled into my client mainline, should
  these be defined in the header files adb_add.h and adb_addResponse.h

  Using VC 7.1 installed as part of visual studio .NET 2003

  C:\Axis2\axis2c-bin-1.3.0-win32\samples\client\calc2cl
  Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for
  80x86


  Regards,
  Navin

  -Original Message-
  From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]


 Sent: 03 April 2008 19:06
  To: Apache AXIS C User List
  Subject: Re: WSDL2C

  Oops, looks like it is not part of the windows build. Should be
  corrected in the next incomming patch release.

  For the time being, please copy the scripts form
  https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/tools/codegen
  /javatool/

  Thanks
  Dimuthu

  On Thu, Apr 3, 2008 at 11:30 PM, Kamath, Navin [EMAIL PROTECTED]
  wrote:
   Hi,
  
I downloaded 1.3.0 binary distribution of Axis2/C from
   http://ws.apache.org/axis2/c/download.cgi  using my local mirror but
   after extracting axis2c-bin-1.3.0-win32.zip
  
I see the following structure
  
C:\Axis2\axis2c-bin-1.3.0-win32ls -1  AUTHORS  CREDITS  INSTALL
   LICENSE  NEWS  NOTICE  README  axis2.xml  bin  docs  ides  include
   lib  logs  modules  samples
  
No tools folder in the distribution, should I be trying a nightly
   distribution. If I am right, then this tool was part of the
   distribution  since some time, right?
  
Thanks for the quick reply
  
Regards,
Navin
  
  
  
-Original Message-
From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]
Sent: 03 April 2008 18:51
To: Apache AXIS C User List
Subject: Re: WSDL2C
  
Try to use the WSDL2C scripts in the tools/codegen/javatool
directory of the axis2/C distribution. Note that you have to set
   AXIS2_HOME to the Axis2/Java distribution.
  
Thanks
Dimuthu
  
On Thu, Apr 3, 2008 at 11:09 PM, Kamath, Navin
   [EMAIL PROTECTED]
wrote:
 Hi there,

  I want to use WSDL2C tool from Axis2 on windows to generate some C

   code.
  But no matter which version I download I don't see the tool in bin

folder.

  I understand that the tool itself belongs to Axis2/J. The versions

   I
  
 tried are

  http://ws.apache.org/axis2/download/1_3/download.cgi using a local

mirror  http://people.apache.org/dist/axis2/nightly/
  distribution-snapshot-bin.zip

  I also see jars under nightly
  http://people.apache.org/repository/org.apache.axis2/jars/ but
   seem   older, hence didn't download it but if it's helps in any way,
   I can do
  
 that as well.

  I just want to use some distribution and generate code rather than

building Axis2/C or Axis2/J myself. What am I missing?

  Can anyone help me? If this is a question for the Java user list
please  let me know so that I can sign up for it rather than

Re: WSDL2C

2008-04-04 Thread Dimuthu Gamage
BTW your wsdl has a problem, I got following warning in generating the code,

2008-04-04 22:18:42,668 WARN  org.apache.axis2.schema.SchemaCompiler -
Type {http://www.w3.org/2001/XMLSchema}SimpleStruct missing!


And  noticed following part should be replaced

  wsdl:message name=testOpRequest
wsdl:part name=in0 type=xsd:SimpleStruct/
  /wsdl:message

to

  wsdl:message name=testOpRequest
wsdl:part name=in0 type=xsd1:SimpleStruct/
  /wsdl:message


Note the xsd is renamed to xsd1

Thanks
Dimuthu




On Fri, Apr 4, 2008 at 10:16 PM, Dimuthu Gamage [EMAIL PROTECTED] wrote:
 Hi Kamath,

  Apparently this is not a problem in the generated code.. Did you
  include the generated axis2_stub_Calc2.h in your source. If so did you
  set the headers path to the axis2/c headers directory?

  Can you try declaring all the types in the first part of the
  function?, There are issues in windows if we mix variable declaration
  inside function body.

  void main()
  {
/* first declaration */
axutil_env_t *env;
axs2_stub_t *stub;

/* then usage*/
env = ...;
stub = ...;
  }

  Hope this will useful in catching the problem.

  Thanks
  Dimuthu



  On Fri, Apr 4, 2008 at 9:34 PM, Kamath, Navin [EMAIL PROTECTED] wrote:
   Thanks Dimuthu. Now I got it to generate some stuff
  
I have further questions about the types generated. I am using the
incantation
  
... -uri calc2.wsdl -ss -sd -g -d adb -f
  
Where calc2.wsdl is the wsdl for an extended calculator service (see
attached)
  
I was able to get the code generated. Now I want to write some simple
client to invoke on add using ADB but couldn't find examples, so used
the header file to work out a simple client which looks like this...
  
snip
   ... // create env etc
  
   axis2_stub_t* stub = axis2_stub_create_Calc2(
   env, client_home, http://localhost:9090/axis2/services/calc2;
   );
  
   adb_add_t* in = adb_add_create(env);
   if (stub == NULL)
   {
   return;
   }
  
   // populate adb_add_t (not done yet)
   adb_addResponse_t* out = axis2_stub_op_Calc2_add(stub, env, in);
   printf(Received: \n);
   printf(adb_addResponse_get_addReturn(out, env));
   ...
/snip
  
Getting the following error
  
   cl.exe /nologo /D WIN32 /D AXIS2_DECLARE_EXPORT /D
_WINDOWS /D _M
BCS axis2_stub_Calc2.c calc2_client.c /I.\..\..\..\include /c
axis2_stub_Calc2.c
calc2_client.c
calc2_client.c(50) : error C2275: 'axis2_stub_t' : illegal use of this
type as a
n expression
   ..\..\..\include\axis2_stub.h(54) : see declaration of
'axis2_stub_t'
  
I can see that the internal structures are defined in c files. If so,
how can the type definitions be pulled into my client mainline, should
these be defined in the header files adb_add.h and adb_addResponse.h
  
Using VC 7.1 installed as part of visual studio .NET 2003
  
C:\Axis2\axis2c-bin-1.3.0-win32\samples\client\calc2cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for
80x86
  
  
Regards,
Navin
  
-Original Message-
From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]
  
  
   Sent: 03 April 2008 19:06
To: Apache AXIS C User List
Subject: Re: WSDL2C
  
Oops, looks like it is not part of the windows build. Should be
corrected in the next incomming patch release.
  
For the time being, please copy the scripts form
https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/tools/codegen
/javatool/
  
Thanks
Dimuthu
  
On Thu, Apr 3, 2008 at 11:30 PM, Kamath, Navin [EMAIL PROTECTED]
wrote:
 Hi,

  I downloaded 1.3.0 binary distribution of Axis2/C from
 http://ws.apache.org/axis2/c/download.cgi  using my local mirror but
 after extracting axis2c-bin-1.3.0-win32.zip

  I see the following structure

  C:\Axis2\axis2c-bin-1.3.0-win32ls -1  AUTHORS  CREDITS  INSTALL
 LICENSE  NEWS  NOTICE  README  axis2.xml  bin  docs  ides  include
 lib  logs  modules  samples

  No tools folder in the distribution, should I be trying a nightly
 distribution. If I am right, then this tool was part of the
 distribution  since some time, right?

  Thanks for the quick reply

  Regards,
  Navin



  -Original Message-
  From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]
  Sent: 03 April 2008 18:51
  To: Apache AXIS C User List
  Subject: Re: WSDL2C

  Try to use the WSDL2C scripts in the tools/codegen/javatool
  directory of the axis2/C distribution. Note that you have to set
 AXIS2_HOME to the Axis2/Java distribution.

  Thanks
  Dimuthu

  On Thu, Apr 3, 2008 at 11:09 PM, Kamath, Navin
 [EMAIL PROTECTED]
  wrote:
   Hi there,
  
I want to use WSDL2C tool from Axis2 on windows to generate some C

Re: WSDL2C

2008-04-03 Thread Dimuthu Gamage
Try to use the WSDL2C scripts in the tools/codegen/javatool
directory of the axis2/C distribution. Note that you have to set
AXIS2_HOME to the Axis2/Java distribution.

Thanks
Dimuthu

On Thu, Apr 3, 2008 at 11:09 PM, Kamath, Navin [EMAIL PROTECTED] wrote:
 Hi there,

  I want to use WSDL2C tool from Axis2 on windows to generate some C code.
  But no matter which version I download I don't see the tool in bin
  folder.

  I understand that the tool itself belongs to Axis2/J. The versions I
  tried are

  http://ws.apache.org/axis2/download/1_3/download.cgi using a local
  mirror

  http://people.apache.org/dist/axis2/nightly/
  distribution-snapshot-bin.zip

  I also see jars under nightly
  http://people.apache.org/repository/org.apache.axis2/jars/ but seem
  older, hence didn't download it but if it's helps in any way, I can do
  that as well.

  I just want to use some distribution and generate code rather than
  building Axis2/C or Axis2/J myself. What am I missing?

  Can anyone help me? If this is a question for the Java user list please
  let me know so that I can sign up for it rather than the c user list

  Regards,
  Navin

  
  IONA Technologies PLC (registered in Ireland)
  Registered Number: 171387
  Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

  -
  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: WSDL2C

2008-04-03 Thread Kamath, Navin
Hi,

I downloaded 1.3.0 binary distribution of Axis2/C from
http://ws.apache.org/axis2/c/download.cgi  using my local mirror but
after extracting axis2c-bin-1.3.0-win32.zip

I see the following structure

C:\Axis2\axis2c-bin-1.3.0-win32ls -1
AUTHORS
CREDITS
INSTALL
LICENSE
NEWS
NOTICE
README
axis2.xml
bin
docs
ides
include
lib
logs
modules
samples

No tools folder in the distribution, should I be trying a nightly
distribution. If I am right, then this tool was part of the distribution
since some time, right?

Thanks for the quick reply

Regards,
Navin

-Original Message-
From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Sent: 03 April 2008 18:51
To: Apache AXIS C User List
Subject: Re: WSDL2C

Try to use the WSDL2C scripts in the tools/codegen/javatool
directory of the axis2/C distribution. Note that you have to set
AXIS2_HOME to the Axis2/Java distribution.

Thanks
Dimuthu

On Thu, Apr 3, 2008 at 11:09 PM, Kamath, Navin [EMAIL PROTECTED]
wrote:
 Hi there,

  I want to use WSDL2C tool from Axis2 on windows to generate some C
code.
  But no matter which version I download I don't see the tool in bin  
 folder.

  I understand that the tool itself belongs to Axis2/J. The versions I

 tried are

  http://ws.apache.org/axis2/download/1_3/download.cgi using a local  
 mirror

  http://people.apache.org/dist/axis2/nightly/
  distribution-snapshot-bin.zip

  I also see jars under nightly
  http://people.apache.org/repository/org.apache.axis2/jars/ but seem  
 older, hence didn't download it but if it's helps in any way, I can do

 that as well.

  I just want to use some distribution and generate code rather than  
 building Axis2/C or Axis2/J myself. What am I missing?

  Can anyone help me? If this is a question for the Java user list 
 please  let me know so that I can sign up for it rather than the c 
 user list

  Regards,
  Navin

  
  IONA Technologies PLC (registered in Ireland)  Registered Number: 
 171387  Registered Address: The IONA Building, Shelbourne Road, Dublin

 4, Ireland

  -
  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]


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

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



Re: WSDL2C: core dumped in generated code.

2008-03-14 Thread Simone Bordin




Hi Dimuthu,
it seems that using guththila
the crash problem is resolved also on linux.

Now i'm testing it more deeply (in my application i need to use
different services/stub)

For now thanks,
simone



Dimuthu Gamage wrote:

  HI Simone,

I heard that there are some problem with libxml parser with mulitple
threading in windows. It may be the problem you too facing in linux.
Just for a test can you try building the axis2 with the guththila as
the parser,
you can do this by giving '--enable-guththila' as a configure option
when building from the source.

Thanks
Dimuthu



On Wed, Mar 12, 2008 at 11:29 PM, Simone Bordin
[EMAIL PROTECTED] wrote:
  
  
 I'm using a nightly build of 15 february.
 In the next day i'll try with the lastest nigthly build.

 But i think the problem is in thread.
 I'm using 2 thead to call the same service but in different location
(different URI).
 For each thread i have create its own eviroment (axutil_env_t) and stub
(axis2_stub_t).

 If i use only one thread to call the service (toward one destination)
there's no problem.
 When i use the 2 thread (one for each destination) there's the crash
problem.

 Do u think is this the problem?
 Thanks,
 simone



 Dimuthu Gamage wrote:

 Hi Simone,
I doubt whether it is a problem of WSDL2C as i coudn't see anything
related to ADB (ADB is the most possible place to find errors in the
codegen),

BTW are you using the latest nightly build (from
http://people.apache.org/dist/axis2/nightly/ ) or 1.3 build for the
codegen tool?, if it is the old version can you re- try with the
nightly build?

Thanks
Dimuthu

On Wed, Mar 12, 2008 at 8:35 PM, Simone Bordin
[EMAIL PROTECTED] wrote:


 I have a problem with client services generated with WSDL2C.

 When i use it in my application, sometimes it crashes.
 Bottom there's the stack trace that is printed when this happend.

 Is this a problem in code generated from WSDL2C?
 Thanx,
 simone

 *** glibc detected *** ./com_fonia: double free or corruption (out):
0x08f03c18 ***
 === Backtrace: =
 /lib/libc.so.6[0x8d98b6]
 /lib/libc.so.6(cfree+0x90)[0x8dce00]
 /usr/lib/libxml2.so.2(xmlCharEncCloseFunc+0x4f)[0xbebbaf]
 /usr/lib/libxml2.so.2(xmlFreeParserInputBuffer+0x3f)[0xc16fdf]
 /usr/lib/libxml2.so.2(xmlFreeInputStream+0x78)[0xbf0008]
 /usr/lib/libxml2.so.2(xmlFreeParserCtxt+0x28)[0xbf0058]
 /usr/lib/libxml2.so.2(xmlFreeTextReader+0x1ee)[0xc9bdae]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_parser.so.0(axis2_libxml2_reader_wrapper_free+0x5e)[0xfd6acb]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_parser.so.0(axiom_xml_reader_free+0x1d)[0xfd5a87]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_axiom.so.0(axiom_stax_builder_free+0xb6)[0x9e7847]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_axiom.so.0(axiom_soap_builder_free+0xb1)[0x9f161f]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_axiom.so.0(axiom_soap_envelope_free+0x95)[0x9f080a]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_msg_ctx_free+0x14a)[0x5367ad]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_op_ctx_free+0x83)[0x53b2d6]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_op_client_free+0x50)[0x541e9f]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_svc_client_create_op_client+0xd0)[0x545699]

/opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_svc_client_send_receive_with_op_qname+0x541)[0x544f52]

/home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/ws_app_client/lib/libfonia_ws_app_client.so.1(axis2_stub_op_AppFoniaService_CallState+0x1f2)[0x1397a8]
 ./com_fonia[0x8060577]
 ./com_fonia[0x8061f61]
 ./com_fonia[0x80638fe]

/home/gsmr_mgw/RFI/MGW_COM/current/COM/libcommon/libcommonSp01/lib/libcommonSp01.so.1(_ZN4sp016Thread7svc_runEPv+0x30)[0x3a6410]
 /lib/libpthread.so.0[0x86143b]
 /lib/libc.so.6(clone+0x5e)[0x940fde]
 === Memory map: 
 0011-0012 r-xp  08:05 689825
/home/gsmr_mgw/RFI/MGW_COM/current/COM/libcommon/esFnResolve/ws_es_client/lib/libws_es_client.so.1.0.0
 0012-00121000 rw-p 0001 08:05 689825
/home/gsmr_mgw/RFI/MGW_COM/current/COM/libcommon/esFnResolve/ws_es_client/lib/libws_es_client.so.1.0.0
 00121000-00134000 r-xp  08:05 720406
/home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/lib_diva_wrapper/lib/libDivaWrapper.so.1.0.0
 00134000-00135000 rw-p 00012000 08:05 720406
/home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/lib_diva_wrapper/lib/libDivaWrapper.so.1.0.0
 00135000-00144000 r-xp  08:05 720455
/home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/ws_app_client/lib/libfonia_ws_app_client.so.1.0.0
 00144000-00145000 rw-p e000 08:05 720455
/home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/ws_app_client/lib/libfonia_ws_app_client.so.1.0.0
 00145000-0015 r-xp  08:05 6352357
/lib/libgcc_s-4.1.2-20070626.so.1
 0015-00151000 rw-p a000 08:05 6352357
/lib/libgcc_s-4.1.2-20070626.so.1
 00151000-00163000 r-xp  08:05 2449523 /usr/lib/libz.so.1.2.3
 00163000-00164000 rw-p 00011000 08:05 2449523 /usr/lib/libz.so.1.2.3
 

Re: WSDL2C: core dumped in generated code.

2008-03-12 Thread Dimuthu Gamage
HI Simone,

I heard that there are some problem with libxml parser with mulitple
threading in windows. It may be the problem you too facing in linux.
Just for a test can you try building the axis2 with the guththila as
the parser,
you can do this by giving '--enable-guththila' as a configure option
when building from the source.

Thanks
Dimuthu



On Wed, Mar 12, 2008 at 11:29 PM, Simone Bordin
[EMAIL PROTECTED] wrote:

  I'm using a nightly build of 15 february.
  In the next day i'll try with the lastest nigthly build.

  But i think the problem is in thread.
  I'm using 2 thead to call the same service but in different location
 (different URI).
  For each thread i have create its own eviroment (axutil_env_t) and stub
 (axis2_stub_t).

  If i use only one thread to call the service (toward one destination)
 there's no problem.
  When i use the 2 thread (one for each destination) there's the crash
 problem.

  Do u think is this the problem?
  Thanks,
  simone



  Dimuthu Gamage wrote:

  Hi Simone,
 I doubt whether it is a problem of WSDL2C as i coudn't see anything
 related to ADB (ADB is the most possible place to find errors in the
 codegen),

 BTW are you using the latest nightly build (from
 http://people.apache.org/dist/axis2/nightly/ ) or 1.3 build for the
 codegen tool?, if it is the old version can you re- try with the
 nightly build?

 Thanks
 Dimuthu

 On Wed, Mar 12, 2008 at 8:35 PM, Simone Bordin
 [EMAIL PROTECTED] wrote:


  I have a problem with client services generated with WSDL2C.

  When i use it in my application, sometimes it crashes.
  Bottom there's the stack trace that is printed when this happend.

  Is this a problem in code generated from WSDL2C?
  Thanx,
  simone

  *** glibc detected *** ./com_fonia: double free or corruption (out):
 0x08f03c18 ***
  === Backtrace: =
  /lib/libc.so.6[0x8d98b6]
  /lib/libc.so.6(cfree+0x90)[0x8dce00]
  /usr/lib/libxml2.so.2(xmlCharEncCloseFunc+0x4f)[0xbebbaf]
  /usr/lib/libxml2.so.2(xmlFreeParserInputBuffer+0x3f)[0xc16fdf]
  /usr/lib/libxml2.so.2(xmlFreeInputStream+0x78)[0xbf0008]
  /usr/lib/libxml2.so.2(xmlFreeParserCtxt+0x28)[0xbf0058]
  /usr/lib/libxml2.so.2(xmlFreeTextReader+0x1ee)[0xc9bdae]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_parser.so.0(axis2_libxml2_reader_wrapper_free+0x5e)[0xfd6acb]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_parser.so.0(axiom_xml_reader_free+0x1d)[0xfd5a87]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_axiom.so.0(axiom_stax_builder_free+0xb6)[0x9e7847]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_axiom.so.0(axiom_soap_builder_free+0xb1)[0x9f161f]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_axiom.so.0(axiom_soap_envelope_free+0x95)[0x9f080a]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_msg_ctx_free+0x14a)[0x5367ad]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_op_ctx_free+0x83)[0x53b2d6]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_op_client_free+0x50)[0x541e9f]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_svc_client_create_op_client+0xd0)[0x545699]

 /opt/axis2c-bin-1.3.0-linux/lib/libaxis2_engine.so.0(axis2_svc_client_send_receive_with_op_qname+0x541)[0x544f52]

 /home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/ws_app_client/lib/libfonia_ws_app_client.so.1(axis2_stub_op_AppFoniaService_CallState+0x1f2)[0x1397a8]
  ./com_fonia[0x8060577]
  ./com_fonia[0x8061f61]
  ./com_fonia[0x80638fe]

 /home/gsmr_mgw/RFI/MGW_COM/current/COM/libcommon/libcommonSp01/lib/libcommonSp01.so.1(_ZN4sp016Thread7svc_runEPv+0x30)[0x3a6410]
  /lib/libpthread.so.0[0x86143b]
  /lib/libc.so.6(clone+0x5e)[0x940fde]
  === Memory map: 
  0011-0012 r-xp  08:05 689825
 /home/gsmr_mgw/RFI/MGW_COM/current/COM/libcommon/esFnResolve/ws_es_client/lib/libws_es_client.so.1.0.0
  0012-00121000 rw-p 0001 08:05 689825
 /home/gsmr_mgw/RFI/MGW_COM/current/COM/libcommon/esFnResolve/ws_es_client/lib/libws_es_client.so.1.0.0
  00121000-00134000 r-xp  08:05 720406
 /home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/lib_diva_wrapper/lib/libDivaWrapper.so.1.0.0
  00134000-00135000 rw-p 00012000 08:05 720406
 /home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/lib_diva_wrapper/lib/libDivaWrapper.so.1.0.0
  00135000-00144000 r-xp  08:05 720455
 /home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/ws_app_client/lib/libfonia_ws_app_client.so.1.0.0
  00144000-00145000 rw-p e000 08:05 720455
 /home/gsmr_mgw/RFI/MGW_COM/current/COM/COM_FONIA/ws_app_client/lib/libfonia_ws_app_client.so.1.0.0
  00145000-0015 r-xp  08:05 6352357
 /lib/libgcc_s-4.1.2-20070626.so.1
  0015-00151000 rw-p a000 08:05 6352357
 /lib/libgcc_s-4.1.2-20070626.so.1
  00151000-00163000 r-xp  08:05 2449523 /usr/lib/libz.so.1.2.3
  00163000-00164000 rw-p 00011000 08:05 2449523 /usr/lib/libz.so.1.2.3
  00164000-00167000 r-xp  08:05 6352358 /lib/libuuid.so.1.2
  00167000-00168000 rw-p 2000 08:05 6352358 /lib/libuuid.so.1.2
  00168000-001c5000 r-xp 

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


Re: WSDL2C Generates Files with Compilation Errors

2008-03-10 Thread astuce

I've just downloaded the Axis2 version 1.3 and I cannot see any class or
module that can generate C code from a wsdl file, even though the axis2c
documentation specifies that there is such a tool written in Java and even
points me to the Web location where I can find the the Java binaries...

Can someone tell me where is the wsdl2c class/exe that generates a web
service in C from a wsdl file?

Also, the mod_axis2.dll I downloaded with axis2c (or the one I am building
myself) is crushing Apache. Does anybody else see this problem?

Thank you,
Corneliu


sreenivasulu guduru wrote:
 
 Hi
 I am using the attached WSDL to generate Server Stubs using the command
 wsdl.bat -uri so1.wsdl -ss -sd -d adb –u
 I used the latest Apache Axis2 SNAPSHOT build  (23-01-2008).
  
 The process generates 111 C and Header files.
 I have them added to my VC++ project that has includes of
 axis2c-bin-1.2.0-win32 version. And I have the Preprocessor directive
 AXIS2_DECLARE_EXPORT being set for the VC++ project.
  
 There were many compiler errors such as fatal error C1083: Cannot open
 include file: 'adb_axis2_char_t*.h': Invalid argument:. The complete
 report of compilation errors is attached in the mail in the file
 “BuildLog.htm”.
  
 Could you please suggest me workaround for these compilation errors?
  
 Thank You
 Regards
 Sreenivasulu Guduru
 _
 Connect and share in new ways with Windows Live.
 http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
  
 
 
 
 
 
 
   
 Build Log
 nbsp; nbsp; 
 --- Build started: Project: ForteWebServices, Configuration:
 Debug|Win32 ---
 
 
 Command Lines
 nbsp; nbsp; Creating temporary file c:\Documents and
 Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\Debug\RSP15.rsp with contents
 [
 /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D
 AXIS2_DECLARE_EXPORT /D _WINDLL /D _MBCS /Gm /EHsc /RTC1 /MTd
 /FoDebug/ /FdDebug/vc70.pdb /W3 /c /Wp64 /ZI /TC  /I
 C:\Axis\axis2C\axis2c-bin-1.2.0-win32\include
 .\axis2_svc_skel_DataExtractServiceService.c
 .\axis2_skel_DataExtractServiceService.c
 .\adb_unsignedShort.c
 .\adb_unsignedShort0.c
 .\adb_unsignedLong.c
 .\adb_unsignedInt.c
 .\adb_unsignedByte.c
 .\adb_unsignedByte2.c
 .\adb_token.c
 .\adb_time.c
 .\adb_Struct.c
 .\adb_string.c
 .\adb_QName.c
 .\adb_positiveInteger.c
 .\adb_positiveInteger3.c
 .\adb_NOTATION.c
 .\adb_normalizedString.c
 .\adb_nonPositiveInteger.c
 .\adb_nonNegativeInteger.c
 .\adb_NMTOKENS.c
 .\adb_NMTOKENS1.c
 .\adb_NMTOKEN.c
 .\adb_negativeInteger.c
 .\adb_NCName.c
 .\adb_Name.c
 .\adb_long.c
 .\adb_language.c
 .\adb_integer.c
 .\adb_int.c
 .\adb_IDREFS.c
 .\adb_IDREF.c
 .\adb_ID.c
 .\adb_hexBinary.c
 .\adb_gYearMonth.c
 .\adb_gYear.c
 .\adb_gMonthDay.c
 .\adb_gMonth.c
 .\adb_GetViewListResponse.c
 .\adb_GetViewList.c
 .\adb_gDay.c
 .\adb_ENTITY.c
 .\adb_ENTITIES.c
 .\adb_duration.c
 .\adb_decimal.c
 .\adb_dateTime.c
 .\adb_date.c
 .\adb_byte.c
 .\adb_boolean.c
 .\adb_base64Binary.c
 .\adb_ArrayOfString.c
 .\adb_Array.c
 .\adb_anyURI.c
 .\adb_anyType.c
 .\adb__short.c
 .\adb__float.c
 .\adb__double.c
 ]
 Creating command line cl.exe @c:\Documents and Settings\sguduru\My
 Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\Debug\RSP15.rsp /nologo
 
 Output Window
 nbsp; nbsp; Compiling...
 axis2_svc_skel_DataExtractServiceService.c
 axis2_skel_DataExtractServiceService.c
 adb_unsignedShort.c
 adb_unsignedShort0.c
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedShort0.c(289) : warning
 C4101: 'text_value_1' : unreferenced local variable
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedShort0.c(287) : warning
 C4101: 'ns_already_defined' : unreferenced local variable
 adb_unsignedLong.c
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedLong.h(19) : fatal error
 C1083: Cannot open include file: 'adb_unsigned long.h': No such file or
 directory
 adb_unsignedInt.c
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedInt.h(19) : fatal error
 C1083: Cannot open include file: 'adb_unsigned int.h': No such file or
 directory
 adb_unsignedByte.c
 adb_unsignedByte2.c
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedByte2.c(289) : warning
 C4101: 'text_value_1' : unreferenced local variable
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedByte2.c(287) : warning
 C4101: 'ns_already_defined' : unreferenced local variable
 adb_token.c
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_token.h(19) : fatal error C1083:
 Cannot open include file: 'adb_axis2_char_t*.h': Invalid 

Re: WSDL2C Generates Files with Compilation Errors

2008-03-10 Thread Senaka Fernando

 I've just downloaded the Axis2 version 1.3 and I cannot see any class or
 module that can generate C code from a wsdl file, even though the axis2c
 documentation specifies that there is such a tool written in Java and even
 points me to the Web location where I can find the the Java binaries...

 Can someone tell me where is the wsdl2c class/exe that generates a web
 service in C from a wsdl file?

The required shell scripts are found inside Axis2/C itself, and not in
Axis2/Java.

You'll find the tool, if using source distribution in
tools/codegen/javatool. Or if using binary IIRC you should see it in the
bin inside your AXIS2C_HOME. According to your platform you'll either see
the WSDL2C.bat or th WSDL2C.sh file.



 Also, the mod_axis2.dll I downloaded with axis2c (or the one I am building
 myself) is crushing Apache. Does anybody else see this problem?

It shouldn't cause Apache to crash. If it does, it should be due to a
small mistake when setting it up. Please read through the Axis2/C manual
on how to deploy and setup mod_axis2. If you get it setup according to the
manual, it should work without any errors.

Regards,
Senaka


 Thank you,
 Corneliu


 sreenivasulu guduru wrote:

 Hi
 I am using the attached WSDL to generate Server Stubs using the command
 wsdl.bat -uri so1.wsdl -ss -sd -d adb –u
 I used the latest Apache Axis2 SNAPSHOT build  (23-01-2008).

 The process generates 111 C and Header files.
 I have them added to my VC++ project that has includes of
 axis2c-bin-1.2.0-win32 version. And I have the Preprocessor directive
 AXIS2_DECLARE_EXPORT being set for the VC++ project.

 There were many compiler errors such as fatal error C1083: Cannot open
 include file: 'adb_axis2_char_t*.h': Invalid argument:. The complete
 report of compilation errors is attached in the mail in the file
 “BuildLog.htm”.

 Could you please suggest me workaround for these compilation errors?

 Thank You
 Regards
 Sreenivasulu Guduru
 _
 Connect and share in new ways with Windows Live.
 http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008








 Build Log
 nbsp; nbsp;
 --- Build started: Project: ForteWebServices, Configuration:
 Debug|Win32 ---


 Command Lines
 nbsp; nbsp; Creating temporary file c:\Documents and
 Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\Debug\RSP15.rsp with contents
 [
 /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D
 AXIS2_DECLARE_EXPORT /D _WINDLL /D _MBCS /Gm /EHsc /RTC1 /MTd
 /FoDebug/ /FdDebug/vc70.pdb /W3 /c /Wp64 /ZI /TC  /I
 C:\Axis\axis2C\axis2c-bin-1.2.0-win32\include
 .\axis2_svc_skel_DataExtractServiceService.c
 .\axis2_skel_DataExtractServiceService.c
 .\adb_unsignedShort.c
 .\adb_unsignedShort0.c
 .\adb_unsignedLong.c
 .\adb_unsignedInt.c
 .\adb_unsignedByte.c
 .\adb_unsignedByte2.c
 .\adb_token.c
 .\adb_time.c
 .\adb_Struct.c
 .\adb_string.c
 .\adb_QName.c
 .\adb_positiveInteger.c
 .\adb_positiveInteger3.c
 .\adb_NOTATION.c
 .\adb_normalizedString.c
 .\adb_nonPositiveInteger.c
 .\adb_nonNegativeInteger.c
 .\adb_NMTOKENS.c
 .\adb_NMTOKENS1.c
 .\adb_NMTOKEN.c
 .\adb_negativeInteger.c
 .\adb_NCName.c
 .\adb_Name.c
 .\adb_long.c
 .\adb_language.c
 .\adb_integer.c
 .\adb_int.c
 .\adb_IDREFS.c
 .\adb_IDREF.c
 .\adb_ID.c
 .\adb_hexBinary.c
 .\adb_gYearMonth.c
 .\adb_gYear.c
 .\adb_gMonthDay.c
 .\adb_gMonth.c
 .\adb_GetViewListResponse.c
 .\adb_GetViewList.c
 .\adb_gDay.c
 .\adb_ENTITY.c
 .\adb_ENTITIES.c
 .\adb_duration.c
 .\adb_decimal.c
 .\adb_dateTime.c
 .\adb_date.c
 .\adb_byte.c
 .\adb_boolean.c
 .\adb_base64Binary.c
 .\adb_ArrayOfString.c
 .\adb_Array.c
 .\adb_anyURI.c
 .\adb_anyType.c
 .\adb__short.c
 .\adb__float.c
 .\adb__double.c
 ]
 Creating command line cl.exe @c:\Documents and Settings\sguduru\My
 Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\Debug\RSP15.rsp /nologo

 Output Window
 nbsp; nbsp; Compiling...
 axis2_svc_skel_DataExtractServiceService.c
 axis2_skel_DataExtractServiceService.c
 adb_unsignedShort.c
 adb_unsignedShort0.c
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedShort0.c(289) : warning
 C4101: 'text_value_1' : unreferenced local variable
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedShort0.c(287) : warning
 C4101: 'ns_already_defined' : unreferenced local variable
 adb_unsignedLong.c
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedLong.h(19) : fatal
 error
 C1083: Cannot open include file: 'adb_unsigned long.h': No such file or
 directory
 adb_unsignedInt.c
 c:\Documents and Settings\sguduru\My Documents\Visual Studio
 Projects\Axis2Test1\ForteWebServices\adb_unsignedInt.h(19) : fatal error
 C1083: Cannot open include file: 'adb_unsigned int.h': No such file or
 directory
 adb_unsignedByte.c
 

Re: WSDL2C CodeGenerationException

2008-03-06 Thread Milinda Pathirage
Hi Carl,

It's hard to give a answer without looking at WSDL. Because this error was
generated at the Data Binding code. So can you please send the WSDL to the
list. Then it'll be easier for us to track the bug.

Thanks
Milinda


On Fri, Mar 7, 2008 at 1:50 AM, Carl Lefrançois [EMAIL PROTECTED]
wrote:

 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)
 

Re: WSDL2C Generates Files with Compilation Errors

2008-01-23 Thread Dimuthu Gamage
Hi sreenivasulu,

Your wsdl is an RPC-Encoded Style one.

Currently WSDL2C support for the RPC-Encoded style WSDLs is in very
primary state.

Since we are using Axis2/Java tool for the code generation and
Axis2/Java support for the RPC-Encoded is fairly new (infact just only
one month old), we may need sometime to change 'C' code generation
templates to support WSDL2C. I will let the user-list know when I
manage to do that.

Thanks
Dimuthu


On Jan 24, 2008 6:23 AM, sreenivasulu guduru [EMAIL PROTECTED] wrote:



 Hi

 I am using the attached WSDL to generate Server Stubs using the command

 wsdl.bat -uri so1.wsdl -ss -sd -d adb –u

 I used the latest Apache Axis2 SNAPSHOT build  (23-01-2008).



 The process generates 111 C and Header files.

 I have them added to my VC++ project that has includes of
 axis2c-bin-1.2.0-win32 version. And I have the Preprocessor directive
 AXIS2_DECLARE_EXPORT being set for the VC++ project.



 There were many compiler errors such as fatal error C1083: Cannot open
 include file: 'adb_axis2_char_t*.h': Invalid argument:. The complete report
 of compilation errors is attached in the mail in the file BuildLog.htm.



 Could you please suggest me workaround for these compilation errors?



 Thank You

 Regards

 Sreenivasulu Guduru
 
 Connect and share in new ways with Windows Live. Get it now!
 -
 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: WSDL2C Generates Files with Compilation Errors

2008-01-23 Thread sreenivasulu guduru
Hi Dimuthu
I am very glad to see such as quick response about my issue.
 
Since my client who use the Axis2 Web Service is flexible to use Soap HTTP/RPC 
too, I will try to change the WSDL to signify SOAP-HTTP, instead of SOAP-RPC.
 
Thank You for your support.
 
RegardsGS



 Date: Thu, 24 Jan 2008 06:55:19 +0530 From: [EMAIL PROTECTED] To: 
 axis-c-user@ws.apache.org Subject: Re: WSDL2C Generates Files with 
 Compilation Errors  Hi sreenivasulu,  Your wsdl is an RPC-Encoded Style 
 one.  Currently WSDL2C support for the RPC-Encoded style WSDLs is in very 
 primary state.  Since we are using Axis2/Java tool for the code generation 
 and Axis2/Java support for the RPC-Encoded is fairly new (infact just only 
 one month old), we may need sometime to change 'C' code generation templates 
 to support WSDL2C. I will let the user-list know when I manage to do that. 
  Thanks Dimuthu   On Jan 24, 2008 6:23 AM, sreenivasulu guduru [EMAIL 
 PROTECTED] wrote: Hi   I am using the attached WSDL to 
 generate Server Stubs using the command   wsdl.bat -uri so1.wsdl -ss -sd 
 -d adb –u   I used the latest Apache Axis2 SNAPSHOT build (23-01-2008). 
 The process generates 111 C and Header files.   I have them 
 added to my VC++ project that has includes of  axis2c-bin-1.2.0-win32 
 version. And I have the Preprocessor directive  AXIS2_DECLARE_EXPORT being 
 set for the VC++ project. There were many compiler errors such as 
 fatal error C1083: Cannot open  include file: 'adb_axis2_char_t*.h': 
 Invalid argument:. The complete report  of compilation errors is attached 
 in the mail in the file BuildLog.htm. Could you please suggest 
 me workaround for these compilation errors? Thank You   
 Regards   Sreenivasulu Guduru    
 Connect and share in new ways with Windows Live. Get it now!  
 -  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] 
_
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008

Re: WSDL2C Generates Files with Compilation Errors

2008-01-23 Thread Dimuthu Gamage
BTW I tried your WSDL. It seems have lot of unwanted schema constrcuts
defined, but never using in operations.

So just to invoke that particular operation (GetViewList) you will
only these files from the generated set.

adb_ArrayOfString.c  adb_GetViewList.c  adb_GetViewListResponse.c
axis2_stub_DataExtractServiceService.c
adb_ArrayOfString.h  adb_GetViewList.h  adb_GetViewListResponse.h
axis2_stub_DataExtractServiceService.h

Thanks
Dimuthu



On Jan 24, 2008 11:06 AM, sreenivasulu guduru [EMAIL PROTECTED] wrote:

 Hi Dimuthu
  I am very glad to see such as quick response about my issue.

  Since my client who use the Axis2 Web Service is flexible to use Soap
 HTTP/RPC too, I will try to change the WSDL to signify SOAP-HTTP, instead of
 SOAP-RPC.

  Thank You for your support.

  Regards
 GS




  

   Date: Thu, 24 Jan 2008 06:55:19 +0530
  From: [EMAIL PROTECTED]
  To: axis-c-user@ws.apache.org
  Subject: Re: WSDL2C Generates Files with Compilation Errors


 
  Hi sreenivasulu,
 
  Your wsdl is an RPC-Encoded Style one.
 
  Currently WSDL2C support for the RPC-Encoded style WSDLs is in very
  primary state.
 
  Since we are using Axis2/Java tool for the code generation and
  Axis2/Java support for the RPC-Encoded is fairly new (infact just only
  one month old), we may need sometime to change 'C' code generation
  templates to support WSDL2C. I will let the user-list know when I
  manage to do that.
 
  Thanks
  Dimuthu
 
 
  On Jan 24, 2008 6:23 AM, sreenivasulu guduru [EMAIL PROTECTED] wrote:
  
  
  
   Hi
  
   I am using the attached WSDL to generate Server Stubs using the command
  
   wsdl.bat -uri so1.wsdl -ss -sd -d adb –u
  
   I used the latest Apache Axis2 SNAPSHOT build (23-01-2008).
  
  
  
   The process generates 111 C and Header files.
  
   I have them added to my VC++ project that has includes of
   axis2c-bin-1.2.0-win32 version. And I have the Preprocessor directive
   AXIS2_DECLARE_EXPORT being set for the VC++ project.
  
  
  
   There were many compiler errors such as fatal error C1083: Cannot open
   include file: 'adb_axis2_char_t*.h': Invalid argument:. The complete
 report
   of compilation errors is attached in the mail in the file
 BuildLog.htm.
  
  
  
   Could you please suggest me workaround for these compilation errors?
  
  
  
   Thank You
  
   Regards
  
   Sreenivasulu Guduru
   
   Connect and share in new ways with Windows Live. Get it now!
   -
   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]
 


 
 Connect and share in new ways with Windows Live. Get it now!

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



Re: Wsdl2C incorrect choice management

2007-12-19 Thread Dimuthu Gamage
Hi Simon,
Yea it is a known bug:(

We have a JIRA issue reported similar to yours,
https://issues.apache.org/jira/browse/AXIS2C-826


Thanks
DImuthu

On Dec 19, 2007 8:31 PM, Simone Bordin [EMAIL PROTECTED] wrote:
 Hi,

 In my operation parameter i have  a choice element with 3 subelement.

 xs:choice
 xs:element name=NumericMessage
 type=NumericMessageType/
 xs:element name=AlphanumericMessage
 type=AlphanumericMessageType/
 xs:element name=TransparentDataMessage
 type=TransparentDataMessageType/
 /xs:choice

 In the serialize function of the generated code (with last nightly
 build), this element is not correctly managed: it checks for the
 presence of all three element, not for only one.
 I have attached the generated code of the choice type.

 Is this  a known bug?

 Thanx,
 simone bordin


 -
 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: WSDL2C Defects

2007-12-14 Thread Dimuthu Gamage
Hi Alastair,
Please check the comments inline.

On Nov 30, 2007 6:04 AM, Alastair FETTES [EMAIL PROTECTED] wrote:

 I have a combination question/defect report.  These are all in regards
 to StubSourceTemplate.xsl.

 

 Defect 1:
 -
 (line 179 of StubSourceTemplate.xsl)

 /**
  * auto generated method signature
  * for xsl:value-of select=@qname/ operation.
  xsl:for-each select=input/[EMAIL PROTECTED]'']* @param _xsl:value-of
 select=@name//xsl:for-each
  * @return
  */

 This produces method headers that look like...

 /**
  * auto generated method signature for asynchronous invocations
  * for MyOperation|http://location.org/wsdl; operation.

  * @param myOperationRequest* @param interfaceVersion
  * @param on_complete callback to handle on complete
  * @param on_error callback to handle on error
  */

 This code should be changed too...

 /**
  * auto generated method signature
  * for xsl:value-of select=@qname/ operation.
  * xsl:for-each select=input/[EMAIL PROTECTED]'']xsl:text
 /xsl:text * @param _xsl:value-of select=@name//xsl:for-each
  * @return
  */

 This will pretty print your output to correctly show all parameters on
 their own line.


Done.



 ===

 Defect 2:
 -
 (line 190 of StubSourceTemplate.xsl)

 axis2_stub_op_xsl:value-of select=$servicename/_xsl:value-of
 select=@name/(
axis2_stub_t *stub, const axutil_env_t *envxsl:for-each
 select=input/[EMAIL PROTECTED]''],
xsl:variable name=inputtype
xsl:if test=@oursadb_/xsl:ifxsl:value-of
 select=@type/xsl:if test=@ours_t*/xsl:if
/xsl:variable
xsl:if test=position()1,/xsl:ifxsl:value-of
 select=$inputtype/xsl:text _/xsl:textxsl:value-of
 select=@name/
/xsl:for-each)

 This produces code that looks like...

 void axis2_stub_MyService_MyOperation_start( axis2_stub_t *stub, const
 axutil_env_t *env,
 ,axiom_node_t*
 myOperationRequest,
 ,axiom_node_t*
 interfaceVersion,
 ,axis2_status_t (
 AXIS2_CALL *on_complete ) (struct axis2_callback *, const axutil_env_t
 *) ,
 ,axis2_status_t (
 AXIS2_CALL *on_error ) (struct axis2_callback *, const axutil_env_t *,
 int ) )

 Note the extra comma.  The following lines of code should be changed:

axis2_stub_t *stub, const axutil_env_t *envxsl:for-each
 select=input/[EMAIL PROTECTED]''],  remove this comma
xsl:variable name=inputtype


Fixed, Rather I removed the last , (which was inside the  if tag), now that
piece of  code is look like,
 xsl:for-each select=input/[EMAIL PROTECTED]''] ,
 xsl:variable
name=inputtypexsl:if test=@oursadb_/xsl:ifxsl:value-of
select=@type/xsl:if test=@ours_t*/xsl:if/xsl:variable
 xsl:value-of
select=$inputtype/xsl:text _/xsl:textxsl:value-of select=@name/
  /xsl:for-each



 ===

 Defect 3:
 -
 (line 214 of StubSourceTemplate.xsl)

 !-- for service client currently suppported only 1 input param --
 xsl:for-each select=input/[EMAIL PROTECTED]'']
xsl:if test=position()=1
xsl:choose
xsl:when test=@ours
payload = adb_xsl:value-of
 select=@type/_serialize(_xsl:value-of select=@name/, env, NULL,
 NULL, AXIS2_TRUE, NULL, NULL);
/xsl:when
xsl:otherwise
payload = _xsl:value-of select=@name/;
/xsl:otherwise
/xsl:choose
/xsl:if
 /xsl:for-each

 The for loop is redundant.  Change this code to be the following:

 xsl:variable name=firstParam select=input/param[1]/
 xsl:if test=$firstParam/@type!=''
xsl:choose
xsl:when test=$firstParam/@ours
payload = adb_xsl:value-of
 select=$firstParam/@type/_serialize(_xsl:value-of
 select=$firstParam/@name/, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
/xsl:when
xsl:otherwise
payload = _xsl:value-of select=$firstParam/@name/;
/xsl:otherwise
/xsl:choose
 /xsl:if


Done.


 ===

 Defect 4:
 -
 (lines 179 to 285 of StubSourceTemplate.xsl)

 This code adds in the parameters for the header (xsl:for-each
 select=input/[EMAIL PROTECTED]'']) but only the first parameter is ever
 referenced.  Read: The elements explicitly specified as headers in the
 WSDL are not used and thus not added to the service call.


Yea, Currently the generated code doesn't process custom headers, As you
have mentioned, this is the reason for all the defects you mention above.
(Simply We have not encountered more than 1 parameters for above functions.)

I will raise a JIRA on this, and hope to fix this within next couple of
weeks.



 Here is the sample WSDL that can be used to reproduce these errors.

 wsdl:definitions targetNamespace=http://location.org/wsdl;
 xmlns:tns=http://location.org/wsdl;
 

Re: WSDL2C Defects

2007-12-04 Thread Dimuthu Gamage
Hi Alastair,

I will fix the defects you mentioned, And thanks for posting them.

Regarding the question you ask, you can set custom headers using
axis2_svc_client_add_header function in your code.

Thanks
Dimuthu


On Nov 30, 2007 6:04 AM, Alastair FETTES [EMAIL PROTECTED] wrote:

 I have a combination question/defect report.  These are all in regards
 to StubSourceTemplate.xsl.

 

 Defect 1:
 -
 (line 179 of StubSourceTemplate.xsl)

 /**
  * auto generated method signature
  * for xsl:value-of select=@qname/ operation.
  xsl:for-each select=input/[EMAIL PROTECTED]'']* @param _xsl:value-of
 select=@name//xsl:for-each
  * @return
  */

 This produces method headers that look like...

 /**
  * auto generated method signature for asynchronous invocations
  * for MyOperation|http://location.org/wsdl; operation.

  * @param myOperationRequest* @param interfaceVersion
  * @param on_complete callback to handle on complete
  * @param on_error callback to handle on error
  */

 This code should be changed too...

 /**
  * auto generated method signature
  * for xsl:value-of select=@qname/ operation.
  * xsl:for-each select=input/[EMAIL PROTECTED]'']xsl:text
 /xsl:text * @param _xsl:value-of select=@name//xsl:for-each
  * @return
  */

 This will pretty print your output to correctly show all parameters on
 their own line.

 ===

 Defect 2:
 -
 (line 190 of StubSourceTemplate.xsl)

 axis2_stub_op_xsl:value-of select=$servicename/_xsl:value-of
 select=@name/(
axis2_stub_t *stub, const axutil_env_t *envxsl:for-each
 select=input/[EMAIL PROTECTED]''],
xsl:variable name=inputtype
xsl:if test=@oursadb_/xsl:ifxsl:value-of
 select=@type/xsl:if test=@ours_t*/xsl:if
/xsl:variable
xsl:if test=position()1,/xsl:ifxsl:value-of
 select=$inputtype/xsl:text _/xsl:textxsl:value-of
 select=@name/
/xsl:for-each)

 This produces code that looks like...

 void axis2_stub_MyService_MyOperation_start( axis2_stub_t *stub, const
 axutil_env_t *env,
 ,axiom_node_t*
 myOperationRequest,
 ,axiom_node_t*
 interfaceVersion,
 ,axis2_status_t (
 AXIS2_CALL *on_complete ) (struct axis2_callback *, const axutil_env_t
 *) ,
 ,axis2_status_t (
 AXIS2_CALL *on_error ) (struct axis2_callback *, const axutil_env_t *,
 int ) )

 Note the extra comma.  The following lines of code should be changed:

axis2_stub_t *stub, const axutil_env_t *envxsl:for-each
 select=input/[EMAIL PROTECTED]''],  remove this comma
xsl:variable name=inputtype

 ===

 Defect 3:
 -
 (line 214 of StubSourceTemplate.xsl)

 !-- for service client currently suppported only 1 input param --
 xsl:for-each select=input/[EMAIL PROTECTED]'']
xsl:if test=position()=1
xsl:choose
xsl:when test=@ours
payload = adb_xsl:value-of
 select=@type/_serialize(_xsl:value-of select=@name/, env, NULL,
 NULL, AXIS2_TRUE, NULL, NULL);
/xsl:when
xsl:otherwise
payload = _xsl:value-of select=@name/;
/xsl:otherwise
/xsl:choose
/xsl:if
 /xsl:for-each

 The for loop is redundant.  Change this code to be the following:

 xsl:variable name=firstParam select=input/param[1]/
 xsl:if test=$firstParam/@type!=''
xsl:choose
xsl:when test=$firstParam/@ours
payload = adb_xsl:value-of
 select=$firstParam/@type/_serialize(_xsl:value-of
 select=$firstParam/@name/, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
/xsl:when
xsl:otherwise
payload = _xsl:value-of select=$firstParam/@name/;
/xsl:otherwise
/xsl:choose
 /xsl:if

 ===

 Defect 4:
 -
 (lines 179 to 285 of StubSourceTemplate.xsl)

 This code adds in the parameters for the header (xsl:for-each
 select=input/[EMAIL PROTECTED]'']) but only the first parameter is ever
 referenced.  Read: The elements explicitly specified as headers in the
 WSDL are not used and thus not added to the service call.

 Here is the sample WSDL that can be used to reproduce these errors.

 wsdl:definitions targetNamespace=http://location.org/wsdl;
 xmlns:tns=http://location.org/wsdl;
 xmlns:msg=http://location.org/messages;
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:http=http://schemas.xmlsoap.org/wsdl/http/;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
 xmlns:wsi=http://ws-i.org/schemas/conformanceClaim/;

wsdl:types
xs:schema targetNamespace=http://location.org/wsdl;
xs:element name=InterfaceVersion type=xs:string/
xs:element name=MyOperationRequest type=xs:string/
xs:element name=MyOperationResponse type=xs:string/
xs:element name=MyException type=xs:string/
/xs:schema

Re: WSDL2C Stub Generation - Operations missing

2007-11-23 Thread Sebastian Merten
Hi Dimuthu,

thanks for the quick answer. Now that I know this, I think I can live
with request-response operations ...

 

 

Von: Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 22. November 2007 13:15
An: Apache AXIS C User List
Betreff: Re: WSDL2C Stub Generation - Operations missing

 

Hi Sebastian,

You wsdl  have  a operation with out only  message exchange pattern. You
can't generate code to this kind of scenarios using WSDL2C tool.
AFAIK you need to work with Apache savan module here.

And currently there are no other ways to generate the stub from the wsdl
except the WSDL2C tool.

Thanks
Dimuthu

On Nov 22, 2007 5:09 PM, Sebastian Merten  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Hi all,

I a m currently making my first steps with axis2/c and now have a few
questions about stub generation. 

I' m using the WSDL2C Tool to generate the client stub with the
following command: 

axis2.bat org.apache.axis2.wsdl.WSDL2C -uri http:// mydomain.com/
http://mydomain.com/ soap_server.php?wsdl -d adb - u

The Problem is, that when I define a so called Notfication Operation 
in the server side wsdl file , the corresponding implementation in the
generated axis2_stub_service.c -file is missing. Although the
definition in the .h file is there.

Functions for  Request-respones Operations are correctly generated. 

Some example:

Operations defined in the WSDL file:

portType name =Service_PortType 

 operation name= ServerVersion 

 output message= tns:ServerVersionOutput /

/ operation 

 operation name= Test 

 input message= tns:TestInput /

 output message =tns:TestOutput /

/ operation 

/ portType 

Function declarations in the generated .h file:

adb_string_element_t* axis2_stub_Service_ServerVersion( axis2_stub_t
*stub, const axutil_env_t *env);

adb_string_element_t* axis2_stub_Service_Test( axis2_stub_t *stub, const
axutil_env_t *env,
adb_string_element_t* string_element3);

The function axis2_stub_Service_Test is correctly implemented in the .c
file but the function axis2_stub_Service_ServerVersion not.

Anyone has an idea what could be wrong?

b.t.w.: Is there also a way to generate the client stub (from wsdl)
programmatically without using the WSDL2C Tool? 

Greetings and thanks in advance

Sebastian

 



Re: WSDL2C Stub Generation - Operations missing

2007-11-22 Thread Dimuthu Gamage
Hi Sebastian,

You wsdl  have  a operation with out only  message exchange pattern. You
can't generate code to this kind of scenarios using WSDL2C tool.
AFAIK you need to work with Apache savan module here.

And currently there are no other ways to generate the stub from the wsdl
except the WSDL2C tool.

Thanks
Dimuthu

On Nov 22, 2007 5:09 PM, Sebastian Merten [EMAIL PROTECTED] wrote:

  Hi all,

 I am currently making my first steps with axis2/c and now have a few
 questions about stub generation.

 I'm using the WSDL2C Tool to generate the client stub with the following
 command:

 axis2.bat org.apache.axis2.wsdl.WSDL2C -uri 
 http://mydomain.com/soap_server.php?wsdl
 -d adb –u

 The Problem is, that when I define a so called Notfication Operation in
 the server side wsdl file, the corresponding implementation in the
 generated axis2_stub_service.c-file is missing. Although the definition
 in the .h file is there.

 Functions for Request-respones Operations are correctly generated.

 Some example:

 Operations defined in the WSDL file:

 portType name=Service_PortType

 operation name=ServerVersion

 output message=tns:ServerVersionOutput/

 /operation

 operation name=Test

 input message=tns:TestInput/

 output message=tns:TestOutput/

 /operation

 /portType

 Function declarations in the generated .h file:

 adb_string_element_t* axis2_stub_Service_ServerVersion( axis2_stub_t
 *stub, const axutil_env_t *env);

 adb_string_element_t* axis2_stub_Service_Test( axis2_stub_t *stub, 
 constaxutil_env_t *env,
 adb_string_element_t* string_element3);

 The function axis2_stub_Service_Test is correctly implemented in the .c
 file but the function axis2_stub_Service_ServerVersion not.

 Anyone has an idea what could be wrong?

 b.t.w.: Is there also a way to generate the client stub (from wsdl)
 programmatically without using the WSDL2C Tool?

 Greetings and thanks in advance

 Sebastian



Re: WSDL2C create function conflicts with SOAP operation named create

2007-11-20 Thread Bill Mitchell

If I understand your reference to the absence of namespaces in my example,
Dimuthu, you are correct to identify that as a distinct but similar name
uniqueness issue.  Certainly the WSDL itself could contain name conflicts
that are resolved through the use of distinct namespaces.  So, where I wrote
axis2_stub_start_op_servicename_opname, in the general case that would
need to be axis2_stub_start_op_ns1_servicename_ns2_opname.  This could
certainly be remedied as part of the same project.  In the simple case where
all the user names are part of the same namespace, one could default to the
status quo and leave these out.  To handle the general case, one could use
the -N command line argument to WSDL2Java for the similar purpose here. 
This would allow the WSDL2C user to determine the prefix to be used for each
namespace.  The important part to avoid name conflicts, similar to the other
situations I raised, is that every element always be generated or never
generated.  In a situation where namespace identifiers are included, they
need to be included everywhere to guarantee that a namespace identifier in
one place is not confused with the same string that is part of a user name
in another place.  

And, of course, the other important part is the suggestion I made below,
that all parts of the Axis generated name precede any parts of the user
name, and no Axis string prefix be the leading substring of another Axis
generated string prefix.  

I made my suggestion for an option to preserve the status quo only to handle
the case where you folks think there is enough installed base and the change
is awkward enough to demand it.  I personally don't have a strong opinion
one way or the other on compatibility with the status quo.  

Thanks,
Bill


Hi Bill,
So briefly your suggestion is,
For wsdl operations in the stub,
axis2_stub_servicename_opname should be replaced with
axis2_stub_op_servicename_opname.
axis2_stub_servicename_opname_start should be replaced with
axis2_stub_start_op_servicename_opname.

and for consistency non wsdl-operations in the stub,
axis2_stub_servicename_create should be replaced with
axis2_stub_create_servicename.

The only issue against this suggestion is, there the namespace part of the
operation is not prefixed. But we can just forget that, if this  solves  all
the problems.

Anyway I doubt whether we can provide the old functions with a user option,
since it need to add some code to the java tool (code portions not specific
to c codegeneration), But we can give a try.

I will let devs know this discussion and ask their suggestions.

Thanks
Dimuthu

-- 
View this message in context: 
http://www.nabble.com/WSDL2C-create-function-conflicts-with-SOAP-operation-named-create-tf4818227.html#a13870069
Sent from the Axis - C++ - User mailing list archive at Nabble.com.


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



Re: WSDL2C create function conflicts with SOAP operation named create

2007-11-20 Thread Dimuthu Gamage
Hi Bill,
Currently whenever there is a name conflict in schema elements, they will be
named with a post fix. And in the headers we should show the namespaces, so
the developers will be able to figure out the right element.

Thanks
Dimuthu

On Nov 21, 2007 8:16 AM, Bill Mitchell [EMAIL PROTECTED] wrote:


 If I understand your reference to the absence of namespaces in my example,
 Dimuthu, you are correct to identify that as a distinct but similar name
 uniqueness issue.  Certainly the WSDL itself could contain name conflicts
 that are resolved through the use of distinct namespaces.  So, where I
 wrote
 axis2_stub_start_op_servicename_opname, in the general case that would
 need to be axis2_stub_start_op_ns1_servicename_ns2_opname.  This could
 certainly be remedied as part of the same project.  In the simple case
 where
 all the user names are part of the same namespace, one could default to
 the
 status quo and leave these out.  To handle the general case, one could use
 the -N command line argument to WSDL2Java for the similar purpose here.
 This would allow the WSDL2C user to determine the prefix to be used for
 each
 namespace.  The important part to avoid name conflicts, similar to the
 other
 situations I raised, is that every element always be generated or never
 generated.  In a situation where namespace identifiers are included, they
 need to be included everywhere to guarantee that a namespace identifier in
 one place is not confused with the same string that is part of a user name
 in another place.

 And, of course, the other important part is the suggestion I made below,
 that all parts of the Axis generated name precede any parts of the user
 name, and no Axis string prefix be the leading substring of another Axis
 generated string prefix.

 I made my suggestion for an option to preserve the status quo only to
 handle
 the case where you folks think there is enough installed base and the
 change
 is awkward enough to demand it.  I personally don't have a strong opinion
 one way or the other on compatibility with the status quo.

 Thanks,
 Bill


 Hi Bill,
 So briefly your suggestion is,
 For wsdl operations in the stub,
 axis2_stub_servicename_opname should be replaced with
 axis2_stub_op_servicename_opname.
 axis2_stub_servicename_opname_start should be replaced with
 axis2_stub_start_op_servicename_opname.

 and for consistency non wsdl-operations in the stub,
 axis2_stub_servicename_create should be replaced with
 axis2_stub_create_servicename.

 The only issue against this suggestion is, there the namespace part of the
 operation is not prefixed. But we can just forget that, if this  solves
  all
 the problems.

 Anyway I doubt whether we can provide the old functions with a user
 option,
 since it need to add some code to the java tool (code portions not
 specific
 to c codegeneration), But we can give a try.

 I will let devs know this discussion and ask their suggestions.

 Thanks
 Dimuthu

 --
 View this message in context:
 http://www.nabble.com/WSDL2C-create-function-conflicts-with-SOAP-operation-named-create-tf4818227.html#a13870069
 Sent from the Axis - C++ - User mailing list archive at Nabble.com.


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




Re: WSDL2C create function conflicts with SOAP operation named create

2007-11-19 Thread Bill Mitchell

Interesting suggestion, Samisa.  I modified my WSDL renaming the delete
operation to struct and used the WSDL2C utility to generate the stub and
header files.  I see the same result, the header contains a template with
the dummy parameter name struct:
axiom2_node_t* axis2_stub_TestService_struct( axis2_stub_t *stub, const
axutil_env_t *env,  
 axiom_node_t* struct);
So, if there is a table that is used to filter C reserved words, that table
is not being applied to the dummy parameter names when the operation stubs
are generated.  


Bill Mitchell wrote:
 In a similar vein, although I could raise it as a separate issue, I have
 come
 across another naming conflict in the output of the WSDL2C tool.  In the
 same WSDL, I find another operation, this one named delete:
 ...
   operation name=delete
 input message=fw:deleteRequest/
 output message=fw:deleteResponse/
   /operation
 ...

 The template in the header for the stub for this operation is:
   axiom_node_t* axis2_stub_Fservice_delete( axis2_stub_t *stub, const
 axutil_env_t *env,
 axiom_node_t* delete);

 The problem with this is that, although delete is not a reserved word in
 C,
 it certainly is in C++.  And my goal is to invoke the Axis2C code from
 within a C++ program.  So I would suggest that WSDL2C should prefix all of
 the names generated as a result of the WSDL with something, and not leave
 them naked where they could conflict with reserved words in C or C++.
   

+1. I think we already track for C keywords. May be we can add C++ 
keywords to that table as well.


Samisa...
-- 
View this message in context: 
http://www.nabble.com/WSDL2C-create-function-conflicts-with-SOAP-operation-named-create-tf4818227.html#a13842836
Sent from the Axis - C++ - User mailing list archive at Nabble.com.


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



Re: WSDL2C create function conflicts with SOAP operation named create

2007-11-16 Thread Bill Mitchell

Yes, Dimuthu, it occurred to me when I uncovered it that this is an issue
without pretty solutions.  Changing either the name of the axis support
functions or the name of the generated operation functions would impact
existing users who re-generated their stubs.  

On the other hand, there are real problems with selective name changing when
conflicts are detected.  In this particular case, imagine that the generated
name is changed from create to op_create because create conflicts with
the axis support function.  Now the WSDL is changed to reflect a new
function at the server, op_create.  When the stubs are regenerated, the
create operation would conflict with the support function, and the first
alternative name would conflict as well.  So the code would fall to a second
alternate?  That would mean that for this user, WSDL2C generated stubs with
one name, op_create, and now started generated stubs with a different name. 
This now inflicts on the one user with the conflict the abrupt change in
names that we would like to avoid inflicting on all the users one time.  The
general problem with selective name changes is that they seemingly occur at
random and will be a surprise to anyone who is not already experienced with
Axis and has not seen them before.  

My recommendation would be to change the interfaces to include a string,
e.g., _op_, in front of all the operation names.  The only way to avoid the
possibility of conflicts with names from the WSDL is for the string to be
added to the front, and not to the end.  As there is an existing problem
with the names asynchronous operations, e.g., _create_start, the
asynchronous start of a create operation, has the same name as
_create_start, the synchronous invocation of a create_start operation, I
suggest that these be changed at the same time.  So the old
axis2_stub_servicename_opname becomes axis2_stub_op_servicename_opname, and
the old axis2_stub_servicename_opname_start becomes
axis2_stub_start_op_servicename_opname.  As you imply this is a longstanding
issue, you may already be aware of other name conflicts that I have not yet
uncovered that should be solved at the same time.  Maybe, to make it a
general practice and example everywhere, you would want to change all the
generated names to have all the axis assigned names precede the servicename
or other username, e.g., axis2_stub_servicename_create itself becomes
axis2_stub_create_servicename.  This might avoid future problems and give
you more freedom to add new stub functions without creating new conflicts.  

Obviously, it would be nice to avoid the abrupt change under the existing
user base, so the old naming convention would still need to be available
through a command-line option or an option in a properties file.  I would
suggest the improved naming convention be the default so that new adopters
of Axis2C don't encounter problems, as the goal should be to increase the
number of adopters by making it as easy and trouble free as possible.  

Clearly the longer one waits to introduce such a change, the more existing
users there are and thus the more users are inconvenienced by the change. 
It might have been nice to associate such a change with the introduction of
Axis2, so that people might be more accepting of a radical change from the
Axis1 behavior.  


Dimuthu Gamage wrote:
 
 Hi Bill,
 
 Yea, that is a big issue. But since the tool has been there for sometime
 there would be codes that stick to the current api given by the generated
 code..
 
 SO one thing we can do is, check whether the names for  operations
 conflicts
 with the _create, _populate_services and _get_endpoint_uri_from_wsdl, and
 if
 so we can prefix the operation names with some thing like op
 
 So your create operation would be,
 'axis2_stub_FService_op_create'
 
 but all the other non-conflicting functions stays the same.
 Any ideas?
 
 Thanks
 Dimuthu
 
 On Nov 16, 2007 6:01 AM, Bill Mitchell [EMAIL PROTECTED] wrote:
 

 In order to communicate with a service written with another tool, I have
 been
 given a WSDL that includes a SOAP operation with the name create:
 ...
 portType name=IFService
  operation name=create
input message=fw:createRequest/
output message=fw:createResponse/
   /operation
 /portType
 ...

 When I pass this WSDL through the WSDL2C utility, the generated header
 file
 constains two conflicting stubs with the same name.
 The first is for its internal procedure to create a stub for the service:
axis2_stub_t*
axis2_stub_FService_create (const axutil_env_t *env,
axis2_char_t *client_home,
axis2_char_t *endpoint_uri);
 The second is the procedure to invoke the create operation on the
 service:
axiom_node_t* axis2_stub_FService_create( axis2_stub_t *stub, const
 axutil_env_t *env,
axiom_node_t* create);

 Obviously, this doesn't work.  It would be nice were 

Re: WSDL2C create function conflicts with SOAP operation named create

2007-11-16 Thread Bill Mitchell

In a similar vein, although I could raise it as a separate issue, I have come
across another naming conflict in the output of the WSDL2C tool.  In the
same WSDL, I find another operation, this one named delete:
...
  operation name=delete
input message=fw:deleteRequest/
output message=fw:deleteResponse/
  /operation
...

The template in the header for the stub for this operation is:
  axiom_node_t* axis2_stub_Fservice_delete( axis2_stub_t *stub, const
axutil_env_t *env,
axiom_node_t* delete);

The problem with this is that, although delete is not a reserved word in C,
it certainly is in C++.  And my goal is to invoke the Axis2C code from
within a C++ program.  So I would suggest that WSDL2C should prefix all of
the names generated as a result of the WSDL with something, and not leave
them naked where they could conflict with reserved words in C or C++.

Thanks,
Bill


Dimuthu Gamage wrote:
 
 Hi Bill,
 
 Yea, that is a big issue. But since the tool has been there for sometime
 there would be codes that stick to the current api given by the generated
 code..
 
 SO one thing we can do is, check whether the names for  operations
 conflicts
 with the _create, _populate_services and _get_endpoint_uri_from_wsdl, and
 if
 so we can prefix the operation names with some thing like op
 
 So your create operation would be,
 'axis2_stub_FService_op_create'
 
 but all the other non-conflicting functions stays the same.
 Any ideas?
 
 Thanks
 Dimuthu
 
 On Nov 16, 2007 6:01 AM, Bill Mitchell [EMAIL PROTECTED] wrote:
 

 In order to communicate with a service written with another tool, I have
 been
 given a WSDL that includes a SOAP operation with the name create:
 ...
 portType name=IFService
  operation name=create
input message=fw:createRequest/
output message=fw:createResponse/
   /operation
 /portType
 ...

 When I pass this WSDL through the WSDL2C utility, the generated header
 file
 constains two conflicting stubs with the same name.
 The first is for its internal procedure to create a stub for the service:
axis2_stub_t*
axis2_stub_FService_create (const axutil_env_t *env,
axis2_char_t *client_home,
axis2_char_t *endpoint_uri);
 The second is the procedure to invoke the create operation on the
 service:
axiom_node_t* axis2_stub_FService_create( axis2_stub_t *stub, const
 axutil_env_t *env,
axiom_node_t* create);

 Obviously, this doesn't work.  It would be nice were WSDL2C to add
 something
 more to the procedures that invoke the operations, such that the second
 were
 called axis2_stub_FService_invoke_create or
 ..._FService_create_operation.
 Is there some command line option I'm not seeing on WSDL2C that would
 force
 a more specific prefix on the operation stubs?

 Of course, in a C++ world, the two functions could both exist as they
 have
 different signatures.  But I tried renaming and compiling the .c stub as
 a
 .cpp and that doesn't work.  The generated .c stub uses delete as a
 parameter name.

 The brute force way is to edit the stubs everytime they are generated to
 solve the name conflict.  Were I in control of both sides, I could avoid
 the
 issue by changing the name of the operation from create to something
 else.

 --
 View this message in context:
 http://www.nabble.com/WSDL2C-create-function-conflicts-with-SOAP-operation-named-create-tf4818227.html#a13785056
 Sent from the Axis - C++ - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/WSDL2C-create-function-conflicts-with-SOAP-operation-named-create-tf4818227.html#a13802853
Sent from the Axis - C++ - User mailing list archive at Nabble.com.


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



Re: WSDL2C create function conflicts with SOAP operation named create

2007-11-16 Thread Samisa Abeysinghe

Bill Mitchell wrote:

In a similar vein, although I could raise it as a separate issue, I have come
across another naming conflict in the output of the WSDL2C tool.  In the
same WSDL, I find another operation, this one named delete:
...
  operation name=delete
input message=fw:deleteRequest/
output message=fw:deleteResponse/
  /operation
...

The template in the header for the stub for this operation is:
  axiom_node_t* axis2_stub_Fservice_delete( axis2_stub_t *stub, const
axutil_env_t *env,
axiom_node_t* delete);

The problem with this is that, although delete is not a reserved word in C,
it certainly is in C++.  And my goal is to invoke the Axis2C code from
within a C++ program.  So I would suggest that WSDL2C should prefix all of
the names generated as a result of the WSDL with something, and not leave
them naked where they could conflict with reserved words in C or C++.
  


+1. I think we already track for C keywords. May be we can add C++ 
keywords to that table as well.



Samisa...


Thanks,
Bill


Dimuthu Gamage wrote:
  

Hi Bill,

Yea, that is a big issue. But since the tool has been there for sometime
there would be codes that stick to the current api given by the generated
code..

SO one thing we can do is, check whether the names for  operations
conflicts
with the _create, _populate_services and _get_endpoint_uri_from_wsdl, and
if
so we can prefix the operation names with some thing like op

So your create operation would be,
'axis2_stub_FService_op_create'

but all the other non-conflicting functions stays the same.
Any ideas?

Thanks
Dimuthu

On Nov 16, 2007 6:01 AM, Bill Mitchell [EMAIL PROTECTED] wrote:



In order to communicate with a service written with another tool, I have
been
given a WSDL that includes a SOAP operation with the name create:
...
portType name=IFService
 operation name=create
   input message=fw:createRequest/
   output message=fw:createResponse/
  /operation
/portType
...

When I pass this WSDL through the WSDL2C utility, the generated header
file
constains two conflicting stubs with the same name.
The first is for its internal procedure to create a stub for the service:
   axis2_stub_t*
   axis2_stub_FService_create (const axutil_env_t *env,
   axis2_char_t *client_home,
   axis2_char_t *endpoint_uri);
The second is the procedure to invoke the create operation on the
service:
   axiom_node_t* axis2_stub_FService_create( axis2_stub_t *stub, const
axutil_env_t *env,
   axiom_node_t* create);

Obviously, this doesn't work.  It would be nice were WSDL2C to add
something
more to the procedures that invoke the operations, such that the second
were
called axis2_stub_FService_invoke_create or
..._FService_create_operation.
Is there some command line option I'm not seeing on WSDL2C that would
force
a more specific prefix on the operation stubs?

Of course, in a C++ world, the two functions could both exist as they
have
different signatures.  But I tried renaming and compiling the .c stub as
a
.cpp and that doesn't work.  The generated .c stub uses delete as a
parameter name.

The brute force way is to edit the stubs everytime they are generated to
solve the name conflict.  Were I in control of both sides, I could avoid
the
issue by changing the name of the operation from create to something
else.

--
View this message in context:
http://www.nabble.com/WSDL2C-create-function-conflicts-with-SOAP-operation-named-create-tf4818227.html#a13785056
Sent from the Axis - C++ - User mailing list archive at Nabble.com.


-
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: WSDL2C create function conflicts with SOAP operation named create

2007-11-16 Thread Dimuthu Gamage
Hi Bill,
So briefly your suggestion is,
For wsdl operations in the stub,
axis2_stub_servicename_opname should be replaced with
axis2_stub_op_servicename_opname.
axis2_stub_servicename_opname_start should be replaced with
axis2_stub_start_op_servicename_opname.

and for consistency non wsdl-operations in the stub,
axis2_stub_servicename_create should be replaced with
axis2_stub_create_servicename.

The only issue against this suggestion is, there the namespace part of the
operation is not prefixed. But we can just forget that, if this  solves  all
the problems.

Anyway I doubt whether we can provide the old functions with a user option,
since it need to add some code to the java tool (code portions not specific
to c codegeneration), But we can give a try.

I will let devs know this discussion and ask their suggestions.

Thanks
Dimuthu

On Nov 17, 2007 2:32 AM, Bill Mitchell [EMAIL PROTECTED] wrote:


 Yes, Dimuthu, it occurred to me when I uncovered it that this is an issue
 without pretty solutions.  Changing either the name of the axis support
 functions or the name of the generated operation functions would impact
 existing users who re-generated their stubs.

 On the other hand, there are real problems with selective name changing
 when
 conflicts are detected.  In this particular case, imagine that the
 generated
 name is changed from create to op_create because create conflicts
 with
 the axis support function.  Now the WSDL is changed to reflect a new
 function at the server, op_create.  When the stubs are regenerated, the
 create operation would conflict with the support function, and the first
 alternative name would conflict as well.  So the code would fall to a
 second
 alternate?  That would mean that for this user, WSDL2C generated stubs
 with
 one name, op_create, and now started generated stubs with a different
 name.
 This now inflicts on the one user with the conflict the abrupt change in
 names that we would like to avoid inflicting on all the users one time.
  The
 general problem with selective name changes is that they seemingly occur
 at
 random and will be a surprise to anyone who is not already experienced
 with
 Axis and has not seen them before.

 My recommendation would be to change the interfaces to include a string,
 e.g., _op_, in front of all the operation names.  The only way to avoid
 the
 possibility of conflicts with names from the WSDL is for the string to be
 added to the front, and not to the end.  As there is an existing problem
 with the names asynchronous operations, e.g., _create_start, the
 asynchronous start of a create operation, has the same name as
 _create_start, the synchronous invocation of a create_start operation, I
 suggest that these be changed at the same time.  So the old
 axis2_stub_servicename_opname becomes axis2_stub_op_servicename_opname,
 and
 the old axis2_stub_servicename_opname_start becomes
 axis2_stub_start_op_servicename_opname.  As you imply this is a
 longstanding
 issue, you may already be aware of other name conflicts that I have not
 yet
 uncovered that should be solved at the same time.  Maybe, to make it a
 general practice and example everywhere, you would want to change all the
 generated names to have all the axis assigned names precede the
 servicename
 or other username, e.g., axis2_stub_servicename_create itself becomes
 axis2_stub_create_servicename.  This might avoid future problems and give
 you more freedom to add new stub functions without creating new conflicts.

 Obviously, it would be nice to avoid the abrupt change under the existing
 user base, so the old naming convention would still need to be available
 through a command-line option or an option in a properties file.  I would
 suggest the improved naming convention be the default so that new adopters
 of Axis2C don't encounter problems, as the goal should be to increase the
 number of adopters by making it as easy and trouble free as possible.

 Clearly the longer one waits to introduce such a change, the more existing
 users there are and thus the more users are inconvenienced by the change.
 It might have been nice to associate such a change with the introduction
 of
 Axis2, so that people might be more accepting of a radical change from the
 Axis1 behavior.


 Dimuthu Gamage wrote:
 
  Hi Bill,
 
  Yea, that is a big issue. But since the tool has been there for sometime
  there would be codes that stick to the current api given by the
 generated
  code..
 
  SO one thing we can do is, check whether the names for  operations
  conflicts
  with the _create, _populate_services and _get_endpoint_uri_from_wsdl,
 and
  if
  so we can prefix the operation names with some thing like op
 
  So your create operation would be,
  'axis2_stub_FService_op_create'
 
  but all the other non-conflicting functions stays the same.
  Any ideas?
 
  Thanks
  Dimuthu
 
  On Nov 16, 2007 6:01 AM, Bill Mitchell [EMAIL PROTECTED] wrote:
 
 
  In order to communicate with a service 

Re: [WSDL2C] Bug in C - ServerStubs - Unexpected Subelement

2007-08-09 Thread Dr. Florian Steinborn

Hi,

just to let you know what we did to temporarily bypass the problem:

We added just one exclamation mark and it works:

[...]


if(has_parent)
   axutil_stream_write(stream, env, start_input_str,  
   start_input_str_len);


changed to

if(!has_parent)
   axutil_stream_write(stream, env, start_input_str,
   start_input_str_len);

[...]

Needless to say this is editing the generated source - the way we did not  
want to go.


Thanks and greetings from Berlin,

Flori

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



Re: [WSDL2C] Bug in C - ServerStubs - Unexpected Subelement

2007-08-09 Thread Samisa Abeysinghe
Looks like a logic error in the generated code. I could change the style 
sheet logic to include this.

However, I would like to have a test case to ensure the change works.

Samisa...

Dr. Florian Steinborn wrote:

Hi,

just to let you know what we did to temporarily bypass the problem:

We added just one exclamation mark and it works:

[...]


if(has_parent)
   axutil_stream_write(stream, env, start_input_str,
start_input_str_len);


changed to

if(!has_parent)
   axutil_stream_write(stream, env, start_input_str,
   start_input_str_len);

[...]

Needless to say this is editing the generated source - the way we did 
not want to go.


Thanks and greetings from Berlin,

Flori

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





--
Samisa Abeysinghe : a href=http://wso2.org/projects/wsf/c;WSO2 Web Services 
Framework/C - Open source C library for providing and consuming Web services/a


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



Re: [WSDL2C] Bug in C - ServerStubs - Unexpected Subelement

2007-08-09 Thread Dr. Florian Steinborn

Hi Samisa

Looks like a logic error in the generated code. I could change the style  
sheet logic to include this.

However, I would like to have a test case to ensure the change works.



attached you find a WSDL and the generated C code with the error. This  
could make it easier to see your change works.


Thanks,
Flori

adb_getSysinfoResponse.c
Description: Binary data


WSProsit.wsdl
Description: Binary data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: WSDL2C REST question

2006-10-17 Thread Samisa Abeysinghe

Dave Meier wrote:
To use REST with Axis2C, do I need to define my inputs and outputs as 
generic XML nodes or can I use specifically defined structures for these?
You have to work at XML level; it is an XML-in/XML-out model that we 
support.

There are no predefined structures for doing REST.
I want to provide both a SOAP based interface and some REST based CRUD 
operations and hopefully share the same code where there is overlap.
You can write a single service and achieve this. Say you write a service 
named foo, you can consume that both using SOAP and REST style calls 
with Axis2/C server.


Samisa...

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



Re: WSDL2C Code generation tool ( C Implementation ) - questions

2006-10-17 Thread Dimuthu Chathuranga
Hi Dave,On 10/18/06, Dave Meier [EMAIL PROTECTED] wrote:







1. Does this new tool currently only build on Linux or can I build 
it on Windows?This compiles and works only on linux, There are no Makefiles available to build it on windows.
2. Does it generate the data structures in C?There are bugs in the c tool as it failed to parse some wsdls. And the
tool will generate schema code only for doc-lit type WSDLs. Anyway In my tests I experienced although it failed to parse wsdls(generate stub or skel) it still generate code for schema successfully. 
 I'm using the 
java WSDL2Code and it generates my input/output data structures all in java when 
I use the -d adb option.Currently I can't figure out where the problem is, as I m having problem in building the latest axis2/java source. But just going through code I can't figure out any new things which would affect this. 

3. Is there remaining work to be done on the 
tool?The C Implementation for the tool is result of my google summer of code project this year. There I was only able to do the starting works for the tool. There are more work to be done in tool itself and templates used in the code generation. 
RegardsDimuthu
Thanks,

-Dave.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.