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

1374Re: [soaplite] Sending a hash to java

Expand Messages
  • Duncan Cameron
    Mar 29, 2002
    • 0 Attachment
      On 2002-03-29 jboy55 wrote:
      >I'm frustrated that this just isn't working. And I can't find a clear
      >example in any of the documentation.
      >i have a function on Java that looks like
      >sendCart(String id, HashTable cart);
      >so i try
      >my $soap1 = SOAP::Lite
      > -> uri('urn:ServiceProxy')
      > -> proxy('http://localhost:8088/soap/servlet/rpcrouter');
      >$id = SOAP::Data->type(string => '1221');
      >result = $soap1->sendCart($id, \%hash);
      >and i get this error
      >SOAP-ENV:Client, No Deserializer found to deserialize
      >a 'http://xml.apache.org/xml-soap:SOAPStruct' using encoding
      >style 'http://schemas.xmlsoap.org/soap/encoding/'.
      >I shouldn't be pulling my hair out over this... this MUST be simple.
      >What's going on?
      It's not well documented but I think that you want to try the 'map' type:

      $result = $soap1->sendCart(
      SOAP::Data->type(map => \%hash)->name('cart')

      This should generate an xml element something like:
      <cart xsi:type="xmlsoap:Map"> which should be handled by the default Apache
      Java serializers to produce a hashtable.

      Duncan Cameron
    • Show all 4 messages in this topic