Hi,
I'm trying to write a service but there seems to be something not working with my set up. I've generated the .Net serialization classes from my xsd using xsd.exe, so far so good. When I query my webservice for the WSDL (http://services_test.portlandpress.c...rvice.svc?wsdl) and XSD (http://services_test.portlandpress.c...e.svc?xsd=xsd1) the returned XSD shows my attributes as elements instead of an attributes.
Here is the relevant snippet from the initial XSD -
Here is the same snippet after the call to http://services_test.portlandpress.c...e.svc?xsd=xsd1Code:... <xs:complexType name="ReportRequest"> <xs:annotation> <xs:documentation/> </xs:annotation> <xs:sequence> <xs:element type="s:Requestor" name="Requestor"> <xs:annotation> <xs:documentation>Consumer of the service (client).</xs:documentation> </xs:annotation> </xs:element> <xs:element type="s:CustomerReference" name="CustomerReference"> <xs:annotation> <xs:documentation>Identity of the customer for which data is requested</xs:documentation> </xs:annotation> </xs:element> <xs:element type="s:ReportDefinition" name="ReportDefinition"> <xs:annotation> <xs:documentation>Report paramters including report name, version and filters (e.g. date ranges)</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> <xs:attribute type="xs:dateTime" name="Created"> <xs:annotation> <xs:documentation>Date/time the request was created</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute type="xs:string" name="ID"> <xs:annotation> <xs:documentation>Identifier may be provided by client application for internal use/diagnostics.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> ...
Any help will be greatly appreciated.Code:... <xs:complexType name="ReportRequest"> <xs:sequence> <xs:element name="createdField" type="xs:dateTime"/> <xs:element name="createdFieldSpecified" type="xs:boolean"/> <xs:element name="customerReferenceField" type="tns:CustomerReference" nillable="true"/> <xs:element name="idField" type="xs:string" nillable="true"/> <xs:element name="reportDefinitionField" type="tns:ReportDefinition" nillable="true"/> <xs:element name="requestorField" type="tns:Requestor" nillable="true"/> </xs:sequence> </xs:complexType> ...
Cheers Al


Reply With Quote
