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

newbie questions... can not get SOAP:Lite working "as expected"

Expand Messages
  • cmatthewblack
    All, I fear that this may be a very dumb/obvious problem, but I m stuck and hope that someone will give me a hand. Here is some background on what I am
    Message 1 of 1 , Aug 12, 2003
      I fear that this may be a very dumb/obvious problem, but I'm stuck
      and hope that someone will give me a hand.

      Here is some background on what I am doing...

      1) Building a perl client to a Web Service that I do not control (So
      I can only debug/work on this from the client side. Fortunatly that
      is where I think the problem is. :)

      2) Using windows ActivePerl (5.6.1 build 635) with SOAP::Lite 0.55.

      I have a WSDL for the web service, and it only uses "Document -
      Literal" interface. (sorry my termanilogy is likely wrong here.)
      Below is a snip of the code I am using...

      ##### start code ######
      use SOAP::Lite;

      #HOST is a location to get the WSDL from a standard http request
      # replaced actual "host name" with "<server>" for the post. :)
      $HOST = "http://<server>/arsys/WSDL/nmba/sprt_Service_Request_test2";
      $NS = "sprt_Service_Request_test2";
      $REQUEST_ID = "TFR00008170423";

      print "starting to connect\n";

      print "prep of data\n";
      my $data = SOAP::Data

      package main;

      print "calling ws and OpGet method ". __LINE__ ."\n";
      $conn= SOAP::Lite
      print "got here!\n";
      print "ref($conn) (", ref($conn), ")\n";
      if (ref($conn)) {
      print "conn is a reference to a ".ref($conn).".\n";
      if (!(ref($conn))) {
      print "conn is not a reference at all.\n";

      #print SOAP::Lite
      # ->service($HOST)
      # ->uri($NS)
      # ->OpGet($data);

      ##### End code ######

      What I get is very odd to me. (Please help me understand what is, or
      is not happening.)

      When I run the code I get:
      starting to connect
      prep of data
      calling ws and OpGet method 69
      got here!
      ref() ()
      conn is not a reference at all.

      So it is like $conn is not getting set. (To anything!)

      However if I do the print statment that is commented at the end
      of the code I see what I would expect to get back. Except all of the
      XML tags are striped and the contents are just dumped as a big string.

      If I do a (( use SOAP::Lite +trace=>all; )) to turn on some very
      verbos output then I see the following. (Which looks more like what I
      want to get at, but apparently I/SOAP::Lite does not know how to
      handel properly.

      ### start snip (short version) of commented print statment #####
      ### the full value is like 10000 lines long so I'm not going to post
      the whole thing. :) ###
      SOAP::Serializer::envelope: OpGet SOAP::Data=HASH(0x1fc5ab8)
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH
      SOAP::Transport::HTTP::Client::send_receive: POST
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 538
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "urn:sprt_Service_Request_test2/OpGet"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
      xmlns=""><Case_ID SOAP-
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      Connection: close
      Date: Tue, 12 Aug 2003 14:53:12 GMT
      Server: Microsoft-IIS/5.0
      Content-Type: text/xml; charset=utf-8
      Client-Date: Tue, 12 Aug 2003 14:53:11 GMT
      Client-Response-Num: 1
      Set-Cookie: JSESSIONID=<some junk here too :)>; path=/arsys/

      <?xml version="1.0" encoding="UTF-8"?>

      <big snip of output here .. just more xml elements with values that
      makes sense to me />

      </OpGetResponse> </soapenv:Body>
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()
      SOAP::SOM::new: ()
      SOAP::SOM::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::SOM::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Parser::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Lite::DESTROY: ()
      ### end snip (short version) of commented print statment #####

      Can anyone clue me in to what I need to do to get the results back in
      a form that I can process the results in Perl?

      (I think I am very close to the solution that I'm looking for. I just
      need that one or two more things to finish this.)

      Thanks in advance
      Carey Matthew Black
    Your message has been successfully submitted and would be delivered to recipients shortly.