axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Dets <ad...@idsk.com>
Subject Axis C++, WSDL & arrays
Date Mon, 12 Jul 2004 21:00:50 GMT
Hi!
I've just started to play with Axis C++ on Linux. Unfortunately, there is 
nearly no documentation on Axis C++, especially for Linux. And even the 
present documentation is incorrect and misleading :-(

So, for sure, I have lots of questions:

1) I want to create a web service in Axis C++. How can I create WSDL file?
I've found a tool "wcg" in the source tree (its existence and functions are 
not described at all!!!), it seems to be able to generate some WSDL files 
from C++ header files. Unfortunately, it looks like that these generated WSDL 
files are incorrect - wsdl2ws doesn't like them :-(
What is the supposed way to create WSDL files? They are rather complex to 
create them manually... :-(

2) If I have a WSDL file, how it is possible to generate a C++ code? As I 
understand, wsdl2ws tool should work, but, unfortunately, for me this works 
only with the example "Calculator" web service :-(

For example, if I'm trying it with the GoogleSearch.wsdl:
$ 
CLASSPATH=$CLASSPATH:axis.jar:commons-discovery.jar:commons-logging.jar:jaxrpc.jar:saaj.jar:wsdl2ws.jar:wsdl4j.jar:xml-apis.jar

java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws GoogleSearch.wsdl -ogoogle -lc++ 
-sserver
args =
args =
args =
1
############## the type found ={urn:GoogleSearch}DirectoryCategoryArray
############## the type found ={urn:GoogleSearch}DirectoryCategory
Exception in thread "main" java.lang.NoSuchMethodError: 
org.apache.axis.wsdl.symbolTable.ElementDecl.getMinOccrs()I
        at 
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.createTypeInfo(WSDL2Ws.java:600)
        at 
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.createTypeInfo(WSDL2Ws.java:466)
        at 
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.createTypeInfo(WSDL2Ws.java:521)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getTypeInfo(WSDL2Ws.java:377)
        at 
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.genarateWrappers(WSDL2Ws.java:402)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(WSDL2Ws.java:684)

The same error (Exception in thread "main" java.lang.NoSuchMethodError: 
org.apache.axis.wsdl.symbolTable.ElementDecl.getMinOccrs()) usually happens 
with all other WSDL files (except Calculator.wsdl - works fine). Where is the 
problem? May be some specific version of JDK is required? Or something is 
installed incorrectly or missing (it will not surprise me)?

3) How to accept and return arrays from C++ code? What C++ code corresponds to 
arrays in SOAP (WSDL file)?
There is one WSDL file that uses arrays in the Axis samples - 
InteropBase.wsdl. However, it is not possible to generate a C++ code from it:
$ 
CLASSPATH=$CLASSPATH:axis.jar:commons-discovery.jar:commons-logging.jar:jaxrpc.jar:saaj.jar:wsdl2ws.jar:wsdl4j.jar:xml-apis.jar

java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws InteropBase.wsdl -ointerop -lc++ 
-sserver
args =
args =
args =
1
############## the type found ={http://soapinterop.org/xsd}ArrayOfstring
############## the type found ={http://soapinterop.org/xsd}ArrayOfint
############## the type found ={http://soapinterop.org/xsd}ArrayOffloat
############## the type found ={http://soapinterop.org/xsd}SOAPStruct
Exception in thread "main" java.lang.NoSuchMethodError: 
org.apache.axis.wsdl.symbolTable.ElementDecl.getMinOccrs()I
        at 
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.createTypeInfo(WSDL2Ws.java:600)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getTypeInfo(WSDL2Ws.java:377)
        at 
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.genarateWrappers(WSDL2Ws.java:402)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(WSDL2Ws.java:684)

4) In general, what is the mapping between C++ types and SOAP types?

I'll appreciate some simple examples and links to documentation.

I'm trying to use self-compiled Axis C++ 1.2beta on RedHat 9 (with all updates 
installed). I've installed additionally Sun JDK 1.4.2 for wsdl2ws tool.

	Alexei

PS. It is _really_ an overkill to package each library binary _3_ times in the 
binary distribution for Linux ;-)))

Mime
View raw message