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

6117Help with ComplexType

Expand Messages
  • bennychee
    Mar 10, 2008
    • 0 Attachment
      I have the following ComplexType definitions for IP address, how do i define the data
      type? I have the following defined but not getting the result i wanted.

      $ip = "1.1.1.1";
      my $networkAddress = SOAP::Data->type(NetworkAddress =>
      \SOAP::Data->value(
      \SOAP::Data->value(String => $ip),
      \SOAP::Data->value(NetworkAddressType =>
      \SOAP::Data->value(String => "IPV4")
      )
      )
      );
      my $tc = SOAP::Data->type(TrafficClassifier => $networkAddress);
      $result = $s->startSession($username, $tc);

      <xsd:complexType name="TrafficClassifier">
      <xsd:sequence>
      <xsd:element name="networkAddress" nillable="false" type="impl:NetworkAddress">
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="NetworkAddress">
      <xsd:sequence>
      <xsd:element name="value" nillable="false" type="xsd:string">
      </xsd:element>
      <xsd:element name="type" nillable="false" type="impl:NetworkAddressType">
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>

      <xsd:simpleType name="NetworkAddressType">
      <xsd:restriction base="xsd:string">
      <xsd:enumeration value="IPV4">
      </xsd:enumeration>
      <xsd:enumeration value="IPV6">
      </xsd:enumeration>
      </xsd:restriction>
      </xsd:simpleType>
    • Show all 2 messages in this topic