Loading ...
Sorry, an error occurred while loading the content.

6308Re: [soaplite] How do I add custom trace callbacks?

Expand Messages
  • rahed
    Mar 24, 2009
      Petar Shangov <pshangov@...> writes:

      > Hi, I have tried enabling all traces but that is no what I need. +trace->'all' gives me this:
      >
      > SOAP::Transport::new: ()
      > SOAP::Serializer::new: ()
      > SOAP::Deserializer::new: ()
      > SOAP::Parser::new: ()
      > SOAP::Server::new: ()
      > SOAP::Transport::HTTP::Server::new: ()
      > SOAP::Transport::HTTP::Daemon::new: ()
      > Contact to SOAP server at http://localhost:8080/
      > SOAP::Server::handle: ()
      > SOAP::Deserializer::deserialize: ()
      > SOAP::Parser::decode: ()
      > SOAP::SOM::new: ()
      > SOAP::Data::new: ()
      > SOAP::Data::DESTROY: ()
      > (eval): HASH(0x145635c) HASH(0x1471264)
      > SOAP::Data::new: ()
      > SOAP::Server::handle: SOAP::Data=HASH(0x14e7a7c)
      > SOAP::Serializer::envelope: ()
      > SOAP::Serializer::envelope: get_setResponse SOAP::Data=HASH(0x14e7a7c)
      > SOAP::Data::new: ()
      > SOAP::Data::new: ()
      > SOAP::Data::new: ()
      > SOAP::Data::new: ()
      > SOAP::Data::new: ()
      > SOAP::SOM::DESTROY: ()

      Apparently you access your local server. I haven't tried this. When you
      call a remote host you must get what you want, xml request & response.

      I guess the trace is not enabled for your particular case or the service
      is called wrongly.

      For instance when calling

      $soap = SOAP::Lite->new(
      uri => ("http://www.webserviceX.NET"),
      proxy => ('http://www.webservicex.com/globalweather.asmx' ),
      );

      the trace is like this:

      SOAP::Transport::new: ()
      SOAP::Serializer::new: ()
      SOAP::Deserializer::new: ()
      SOAP::Parser::new: ()
      SOAP::Lite::new: ()
      SOAP::Transport::HTTP::Client::new: ()
      SOAP::Data::new: ()
      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Serializer::envelope: GetCitiesByCountry SOAP::Data=HASH(0xe91964)
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0xea1d14)
      SOAP::Transport::HTTP::Client::send_receive: POST http://www.webservicex.com/globalweather.asmx HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Accept: application/soap
      Content-Length: 552
      Content-Type: text/xml; charset=utf-8
      SOAPAction: http://www.webserviceX.NET/GetCitiesByCountry

      <?xml version="1.0" encoding="UTF-8"?>
      <soap:Envelope
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
      <GetCitiesByCountry xmlns="http://www.webserviceX.NET">
      <CountryName xsi:type="xsd:string">Singapore</CountryName>
      </GetCitiesByCountry>
      </soap:Body>
      </soap:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x1091a9c)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      Cache-Control: private, max-age=0
      Date: Tue, 24 Mar 2009 19:36:05 GMT
      Server: Microsoft-IIS/6.0
      Content-Length: 702
      Content-Type: text/xml; charset=utf-8
      Client-Date: Tue, 24 Mar 2009 19:36:13 GMT
      Client-Peer: 209.162.186.60:80
      Client-Response-Num: 1
      X-AspNet-Version: 1.1.4322
      X-Powered-By: ASP.NET

      <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetCitiesByCountryResponse xmlns="http://www.webserviceX.NET"><GetCitiesByCountryResult><NewDataSet>
      <Table>
      <Country>Singapore</Country>
      <City>Singapore / Paya Lebar</City>
      </Table>
      <Table>
      <Country>Singapore</Country>
      <City>Singapore / Changi Airport</City>
      </Table>
      </NewDataSet></GetCitiesByCountryResult></GetCitiesByCountryResponse></soap:Body></soap:Envelope>
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()
      SOAP::SOM::new: ()
      SOAP::SOM::DESTROY: ()
      SOAP::Lite::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Parser::DESTROY: ()


      --
      Radek
    • Show all 9 messages in this topic