axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <HAWKI...@uk.ibm.com>
Subject RE: Errors running wsdl2ws
Date Wed, 22 Mar 2006 09:15:47 GMT
Could you please capture the SOAP response.





"Lei Tang" <LTang@bdmetrics.com> 
22/03/2006 04:26
Please respond to
"Apache AXIS C User List" <axis-c-user@ws.apache.org>


To
"Apache AXIS C User List" <axis-c-user@ws.apache.org>
cc

Subject
RE: Errors running wsdl2ws






In my case I used the cpp files generated from wsdl2ws and it has the
right endpoint http://localhost/axis/Calculator.  My client app is
really simple:

#include "Calculator.hpp"

int main()
{
        Calculator c;
        int result = c.add(10, 20);
        printf("The result is %d", result);

        return 0;
}

One warning happened when I built the client app was:

/usr/bin/ld: warning: libstdc++.so.5, needed by
/usr/local/axiscpp_deploy/lib/li
baxis_client.so, may conflict with libstdc++.so.6

Not sure if this caused the exception. Any suggestion?

Lei

-----Original Message-----
From: Petr Cvachoucek [mailto:cvachoucek@unicontrols.cz] 
Sent: Tuesday, March 21, 2006 1:02 AM
To: Apache AXIS C User List
Subject: Re: Errors running wsdl2ws

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:samisa.abeysinghe@gmail.com]
> 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.Strin
>> g , 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.wsdl
> 2w
> 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.Strin
>> g , 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/axisja
> va
> /jaxrpc.
>> jar:/usr/local/axiscpp_home/lib/axisjava/commons-logging.jar:/usr/loc
>> a
>> l/axiscpp_
>> home/lib/axisjava/commons-discovery.jar:/usr/local/axiscpp_home/lib/a
>> x
>> isjava/axi
>> s.jar:/usr/local/axiscpp_deploy/lib/wsdl2ws.jar:"/*
>> 
>> Could anybody please help me figure out what was wrong?
>> 
>> Thanks,
>> 
>> Lei
> 
> 
> 
> 



Mime
View raw message