RE: [Geoserver-devel] invalid element error

Hi David,
   Thank you so much for the reply.

   I tried hitting that way, and the schema can be located.
   But I still get the same error.
   I copied and pasted the responded xml:

<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance&quot;&gt;
      <soapenv:Body>
         <xs:schema targetNamespace="http://www.openplans.org/topp&quot; xmlns:topp="http://www.openplans.org/topp&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:xs="http://www.w3.org/2001/XMLSchema&quot; elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
            <xs:import namespace="http://www.opengis.net/gml&quot; schemaLocation="http://localhost:7001/geoserver/data/capabilities/gml/2.1.2/feature.xsd&quot;/&gt;
            <xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema&quot; name="bc_roads_Type">
               <xs:complexContent>
                  <xs:extension base="gml:AbstractFeatureType">
                     <xs:sequence>
                        <xs:element name="the_geom" minOccurs="0" nillable="true" type="gml:MultiLineStringPropertyType"/>
                        <xs:element name="LENGTH" minOccurs="0" nillable="true" type="xs:double"/>
                        <xs:element name="BTRN_BC_ID" minOccurs="0" nillable="true" type="xs:int"/>
                     </xs:sequence>
                  </xs:extension>
               </xs:complexContent>
            </xs:complexType>
            <xs:element name='bc_roads' type='topp:bc_roads_Type' substitutionGroup='gml:_Feature'/>
         </xs:schema>
      </soapenv:Body>
   </soapenv:Envelope>

best regards,
Sophie

-----Original Message-----
From: David Zwiers [mailto:dzwiers@anonymised.com]
Sent: Wednesday, July 07, 2004 10:22 AM
To: Sophie Wang
Cc: geoserver-devel@lists.sourceforge.net
Subject: Re: [Geoserver-devel] invalid element error

Hi Sophie,

I think i found a related bug a couple days ago
(http://jira.codehaus.org/browse/GEOS-189). Your parser is really
complaining that it cannot resolve the gml schema location (I think).
Try hitting the url directly inside mozila to ensure the schema location
is valid.

Hope this helps, David

On Wed, 2004-07-07 at 10:11, Sophie Wang wrote:

Hi all,
   Lately I am working on the DescribeFeatureType web service. The
client uses the function WFSBasicDescribeFeatureType.

   I keep getting org.xml.sax.SAXException invalid element, which
complains about "import". "import" is one of the element in the
responded xml:

     <soapenv:Body>
         <xs:schema targetNamespace="http://www.openplans.org/topp&quot;
xmlns:topp="http://www.openplans.org/topp&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xs="http://www.w3.org/2001/XMLSchema&quot;
elementFormDefault="qualified" attributeFormDefault="unqualified"
version="1.0">

            <xs:import namespace="http://www.opengis.net/gml&quot;
schemaLocation="

      ......

   The server runs well. The tcpmon got request and response for
DescribeFeatureType.
   Could anyone throw some light on that?
   I would appreciate it very much.

Best Regards,
Sophie

==========================
Sophie Wang
Software Engineer
Polexis
A SYS Technologies Company
Direct: 858-244-7415
http://www.polexis.com

Hi Sophie,

Got it, you have not defined the 'xs' namespace (you used the xsi prefix
in the declaration, and we used the xs prefix in the response). Try
this: (added another namespace declaration).

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot;
xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;

David

On Wed, 2004-07-07 at 11:00, Sophie Wang wrote:

Hi David,
   Thank you so much for the reply.

   I tried hitting that way, and the schema can be located.
   But I still get the same error.
   I copied and pasted the responded xml:

<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance&quot;&gt;
      <soapenv:Body>
         <xs:schema targetNamespace="http://www.openplans.org/topp&quot; xmlns:topp="http://www.openplans.org/topp&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:xs="http://www.w3.org/2001/XMLSchema&quot; elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
            <xs:import namespace="http://www.opengis.net/gml&quot; schemaLocation="http://localhost:7001/geoserver/data/capabilities/gml/2.1.2/feature.xsd&quot;/&gt;
            <xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema&quot; name="bc_roads_Type">
               <xs:complexContent>
                  <xs:extension base="gml:AbstractFeatureType">
                     <xs:sequence>
                        <xs:element name="the_geom" minOccurs="0" nillable="true" type="gml:MultiLineStringPropertyType"/>
                        <xs:element name="LENGTH" minOccurs="0" nillable="true" type="xs:double"/>
                        <xs:element name="BTRN_BC_ID" minOccurs="0" nillable="true" type="xs:int"/>
                     </xs:sequence>
                  </xs:extension>
               </xs:complexContent>
            </xs:complexType>
            <xs:element name='bc_roads' type='topp:bc_roads_Type' substitutionGroup='gml:_Feature'/>
         </xs:schema>
      </soapenv:Body>
   </soapenv:Envelope>

best regards,
Sophie

-----Original Message-----
From: David Zwiers [mailto:dzwiers@anonymised.com]
Sent: Wednesday, July 07, 2004 10:22 AM
To: Sophie Wang
Cc: geoserver-devel@lists.sourceforge.net
Subject: Re: [Geoserver-devel] invalid element error

Hi Sophie,

I think i found a related bug a couple days ago
(http://jira.codehaus.org/browse/GEOS-189). Your parser is really
complaining that it cannot resolve the gml schema location (I think).
Try hitting the url directly inside mozila to ensure the schema location
is valid.

Hope this helps, David

On Wed, 2004-07-07 at 10:11, Sophie Wang wrote:
> Hi all,
> Lately I am working on the DescribeFeatureType web service. The
> client uses the function WFSBasicDescribeFeatureType.
>
> I keep getting org.xml.sax.SAXException invalid element, which
> complains about "import". "import" is one of the element in the
> responded xml:
>
> <soapenv:Body>
> <xs:schema targetNamespace="http://www.openplans.org/topp&quot;
> xmlns:topp="http://www.openplans.org/topp&quot;
> xmlns:gml="http://www.opengis.net/gml&quot;
> xmlns:xs="http://www.w3.org/2001/XMLSchema&quot;
> elementFormDefault="qualified" attributeFormDefault="unqualified"
> version="1.0">
>
> <xs:import namespace="http://www.opengis.net/gml&quot;
> schemaLocation="
>
> ......
>
> The server runs well. The tcpmon got request and response for
> DescribeFeatureType.
> Could anyone throw some light on that?
> I would appreciate it very much.
>
> Best Regards,
> Sophie
>
> ==========================
> Sophie Wang
> Software Engineer
> Polexis
> A SYS Technologies Company
> Direct: 858-244-7415
> http://www.polexis.com
>
>