Click here to Skip to main content
15,899,475 members

Comments by AsthaS (Top 35 by date)

AsthaS 9-Dec-13 3:16am View    
Hi..
Thanks for the reply, But my problem is still there-
I am using the following code :

string xmlString = "<getcapabilities service="\"WCS\"" version="\"1.0.0\"" xmlns="\"http://www.opengis.net/wcs\"/">";

curl_easy_setopt(m_ptrCurlHandle, CURLOPT_URL,"http://172.21.134.150:8080/geoserver/wcs");
curl_easy_setopt(m_ptrCurlHandle, CURLOPT_POST, 1);
curl_easy_setopt(m_ptrCurlHandle, CURLOPT_POSTFIELDS, xmlString.c_str());
curl_easy_setopt(m_ptrCurlHandle, CURLOPT_POSTFIELDSIZE, xmlString.length());
slist = curl_slist_append(NULL, "Content-Type: text/xml; charset=utf-8");
curl_easy_setopt(m_ptrCurlHandle, CURLOPT_HTTPHEADER, slist);
curl_easy_perform(m_ptrCurlHandle);
curl_easy_cleanup(m_ptrCurlHandle);

Where my desired xml post request is
< GetCapabilities service="WCS" version="1.0.0" xmlns="http://www.opengis.net/wcs"/>

But every time is execute the code it gives me -

< ?xml version="1.0" encoding="UTF-8"?>
< ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows http://172.21.134.150:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">
< ows:Exception exceptionCode="NoApplicableCode">
<ows:exceptiontext>org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)
only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)



as the response. I really don't have the clue what am I doing wrong.
Please help.
AsthaS 9-Dec-13 3:10am View    
Deleted
Hi..
Thanks for the reply, But my problem is still there-
I am using the following code :

string xmlString = "<getcapabilities service="\"WCS\"" version="\"1.0.0\"" xmlns="\"http://www.opengis.net/wcs\"/">";

curl_easy_setopt(m_ptrCurlHandle, CURLOPT_URL,"http://172.21.134.150:8080/geoserver/wcs");
curl_easy_setopt(m_ptrCurlHandle, CURLOPT_POST, 1);
curl_easy_setopt(m_ptrCurlHandle, CURLOPT_POSTFIELDS, xmlString.c_str());
curl_easy_setopt(m_ptrCurlHandle, CURLOPT_POSTFIELDSIZE, xmlString.length());
slist = curl_slist_append(NULL, "Content-Type: text/xml; charset=utf-8");
curl_easy_setopt(m_ptrCurlHandle, CURLOPT_HTTPHEADER, slist);
curl_easy_perform(m_ptrCurlHandle);
curl_easy_cleanup(m_ptrCurlHandle);

Where my desired xml post request is <getcapabilities service="WCS" version="1.0.0" xmlns="http://www.opengis.net/wcs">

But every time is execute the code it gives me -


<ows:exceptionreport version="1.0.0"
="" xsi:schemalocation="http://www.opengis.net/ows http://172.21.134.150:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">
<ows:exception exceptioncode="NoApplicableCode">
<ows:exceptiontext>org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)
only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)



as the response. I really don't have the clue what am I doing wrong.
Please help.
AsthaS 6-Dec-13 5:20am View    
Please someone help me out in this.
AsthaS 28-Nov-13 5:49am View    
Ok...Thanks a lot.
AsthaS 28-Nov-13 5:28am View    
Thanks for the reply...I just wanted to know if there is a way by which at the time of parsing of the response file only the comment nodes are ignored altogether. I am not preferring the check for each node option because the response received from the server here is huge, and this will increase the code length. So just wanted to know if there is any other way of achieving this.