Yes we had the same problem, may be this is also your case. It is not related to linux, its a problem on all platforms.

The calculator sample tried to set endpoint to http://localhost/axis/calculator, but the service name is Calculator. The server responded with soap fault (requested service not registered at the server), which was correctly parsed by a client, but then the client throws incorrect exception, so the user gets misleading error 'Cannot deserialize the requested element.'.

So first try to run calculator sample with correct endpoint,
try for ex: ./calculator div 100 5 http://localhost/axis/Calculator

If it will work, you should by hand modify the client stub source code to throw the correct exception, so the user gets correct error description if there is a soap fault.

Petr

Lei Tang wrote:
I installed Sun JDK and now I can generate the C++ skeleton and stub
code.  But after I built the Calculator sample and deployed it, I got
the following error when running the client app:
        terminate called after throwing an instance of
'axiscpp::SoapFaultException'
        what():  Cannot deserialize the requested element
        Aborted

Does anybody else have the similar problem with Axis c++ 1.6b on the
linux (Fedora Core 4)?  Any help would be appreciated!

Thanks,

Lei

-----Original Message-----
From: Samisa Abeysinghe [mailto:[EMAIL PROTECTED] Sent: Friday, March 17, 2006 9:35 PM
To: Apache AXIS C User List
Subject: Re: Errors running wsdl2ws

Seems like you are using gcj.
I suggest you use JDK from Sun, or try to compile the whole WSDL2WS Java
tool, including the required jars from Axis Java using gcj.

I have never been able to use gcj with Axis successfully :-(

Samisa...

Lei Tang wrote:

I installed latest Axis C++ 1.6b on linux (Fedora 4). When I used wsdl2ws to generat the C++ code for the sample calculator.wsdl file with following command

*/java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws
/usr/local/axiscpp_deploy/wsdls/calcul
ator.wsdl -lc++ -sserver -o/tests/ltang/calculator//*
I got the following errors:

*/java.lang.NullPointerException
   at gnu.xml.dom.ls.ReaderInputStream.close()
(/usr/lib/libgcj.so.6.0.0)
   at gnu.xml.aelfred2.XmlParser.doParse(java.lang.String,
java.lang.String, jav
a.io.Reader, java.io.InputStream, java.lang.String)
(/usr/lib/libgcj.so.6.0.0)
   at gnu.xml.aelfred2.SAXDriver.parse(org.xml.sax.InputSource)
(/usr/lib/libgcj
.so.6.0.0)
   at gnu.xml.aelfred2.XmlReader.parse(org.xml.sax.InputSource)
(/usr/lib/libgcj
.so.6.0.0)
   at gnu.xml.dom.ls.DomLSParser.doParse(org.w3c.dom.ls.LSInput)
(/usr/lib/libgc
j.so.6.0.0)
   at gnu.xml.dom.ls.DomLSParser.parse(org.w3c.dom.ls.LSInput)
(/usr/lib/libgcj.
so.6.0.0)
   at gnu.xml.dom.DomDocumentBuilder.parse(org.xml.sax.InputSource)
(/usr/lib/li
bgcj.so.6.0.0)
   at
org.apache.axis.utils.XMLUtils.newDocument(org.xml.sax.InputSource) (Unkno wn Source)
   at org.apache.axis.utils.XMLUtils.newDocument(java.lang.String,
java.lang.Str
ing, java.lang.String) (Unknown Source)
   at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(java.lang.String
, ja va.lang.String, java.lang.String) (Unknown Source)
   at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run() (Unknown
Source)
   at java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)
org.apache.axis.wsdl.wsdl2ws.WrapperFault:
java.lang.NullPointerException
   at

org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.WSDL2Ws(org.apache.axis.wsdl.wsdl2w
s.
CLArgParser) (Unknown Source)
   at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(java.lang.String[])
(Unknown Sou
rce)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) Caused

by: java.lang.NullPointerException
   at gnu.xml.dom.ls.ReaderInputStream.close()
(/usr/lib/libgcj.so.6.0.0)
   at gnu.xml.aelfred2.XmlParser.doParse(java.lang.String,
java.lang.String, jav
a.io.Reader, java.io.InputStream, java.lang.String)
(/usr/lib/libgcj.so.6.0.0)
   at gnu.xml.aelfred2.SAXDriver.parse(org.xml.sax.InputSource)
(/usr/lib/libgcj
.so.6.0.0)
   at gnu.xml.aelfred2.XmlReader.parse(org.xml.sax.InputSource)
(/usr/lib/libgcj
.so.6.0.0)
   at gnu.xml.dom.ls.DomLSParser.doParse(org.w3c.dom.ls.LSInput)
(/usr/lib/libgc
j.so.6.0.0)
   at gnu.xml.dom.ls.DomLSParser.parse(org.w3c.dom.ls.LSInput)
(/usr/lib/libgcj.
so.6.0.0)
   at gnu.xml.dom.DomDocumentBuilder.parse(org.xml.sax.InputSource)
(/usr/lib/li
bgcj.so.6.0.0)
   at
org.apache.axis.utils.XMLUtils.newDocument(org.xml.sax.InputSource) (Unkno wn Source)
   at org.apache.axis.utils.XMLUtils.newDocument(java.lang.String,
java.lang.Str
ing, java.lang.String) (Unknown Source)
   at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(java.lang.String
, ja va.lang.String, java.lang.String) (Unknown Source)
   at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run() (Unknown
Source)
   at java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)/*
*//*
*/Code generation failed. Please see errors above./*
I set my my classpath as following: */declare -x
CLASSPATH="/usr/local/axiscpp_home/lib/axisjava/wsdl4j.jar:/usr/local

/axiscpp_home/lib/axisjava/saaj.jar:/usr/local/axiscpp_home/lib/axisjava
/jaxrpc.
jar:/usr/local/axiscpp_home/lib/axisjava/commons-logging.jar:/usr/loca
l/axiscpp_ home/lib/axisjava/commons-discovery.jar:/usr/local/axiscpp_home/lib/ax
isjava/axi
s.jar:/usr/local/axiscpp_deploy/lib/wsdl2ws.jar:"/*
Could anybody please help me figure out what was wrong? Thanks, Lei




Reply via email to