You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by "Dr. Florian Steinborn" <fp...@gmx.de> on 2007/06/08 00:05:27 UTC

[AXIS2C][WSDL2C] close to despair

Dear group,

I am looking for one complete example of a web service for AXIS2C that was  
completely created by one single WSDL file using the generator utilities  
 from AXIS2-Java. But I cannot find one. Can someone provide me one?

I would like to show you what I did (the webservice is just to return a  
string)...

I used this interface to generate the wsdl-file I want to use...

//++++interface
public interface Hello {
     public String sayHello();
}

I compiled it with javac.
The resulting class file should be usable to generate the wsdl.
I used this (no special parameters):

java2wsdl Hello.class

I was lucky to find a "Hello.wsdl" afterwards.

This one I ran against WSDL2C to generate the server stubs.

java -classpath ${WSCP} org.apache.axis2.wsdl.WSDL2C -uri Hello.wsdl -ss  
-sd -d adb

Everythings works fine until here. I understood I have to implement the  
business logic in "axis2_skel_Hello.c".
But looking at

axis2_sayHelloResponse_t* axis2_skel_Hello_sayHello (const axutil_env_t
{
    /* TODO fill this with the necessary business logic */
    return NULL;
}

I find it extremely difficult to compare this generated source with the  
hand written sources in the samples directory. I am not sure which  
functions I have to call and which not. I probably have to issue a call for
axis2_sayHelloResponse_create()
to get the chance to send back my string, but once I did that: how do I  
copy my string to the return variable? Somewhere I found the use of
AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN ()
but HELL I cannot find the definition of this function (first I thought it  
was a macro but I could find a macro defintion either)... Where is this  
definition? How can I know that this function is useful to return a string  
- how does it look like when I have to return a long?
Once I am sure the service is well defined and running I would like to  
create the Java-client stubs from the same "Hello.wsdl" to connect to the  
service - but this is another story...

Please don't think I am too impatient - I torture myself since monday.

Thanks a lot for your help,

Flori

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by Mark Nüßler <ma...@9elements.com>.
hello users,

i am trying to generate java und c from wsdl.
my first approach was to write the wsdl first,
but i get stucked with this.
now i did the same procedure like Florian, first
write a java-interface and then generate the wsdl.
to save time i wrote a little batch-file

1) compile java-interface
2) gen wsdl from java
3) gen code from wsdl
4) style code

its attached with this mail - maybe someone finds
this useful [just replace the path informations].

with my old axis2java_nighly everything works fine,
but with the current axis2java_nighly [2007_06_10]
following problem occurs when trying to generate
any c-code:

Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.Exception: Emitter class not found!
         at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:256)
         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
         at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:28)
Caused by: java.lang.Exception: Emitter class not found!
         at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:233)
         ... 2 more


any idea what could be the problem with this ?
do i have to use additional parameters for the newer version ?


mfg derMark



Milinda Pathirage schrieb:
> Hi,
> 
> I changed the sample implementation of Calculator server/client to reflect
> the changes in naming conventions and removing macros. Please try this
> sample using the wsdl in sample/codegen/databinding/Calculator directory.
> 
> Thanks
> Milinda.
> 
> On 6/10/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
>>
>> Dear Milinda, dear group,
>>
>> I am very astonished that there was only one answer. Should this say 
>> to me
>> that I am the only one who wants to organize the workflow to get
>> webservices with Axis2c by:
>> 1. define an interface in Java
>> 2. generate the WSDL
>> 3. generate the server stubs and adding all the logic needed
>> 4. generate the client stubs for Java and add everything needed to use 
>> the
>> servide
>>
>> If someone else would go this way (that I thought would be the best one)
>> shouldn't the other ones see the same problems that I encounterd?
>> And nobody can give me a complete example?
>>
>> I really would like to learn how you start and proceed when you want/have
>> to create webservices from scratch.
>>
>> Meanwhile I will follow your advice and look into the databinding
>> directory of AXIS2C 0.96.
>>
>> Thank you all, thank you Milinda.
>> Greetings from Berlin
>>
>> Flori
>>
>>
>> On Fri, 08 Jun 2007 04:35:40 +0200, Milinda Pathirage
>> <mi...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > Sorry about not updating the code generation samples inside
>> > AXIS2C_HOME/samples/codegen/databinding directory. The sample
>> > implementations in this directory are out of date because we remove
>> > macros
>> > and do some changes to  naming conventions. I will change those samples
>> > ASAP.
>> > If you want to try WSDL2C with data binding follow the guide lines in
>> > README.txt inside databinding directory.
>> > These samples only provide implementations of business logic. You have
>> to
>> > copy other files which are generated using WSDL2C and compile them.
>> > I'll post a more detail  guideline ASAP.
>> >
>> > Thanks ,
>> > Milinda
>> >
>> > On 6/8/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
>> >>
>> >> Dear group,
>> >>
>> >> I am looking for one complete example of a web service for AXIS2C that
>> >> was
>> >> completely created by one single WSDL file using the generator
>> utilities
>> >> from AXIS2-Java. But I cannot find one. Can someone provide me one?
>> >>
>> >> I would like to show you what I did (the webservice is just to 
>> return a
>> >> string)...
>> >>
>> >> I used this interface to generate the wsdl-file I want to use...
>> >>
>> >> //++++interface
>> >> public interface Hello {
>> >>      public String sayHello();
>> >> }
>> >>
>> >> I compiled it with javac.
>> >> The resulting class file should be usable to generate the wsdl.
>> >> I used this (no special parameters):
>> >>
>> >> java2wsdl Hello.class
>> >>
>> >> I was lucky to find a "Hello.wsdl" afterwards.
>> >>
>> >> This one I ran against WSDL2C to generate the server stubs.
>> >>
>> >> java -classpath ${WSCP} org.apache.axis2.wsdl.WSDL2C -uri 
>> Hello.wsdl-ss
>> >> -sd -d adb
>> >>
>> >> Everythings works fine until here. I understood I have to implement 
>> the
>> >> business logic in "axis2_skel_Hello.c".
>> >> But looking at
>> >>
>> >> axis2_sayHelloResponse_t* axis2_skel_Hello_sayHello (const 
>> axutil_env_t
>> >> {
>> >>     /* TODO fill this with the necessary business logic */
>> >>     return NULL;
>> >> }
>> >>
>> >> I find it extremely difficult to compare this generated source with 
>> the
>> >> hand written sources in the samples directory. I am not sure which
>> >> functions I have to call and which not. I probably have to issue a 
>> call
>> >> for
>> >> axis2_sayHelloResponse_create()
>> >> to get the chance to send back my string, but once I did that: how 
>> do I
>> >> copy my string to the return variable? Somewhere I found the use of
>> >> AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN ()
>> >> but HELL I cannot find the definition of this function (first I 
>> thought
>> >> it
>> >> was a macro but I could find a macro defintion either)... Where is 
>> this
>> >> definition? How can I know that this function is useful to return a
>> >> string
>> >> - how does it look like when I have to return a long?
>> >> Once I am sure the service is well defined and running I would like to
>> >> create the Java-client stubs from the same "Hello.wsdl" to connect to
>> >> the
>> >> service - but this is another story...
>> >>
>> >> Please don't think I am too impatient - I torture myself since monday.
>> >>
>> >> Thanks a lot for your help,
>> >>
>> >> Flori
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>> >>
>> >>
>> >
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
> 
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.472 / Virus Database: 269.8.13/843 - Release Date: 10.06.2007 13:39

Re: [AXIS2C][WSDL2C] close to despair

Posted by "Dr. Florian Steinborn" <fl...@drb.insel.de>.
>
>
> When I call it without -laxis2 it works fine.
>
> Should we simply leave it out?

It works. Finally I got the Calculator-server running and can use the  
service from the generated Java-client. Thanks a lot!

Flori


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by "Dr. Florian Steinborn" <fl...@drb.insel.de>.
Hi Milinda,

now I tried the way you suggested and things work fine until now. I spent  
a long time yesterday to install Axis2c on a 64bit version of a Suse SLES  
9.0 (don't ask me why but I have to compile and link it in 32bit mode and  
it was not to be done without editing makefiles and so on...).

Until now when I linked I used these params:

gcc -m32 -shared -olibName.so -I$AXIS2C_HOME/include/axis2-1.1  
-L$AXIS2C_HOME/lib -laxis2 *.o

Now this fails, because there is not libaxis2 in my AXIS2C_HOME/lib, but  
only

flori@drb7n 127: ls *axis2*
  256 libaxis2_axiom.a                   128 libaxis2_http_sender.a
    4 libaxis2_axiom.la*                   4 libaxis2_http_sender.la*
    0 libaxis2_axiom.so@                   0 libaxis2_http_sender.so@
    0 libaxis2_axiom.so.0@                 0 libaxis2_http_sender.so.0@
  204 libaxis2_axiom.so.0.1.0*           128 libaxis2_http_sender.so.0.1.0*
1041 libaxis2_engine.a                   40 libaxis2_libxml2.a
    4 libaxis2_engine.la*                  4 libaxis2_libxml2.la*
    0 libaxis2_engine.so@                  0 libaxis2_libxml2.so@
    0 libaxis2_engine.so.0@                0 libaxis2_libxml2.so.0@
  813 libaxis2_engine.so.0.1.0*           48 libaxis2_libxml2.so.0.1.0*
  168 libaxis2_http_common.a              24 libaxis2_minizip.a
    4 libaxis2_http_common.la*             4 libaxis2_minizip.la*
    0 libaxis2_http_common.so@             0 libaxis2_minizip.so@
    0 libaxis2_http_common.so.0@           0 libaxis2_minizip.so.0@
  152 libaxis2_http_common.so.0.1.0*      28 libaxis2_minizip.so.0.1.0*
   24 libaxis2_http_receiver.a            40 libaxis2_parser.a
    4 libaxis2_http_receiver.la*           4 libaxis2_parser.la*
    0 libaxis2_http_receiver.so@           0 libaxis2_parser.so@
    0 libaxis2_http_receiver.so.0@         0 libaxis2_parser.so.0@
   28 libaxis2_http_receiver.so.0.1.0*    48 libaxis2_parser.so.0.1.0*


When I call it without -laxis2 it works fine.

Should we simply leave it out?

Thanks for your patience. Once I understood the things needed I promise I  
would like to contribute documentation to the project.

Flori

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by "Dr. Florian Steinborn" <fl...@drb.insel.de>.
>
> When you tell me how the LIBXML2_CFLAGS and the LIBXML2_LIBS vars have  
> to look like I can test that way as well...

Ah, I see. They have to be set to the output of
pkg-config --libs libxml-2.0
and
pkg-config --cflags libxml-2.0.

I will check that. Thanks.


  Flori

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Forwarding message form Damitha:

Hi Florian

>
> >>>
> >>> I never had problems in compiling the Axis2c sources. But when I
> >>> check out the latest svn I have to run the autoconf.sh because there
> >>> is no configure-script.
> >> I have uploaded a nightly build today at :
> >> http://people.apache.org/dist/axis2/nightly/c/
> >>
> >> With this, you will be able to run ./configure
> >>
> >> Please try that.
> >
> >
> > thanks for the quick reply. Unfortunately there was no change - the
> > same error happens again....

I have compiled axis2c in suse 10.0 successfully.  Check
pkg-config --libs libxml-2.0
If it could not find libxml2 libraries try installing the libxml2 
tar.gz. I installed
libxml2-2.6.28.tar.gz. Only after installing this I was successful.
Damitha


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dr. Florian Steinborn wrote:
> Setting the LIBXML2_CFLAGS and LIBXML2_LIBS did not work (only 
> evaluated when PKG_CONFIG is set?).
This is a build system bug. We got to fix that.

Samisa...
> But I installed a newer version of pkg_config - my version was 0.18, 
> now it is 0.21.
It works form 0.20 onwards

Samisa...

-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by "Dr. Florian Steinborn" <fp...@gmx.de>.
Setting the LIBXML2_CFLAGS and LIBXML2_LIBS did not work (only evaluated  
when PKG_CONFIG is set?).
But I installed a newer version of pkg_config - my version was 0.18, now  
it is 0.21.

configure and make ran successfully.

Regards,
Flori




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by "Dr. Florian Steinborn" <fl...@drb.insel.de>.
Hi Samisa,

>>
>> thanks for the quick reply. Unfortunately there was no change - the  
>> same error happens again....
> What is your 'pkg-config --version'?
> Also did you try setting the LIBXML2_CFLAGS and LIBXML2_LIBS environment
> variables?

I can check this out this evening at my home machine. I was just wondering  
why the error suddenly arises - there was no problem with the ordinary  
Axis2C 1.0 download so I thought something changed in the generator  
sources...

When you tell me how the LIBXML2_CFLAGS and the LIBXML2_LIBS vars have to  
look like I can test that way as well...

Thanks,
Flori

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dr. Florian Steinborn wrote:
> Hi Samisa,
>
>>>
>>> I never had problems in compiling the Axis2c sources. But when I 
>>> check out the latest svn I have to run the autoconf.sh because there 
>>> is no configure-script.
>> I have uploaded a nightly build today at : 
>> http://people.apache.org/dist/axis2/nightly/c/
>>
>> With this, you will be able to run ./configure
>>
>> Please try that.
>
>
> thanks for the quick reply. Unfortunately there was no change - the 
> same error happens again....
What is your 'pkg-config --version'?
Also did you try setting the LIBXML2_CFLAGS and LIBXML2_LIBS environment
variables?

Samisa...

-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web 
Services Developers' Portal)



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by "Dr. Florian Steinborn" <fp...@gmx.de>.
Hi Samisa,

>>
>> I never had problems in compiling the Axis2c sources. But when I check  
>> out the latest svn I have to run the autoconf.sh because there is no  
>> configure-script.
> I have uploaded a nightly build today at :  
> http://people.apache.org/dist/axis2/nightly/c/
>
> With this, you will be able to run ./configure
>
> Please try that.


thanks for the quick reply. Unfortunately there was no change - the same  
error happens again....


Flori

>
>>
>> When I run the configure script afterwards it fails with
>>
>> +++++Error start +++++++++++++
>>
>> checking for LIBXML2... configure: error: The pkg-config script could  
>> not be found or is too old.  Make sure it
>> is in your PATH or set the PKG_CONFIG environment variable to the full
>> path to pkg-config.
>>
>> Alternatively you may set the LIBXML2_CFLAGS and LIBXML2_LIBS  
>> environment variables
>> to avoid the need to call pkg-config.  See the pkg-config man page for
>> more details.
>> configure: error: /bin/sh './configure' failed for axiom
>>
>> +++++Error end +++++++++++++
>>
>> It was no error with the other releases. The installed version of  
>> libxml2 is 2.6.20 and the system is a Suse Linux 10.0.
>>
>> Thanks,
>> Flori
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dr. Florian Steinborn wrote:
> On Mon, 11 Jun 2007 04:21:56 +0200, Samisa Abeysinghe 
> <sa...@wso2.com> wrote:
>
>> Milinda Pathirage wrote:
>>> Hi,
>>>
>>> I changed the sample implementation of Calculator server/client to 
>>> reflect the changes in naming conventions and removing macros. 
>>> Please try this sample using the wsdl in 
>>> sample/codegen/databinding/Calculator directory.
>> With the latest svn of course.
>>
>> Samisa...
>
> Hi friends,
>
> I never had problems in compiling the Axis2c sources. But when I check 
> out the latest svn I have to run the autoconf.sh because there is no 
> configure-script.
I have uploaded a nightly build today at : 
http://people.apache.org/dist/axis2/nightly/c/

With this, you will be able to run ./configure

Please try that.

Thanks,
Samisa...

>
> When I run the configure script afterwards it fails with
>
> +++++Error start +++++++++++++
>
> checking for LIBXML2... configure: error: The pkg-config script could 
> not be found or is too old.  Make sure it
> is in your PATH or set the PKG_CONFIG environment variable to the full
> path to pkg-config.
>
> Alternatively you may set the LIBXML2_CFLAGS and LIBXML2_LIBS 
> environment variables
> to avoid the need to call pkg-config.  See the pkg-config man page for
> more details.
> configure: error: /bin/sh './configure' failed for axiom
>
> +++++Error end +++++++++++++
>
> It was no error with the other releases. The installed version of 
> libxml2 is 2.6.20 and the system is a Suse Linux 10.0.
>
> Thanks,
> Flori
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by "Dr. Florian Steinborn" <fp...@gmx.de>.
On Mon, 11 Jun 2007 04:21:56 +0200, Samisa Abeysinghe <sa...@wso2.com>  
wrote:

> Milinda Pathirage wrote:
>> Hi,
>>
>> I changed the sample implementation of Calculator server/client to  
>> reflect the changes in naming conventions and removing macros. Please  
>> try this sample using the wsdl in sample/codegen/databinding/Calculator  
>> directory.
> With the latest svn of course.
>
> Samisa...

Hi friends,

I never had problems in compiling the Axis2c sources. But when I check out  
the latest svn I have to run the autoconf.sh because there is no  
configure-script.

When I run the configure script afterwards it fails with

+++++Error start +++++++++++++

checking for LIBXML2... configure: error: The pkg-config script could not  
be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively you may set the LIBXML2_CFLAGS and LIBXML2_LIBS environment  
variables
to avoid the need to call pkg-config.  See the pkg-config man page for
more details.
configure: error: /bin/sh './configure' failed for axiom

+++++Error end +++++++++++++

It was no error with the other releases. The installed version of libxml2  
is 2.6.20 and the system is a Suse Linux 10.0.

Thanks,
Flori

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Milinda Pathirage wrote:
> Hi,
>
> I changed the sample implementation of Calculator server/client to 
> reflect the changes in naming conventions and removing macros. Please 
> try this sample using the wsdl in 
> sample/codegen/databinding/Calculator directory.
With the latest svn of course.

Samisa...
>
> Thanks
> Milinda.
>
> On 6/10/07, *Dr. Florian Steinborn* <fpunkt@gmx.de 
> <ma...@gmx.de>> wrote:
>
>     Dear Milinda, dear group,
>
>     I am very astonished that there was only one answer. Should this
>     say to me
>     that I am the only one who wants to organize the workflow to get
>     webservices with Axis2c by:
>     1. define an interface in Java
>     2. generate the WSDL
>     3. generate the server stubs and adding all the logic needed
>     4. generate the client stubs for Java and add everything needed to
>     use the
>     servide
>
>     If someone else would go this way (that I thought would be the
>     best one)
>     shouldn't the other ones see the same problems that I encounterd?
>     And nobody can give me a complete example?
>
>     I really would like to learn how you start and proceed when you
>     want/have
>     to create webservices from scratch.
>
>     Meanwhile I will follow your advice and look into the databinding
>     directory of AXIS2C 0.96.
>
>     Thank you all, thank you Milinda.
>     Greetings from Berlin
>
>     Flori
>
>
>     On Fri, 08 Jun 2007 04:35:40 +0200, Milinda Pathirage
>     <milinda.pathirage@gmail.com <ma...@gmail.com>>
>     wrote:
>
>     > Hi,
>     >
>     > Sorry about not updating the code generation samples inside
>     > AXIS2C_HOME/samples/codegen/databinding directory. The sample
>     > implementations in this directory are out of date because we remove
>     > macros
>     > and do some changes to  naming conventions. I will change those
>     samples
>     > ASAP.
>     > If you want to try WSDL2C with data binding follow the guide
>     lines in
>     > README.txt inside databinding directory.
>     > These samples only provide implementations of business logic.
>     You have to
>     > copy other files which are generated using WSDL2C and compile them.
>     > I'll post a more detail  guideline ASAP.
>     >
>     > Thanks ,
>     > Milinda
>     >
>     > On 6/8/07, Dr. Florian Steinborn <fpunkt@gmx.de
>     <ma...@gmx.de>> wrote:
>     >>
>     >> Dear group,
>     >>
>     >> I am looking for one complete example of a web service for
>     AXIS2C that
>     >> was
>     >> completely created by one single WSDL file using the generator
>     utilities
>     >> from AXIS2-Java. But I cannot find one. Can someone provide me one?
>     >>
>     >> I would like to show you what I did (the webservice is just to
>     return a
>     >> string)...
>     >>
>     >> I used this interface to generate the wsdl-file I want to use...
>     >>
>     >> //++++interface
>     >> public interface Hello {
>     >>      public String sayHello();
>     >> }
>     >>
>     >> I compiled it with javac.
>     >> The resulting class file should be usable to generate the wsdl.
>     >> I used this (no special parameters):
>     >>
>     >> java2wsdl Hello.class
>     >>
>     >> I was lucky to find a "Hello.wsdl" afterwards.
>     >>
>     >> This one I ran against WSDL2C to generate the server stubs.
>     >>
>     >> java -classpath ${WSCP} org.apache.axis2.wsdl.WSDL2C -uri
>     Hello.wsdl -ss
>     >> -sd -d adb
>     >>
>     >> Everythings works fine until here. I understood I have to
>     implement the
>     >> business logic in "axis2_skel_Hello.c".
>     >> But looking at
>     >>
>     >> axis2_sayHelloResponse_t* axis2_skel_Hello_sayHello (const
>     axutil_env_t
>     >> {
>     >>     /* TODO fill this with the necessary business logic */
>     >>     return NULL;
>     >> }
>     >>
>     >> I find it extremely difficult to compare this generated source
>     with the
>     >> hand written sources in the samples directory. I am not sure which
>     >> functions I have to call and which not. I probably have to
>     issue a call
>     >> for
>     >> axis2_sayHelloResponse_create()
>     >> to get the chance to send back my string, but once I did that:
>     how do I
>     >> copy my string to the return variable? Somewhere I found the
>     use of
>     >> AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN ()
>     >> but HELL I cannot find the definition of this function (first I
>     thought
>     >> it
>     >> was a macro but I could find a macro defintion either)... Where
>     is this
>     >> definition? How can I know that this function is useful to return a
>     >> string
>     >> - how does it look like when I have to return a long?
>     >> Once I am sure the service is well defined and running I would
>     like to
>     >> create the Java-client stubs from the same "Hello.wsdl" to
>     connect to
>     >> the
>     >> service - but this is another story...
>     >>
>     >> Please don't think I am too impatient - I torture myself since
>     monday.
>     >>
>     >> Thanks a lot for your help,
>     >>
>     >> Flori
>     >>
>     >>
>     ---------------------------------------------------------------------
>     >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>     >>
>     >>
>     >
>     >
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-c-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>
> -- 
> milinda@wso2.com <ma...@wso2.com>
> WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform"
> http://www.milindalakmal.wordpress.com 


-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi,

I changed the sample implementation of Calculator server/client to reflect
the changes in naming conventions and removing macros. Please try this
sample using the wsdl in sample/codegen/databinding/Calculator directory.

Thanks
Milinda.

On 6/10/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
>
> Dear Milinda, dear group,
>
> I am very astonished that there was only one answer. Should this say to me
> that I am the only one who wants to organize the workflow to get
> webservices with Axis2c by:
> 1. define an interface in Java
> 2. generate the WSDL
> 3. generate the server stubs and adding all the logic needed
> 4. generate the client stubs for Java and add everything needed to use the
> servide
>
> If someone else would go this way (that I thought would be the best one)
> shouldn't the other ones see the same problems that I encounterd?
> And nobody can give me a complete example?
>
> I really would like to learn how you start and proceed when you want/have
> to create webservices from scratch.
>
> Meanwhile I will follow your advice and look into the databinding
> directory of AXIS2C 0.96.
>
> Thank you all, thank you Milinda.
> Greetings from Berlin
>
> Flori
>
>
> On Fri, 08 Jun 2007 04:35:40 +0200, Milinda Pathirage
> <mi...@gmail.com> wrote:
>
> > Hi,
> >
> > Sorry about not updating the code generation samples inside
> > AXIS2C_HOME/samples/codegen/databinding directory. The sample
> > implementations in this directory are out of date because we remove
> > macros
> > and do some changes to  naming conventions. I will change those samples
> > ASAP.
> > If you want to try WSDL2C with data binding follow the guide lines in
> > README.txt inside databinding directory.
> > These samples only provide implementations of business logic. You have
> to
> > copy other files which are generated using WSDL2C and compile them.
> > I'll post a more detail  guideline ASAP.
> >
> > Thanks ,
> > Milinda
> >
> > On 6/8/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
> >>
> >> Dear group,
> >>
> >> I am looking for one complete example of a web service for AXIS2C that
> >> was
> >> completely created by one single WSDL file using the generator
> utilities
> >> from AXIS2-Java. But I cannot find one. Can someone provide me one?
> >>
> >> I would like to show you what I did (the webservice is just to return a
> >> string)...
> >>
> >> I used this interface to generate the wsdl-file I want to use...
> >>
> >> //++++interface
> >> public interface Hello {
> >>      public String sayHello();
> >> }
> >>
> >> I compiled it with javac.
> >> The resulting class file should be usable to generate the wsdl.
> >> I used this (no special parameters):
> >>
> >> java2wsdl Hello.class
> >>
> >> I was lucky to find a "Hello.wsdl" afterwards.
> >>
> >> This one I ran against WSDL2C to generate the server stubs.
> >>
> >> java -classpath ${WSCP} org.apache.axis2.wsdl.WSDL2C -uri Hello.wsdl-ss
> >> -sd -d adb
> >>
> >> Everythings works fine until here. I understood I have to implement the
> >> business logic in "axis2_skel_Hello.c".
> >> But looking at
> >>
> >> axis2_sayHelloResponse_t* axis2_skel_Hello_sayHello (const axutil_env_t
> >> {
> >>     /* TODO fill this with the necessary business logic */
> >>     return NULL;
> >> }
> >>
> >> I find it extremely difficult to compare this generated source with the
> >> hand written sources in the samples directory. I am not sure which
> >> functions I have to call and which not. I probably have to issue a call
> >> for
> >> axis2_sayHelloResponse_create()
> >> to get the chance to send back my string, but once I did that: how do I
> >> copy my string to the return variable? Somewhere I found the use of
> >> AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN ()
> >> but HELL I cannot find the definition of this function (first I thought
> >> it
> >> was a macro but I could find a macro defintion either)... Where is this
> >> definition? How can I know that this function is useful to return a
> >> string
> >> - how does it look like when I have to return a long?
> >> Once I am sure the service is well defined and running I would like to
> >> create the Java-client stubs from the same "Hello.wsdl" to connect to
> >> the
> >> service - but this is another story...
> >>
> >> Please don't think I am too impatient - I torture myself since monday.
> >>
> >> Thanks a lot for your help,
> >>
> >> Flori
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >>
> >>
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
milinda@wso2.com
WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform"
http://www.milindalakmal.wordpress.com

Re: [AXIS2C][WSDL2C] close to despair

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dr. Florian Steinborn wrote:
> Dear Milinda, dear group,
>
> I am very astonished that there was only one answer. Should this say 
> to me that I am the only one who wants to organize the workflow to get 
> webservices with Axis2c by:
> 1. define an interface in Java
> 2. generate the WSDL
> 3. generate the server stubs and adding all the logic needed
> 4. generate the client stubs for Java and add everything needed to use 
> the servide
>
> If someone else would go this way (that I thought would be the best 
> one) shouldn't the other ones see the same problems that I encounterd?
There was a codegen sample but we seem to have left it out form the svn 
for 1.0.
I think the sample that Milinda is talking about would solve your 
problem. We should have a doc on "How to use WSDL2C tool". The bit we 
have in the manual on the WSDL tool 
(http://ws.apache.org/axis2/c/docs/axis2c_manual.html#wsdl2c) is very 
high level. So lets include a separate doc with a sample on this subject.

Samisa...
> And nobody can give me a complete example?
>
> I really would like to learn how you start and proceed when you 
> want/have to create webservices from scratch.
>
> Meanwhile I will follow your advice and look into the databinding 
> directory of AXIS2C 0.96.
>
> Thank you all, thank you Milinda.
> Greetings from Berlin
>
> Flori
>
>
> On Fri, 08 Jun 2007 04:35:40 +0200, Milinda Pathirage 
> <mi...@gmail.com> wrote:
>
>> Hi,
>>
>> Sorry about not updating the code generation samples inside
>> AXIS2C_HOME/samples/codegen/databinding directory. The sample
>> implementations in this directory are out of date because we remove 
>> macros
>> and do some changes to  naming conventions. I will change those samples
>> ASAP.
>> If you want to try WSDL2C with data binding follow the guide lines in
>> README.txt inside databinding directory.
>> These samples only provide implementations of business logic. You 
>> have to
>> copy other files which are generated using WSDL2C and compile them.
>> I'll post a more detail  guideline ASAP.
>>
>> Thanks ,
>> Milinda
>>
>> On 6/8/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
>>>
>>> Dear group,
>>>
>>> I am looking for one complete example of a web service for AXIS2C 
>>> that was
>>> completely created by one single WSDL file using the generator 
>>> utilities
>>> from AXIS2-Java. But I cannot find one. Can someone provide me one?
>>>
>>> I would like to show you what I did (the webservice is just to return a
>>> string)...
>>>
>>> I used this interface to generate the wsdl-file I want to use...
>>>
>>> //++++interface
>>> public interface Hello {
>>>      public String sayHello();
>>> }
>>>
>>> I compiled it with javac.
>>> The resulting class file should be usable to generate the wsdl.
>>> I used this (no special parameters):
>>>
>>> java2wsdl Hello.class
>>>
>>> I was lucky to find a "Hello.wsdl" afterwards.
>>>
>>> This one I ran against WSDL2C to generate the server stubs.
>>>
>>> java -classpath ${WSCP} org.apache.axis2.wsdl.WSDL2C -uri Hello.wsdl 
>>> -ss
>>> -sd -d adb
>>>
>>> Everythings works fine until here. I understood I have to implement the
>>> business logic in "axis2_skel_Hello.c".
>>> But looking at
>>>
>>> axis2_sayHelloResponse_t* axis2_skel_Hello_sayHello (const axutil_env_t
>>> {
>>>     /* TODO fill this with the necessary business logic */
>>>     return NULL;
>>> }
>>>
>>> I find it extremely difficult to compare this generated source with the
>>> hand written sources in the samples directory. I am not sure which
>>> functions I have to call and which not. I probably have to issue a call
>>> for
>>> axis2_sayHelloResponse_create()
>>> to get the chance to send back my string, but once I did that: how do I
>>> copy my string to the return variable? Somewhere I found the use of
>>> AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN ()
>>> but HELL I cannot find the definition of this function (first I 
>>> thought it
>>> was a macro but I could find a macro defintion either)... Where is this
>>> definition? How can I know that this function is useful to return a 
>>> string
>>> - how does it look like when I have to return a long?
>>> Once I am sure the service is well defined and running I would like to
>>> create the Java-client stubs from the same "Hello.wsdl" to connect 
>>> to the
>>> service - but this is another story...
>>>
>>> Please don't think I am too impatient - I torture myself since monday.
>>>
>>> Thanks a lot for your help,
>>>
>>> Flori
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>>
>>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by "Dr. Florian Steinborn" <fp...@gmx.de>.
Dear Milinda, dear group,

I am very astonished that there was only one answer. Should this say to me  
that I am the only one who wants to organize the workflow to get  
webservices with Axis2c by:
1. define an interface in Java
2. generate the WSDL
3. generate the server stubs and adding all the logic needed
4. generate the client stubs for Java and add everything needed to use the  
servide

If someone else would go this way (that I thought would be the best one)  
shouldn't the other ones see the same problems that I encounterd?
And nobody can give me a complete example?

I really would like to learn how you start and proceed when you want/have  
to create webservices from scratch.

Meanwhile I will follow your advice and look into the databinding  
directory of AXIS2C 0.96.

Thank you all, thank you Milinda.
Greetings from Berlin

Flori


On Fri, 08 Jun 2007 04:35:40 +0200, Milinda Pathirage  
<mi...@gmail.com> wrote:

> Hi,
>
> Sorry about not updating the code generation samples inside
> AXIS2C_HOME/samples/codegen/databinding directory. The sample
> implementations in this directory are out of date because we remove  
> macros
> and do some changes to  naming conventions. I will change those samples
> ASAP.
> If you want to try WSDL2C with data binding follow the guide lines in
> README.txt inside databinding directory.
> These samples only provide implementations of business logic. You have to
> copy other files which are generated using WSDL2C and compile them.
> I'll post a more detail  guideline ASAP.
>
> Thanks ,
> Milinda
>
> On 6/8/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
>>
>> Dear group,
>>
>> I am looking for one complete example of a web service for AXIS2C that  
>> was
>> completely created by one single WSDL file using the generator utilities
>> from AXIS2-Java. But I cannot find one. Can someone provide me one?
>>
>> I would like to show you what I did (the webservice is just to return a
>> string)...
>>
>> I used this interface to generate the wsdl-file I want to use...
>>
>> //++++interface
>> public interface Hello {
>>      public String sayHello();
>> }
>>
>> I compiled it with javac.
>> The resulting class file should be usable to generate the wsdl.
>> I used this (no special parameters):
>>
>> java2wsdl Hello.class
>>
>> I was lucky to find a "Hello.wsdl" afterwards.
>>
>> This one I ran against WSDL2C to generate the server stubs.
>>
>> java -classpath ${WSCP} org.apache.axis2.wsdl.WSDL2C -uri Hello.wsdl -ss
>> -sd -d adb
>>
>> Everythings works fine until here. I understood I have to implement the
>> business logic in "axis2_skel_Hello.c".
>> But looking at
>>
>> axis2_sayHelloResponse_t* axis2_skel_Hello_sayHello (const axutil_env_t
>> {
>>     /* TODO fill this with the necessary business logic */
>>     return NULL;
>> }
>>
>> I find it extremely difficult to compare this generated source with the
>> hand written sources in the samples directory. I am not sure which
>> functions I have to call and which not. I probably have to issue a call
>> for
>> axis2_sayHelloResponse_create()
>> to get the chance to send back my string, but once I did that: how do I
>> copy my string to the return variable? Somewhere I found the use of
>> AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN ()
>> but HELL I cannot find the definition of this function (first I thought  
>> it
>> was a macro but I could find a macro defintion either)... Where is this
>> definition? How can I know that this function is useful to return a  
>> string
>> - how does it look like when I have to return a long?
>> Once I am sure the service is well defined and running I would like to
>> create the Java-client stubs from the same "Hello.wsdl" to connect to  
>> the
>> service - but this is another story...
>>
>> Please don't think I am too impatient - I torture myself since monday.
>>
>> Thanks a lot for your help,
>>
>> Flori
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [AXIS2C][WSDL2C] close to despair

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi,

Sorry about not updating the code generation samples inside
AXIS2C_HOME/samples/codegen/databinding directory. The sample
implementations in this directory are out of date because we remove macros
and do some changes to  naming conventions. I will change those samples
ASAP.
If you want to try WSDL2C with data binding follow the guide lines in
README.txt inside databinding directory.
These samples only provide implementations of business logic. You have to
copy other files which are generated using WSDL2C and compile them.
I'll post a more detail  guideline ASAP.

Thanks ,
Milinda

On 6/8/07, Dr. Florian Steinborn <fp...@gmx.de> wrote:
>
> Dear group,
>
> I am looking for one complete example of a web service for AXIS2C that was
> completely created by one single WSDL file using the generator utilities
> from AXIS2-Java. But I cannot find one. Can someone provide me one?
>
> I would like to show you what I did (the webservice is just to return a
> string)...
>
> I used this interface to generate the wsdl-file I want to use...
>
> //++++interface
> public interface Hello {
>      public String sayHello();
> }
>
> I compiled it with javac.
> The resulting class file should be usable to generate the wsdl.
> I used this (no special parameters):
>
> java2wsdl Hello.class
>
> I was lucky to find a "Hello.wsdl" afterwards.
>
> This one I ran against WSDL2C to generate the server stubs.
>
> java -classpath ${WSCP} org.apache.axis2.wsdl.WSDL2C -uri Hello.wsdl -ss
> -sd -d adb
>
> Everythings works fine until here. I understood I have to implement the
> business logic in "axis2_skel_Hello.c".
> But looking at
>
> axis2_sayHelloResponse_t* axis2_skel_Hello_sayHello (const axutil_env_t
> {
>     /* TODO fill this with the necessary business logic */
>     return NULL;
> }
>
> I find it extremely difficult to compare this generated source with the
> hand written sources in the samples directory. I am not sure which
> functions I have to call and which not. I probably have to issue a call
> for
> axis2_sayHelloResponse_create()
> to get the chance to send back my string, but once I did that: how do I
> copy my string to the return variable? Somewhere I found the use of
> AXIS2_ECHOSTRUCTRESPONSE_SET_RETURN ()
> but HELL I cannot find the definition of this function (first I thought it
> was a macro but I could find a macro defintion either)... Where is this
> definition? How can I know that this function is useful to return a string
> - how does it look like when I have to return a long?
> Once I am sure the service is well defined and running I would like to
> create the Java-client stubs from the same "Hello.wsdl" to connect to the
> service - but this is another story...
>
> Please don't think I am too impatient - I torture myself since monday.
>
> Thanks a lot for your help,
>
> Flori
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


-- 
milinda@wso2.com
WSO2, Inc: http://www.wso2.com "Oxygenating the Web Service Platform"
http://www.milindalakmal.wordpress.com