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

5566Changing the behaviour of the deserialization on the server side

Expand Messages
  • F. Garzon
    Aug 25 8:09 AM

      I have some trouble writing a SOAP server with Soap::Lite. The SOAP
      client and I have agreed on a WSDL (and a schema) to communicate with
      each other. I have no problem generating the responses conforming to our
      xml schema (using SOAP::Data). But when I try to read the data received
      from the client, I don't receive what I expect.
      When the client sends this request :

      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      <myfunction xmlns="urn:garz">
      <InputParameter xmlns="">
      <ns1:garzMessage xmlns:ns1="urn:garz">
      <ns1:Item key="ignored">
      <ns1:Item key="ignored">
      <ns1:Item key="organizationName1">
      <ns1:Item key="password">
      <ns1:Item key="emailAddress1">
      <ns1:Item key="commonName1">
      <ns1:Value>John Doe</ns1:Value>


      I get this as argument in my function
      $VAR1 = [
      'garzMessage' => {
      'Array' => {
      'Item' => {
      'HashTable' => {

      'Item' => {

      'Value' => 'John Doe'
      It looks like if the deserializer only expects to have exactly one
      element with a certain name at a particular level(ex. Item in Array). if
      there are several, only the last one goes in the resulting data
      structure. Is there a way to change this behaviour ? I would like to be
      able to retrieve in an ordered list the contained elements of a
      particular element... If I have to write my own deserializer, are there
      any sample codes I could use as a starting point ?

      Thanks in advance,

      F. Garzon