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

Re: [soaplite] Re: Help using SOAP::Lite

Expand Messages
  • Octavian Rasnita
    Hi, Thank you for that code. I have tried the following: use SOAP::Lite; use SOAP::Lite +trace = [qw(debug)]; my $url = http://... ; my $ENDPOINT = $url; my
    Message 1 of 6 , Jul 3, 2006
    • 0 Attachment
      Hi,

      Thank you for that code.

      I have tried the following:

      use SOAP::Lite;
      use SOAP::Lite +trace => [qw(debug)];

      my $url = "http://...";

      my $ENDPOINT = $url;
      my $lucas = new SOAP::Lite(endpoint => $ENDPOINT, proxy => $ENDPOINT, ns =>
      'www.bvb.ro/Level2');

      $lucas->transport->timeout(600);

      my @params = (
      SOAP::Data->type('string')->name('symbol')->value('SIF5'),
      SOAP::Data->type('string')->name('market')->value('REGS'));

      my $response = $lucas->call('Level2' => @params)->result;
      __END__

      I have seen that the program sends the following HTTP header which is not
      correct:

      SOAPAction: "www.bvb.ro/Level2#Level2"

      The correct header should be:

      SOAPAction: "www.bvb.ro/Level2"

      (without #Level2)

      What can I do to make it send the correct header?

      Thank you.

      Teddy

      ----- Original Message -----
      From: "gayathri athreya" <satanssidekick5@...>

      > Hi,
      > Here is a small sample code. This code was originally in Java and I
      had to rewrite it in perl. It takes a while to actually understand how SOAP
      works but once you do, the language is not a barrier, the perl module is
      just as efficient and easy as java or C#. It is done exactly like the way
      you do it in java, only the function names are different. Please refer to
      www.perl.com for articles on SOAP, they were of immense help to me. Hope
      this helps.
      >
    • rahed
      ... www.bvb.ro/Level2#Level2 Part before # is uri and part after is a called method. SOAPAction http header can be set by an on_action method:
      Message 2 of 6 , Jul 4, 2006
      • 0 Attachment
        "Octavian Rasnita" <orasnita@...> writes:

        > I have seen that the program sends the following HTTP header which is not
        > correct:
        >
        > SOAPAction: "www.bvb.ro/Level2#Level2"
        >
        > The correct header should be:
        >
        > SOAPAction: "www.bvb.ro/Level2"
        >
        > (without #Level2)
        >
        > What can I do to make it send the correct header?
        >



        www.bvb.ro/Level2#Level2
        Part before # is uri and part after is a called method.

        SOAPAction http header can be set by an on_action method:
        $soap->on_action(sub {'www.bvb.ro/Level2'});

        --
        Radek
      • Octavian Rasnita
        Thank you. I have managed to send the correct header but the XML body is not correct. I have also read that I need to make some changes in order to make the
        Message 3 of 6 , Jul 4, 2006
        • 0 Attachment
          Thank you. I have managed to send the correct header but the XML body is not
          correct.
          I have also read that I need to make some changes in order to make the
          SOAP::Lite client work with a .net server (because it is a .net server
          running under IIS), and I have tried changing many things, but the body sent
          is very different than the server needs.

          Here is the SOAP 1.1 and 1.2 requests and responses that should be used.
          Is it possible to do it using SOAP::Lite?
          (with any of them)

          SOAP 1.1

          The following is a sample SOAP 1.1 request and response. The placeholders
          shown need to be replaced with actual values.
          POST /bsews/intraday.asmx HTTP/1.1
          Host: www.rasd.ro
          Content-Type: text/xml; charset=utf-8
          Content-Length: length
          SOAPAction: "www.bvb.ro/Level2"

          <?xml version="1.0" encoding="utf-8"?>
          <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
          <soap:Body>
          <Level2 xmlns="www.bvb.ro">
          <symbol>string</symbol>
          <market>string</market>
          </Level2>
          </soap:Body>
          </soap:Envelope>
          HTTP/1.1 200 OK
          Content-Type: text/xml; charset=utf-8
          Content-Length: length

          <?xml version="1.0" encoding="utf-8"?>
          <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
          <soap:Body>
          <Level2Response xmlns="www.bvb.ro">
          <Level2Result>
          <Symbolcode xmlns="http://www.bvb.ro/">string</Symbolcode>
          <Marketcode xmlns="http://www.bvb.ro/">string</Marketcode>
          <LastTradeTime xmlns="http://www.bvb.ro/">dateTime</LastTradeTime>
          <Openprice xmlns="http://www.bvb.ro/">decimal</Openprice>
          <Closeprice xmlns="http://www.bvb.ro/">decimal</Closeprice>
          <Value xmlns="http://www.bvb.ro/">decimal</Value>
          <Volume xmlns="http://www.bvb.ro/">long</Volume>
          <Trades xmlns="http://www.bvb.ro/">long</Trades>
          <Lowpricecurrent xmlns="http://www.bvb.ro/">decimal</Lowpricecurrent>
          <Highpricecurrent xmlns="http://www.bvb.ro/">decimal</Highpricecurrent>
          <Avgprice xmlns="http://www.bvb.ro/">decimal</Avgprice>
          <NetChgFromOfficialPrice
          xmlns="http://www.bvb.ro/">decimal</NetChgFromOfficialPrice>
          <PrcChgFromOfficialPrice
          xmlns="http://www.bvb.ro/">double</PrcChgFromOfficialPrice>
          <ReferencePrice xmlns="http://www.bvb.ro/">decimal</ReferencePrice>
          <PotentialOpenVol xmlns="http://www.bvb.ro/">decimal</PotentialOpenVol>
          <PotentialOpenPrice xmlns="http://www.bvb.ro/">decimal</PotentialOpenPrice>
          <SymbolStatus xmlns="http://www.bvb.ro/">string</SymbolStatus>
          <LastTopTime xmlns="http://www.bvb.ro/">dateTime</LastTopTime>
          <B1Price xmlns="http://www.bvb.ro/">decimal</B1Price>
          <B1Vol xmlns="http://www.bvb.ro/">double</B1Vol>
          <B2Price xmlns="http://www.bvb.ro/">decimal</B2Price>
          <B2Vol xmlns="http://www.bvb.ro/">double</B2Vol>
          <B3Price xmlns="http://www.bvb.ro/">decimal</B3Price>
          <B3Vol xmlns="http://www.bvb.ro/">double</B3Vol>
          <B4Price xmlns="http://www.bvb.ro/">decimal</B4Price>
          <B4Vol xmlns="http://www.bvb.ro/">double</B4Vol>
          <B5Price xmlns="http://www.bvb.ro/">decimal</B5Price>
          <B5Vol xmlns="http://www.bvb.ro/">double</B5Vol>
          <A1Price xmlns="http://www.bvb.ro/">decimal</A1Price>
          <A1Vol xmlns="http://www.bvb.ro/">double</A1Vol>
          <A2Price xmlns="http://www.bvb.ro/">decimal</A2Price>
          <A2Vol xmlns="http://www.bvb.ro/">double</A2Vol>
          <A3Price xmlns="http://www.bvb.ro/">decimal</A3Price>
          <A3Vol xmlns="http://www.bvb.ro/">double</A3Vol>
          <A4Price xmlns="http://www.bvb.ro/">decimal</A4Price>
          <A4Vol xmlns="http://www.bvb.ro/">double</A4Vol>
          <A5Price xmlns="http://www.bvb.ro/">decimal</A5Price>
          <A5Vol xmlns="http://www.bvb.ro/">double</A5Vol>
          </Level2Result>
          </Level2Response>
          </soap:Body>
          </soap:Envelope>

          SOAP 1.2

          The following is a sample SOAP 1.2 request and response. The placeholders
          shown need to be replaced with actual values.
          POST /bsews/intraday.asmx HTTP/1.1
          Host: www.rasd.ro
          Content-Type: application/soap+xml; charset=utf-8
          Content-Length: length

          <?xml version="1.0" encoding="utf-8"?>
          <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
          <soap12:Body>
          <Level2 xmlns="www.bvb.ro">
          <symbol>string</symbol>
          <market>string</market>
          </Level2>
          </soap12:Body>
          </soap12:Envelope>
          HTTP/1.1 200 OK
          Content-Type: application/soap+xml; charset=utf-8
          Content-Length: length

          <?xml version="1.0" encoding="utf-8"?>
          <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
          <soap12:Body>
          <Level2Response xmlns="www.bvb.ro">
          <Level2Result>
          <Symbolcode xmlns="http://www.bvb.ro/">string</Symbolcode>
          <Marketcode xmlns="http://www.bvb.ro/">string</Marketcode>
          <LastTradeTime xmlns="http://www.bvb.ro/">dateTime</LastTradeTime>
          <Openprice xmlns="http://www.bvb.ro/">decimal</Openprice>
          <Closeprice xmlns="http://www.bvb.ro/">decimal</Closeprice>
          <Value xmlns="http://www.bvb.ro/">decimal</Value>
          <Volume xmlns="http://www.bvb.ro/">long</Volume>
          <Trades xmlns="http://www.bvb.ro/">long</Trades>
          <Lowpricecurrent xmlns="http://www.bvb.ro/">decimal</Lowpricecurrent>
          <Highpricecurrent xmlns="http://www.bvb.ro/">decimal</Highpricecurrent>
          <Avgprice xmlns="http://www.bvb.ro/">decimal</Avgprice>
          <NetChgFromOfficialPrice
          xmlns="http://www.bvb.ro/">decimal</NetChgFromOfficialPrice>
          <PrcChgFromOfficialPrice
          xmlns="http://www.bvb.ro/">double</PrcChgFromOfficialPrice>
          <ReferencePrice xmlns="http://www.bvb.ro/">decimal</ReferencePrice>
          <PotentialOpenVol xmlns="http://www.bvb.ro/">decimal</PotentialOpenVol>
          <PotentialOpenPrice xmlns="http://www.bvb.ro/">decimal</PotentialOpenPrice>
          <SymbolStatus xmlns="http://www.bvb.ro/">string</SymbolStatus>
          <LastTopTime xmlns="http://www.bvb.ro/">dateTime</LastTopTime>
          <B1Price xmlns="http://www.bvb.ro/">decimal</B1Price>
          <B1Vol xmlns="http://www.bvb.ro/">double</B1Vol>
          <B2Price xmlns="http://www.bvb.ro/">decimal</B2Price>
          <B2Vol xmlns="http://www.bvb.ro/">double</B2Vol>
          <B3Price xmlns="http://www.bvb.ro/">decimal</B3Price>
          <B3Vol xmlns="http://www.bvb.ro/">double</B3Vol>
          <B4Price xmlns="http://www.bvb.ro/">decimal</B4Price>
          <B4Vol xmlns="http://www.bvb.ro/">double</B4Vol>
          <B5Price xmlns="http://www.bvb.ro/">decimal</B5Price>
          <B5Vol xmlns="http://www.bvb.ro/">double</B5Vol>
          <A1Price xmlns="http://www.bvb.ro/">decimal</A1Price>
          <A1Vol xmlns="http://www.bvb.ro/">double</A1Vol>
          <A2Price xmlns="http://www.bvb.ro/">decimal</A2Price>
          <A2Vol xmlns="http://www.bvb.ro/">double</A2Vol>
          <A3Price xmlns="http://www.bvb.ro/">decimal</A3Price>
          <A3Vol xmlns="http://www.bvb.ro/">double</A3Vol>
          <A4Price xmlns="http://www.bvb.ro/">decimal</A4Price>
          <A4Vol xmlns="http://www.bvb.ro/">double</A4Vol>
          <A5Price xmlns="http://www.bvb.ro/">decimal</A5Price>
          <A5Vol xmlns="http://www.bvb.ro/">double</A5Vol>
          </Level2Result>
          </Level2Response>
          </soap12:Body>
          </soap12:Envelope>





          Teddy

          ----- Original Message -----
          From: "rahed" <rahed@...>
          To: "Octavian Rasnita" <orasnita@...>
          Cc: "gayathri athreya" <satanssidekick5@...>; "theorem21"
          <bryant.eadon@...>; <soaplite@yahoogroups.com>
          Sent: Tuesday, July 04, 2006 12:59 PM
          Subject: Re: [soaplite] Re: Help using SOAP::Lite


          > "Octavian Rasnita" <orasnita@...> writes:
          >
          > > I have seen that the program sends the following HTTP header which is
          not
          > > correct:
          > >
          > > SOAPAction: "www.bvb.ro/Level2#Level2"
          > >
          > > The correct header should be:
          > >
          > > SOAPAction: "www.bvb.ro/Level2"
          > >
          > > (without #Level2)
          > >
          > > What can I do to make it send the correct header?
          > >
          >
          >
          >
          > www.bvb.ro/Level2#Level2
          > Part before # is uri and part after is a called method.
          >
          > SOAPAction http header can be set by an on_action method:
          > $soap->on_action(sub {'www.bvb.ro/Level2'});
          >
          > --
          > Radek
        Your message has been successfully submitted and would be delivered to recipients shortly.