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

2175problem creating an object to match the WSDL

Expand Messages
  • sylvainstg <sylvainstg@hotmail.com>
    Dec 9, 2002
    • 0 Attachment
      Hi,

      I am trying to create objects that will give me the following XML:

      <formFieldVars SOAP-ENC:arrayType="namesp2:formFieldVar[3]" ...>
      <item xsi:type="namesp2:formFieldVar">
      <name xsi:type="xsd:string">CAMNamespace</name>
      <value xsi:type="xsd:string">LDAP</value>
      ---
      <format xsi:type="namesp2:formatEnum">not_encrypted</format>
      ---
      </item>

      When writting perl like:

      my $header = SOAP::Header->name(
      'biBusHeader' => new biBusHeader(
      new CAM(undef,'logon'),
      new hdrSession([
      new formFieldVar('CAMNamespace',
      $namespace, new formatEnum('not_encrypted')),
      [...]


      The problem is that the above code gives me this XML:

      <formFieldVars SOAP-ENC:arrayType="namesp2:formFieldVar[3]" ...>
      <item xsi:type="namesp2:formFieldVar">
      <name xsi:type="xsd:string">CAMNamespace</name>
      <value xsi:type="xsd:string">LDAP</value>
      ---
      <format xsi:type="namesp2:formatEnum">
      <c-gensym17 xsi:type="xsd:string">not_encrypted</c-gensym17>
      </format>
      ---
      </item>


      It feels like the formFieldVar object is the culprit.

      package formatEnum;
      sub new {
      shift;
      my ( $value ) = @_;
      my $data = \SOAP::Data($value);

      bless $data;
      return $data;
      }

      I tried all I could think about, I cannot find a way to have the
      provided string to formatEnum object to appear as the element text
      while keeping the type of the format element (namesp2:formatEnum),
      anything I do either turn the type to string or put the data in a
      children node (c-gensym17)

      Any help much appreciated.

      Sylvain.
    • Show all 3 messages in this topic