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

enumeration value not being sent

Expand Messages
  • cresswell.alex
    When I try to call a method with an enumeration as one of the parameters, nothing is sent. How do explicitly define the type? I assumed that since the WSTL
    Message 1 of 1 , Dec 6, 2010
    • 0 Attachment
      When I try to call a method with an enumeration as one of the parameters, nothing is sent. How do explicitly define the type? I assumed that since the WSTL definition was supplied that it would automatically convert the type for me, but it doesn't seem to do that.

      use SOAP::Lite +trace;

      my $eventmanager = SOAP::Lite -> service('http://mir.quantlab.com/mirdal/eventmanager.asmx?WSDL')
      -> envprefix('soap12');


      $result = $eventmanager -> AddEventGroup("ServerDiscoveryProess","auto discovery");

      This sends the following:


      <?xml version="1.0" encoding="UTF-8"?><soap12:Envelope xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soap12="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" soap12:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://tempuri.org/"><soap12:Body><tns:AddEventGroup><Type xsi:nil="true" xsi:type="tns:EventGroupType" /><Description xsi:type="s:string">auto discovery</Description></tns:AddEventGroup></soap12:Body></soap12:Envelope>


      WSTL definition:

      <?xml version="1.0" encoding="utf-8"?>
      <wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
      <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="AddEventGroup">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="Type" type="tns:EventGroupType" />
      <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:simpleType name="EventGroupType">
      <s:restriction base="s:string">
      <s:enumeration value="any" />
      <s:enumeration value="ServerDiscoveryProcess" />
      <s:enumeration value="ServerCollectionProcess" />
      </s:restriction>
      </s:simpleType>
      <s:element name="AddEventGroupResponse">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="AddEventGroupResult" type="tns:EventGroup" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:complexType name="EventGroup">
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="Events" type="tns:ArrayOfEvent" />
      <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
      <s:element minOccurs="1" maxOccurs="1" name="Type" type="tns:EventGroupType" />
      <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
      </s:sequence>
      </s:complexType>
      <s:complexType name="ArrayOfEvent">
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="Event" nillable="true" type="tns:Event" />
      </s:sequence>
      </s:complexType>
      <s:complexType name="Event">
      <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
      <s:element minOccurs="1" maxOccurs="1" name="GroupID" type="s:int" />
      <s:element minOccurs="1" maxOccurs="1" name="Type" type="tns:EventType" />
      <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
      <s:element minOccurs="1" maxOccurs="1" name="DeviceID" type="s:int" />
      <s:element minOccurs="1" maxOccurs="1" name="DateTime" type="s:dateTime" />
      </s:sequence>
      </s:complexType>
      <s:simpleType name="EventType">
      <s:restriction base="s:string">
      <s:enumeration value="any" />
      <s:enumeration value="DeviceDiscovery" />
      <s:enumeration value="DeviceCollection" />
      <s:enumeration value="DeviceRename" />
      </s:restriction>
      </s:simpleType>
      <s:element name="AddEvent">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="GroupID" type="s:int" />
      <s:element minOccurs="1" maxOccurs="1" name="Type" type="tns:EventType" />
      <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
      <s:element minOccurs="1" maxOccurs="1" name="DeviceID" type="s:int" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="AddEventResponse">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="AddEventResult" type="tns:Event" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="GetEvents">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="EventIDIn" nillable="true" type="s:int" />
      <s:element minOccurs="1" maxOccurs="1" name="EventGroupIDIn" nillable="true" type="s:int" />
      <s:element minOccurs="1" maxOccurs="1" name="EventTypeIn" type="tns:EventType" />
      <s:element minOccurs="1" maxOccurs="1" name="DeviceIDIn" nillable="true" type="s:int" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="GetEventsResponse">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="GetEventsResult" type="tns:ArrayOfEvent" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="GetEventGroups">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="EventGroupIDIn" nillable="true" type="s:int" />
      <s:element minOccurs="1" maxOccurs="1" name="EventGroupTypeIn" type="tns:EventGroupType" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="GetEventGroupsResponse">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="GetEventGroupsResult" type="tns:ArrayOfEventGroup" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:complexType name="ArrayOfEventGroup">
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="EventGroup" nillable="true" type="tns:EventGroup" />
      </s:sequence>
      </s:complexType>
      </s:schema>
      </wsdl:types>
      <wsdl:message name="AddEventGroupSoapIn">
      <wsdl:part name="parameters" element="tns:AddEventGroup" />
      </wsdl:message>
      <wsdl:message name="AddEventGroupSoapOut">
      <wsdl:part name="parameters" element="tns:AddEventGroupResponse" />
      </wsdl:message>
      <wsdl:message name="AddEventSoapIn">
      <wsdl:part name="parameters" element="tns:AddEvent" />
      </wsdl:message>
      <wsdl:message name="AddEventSoapOut">
      <wsdl:part name="parameters" element="tns:AddEventResponse" />
      </wsdl:message>
      <wsdl:message name="GetEventsSoapIn">
      <wsdl:part name="parameters" element="tns:GetEvents" />
      </wsdl:message>
      <wsdl:message name="GetEventsSoapOut">
      <wsdl:part name="parameters" element="tns:GetEventsResponse" />
      </wsdl:message>
      <wsdl:message name="GetEventGroupsSoapIn">
      <wsdl:part name="parameters" element="tns:GetEventGroups" />
      </wsdl:message>
      <wsdl:message name="GetEventGroupsSoapOut">
      <wsdl:part name="parameters" element="tns:GetEventGroupsResponse" />
      </wsdl:message>
      <wsdl:portType name="EventManagerSoap">
      <wsdl:operation name="AddEventGroup">
      <wsdl:input message="tns:AddEventGroupSoapIn" />
      <wsdl:output message="tns:AddEventGroupSoapOut" />
      </wsdl:operation>
      <wsdl:operation name="AddEvent">
      <wsdl:input message="tns:AddEventSoapIn" />
      <wsdl:output message="tns:AddEventSoapOut" />
      </wsdl:operation>
      <wsdl:operation name="GetEvents">
      <wsdl:input message="tns:GetEventsSoapIn" />
      <wsdl:output message="tns:GetEventsSoapOut" />
      </wsdl:operation>
      <wsdl:operation name="GetEventGroups">
      <wsdl:input message="tns:GetEventGroupsSoapIn" />
      <wsdl:output message="tns:GetEventGroupsSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="EventManagerSoap" type="tns:EventManagerSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
      <wsdl:operation name="AddEventGroup">
      <soap:operation soapAction="http://tempuri.org/AddEventGroup" style="document" />
      <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="AddEvent">
      <soap:operation soapAction="http://tempuri.org/AddEvent" style="document" />
      <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetEvents">
      <soap:operation soapAction="http://tempuri.org/GetEvents" style="document" />
      <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetEventGroups">
      <soap:operation soapAction="http://tempuri.org/GetEventGroups" style="document" />
      <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:binding name="EventManagerSoap12" type="tns:EventManagerSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
      <wsdl:operation name="AddEventGroup">
      <soap12:operation soapAction="http://tempuri.org/AddEventGroup" style="document" />
      <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="AddEvent">
      <soap12:operation soapAction="http://tempuri.org/AddEvent" style="document" />
      <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetEvents">
      <soap12:operation soapAction="http://tempuri.org/GetEvents" style="document" />
      <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetEventGroups">
      <soap12:operation soapAction="http://tempuri.org/GetEventGroups" style="document" />
      <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="EventManager">
      <wsdl:port name="EventManagerSoap" binding="tns:EventManagerSoap">
      <soap:address location="http://mir.quantlab.com/mirdal/eventmanager.asmx" />
      </wsdl:port>
      <wsdl:port name="EventManagerSoap12" binding="tns:EventManagerSoap12">
      <soap12:address location="http://mir.quantlab.com/mirdal/eventmanager.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    Your message has been successfully submitted and would be delivered to recipients shortly.