You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by da...@opensource.lk on 2004/05/19 06:03:53 UTC

cvs head transport and parser abstration works on Linux

Hi,
It seems that transport layer abstraction and parser abstraction now work
on linux. Thanks Susantha. But it is still working only with apache1.
I tried with only expat. it works.
parser and transport layer both is loaded in to axis engine when it is
loaded by apache.
in $AXISCPP_HOME/src/engine/SOAPTransportFactory.cpp

m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_transport.so"; //this will
be taken from configuration file

and in $AXISCPP_HOME/src/engine/XMLParserFactory.cpp

 m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_xmlparser.so"; //this
will be taken from configuration file

That means that both the library paths are still hard coded until somebody
make it read from the configuration file.

To make it work, we need to build from $AXISCPP_HOME.
All transport libraries(libaxis_transport.so) and both
expat(libaxis_expat.so) and xercesc(libaxis_xercesc.so) are created in
$AXISCPP_HOME/bin

So when you run the following script from $AXIS_HOME(eg:/usr/local/Axis)

rm /usr/local/apache/libexec/libaxiscpp_mod.so
rm webservices/libAdminService.so
rm libs/libserver_engine.so
rm libs/libaxis_transport.so
rm libs/libaxis_xmlparser.so
cp -f $AXISCPP_HOME/bin/libAdminService.so webservices/
cp -f $AXISCPP_HOME/bin/libserver_engine.so libs/
cp -f $AXISCPP_HOME/bin/libaxiscpp_mod.so /usr/local/apache/libexec/
cp -f $AXISCPP_HOME/bin/libaxis_transport.so libs/
cp -f $AXISCPP_HOME/bin/libaxis_expat.so libs/libaxis_xmlparser.so
/usr/local/apache/bin/apachectl stop
sleep 2
/usr/local/apache/bin/apachectl start

all the libraries are loaded.

Note that in the line no. 10 of the script above we change
the name libaxis_expat.so to libaxis_xmlparser.so.
If we use xerces we need to change
libaxis_xercesc.so to libaxis_xmlparser.so.

bravo, now anybody could make their parsers and transport layers work with
Axis C++. But I think the api headers need more documentation for somebody
to work with it.

cheers
damitha

Re: cvs head transport and parser abstration works on Linux

Posted by da...@opensource.lk.
Hi Samisa,

> Damitha,
>    I am still strugling to get this working on Linux.
>
>    I have couple of problems
> 1. What about the USE_XERCES_PARSER and USE_EXPAT_PARSER directives?
>    Are they no longer used?

Yes they are no longer used. I removed all references to USE_EXPAT_PARSER

> 2. If I want to use only Xerces parser, how do I do that with new code?
> (say, I do not want to
> compile Expat related stuff at all)

I update the configure.ac so that you can choose to build both axis_expat
and axis_xerces libraries or build just one library you want. You also
have to make a selection at $AXISCPP_HOME/xml/Makefile.am

>
> --- damitha@opensource.lk wrote:
>> Hi,
>> It seems that transport layer abstraction and parser abstraction now
>> work
>> on linux. Thanks Susantha. But it is still working only with apache1.
>> I tried with only expat. it works.
>> parser and transport layer both is loaded in to axis engine when it is
>> loaded by apache.
>> in $AXISCPP_HOME/src/engine/SOAPTransportFactory.cpp
>>
>> m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_transport.so"; //this
>> will
>> be taken from configuration file
>>
>> and in $AXISCPP_HOME/src/engine/XMLParserFactory.cpp
>>
>>  m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_xmlparser.so"; //this
>> will be taken from configuration file
>>
>> That means that both the library paths are still hard coded until
>> somebody
>> make it read from the configuration file.
>>
>> To make it work, we need to build from $AXISCPP_HOME.
>> All transport libraries(libaxis_transport.so) and both
>> expat(libaxis_expat.so) and xercesc(libaxis_xercesc.so) are created in
>> $AXISCPP_HOME/bin
>>
>> So when you run the following script from $AXIS_HOME(eg:/usr/local/Axis)
>>
>> rm /usr/local/apache/libexec/libaxiscpp_mod.so
>> rm webservices/libAdminService.so
>> rm libs/libserver_engine.so
>> rm libs/libaxis_transport.so
>> rm libs/libaxis_xmlparser.so
>> cp -f $AXISCPP_HOME/bin/libAdminService.so webservices/
>> cp -f $AXISCPP_HOME/bin/libserver_engine.so libs/
>> cp -f $AXISCPP_HOME/bin/libaxiscpp_mod.so /usr/local/apache/libexec/
>> cp -f $AXISCPP_HOME/bin/libaxis_transport.so libs/
>> cp -f $AXISCPP_HOME/bin/libaxis_expat.so libs/libaxis_xmlparser.so
>> /usr/local/apache/bin/apachectl stop
>> sleep 2
>> /usr/local/apache/bin/apachectl start
>>
>> all the libraries are loaded.
>>
>> Note that in the line no. 10 of the script above we change
>> the name libaxis_expat.so to libaxis_xmlparser.so.
>> If we use xerces we need to change
>> libaxis_xercesc.so to libaxis_xmlparser.so.
>>
>> bravo, now anybody could make their parsers and transport layers work
>> with
>> Axis C++. But I think the api headers need more documentation for
>> somebody
>> to work with it.
>>
>> cheers
>> damitha
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! - Internet access at a great low price.
> http://promo.yahoo.com/sbc/
>
>


Re: cvs head transport and parser abstration works on Linux

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
I managed to get the source compiled, thanks to Damitha.
But when I run the client it crashes :(

Platform: Linux
Parser: Xerces (I used only Xerces)

Fid below the gdb stack trace. (Looking in to the problem, I found that Reveiver returns NULL from
Recev() method. I am not sure why)

Thanks,
Samisa...

(gdb) bt
#0  0x4207a453 in strlen () from /lib/tls/libc.so.6
#1  0x420637a6 in puts () from /lib/tls/libc.so.6
#2  0x4035b8d6 in AxisTransport::getBytes(char*, int*) (this=0x804e5e0, pcBuffer=0x806757c "",
pSize=0xbfffdca4)
    at AxisTransport.cpp:203
#3  0x40458f0d in SoapBinInputStream::readBytes(unsigned char*, unsigned) (this=0x0,
pcToFill=0x806757c "", iMaxToRead=0)
    at SoapBinInputStream.cpp:45
#4  0x4024fe56 in xercesc_2_2::XMLReader::refreshRawBuffer() () from
/usr/local/lib/libxerces-c.so.22
#5  0x4024d3b5 in xercesc_2_2::XMLReader::XMLReader(unsigned short const*, unsigned short const*,
xercesc_2_2::BinInputStream*, xercesc_2_2::XMLReader::RefFrom, xercesc_2_2::XMLReader::Types,
xercesc_2_2::XMLReader::Sources, bool, bool, xercesc_2_2::XMLReader::XMLVersion) () from
/usr/local/lib/libxerces-c.so.22
#6  0x401eac45 in xercesc_2_2::ReaderMgr::createReader(xercesc_2_2::InputSource const&, bool,
xercesc_2_2::XMLReader::RefFrom, xercesc_2_2::XMLReader::Types, xercesc_2_2::XMLReader::Sources,
bool) () from /usr/local/lib/libxerces-c.so.22
#7  0x401c49ba in xercesc_2_2::IGXMLScanner::scanReset(xercesc_2_2::InputSource const&) ()
   from /usr/local/lib/libxerces-c.so.22
#8  0x402521d3 in xercesc_2_2::XMLScanner::scanFirst(xercesc_2_2::InputSource const&,
xercesc_2_2::XMLPScanToken&) ()
   from /usr/local/lib/libxerces-c.so.22
#9  0x401f6f41 in xercesc_2_2::SAX2XMLReaderImpl::parseFirst(xercesc_2_2::InputSource const&,
xercesc_2_2::XMLPScanToken&)
    () from /usr/local/lib/libxerces-c.so.22
#10 0x4045953e in SoapParserXerces::next(bool) (this=0x8051768, isCharData=false) at
SoapParserXerces.cpp:82
#11 0x4005333c in SoapDeSerializer::getEnvelope() (this=0x8050990) at SoapDeSerializer.cpp:98
#12 0x400539d0 in SoapDeSerializer::getVersion() (this=0x8050990) at SoapDeSerializer.cpp:361
#13 0x40039b27 in ClientAxisEngine::invoke(MessageData*) (this=0x804fb70, pMsg=0x804fba8) at
ClientAxisEngine.cpp:180
#14 0x400398f7 in ClientAxisEngine::process(SOAPTransport*) (this=0x804fb70, pSoap=0x804e5e0) at
ClientAxisEngine.cpp:92
#15 0x40041df8 in Call::invoke() (this=0x804cc10) at Call.cpp:96
#16 0x0804949a in strcpy ()
#17 0x08048b29 in strcpy ()
#18 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6





	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

Re: cvs head transport and parser abstration works on Linux

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Hi Guys,
    Apparently the server and not the client side crashes with Xerces parser on Linux platform.

    I managed to get clients working with Axis Java. 
    However there are HTTP chunking problems still in the code. Has the chunking patch been
applied?

Thanks,
Samisa...

--- Samisa Abeysinghe <sa...@yahoo.com> wrote:
> Damitha,
>    I am still strugling to get this working on Linux.
> 
>    I have couple of problems
> 1. What about the USE_XERCES_PARSER and USE_EXPAT_PARSER directives?
>    Are they no longer used? 
> 2. If I want to use only Xerces parser, how do I do that with new code? (say, I do not want to
> compile Expat related stuff at all)
> 3. Will Apache 2.0 be supported? If yes, how long do I have to wait?
> 4. When can I expect the hard coding of m_pcLibraryPath be removed?
> 
>    Appriciate if you could sapre some time to answer the above.
> Thanks in advace,
> Samisa...
> 
> --- damitha@opensource.lk wrote:
> > Hi,
> > It seems that transport layer abstraction and parser abstraction now work
> > on linux. Thanks Susantha. But it is still working only with apache1.
> > I tried with only expat. it works.
> > parser and transport layer both is loaded in to axis engine when it is
> > loaded by apache.
> > in $AXISCPP_HOME/src/engine/SOAPTransportFactory.cpp
> > 
> > m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_transport.so"; //this will
> > be taken from configuration file
> > 
> > and in $AXISCPP_HOME/src/engine/XMLParserFactory.cpp
> > 
> >  m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_xmlparser.so"; //this
> > will be taken from configuration file
> > 
> > That means that both the library paths are still hard coded until somebody
> > make it read from the configuration file.
> > 
> > To make it work, we need to build from $AXISCPP_HOME.
> > All transport libraries(libaxis_transport.so) and both
> > expat(libaxis_expat.so) and xercesc(libaxis_xercesc.so) are created in
> > $AXISCPP_HOME/bin
> > 
> > So when you run the following script from $AXIS_HOME(eg:/usr/local/Axis)
> > 
> > rm /usr/local/apache/libexec/libaxiscpp_mod.so
> > rm webservices/libAdminService.so
> > rm libs/libserver_engine.so
> > rm libs/libaxis_transport.so
> > rm libs/libaxis_xmlparser.so
> > cp -f $AXISCPP_HOME/bin/libAdminService.so webservices/
> > cp -f $AXISCPP_HOME/bin/libserver_engine.so libs/
> > cp -f $AXISCPP_HOME/bin/libaxiscpp_mod.so /usr/local/apache/libexec/
> > cp -f $AXISCPP_HOME/bin/libaxis_transport.so libs/
> > cp -f $AXISCPP_HOME/bin/libaxis_expat.so libs/libaxis_xmlparser.so
> > /usr/local/apache/bin/apachectl stop
> > sleep 2
> > /usr/local/apache/bin/apachectl start
> > 
> > all the libraries are loaded.
> > 
> > Note that in the line no. 10 of the script above we change
> > the name libaxis_expat.so to libaxis_xmlparser.so.
> > If we use xerces we need to change
> > libaxis_xercesc.so to libaxis_xmlparser.so.
> > 
> > bravo, now anybody could make their parsers and transport layers work with
> > Axis C++. But I think the api headers need more documentation for somebody
> > to work with it.
> > 
> > cheers
> > damitha
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! - Internet access at a great low price.
> http://promo.yahoo.com/sbc/



	
		
__________________________________
Do you Yahoo!?
Yahoo! Domains � Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

Re: cvs head transport and parser abstration works on Linux

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Damitha,
   I am still strugling to get this working on Linux.

   I have couple of problems
1. What about the USE_XERCES_PARSER and USE_EXPAT_PARSER directives?
   Are they no longer used? 
2. If I want to use only Xerces parser, how do I do that with new code? (say, I do not want to
compile Expat related stuff at all)
3. Will Apache 2.0 be supported? If yes, how long do I have to wait?
4. When can I expect the hard coding of m_pcLibraryPath be removed?

   Appriciate if you could sapre some time to answer the above.
Thanks in advace,
Samisa...

--- damitha@opensource.lk wrote:
> Hi,
> It seems that transport layer abstraction and parser abstraction now work
> on linux. Thanks Susantha. But it is still working only with apache1.
> I tried with only expat. it works.
> parser and transport layer both is loaded in to axis engine when it is
> loaded by apache.
> in $AXISCPP_HOME/src/engine/SOAPTransportFactory.cpp
> 
> m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_transport.so"; //this will
> be taken from configuration file
> 
> and in $AXISCPP_HOME/src/engine/XMLParserFactory.cpp
> 
>  m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_xmlparser.so"; //this
> will be taken from configuration file
> 
> That means that both the library paths are still hard coded until somebody
> make it read from the configuration file.
> 
> To make it work, we need to build from $AXISCPP_HOME.
> All transport libraries(libaxis_transport.so) and both
> expat(libaxis_expat.so) and xercesc(libaxis_xercesc.so) are created in
> $AXISCPP_HOME/bin
> 
> So when you run the following script from $AXIS_HOME(eg:/usr/local/Axis)
> 
> rm /usr/local/apache/libexec/libaxiscpp_mod.so
> rm webservices/libAdminService.so
> rm libs/libserver_engine.so
> rm libs/libaxis_transport.so
> rm libs/libaxis_xmlparser.so
> cp -f $AXISCPP_HOME/bin/libAdminService.so webservices/
> cp -f $AXISCPP_HOME/bin/libserver_engine.so libs/
> cp -f $AXISCPP_HOME/bin/libaxiscpp_mod.so /usr/local/apache/libexec/
> cp -f $AXISCPP_HOME/bin/libaxis_transport.so libs/
> cp -f $AXISCPP_HOME/bin/libaxis_expat.so libs/libaxis_xmlparser.so
> /usr/local/apache/bin/apachectl stop
> sleep 2
> /usr/local/apache/bin/apachectl start
> 
> all the libraries are loaded.
> 
> Note that in the line no. 10 of the script above we change
> the name libaxis_expat.so to libaxis_xmlparser.so.
> If we use xerces we need to change
> libaxis_xercesc.so to libaxis_xmlparser.so.
> 
> bravo, now anybody could make their parsers and transport layers work with
> Axis C++. But I think the api headers need more documentation for somebody
> to work with it.
> 
> cheers
> damitha



	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/