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

Please Help!

Expand Messages
  • manoj patil
    Hi guys I am completely new to SOAP and trying to write a client for a web service our company intend to use. My problem is i am not able to figure out why
    Message 1 of 1 , Jun 21, 2006
    • 0 Attachment
      Hi guys
       I am completely new to SOAP and trying to write a client for a web service
      our company intend to use.
      My problem is i am not able to figure out why this code does not fill up
      my $response
       
      I am pasting my code..
       
       
       
       my $webService = SOAP::Lite-> uri($self->{NAMESPACE})         
                -> on_action(sub{sprintf '%s/%s', @_ })
                -> outputxml("0") 
                                     -> proxy($self->{ENDPOINT});
         eval{
       my $response = $webService
            ->call(SOAP::Data->name("SubmitXml")->attr({xmlns => $self->{NAMESPACE}}),
                   SOAP::Data->name(Profile => $self->{HAP})->type('string'),
                   SOAP::Data->name(Request => $xmlRequest)->type('xml'),
                   SOAP::Data->name(Filter => $xmlFilter)->type('xml'));
           };
          if($@){print $@}

       open RES,">>Responce.log";
       if (defined $response) {
       print RES $response."\n";
       }else {print RES "========No Response======== \n";}
       
       close RES; 
       
       
      Now guys please help me I always end up with undefined $response
       
      i dont know but if i call $response=$webService->result;
      the wsdl raises a exception which can be seen in the log .
      but i can see the proper response if i enable +trace on it shows me the right
      result but does not return it .
       This is my trace output.
       
       
      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><SubmitXml xmlns="http://webservices.galileo.com"><Profile xsi:type="xsd:string">DynGalileoCopy_75YO</Profile><Request><AirAvailability_6_2><AirAvailMods><AirVSpecificAvail><NumSeats>0</NumSeats><Class>Y</Class><StartDt>20060715</StartDt><StartPt>BOM</StartPt><EndPt>LON</EndPt><StartTm>0000</StartTm><TmWndInd>D</TmWndInd><StartTmWnd>0000</StartTmWnd><EndTmWnd>2359</EndTmWnd><JrnyTm><![CDATA[ ]]></JrnyTm><FltTypeInd/><FltTypePref/><StartPtInd/><EndPtInd/><IgnoreTSPref/><WidenSearchWndInd/><MaxNumFlts>99</MaxNumFlts></AirVSpecificAvail><AirVPrefInd><AirVIncExcInd>I</AirVIncExcInd><RelaxAirVPref>Y</RelaxAirVPref></AirVPrefInd><AirVPrefs><AirVAry><AirVInfo><AirV>BA</AirV></AirVInfo></AirVAry></AirVPrefs></AirAvailMods></AirAvailability_6_2></Request><Filter><AirAvailability_6_2><AirAvail><AvailSummary><NumSegs></NumSegs><StartPt></StartPt><StartCity></StartCity><EndPt></EndPt><EndCity></EndCity><ErrInd></ErrInd><ErrNum></ErrNum></AvailSummary><AvailFlt><AirV></AirV><FltNum></FltNum><StartDt></StartDt><StartAirp></StartAirp><EndAirp> ;</EndAirp><StartTm></StartTm><EndTm></EndTm><DayChg></DayChg><Conx></Conx><AirpChg></AirpChg><Equip></Equip><NumStops></NumStops><DaysOperates></DaysOperates><JrnyTm></JrnyTm><EndDt></EndDt><EndTerminal></EndTerminal></AvailFlt><FltAvailStatus><FltStatus/><First></First><Business></Business><Coach></Coach></FltAvailStatus><BICAvail><BICStatusAry><BICStatus><BIC></BIC><Status></Status></BICStatus></BICStatusAry></BICAvail><MoreToken><Tok></Tok></MoreToken><FltText><Text></Text></FltText></AirAvail></AirAvailability_6_2></Filter></SubmitXml></SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      Connection: close
      Date: Wed, 21 Jun 2006 10:44:06 GMT
      Server: Apache-Coyote/1.1
      Content-Length: 4059
      Content-Type: text/xml;charset=utf-8
      Client-Date: Wed, 21 Jun 2006 10:45:18 GMT
      Client-Response-Num: 1
      Client-SSL-Cert-Issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
      Client-SSL-Cert-Subject: /C=US/ST=New Jersey/L=Parsippany/O=Cendant Corporation/OU=Terms of use at www.verisign.com/OU=Terms of use at www.verisign.com/rpa (c)00/CN=copyws.cendant.com
      Client-SSL-Cipher: AES256-SHA
      Client-SSL-Warning: Peer certificate not verified
      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
       <soapenv:Body><SubmitXmlResponse xmlns="http://webservices.galileo.com"><SubmitXmlResult><AirAvailability_6_2 xmlns=""><AirAvail><MoreToken><Tok>301030383628882023605530276080</Tok></MoreToken><AvailSummary><NumSegs>2</NumSegs></AirAvail></AirAvailability_6_2></SubmitXmlResult></SubmitXmlResponse></soapenv:Body></soapenv:Envelope>
       
      now according to me my $response should have this string as i have enabled the outputxml(1) .
       
       
      Please help guys.
       
       
       
       


      Yahoo! India Answers: Share what you know. Learn something new Click here
    Your message has been successfully submitted and would be delivered to recipients shortly.