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

Re: Passing Hashtables from Perl (again)

Expand Messages
  • calinm
    ... Exactly. This is the code of my java function: public Hashtable echoHashtable(Hashtable ht) { return ht; } I am trying to call it from perl. I tried the
    Message 1 of 4 , Aug 16, 2002
    • 0 Attachment
      > >I am using the Sun Java WSDP.
      > >
      > It's not clear quite what you want to do. Send a SOAP message from
      > SOAP::Lite containing a hash table which Java can handle?

      Exactly. This is the code of my java function:
      public Hashtable echoHashtable(Hashtable ht)
      {
      return ht;
      }

      I am trying to call it from perl. I tried the approach you described
      in msg 1374:

      $result = echoHashtable (SOAP::Data->type(map =>
      $hashref)->name('ht'))

      and I get this:

      <?xml version="1.0" encoding="UTF-8"?>
      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:ns0="http://com.test/types/ZoneEditWS"
      xmlns:ns1="http://java.sun.com/jax-rpc-ri/internal"
      env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <env:Body><env:Fault><faultcode>env:Server</faultcode>
      <faultstring>Internal Server Error (deserialization error:
      unexpected XML reader state. expected: END but found: START:
      ht)</faultstring>
      </env:Fault></env:Body>
      </env:Envelope>

      I am using the Sun java WSDP. and WSDL on the client side.

      Any help would be most appreciated.

      Thanks,

      Calin

      > The previous posts should give you a handle on how to do that,
      > see http://groups.yahoo.com/group/soaplite/message/1374 as an
      example.
      >
      >
      > Regards,
      > Duncan Cameron
    • Duncan Cameron
      ... Clearly you have some sort of malformed message. I think that you need to look at the SOAP message generated by SOAP::Lite. If you don t have a tracing
      Message 2 of 4 , Aug 16, 2002
      • 0 Attachment
        On 2002-08-16 calinm wrote:
        >> >I am using the Sun Java WSDP.
        >> >
        >> It's not clear quite what you want to do. Send a SOAP message from
        >> SOAP::Lite containing a hash table which Java can handle?
        >
        >Exactly. This is the code of my java function:
        >public Hashtable echoHashtable(Hashtable ht)
        >{
        > return ht;
        >}
        >
        >I am trying to call it from perl. I tried the approach you described
        >in msg 1374:
        >
        >$result = echoHashtable (SOAP::Data->type(map =>
        >$hashref)->name('ht'))
        >
        >and I get this:
        >
        ><?xml version="1.0" encoding="UTF-8"?>
        ><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
        >xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        >xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
        >xmlns:ns0="http://com.test/types/ZoneEditWS"
        >xmlns:ns1="http://java.sun.com/jax-rpc-ri/internal"
        >env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        ><env:Body><env:Fault><faultcode>env:Server</faultcode>
        ><faultstring>Internal Server Error (deserialization error:
        >unexpected XML reader state. expected: END but found: START:
        >ht)</faultstring>
        ></env:Fault></env:Body>
        ></env:Envelope>
        >
        >I am using the Sun java WSDP. and WSDL on the client side.
        >
        Clearly you have some sort of malformed message.
        I think that you need to look at the SOAP message generated by
        SOAP::Lite. If you don't have a tracing proxy then turn on debug
        with SOAP::Lite, something like

        use SOAP::Lite +debug => trace;

        That should show the generated xml and hopefully identify the problem.

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