Hi Dushshantha,
   
  Thanks a lot. I have used Java 1.5 to make it work well. No any Java errors.
   
  But there are still a lot of C++(I change the postfix name to cpp) compiling 
errors, like:
   
          AXIS2_EXTERN axis2_getQuote_t* AXIS2_CALL
        axis2_getQuote_create(
            const axis2_env_t *env );
   
  1>e:\project\vs8\axis2_prototype\stockquoteservice\axis2_getquote.h(34) : 
error C4430: missing type specifier - int assumed. Note: C++ does not support 
default-int
1>e:\project\vs8\axis2_prototype\stockquoteservice\axis2_getquote.h(34) : error 
C2143: syntax error : missing ',' before '*'
   
  By the way, I using nightly building, it failed to generate C codes with Java 
errors. So I still use official release version 1.2.
   
  Kelvin.Lin

Dushshantha Chandradasa <[EMAIL PROTECTED]> wrote:
  Hi,

I tried to generate and build the generated code for your wsdl. It was 
successful. Im using Java 1.5. Please check your java version.

Dushshantha

  On 7/2/07, Kelvin Lin <[EMAIL PROTECTED]> wrote:    Thanks to Dushshantha and 
Dr. Florian Steinborn,
   
  but I downloaded the latest nightly build, there are two issues:
   
  1, using this script(Windows) to run it, although it generates some C files, 
it is with lots of  Java errors. 
   
  Script:
   
  set AXIS2_SNAPSHOT_HOME=E:\axis2-SNAPSHOT
setlocal EnableDelayedExpansion
set AXIS2_SNAPSHOT_CLASSPATH=%AXIS2_SNAPSHOT_HOME%
FOR %%c in ("%AXIS2_SNAPSHOT_HOME%\lib\*.jar") DO set 
AXIS2_SNAPSHOT_CLASSPATH=!AXIS2_SNAPSHOT_CLASSPATH!;%%c; 
  java -classpath %AXIS2_SNAPSHOT_CLASSPATH% org.apache.axis2.wsdl.WSDL2C -uri 
E:\StockQuoteService.wsdl -g -d adb -u -f -o e:\Project
   
  Java error:
   
  Caused by: java.io.UTFDataFormatException: 1 ×Ö½Ú UTF-8 ÐòÁеÄÎÞЧ×Ö½Ú 1¡£
        at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
        at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
        at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
        at org.apache.xerces.impl.XMLEntityScanner.scanLiteral(Unknown Source)
        at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute 
(Unknown
 Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.s
canRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source) 
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) 
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.jav
a:437)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:728)
        ... 13 more
   
  2, using vs2005 to build six files, there are some compiling error like:
   
  1>axis2_getQuote.cpp
1>e:\project\vs8\axis2_prototype\stockquoteservice\axis2_getquote.cpp(31) : 
error C2491: 'axis2_getQuote_create' : definition of dllimport function not 
allowed
1>e:\project\vs8\axis2_prototype\stockquoteservice\axis2_getquote.cpp(43) : 
error C2664: 'axutil_error_set_status_code' : cannot convert parameter 2 from 
'int' to 'axis2_status_codes_t' 
1>        Conversion to enumeration type requires an explicit cast 
(static_cast, C-style cast or function-style cast)
1>e:\project\vs8\axis2_prototype\stockquoteservice\axis2_getquote.cpp(132) : 
error C2440: '=' : cannot convert from 'void *' to 'axiom_element_t *'
1>        Conversion from 'void*' to pointer to non-'void' requires an explicit 
cast
1>e:\project\vs8\axis2_prototype\stockquoteservice\axis2_getquote.cpp(155) : 
error C2440: '=' : cannot convert from 'void *' to 'axiom_element_t *' 
1>        Conversion from 'void*' to pointer to non-'void' requires an explicit 
cast
1>e:\project\vs8\axis2_prototype\stockquoteservice\axis2_getquote.cpp(207) : 
error C2440: '=' : cannot convert from 'void *' to 'axiom_data_source_t *' 
1>        Conversion from 'void*' to pointer to non-'void' requires an explicit 
cast
   
  The attached file is my wsdl file.
   
  Best regards.
   
  Kelvin.Lin  

Dushshantha Chandradasa < [EMAIL PROTECTED]> wrote:

    Hi Kelvin,

The tool you are using doesnt have latest changes of codegen. Please use a 
latest nightly build from http://people.apache.org/dist/axis2/nightly/ 
.

Regards,
Dushshantha

  On 7/2/07, Kelvin Lin < [EMAIL PROTECTED]> wrote:     Hi,
   
  I used "WSDL2C Tool" that comes with Axis2/Java( 1.2) to generate C codes 
automatically from an existing wsdl. And the following is a part of the codes:
   
          AXIS2_EXTERN axis2_getQuote_t* AXIS2_CALL
        axis2_getQuote_create(
            const axis2_env_t *env );
   
  but the compiler(VS 2005) can't find the variable "axis2_env_t" although I 
have set the include directory and library directory correctly, and including 
some header files like 
   
          #include <stdio.h>
        #include <axiom.h>
        #include <axis2_util.h>
        #include <axiom_soap.h>
        #include <axis2_client.h>
   
  Where is wrong? And I used UltraEdit to search key words "axis2_env_t" under 
folder "E:\axis2c-bin-1.0.0-win32\include ", but found nothing.
   
  Thanks a lot.
   
  Kelvin
  
  
---------------------------------
  Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.   




  
  
---------------------------------
  8:00? 8:25? 8:40? Find a flick in no time
with theYahoo! Search movie showtime shortcut.  

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





       
---------------------------------
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. 
       
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.

Reply via email to