Opened 16 years ago

Closed 16 years ago

#2421 closed defect (invalid)

WMS : invalid xml when contact info metadata are missing

Reported by: assefa Owned by: mapserverbugs
Priority: normal Milestone: 5.2 release
Component: WMS Server Version: svn-trunk (development)
Severity: normal Keywords: wms contactinfo
Cc: tomkralidis

Description

Tom,

If there is no metadata related to contact information, we end up with an invalid XML (according to xmlspy) : <ContactInformation></ContactInformation> Is this a bug? Note that there was a ticket related to the contact info(#2270).

Change History (4)

comment:1 by assefa, 16 years ago

oops I meant bug #2070

comment:2 by tomkralidis, 16 years ago

Assefa: against trunk, if I invoke a WMS 1.1.1 or 1.1.0 or 1.0.0 GetCapabilities / capabilities request, I get an empty ContactInformation element. However XMLSpy 2008 says it's valid in all cases.

Do you have a testcase or mapfile snippet?

comment:3 by assefa, 16 years ago

I am also so svn trunk:

map file is web element contains:

METADATA

"WMS_TITLE" "multi style test" "WMS_ONLINERESOURCE" "http://127.0.0.1/cgi-bin/mapserv.exe?map=f:/msapps/landgate/test.map&" "WMS_SRS" "EPSG:4326" "OWS_SCHEMAS_LOCATION" "http://ogc.dmsolutions.ca" "WMS_ACCESSCONTRAINTS" "none" "WMS_FEES" "none"

# # "ows_contactperson" "ttt" # "ows_contactorganization" "ttt"

END

I get as xml output :

<Service>

<Name>OGC:WMS</Name> <Title>multi style test</Title> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://127.0.0.1/cgi-bin/mapserv.exe?map=f:/msapps/landgate/test.map&amp;"/> <ContactInformation> </ContactInformation> <Fees>none</Fees>

</Service>

I am using xml spy 2004. Maybe it is just my version. If <ContactInformation></ContactInformation> is valid, please close the bug. Soorr for the noise.

comment:4 by tomkralidis, 16 years ago

Resolution: invalid
Status: newclosed

Closing. Here's what I get:

<Service>
  <Name>OGC:WMS</Name>
  <Title>foo</Title>
  <Abstract>foo</Abstract>
        <KeywordList>
          <Keyword>foo1</Keyword>
          <Keyword>foo1</Keyword>
        </KeywordList>
  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://example.org/"/>
  <ContactInformation>
  </ContactInformation>
  <Fees>none</Fees>
  <AccessConstraints>none</AccessConstraints>
</Service>

..with no complaint from XMLSpy 2008. FYI the DTD which is applied to the document is: http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd, which defines ContactInformation as:

<!-- Information about a contact person for the service. -->
<!ELEMENT ContactInformation  (ContactPersonPrimary?, ContactPosition?,
                               ContactAddress?, ContactVoiceTelephone?,
                               ContactFacsimileTelephone?,
                               ContactElectronicMailAddress?) >

So you can see all direct child elements are optional.

Note: See TracTickets for help on using tickets.