Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 46221 invoked from network); 11 Jun 2007 16:00:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2007 16:00:31 -0000 Received: (qmail 51287 invoked by uid 500); 11 Jun 2007 16:00:33 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 51269 invoked by uid 500); 11 Jun 2007 16:00:33 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 51253 invoked by uid 99); 11 Jun 2007 16:00:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 09:00:33 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [81.169.176.190] (HELO h5987.serverkompetenz.net) (81.169.176.190) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 09:00:28 -0700 Received: (qmail 30583 invoked from network); 11 Jun 2007 18:00:05 +0200 Received: from p508e17cf.dip0.t-ipconnect.de (HELO ?192.168.0.157?) (80.142.23.207) by shocksoft.de with (DHE-RSA-AES256-SHA encrypted) SMTP; 11 Jun 2007 18:00:05 +0200 Message-ID: <466D7183.6070104@9elements.com> Date: Mon, 11 Jun 2007 18:00:03 +0200 From: =?ISO-8859-1?Q?Mark_N=FC=DFler?= User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Apache AXIS C User List Subject: Re: [AXIS2C][WSDL2C] close to despair References: <22a059a60706071935pab69120ge1a30f130a5070c5@mail.gmail.com> <22a059a60706101944k4a67287eq45b8521dca9796b8@mail.gmail.com> In-Reply-To: <22a059a60706101944k4a67287eq45b8521dca9796b8@mail.gmail.com> Content-Type: multipart/mixed; boundary="------------020707060702020704050701" X-Virus-Checked: Checked by ClamAV on apache.org --------------020707060702020704050701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 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 >> 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 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 --------------020707060702020704050701 Content-Type: text/plain; name="gen.bat" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gen.bat" @echo off & cls if "%~n1" == "" goto no_file rem ---------------------------------------------------------------------------------------- rem axis2 set AXIS2_HOME = X:\axis2java_nightly rem set AXIS2_HOME = X:\axis2java_nightly__new rem astyle set astyle_cmd=X:\_profil\progs\Development\astyle\bin\astyle.exe set astyle_opt=--style=ansi -b -p -s4 -M0 -c -U -S -n set astyle_opt_java=--style=java -n rem -- steps of ths batch-- rem 1) compile java-interface rem 2) gen wsdl from java rem 3) gen code from wsdl rem 4) style code rem ---------------------------------------------------------------------------------------- rem get a timestamp set year=%date:~-4% set month=%date:~-7,2% set day=%date:~-10,2% set hour=%time:~-11,2% set min=%time:~-8,2% set timestamp=%year%_%month%_%day%__%hour%_%min% rem filename set filename="%~n1" set filename_java=%filename%.java set filename_class=%filename%.class set filename_wsdl=%filename%.wsdl rem output-folder set outputfolder=%filename%__%timestamp% del %outputfolder% /Q setlocal EnableDelayedExpansion rem get jars set AXIS2_CLASS_PATH=%AXIS2_HOME% FOR %%c in ("%AXIS2_HOME%\lib\*.jar") DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c rem cmd's set wsdl2c_cmd=java -classpath %AXIS2_CLASS_PATH% org.apache.axis2.wsdl.WSDL2C set wsdl2java_cmd=java -classpath %AXIS2_CLASS_PATH% org.apache.axis2.wsdl.WSDL2Java set java2wsdl_cmd=%AXIS2_HOME%/bin/java2wsdl.bat rem ---------------------------------------------------------------------------------------- rem 1) compile java-interface javac %cd%/%filename_java% if not exist %filename_class% goto failed_class rem ---------------------------------------------------------------------------------------- rem 2) gen wsdl from java CALL %java2wsdl_cmd% -cn %filename% -o %cd% if not exist %filename_wsdl% goto failed_class rem ---------------------------------------------------------------------------------------- rem 3) gen code from wsdl echo ======================================================= echo without [databinding] : echo ======================================================= echo C-Client %wsdl2c_cmd% -o %outputfolder%/without/c_client -uri %filename_wsdl% -d none echo ------------------------------------------------------- echo C-Server %wsdl2c_cmd% -o %outputfolder%/without/c_server -uri %filename_wsdl% -ss -sd -d none echo ------------------------------------------------------- echo Java-Client %wsdl2java_cmd% -o %outputfolder%/without/java_client -uri %filename_wsdl% -d none echo ------------------------------------------------------- echo Java-Server %wsdl2java_cmd% -o %outputfolder%/without/java_server -uri %filename_wsdl% -ss -sd -d none echo ------------------------------------------------------- echo ======================================================= echo with [adb] : echo ======================================================= echo C-Client %wsdl2c_cmd% -o %outputfolder%/adb/c_client -uri %filename_wsdl% -d adb -u echo ------------------------------------------------------- echo C-Server %wsdl2c_cmd% -o %outputfolder%/adb/c_server -uri %filename_wsdl% -ss -sd -d adb -u echo ------------------------------------------------------- echo Java-Client %wsdl2java_cmd% -o %outputfolder%/adb/java_client -uri %filename_wsdl% -d adb -u echo ------------------------------------------------------- echo Java-Server %wsdl2java_cmd% -o %outputfolder%/adb/java_server -uri %filename_wsdl% -ss -sd -g -d adb -u echo ------------------------------------------------------- rem any other bindings ??? rem ---------------------------------------------------------------------------------------- rem 4) style code rem style c code FOR /R %outputfolder% %%f IN (*.c;*.h) DO ( %astyle_cmd% %astyle_opt% %%f ) rem style java code FOR /R %outputfolder% %%f IN (*.java) DO ( %astyle_cmd% %astyle_opt_java% %%f ) rem ---------------------------------------------------------------------------------------- goto end :failed_class echo failed to build class !!! goto end :failed_wsdl echo failed to build wsdl !!! goto end :no_file echo any file ??? goto end :end --------------020707060702020704050701 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-user-help@ws.apache.org --------------020707060702020704050701--