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

Problems with SOAP Lite

Expand Messages
  • rajeshchettyau
    Hi, I have a python soap service that I need to access. I need to send this service a header with a username and password here is the code I m trying: use
    Message 1 of 2 , Mar 5, 2002
    • 0 Attachment
      Hi,

      I have a python soap service that I need to access.
      I need to send this service a header with a username and password

      here is the code I'm trying:
      use SOAP::Lite;

      ($username,$password)=("username","password");
      @parameters=("Hello","Cruel World");
      $header = {Key => $key, Type => $type};
      my $soap_conn=SOAP::Lite
      -> uri("Demo")
      -> proxy("https://bakkurta/cgi-
      bin/soap/python/python_soap_server.cgi");
      $soap_conn = $soap_conn->handle_dispatch(
      @parameters,
      SOAP::Header->name("username" => $username),
      SOAP::Header->name("password" => $password))
      ;
      unless ($soap_conn->fault) {
      print $soap_conn->result();
      } else {
      print join ', ',
      $soap_conn->faultcode,
      $soap_conn->faultstring;
      }

      The server is a python server and right now all it does is returns
      the parameters to me.

      However when I run this code I get the following error:
      SOAP-ENV:Client, Unparseable message

      If I comment out the SOAP::Header references the code returns the
      correct result.

      Any ideas?

      Regards

      Rajesh
    • Duncan Cameron
      ... Rajesh If you haven t cracked this yet, can you post a trace of the SOAP envelopes? Duncan Cameron
      Message 2 of 2 , Mar 8, 2002
      • 0 Attachment
        On 2002-03-06 rajeshchettyau wrote:
        >Hi,
        >
        >I have a python soap service that I need to access.
        >I need to send this service a header with a username and password
        >
        >here is the code I'm trying:
        >use SOAP::Lite;
        >
        >($username,$password)=("username","password");
        >@parameters=("Hello","Cruel World");
        >$header = {Key => $key, Type => $type};
        >my $soap_conn=SOAP::Lite
        >-> uri("Demo")
        >-> proxy("https://bakkurta/cgi-
        >bin/soap/python/python_soap_server.cgi");
        >$soap_conn = $soap_conn->handle_dispatch(
        >@parameters,
        >SOAP::Header->name("username" => $username),
        >SOAP::Header->name("password" => $password))
        >;
        >unless ($soap_conn->fault) {
        >print $soap_conn->result();
        >} else {
        >print join ', ',
        >$soap_conn->faultcode,
        >$soap_conn->faultstring;
        >}
        >
        >The server is a python server and right now all it does is returns
        >the parameters to me.
        >
        >However when I run this code I get the following error:
        >SOAP-ENV:Client, Unparseable message
        >
        >If I comment out the SOAP::Header references the code returns the
        >correct result.
        >
        >Any ideas?
        >
        >Regards
        >
        >Rajesh

        Rajesh

        If you haven't cracked this yet, can you post a trace of the
        SOAP envelopes?


        Duncan Cameron
      Your message has been successfully submitted and would be delivered to recipients shortly.