HTTP response code: 401 when parsing feature type 
--------------------------------------------------

                 Key: GEOT-2942
                 URL: http://jira.codehaus.org/browse/GEOT-2942
             Project: GeoTools
          Issue Type: Bug
          Components: data wfs
    Affects Versions: 2.6.2, 2.7-M0
         Environment: linux, java 1.6
            Reporter: Lars Aksel Opsahl
         Attachments: wfsAuthPatch


We use WFS against a server that requires basic authentication over https. 
The feature we request is located in separate name space.

We get HTTP code 401 when we resolve this namespace.

To fix this I added a inner class MyAuthenticator and used 
this in line 371  WFSDataStoreFactory. It works but I am not sure 
if this is the correct way of doing it. 

(The changed code is in file wfsAuthPatch)

java.io.IOException: Server returned HTTP response code: 401 for URL:
https://www.test.matrikkel.no:7004/geoserver/wfs?TYPENAME=matrikkel:TEIGWFS&VERSION=1.1.0&SERVICE=WFS&REQUEST=DescribeFeatureType&NAMESPACE=xmlns(matrikkel=http://www.statkart.no/matrikkel)&
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
        at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
        at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createURLInputStream(URIConverterImpl.java:566)
        at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createInputStream(URIConverterImpl.java:453)
        at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:897)
        at org.geotools.xml.Schemas.parse(Schemas.java:256)
        at org.geotools.xml.XSD.buildSchema(XSD.java:250)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to