[Mono-bugs] [Bug 670945] XML Serialization output differs from Microsoft .NET Runtime (or CLR)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 9 02:25:31 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=670945

https://bugzilla.novell.com/show_bug.cgi?id=670945#c2


Atsushi Enomoto <aenomoto at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|Major                       |Normal

--- Comment #2 from Atsushi Enomoto <aenomoto at novell.com> 2011-05-09 06:25:29 UTC ---
Our WsdlImporter cannot generate valid client proxy and it is not practical
without fixing this issue. So first I'm going to fix it.

So far I got simple repro for the importer issue:

---- 670945.cs ----
using System;
using System.Collections;
using System.IO;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Xml;
using System.Xml.Schema;

using WSServiceDescription =
System.Web.Services.Description.ServiceDescription;

public class Imp
{
    public static void Main (string [] args)
    {
        var mset = new MetadataSet ();
        WSServiceDescription sd = null;
        sd = WSServiceDescription.Read (XmlReader.Create ("670945.wsdl"));
        mset.MetadataSections.Add (new MetadataSection () {
            Dialect = MetadataSection.ServiceDescriptionDialect,
            Metadata = sd });
        var imp = new WsdlImporter (mset);
        var sec = imp.ImportAllContracts ();
    }
}


---- 670945.wsdl ----
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
targetNamespace="http://www.onvif.org/ver10/device/wsdl">
  <wsdl:types>

    <xs:schema
    targetNamespace="http://www.onvif.org/ver10/schema"
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tt="http://www.onvif.org/ver10/schema">

      <xs:complexType name="SystemDateTime">
        <xs:sequence>
          <xs:element name="foobar" type="xs:string" minOccurs="0" />
          <xs:element name="Extension" type="tt:SystemDateTimeExtension"
minOccurs="0"/>
        </xs:sequence>
        <!-- xs:anyAttribute processContents="lax"/ -->
      </xs:complexType>

      <xs:complexType name="SystemDateTimeExtension">
        <xs:sequence>
          <xs:any namespace="##any" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>

    </xs:schema>

    <xs:schema targetNamespace="http://www.onvif.org/ver10/device/wsdl"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
elementFormDefault="qualified">
      <xs:element name="GetSystemDateAndTime">
        <xs:complexType>
          <xs:sequence/>

        </xs:complexType>
      </xs:element>
      <xs:element name="GetSystemDateAndTimeResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SystemDateAndTime" type="tt:SystemDateTime">
              <xs:annotation>
                <xs:documentation>Contains information whether system date and
time are set manually or by NTP, daylight savings is on or off, time zone in
POSIX 1003.1 format and system date and time in UTC and also local system date
and time.</xs:documentation>

              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="GetSystemDateAndTimeRequest">
    <wsdl:part name="parameters" element="tds:GetSystemDateAndTime"/>
  </wsdl:message>
  <wsdl:message name="GetSystemDateAndTimeResponse">
    <wsdl:part name="parameters" element="tds:GetSystemDateAndTimeResponse"/>
  </wsdl:message>
  <wsdl:portType name="Device">
    <wsdl:operation name="GetSystemDateAndTime">
      <wsdl:documentation>This operation gets the device system date and time.
The device shall support the return of
        the daylight saving setting and of the manual system date and time (if
applicable) or indication
        of NTP time (if applicable) through the GetSystemDateAndTime
command.<br/>
        A device shall provide the UTCDateTime
information.</wsdl:documentation>
      <wsdl:input message="tds:GetSystemDateAndTimeRequest"/>
      <wsdl:output message="tds:GetSystemDateAndTimeResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="DeviceBinding" type="tds:Device">
    <wsdl:operation name="GetSystemDateAndTime">

      <soap:operation
soapAction="http://www.onvif.org/ver10/device/wsdl/GetSystemDateAndTime"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
</wsdl:definitions>

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list