0 Replies Latest reply on May 2, 2008 3:17 PM by mcc.mike

    webservices retrieval problem

    mcc.mike
      OK, I've imported my wsdl and all looks fine. I've got a reference to a complex type that is input for a method.

      When I call the webservice I get an error for the first element in the complexType which is named StartTime:
      org.xml.sax.SAXException: Invalid element in ....data.RequestType - StartTime

      Prior to using the generated webservice, I tried calling via the old webservice ways. For some reason, it passed the first parameter in every field in the complexType. No idea why, so I went to the imported genreated webservice...

      Can't figure it. Any help out there?

      Here's the WSDL :

      <xsd:complexType name="RequestType">
      <xsd:sequence>
      <xsd:element name="StartTime"
      type="xsd:dateTime" minOccurs="0" />
      <xsd:element name="EndTime"
      type="xsd:dateTime" minOccurs="0" />
      <xsd:element name="Interval"
      type="xsd:int" minOccurs="0" />
      <xsd:element name="prnNumber"
      type="simple:Type" minOccurs="1" />
      <xsd:element name="SeriesData"
      type="tns:SeriesDataType" minOccurs="1" />
      <xsd:element name="SeriesMessage"
      type="tns:SeriesMessageType" minOccurs="1" />
      </xsd:sequence>
      </xsd:complexType>

      here's the generated:
      package generated.webservices{
      import mx.utils.ObjectProxy;
      import flash.utils.ByteArray;
      import mx.rpc.soap.types.*;
      /**
      * Wrapper class for a operation required type
      */

      public class RequestType
      {
      /**
      * Constructor, initializes the type class
      */
      public function RequestType() {}

      public var StartTime:Date;
      public var EndTime:Date;
      public var Interval:Number;
      public var prnNumber:Number;
      public var SeriesData:Number;
      public var SeriesMessage:Number;
      }
      }

      Here's the call:
      reqType.StartTime= startDate;
      reqType.EndTime= endDate;
      reqType.Interval=1000;
      reqType.prnNumber=13;
      reqType.SeriesData=1;
      reqType.SeriesMessage=10;

      perfService.getSeriesData(reqType);

      Here's the data being passed over via TCPMonitor:
      <SOAP-ENV:Envelope xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/" xmlns=" http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
      <impl:getSeriesData xmlns:impl=" http://.../v1">
      <inputParms>
      <StartTime>2008-05-02T22:01:43.999Z</StartTime>
      <EndTime>2008-05-02T22:01:43.999Z</EndTime>
      <Interval>1000</Interval>
      <prnNumber>13</prnNumber>
      <SeriesData>1</SeriesData>
      <SeriesMessage>10</SeriesMessage>
      </inputParms>
      </impl:getSeriesData>
      </SOAP-ENV:Body></SOAP-ENV:Envelope>

      Thanks