axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodrigo F Baroni" <rodrigobar...@pop.com.br>
Subject Error in receiving messages
Date Fri, 18 Jun 2004 23:33:28 GMT


   Hello,

        I wrote a little application using axis c++, but I'm having problems
in receiving a message response - the client app simple aborts when it
gets the message. My config is GNU/Linux Debian Sarge, kernel 2.6.3,
Axis c++ 1.2 binaries, apache 2.0.49 compiled from sources, Xerces c++
and expat got via apt-get debian method.


        I found some mails in this mailing list talking something similar,
saying that the problem was the HTTP/1.1 in the header of the
messages. Would be this ? I wrote my .wsdl by hand, and the WSDL2Ws
tool doesn't give any errors, but could be something in the classes
bad created ?

        Does anybody knows what can being happening ? ANY suggest would be
very nice. Thanks a lot. Sorry for the cross-posting, but I think this
mail would be of interest of both people, since I'm thinking this to
be a bug.



      Rodrigo Ferreira Baroni
  Computer Science Bach's student
     Sao Paulo, Brazil

        I did a dump of the packages to comprove the works of the service as
follows :

      $tethereal -i lo -V

------------The Requisition----------------------------------
        POST /axis/ExploidsNews HTTP/1.1
Host: localhost:80
Content-Type: text/xml; charset=UTF-8
SOAPAction: "ExploidsNews#getExploidsOfDay"
Content-Length: 359

<?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns1:getExploidsOfDay
xmlns:ns1="http://localhost/axis/ExploidsNews"></ns1:getExploidsOfDay></SOAP-ENV:Body></SOAP-ENV:Envelope>

-------------The answer----------------------
HTTP/1.1 200 OK
Date: Fri, 18 Jun 2004 08:57:49 GMT
Server: Apache/2.0.49 (Unix) DAV/2
Content-Length: 880
Content-Type: text/xml

<?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns1:getExploidsOfDayResponse
xmlns:ns1="http://localhost/axis/ExploidsNews"><ExploidDescription
xsi:type="ns1:ExploidDescription"
xmlns:ns1="http://localhost/axis/ExploidsNews"><programName
xsi:type="xsd:string">Apache</programName><version
xsi:type="xsd:string">1_1</version><OSPlataform
xsi:type="xsd:string">Windows</OSPlataform><details
xsi:type="xsd:string">buffer overflow</details><exploidName
xsi:type="xsd:string">apache_sctl_brk</exploidName><authorHack
xsi:type="xsd:string">W00l00k</authorHack><patchName
xsi:type="xsd:string">apache-p4</patchName></ExploidDescription></ns1:getExploidsOfDayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

-------------WSDL File - build by hand ---------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost/axis/ExploidsNews"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost/axis/ExploidsNews"
xmlns:intf="http://localhost/axis/ExploidsNews"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
    <xsd:schema targetNamespace="http://localhost/axis/ExploidsNews"
xmlns="http://localhost/axis/ExploidsNews">
          <xsd:complexType name="ExploidsList">
            <xsd:complexContent>
              <xsd:restriction base="soapenc:Array">
                    <xsd:sequence/>
                    <xsd:attribute ref="soapenc:arrayType"
n1:arrayType="intf:ExploidDescription[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
                  </xsd:restriction>
            </xsd:complexContent>
          </xsd:complexType>
          <xsd:complexType name="ExploidDescription">
            <xsd:sequence>
                  <xsd:element name="programName" type="xsd:string"/>
                  <xsd:element name="version" type="xsd:string"/>
                  <xsd:element name="OSPlataform" type="xsd:string"/>
                  <xsd:element name="details" type="xsd:string"/>
                  <xsd:element name="exploidName" type="xsd:string"/>
                  <xsd:element name="authorHack" type="xsd:string"/>
                  <xsd:element name="patchName" type="xsd:string"/>
                </xsd:sequence>
          </xsd:complexType>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="ExploidsOfDayRequest">
  </wsdl:message>
  <wsdl:message name="ExploidsOfDayResponse">
    <wsdl:part name="exploidsOfDayReturn" type="intf:ExploidDescription"/>
  </wsdl:message>
  <wsdl:message name="ExploidsOfWeekResponse">
    <wsdl:part name="exploidsOfWeekReturn" type="intf:ExploidsList"/>
  </wsdl:message>
  <wsdl:message name="ExploidsOfWeekRequest">
  </wsdl:message>
  <wsdl:message name="InsertNewExploidRequest">
    <wsdl:part name="exploidContent" type="intf:ExploidDescription"/>
  </wsdl:message>
  <wsdl:message name="InsertNewExploidResponse">
    <wsdl:part name="insertReturn" type="xsd:int"/>
  </wsdl:message>
   <wsdl:portType name="ExploidsNews">
    <wsdl:operation name="getExploidsOfDay">
      <wsdl:input message="intf:ExploidsOfDayRequest"
name="ExploidsOfDayRequest"/>
      <wsdl:output message="intf:ExploidsOfDayResponse"
name="ExploidsOfDayResponse"/>
    </wsdl:operation>
    <wsdl:operation name="getExploidsOfWeek">
      <wsdl:input message="intf:ExploidsOfWeekRequest"
name="ExploidsOfWeekRequest"/>
      <wsdl:output message="intf:ExploidsOfWeekResponse"
name="ExploidsOfWeekResponse"/>
    </wsdl:operation>
    <wsdl:operation name="insertNewExploid">
      <wsdl:input message="intf:InsertNewExploidRequest"
name="InsertNewExploidRequest"/>
      <wsdl:output message="intf:InsertNewExploidResponse"
name="InsertNewExploidResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ExploidsNewsSoapBinding" type="intf:ExploidsNews">
    <wsdlsoap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getExploidsOfDay">
      <wsdlsoap:operation soapAction="ExploidsNews#getExploidsOfDay"/>
      <wsdl:input name="ExploidsOfDayRequest">
        <wsdlsoap:body
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://localhost/axis/ExploidsNews"
        use="encoded"/>
      </wsdl:input>
      <wsdl:output name="ExploidsOfDayResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://localhost/axis/ExploidsNews"
        use="encoded"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getExploidsOfWeek">
      <wsdlsoap:operation soapAction="ExploidsNews#getExploidsOfWeek"/>
      <wsdl:input name="ExploidsOfWeekRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://localhost/axis/ExploidsNews"
        use="encoded"/>
      </wsdl:input>
      <wsdl:output name="ExploidsOfWeekResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://localhost/axis/ExploidsNews"
        use="encoded"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="insertNewExploid">
      <wsdlsoap:operation soapAction="ExploidsNews#insertNewExploid"/>
      <wsdl:input name="InsertNewExploidRequest">
        <wsdlsoap:body
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://localhost/axis/ExploidsNews"
        use="encoded"/>
      </wsdl:input>
      <wsdl:output name="InsertNewExploidResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        namespace="http://localhost/axis/ExploidsNews"
        use="encoded"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ExploidsNews">
    <wsdl:port binding="intf:ExploidsNewsSoapBinding" name="ExploidsNews">
      <wsdlsoap:address location="http://localhost/axis/ExploidsNews"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


--------- the client ------------------------------/* Headers to access the
web service, provided by WSDL2Ws tool. */
#include "ExploidDescription.h"
#include "ExploidDescription_Array.h"
#include "ExploidsNews.h"

/* Headers of standart library of c++ */
#include <iostream>
#include <string.h> //strdup
#include <stdlib.h> //calloc

int main( int argc, char **argv )
{
        ExploidsNews                            *exploidsNewsWebService;
        ExploidDescription                      *results;

        exploidsNewsWebService           = new ExploidsNews( );
        results = exploidsNewsWebService->getExploidsOfDay( );
// reinterpret_cast< ExploidDescription * >( )

        if( results == NULL )
        {
                        std::cout << "No exploids" << std::endl;
                        return 1;
        }
        if( results->programName == NULL )
        {
                        std::cout << "No exploids availables at this day." <<
std::endl;
                        return 1;
        }

        std::cout << "Results got : \n" << std::endl;
        std::cout << "Name of exploitable program ...: " <<
results->programName << std::endl;
        std::cout << "Version of program ............: " << results->version
<< std::endl;
        std::cout << "Plataform .....................: " <<
results->OSPlataform  << std::endl;
        std::cout << "Details. ......................: " << results->details
<< std::endl;
        std::cout << "Name of exploid ...............: " <<
results->exploidName << std::endl;
        std::cout << "Auhtor of vulnerabilitye ......: " <<
results->authorHack << std::endl;
        std::cout << "Name of patch available- ......: " << results->patchName
<< std::endl;

        return 0;
}
--


Mime
View raw message