[Geoserver-users] Outdated instructions for creating customised output format

I have noticed that the instructions for creating one's own output format as
provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Format are
quite outdated, as they are for Geoserver v1.5. I also understand that in
the new release of Geoserver, i.e. 1.6, its the WFSGetFeatureOutputFormat
class that needs to be extended in order to add a new output format. I need
to this to add CSML as one of the output formats of Geoserver. So, I would
greatly appreciate if someone could provide some updated instructions for
this please?

Regards
Arif
--
View this message in context: http://www.nabble.com/Outdated-instructions-for-creating-customised-output-format-tp14762211p14762211.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Arif,

You are correct indeed. And there is a documentation task for the 1.6.0
release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output format as
provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Format are
quite outdated, as they are for Geoserver v1.5. I also understand that in
the new release of Geoserver, i.e. 1.6, its the WFSGetFeatureOutputFormat
class that needs to be extended in order to add a new output format. I need
to this to add CSML as one of the output formats of Geoserver. So, I would
greatly appreciate if someone could provide some updated instructions for
this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Thanks Justin. Any idea when this documentation task will be completed?
I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the 1.6.0
release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output
format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Format

are quite outdated, as they are for Geoserver v1.5. I also understand

that in the new release of Geoserver, i.e. 1.6, its the
WFSGetFeatureOutputFormat class that needs to be extended in order to
add a new output format. I need to this to add CSML as one of the
output formats of Geoserver. So, I would greatly appreciate if someone

could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Arif,

Probably not for a few weeks. But we would be happy to help you directly
in the interim. So this is a WFS output format for GetFeature I assume?
I am not familiar with the CSML output format but something like the
following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format. Something
like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it into
the WEB-INF/lib directory of your geoserver installation. Then if you
make a getfeature request with "OUTPUTFORMAT=CSML" it should engage.

Hope that helps. Please if anything trips you up or you have any more
questions just ask. Also please feel free to hope on the geoserver irc
channel (freenode#geoserver) and ping one of us. We would be happy to
help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be completed?
I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the 1.6.0
release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output
format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Format

are quite outdated, as they are for Geoserver v1.5. I also understand

that in the new release of Geoserver, i.e. 1.6, its the
WFSGetFeatureOutputFormat class that needs to be extended in order to
add a new output format. I need to this to add CSML as one of the
output formats of Geoserver. So, I would greatly appreciate if someone

could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

!DSPAM:4007,4787b375301641015089218!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Thanks Justin. Its very helpful. I will let you know how I get on. A
quick question and probably a stupid one..but where do I place the
schema (.xsd) file for CSML in the project path? Can geoserver handle
imported schemas within the main schema file?

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:49
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Probably not for a few weeks. But we would be happy to help you directly
in the interim. So this is a WFS output format for GetFeature I assume?
I am not familiar with the CSML output format but something like the
following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format. Something
like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it into
the WEB-INF/lib directory of your geoserver installation. Then if you
make a getfeature request with "OUTPUTFORMAT=CSML" it should engage.

Hope that helps. Please if anything trips you up or you have any more
questions just ask. Also please feel free to hope on the geoserver irc
channel (freenode#geoserver) and ping one of us. We would be happy to
help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be

completed?

I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the
1.6.0 release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output
format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Forma
t

are quite outdated, as they are for Geoserver v1.5. I also
understand

that in the new release of Geoserver, i.e. 1.6, its the
WFSGetFeatureOutputFormat class that needs to be extended in order to

add a new output format. I need to this to add CSML as one of the
output formats of Geoserver. So, I would greatly appreciate if
someone

could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

!DSPAM:4007,4787b375301641015089218!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Good question. I suppose you just want a place to serve up the schemas
from geoserver. Currently there is not a facility to have geoserver
serve up schemas provided via a plugin, you have to copy them into the
"schemas" directory manually. The schemas directory can be found under
the root of a geoserver installation.

Also... i looked into CSML and unless i am mistaken it is a complex gml
schemas. Unfortunately there is not support for complex features in
geoserver trunk today. So you will be stuck doing all the gml output
from your plugin. Just wanted to make sure that was clear since that is
no small task.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Its very helpful. I will let you know how I get on. A
quick question and probably a stupid one..but where do I place the
schema (.xsd) file for CSML in the project path? Can geoserver handle
imported schemas within the main schema file?

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:49
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Probably not for a few weeks. But we would be happy to help you directly
in the interim. So this is a WFS output format for GetFeature I assume?
I am not familiar with the CSML output format but something like the
following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format. Something
like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it into
the WEB-INF/lib directory of your geoserver installation. Then if you
make a getfeature request with "OUTPUTFORMAT=CSML" it should engage.

Hope that helps. Please if anything trips you up or you have any more
questions just ask. Also please feel free to hope on the geoserver irc
channel (freenode#geoserver) and ping one of us. We would be happy to
help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be

completed?

I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the
1.6.0 release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output
format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Forma
t
are quite outdated, as they are for Geoserver v1.5. I also
understand
that in the new release of Geoserver, i.e. 1.6, its the
WFSGetFeatureOutputFormat class that needs to be extended in order to

add a new output format. I need to this to add CSML as one of the
output formats of Geoserver. So, I would greatly appreciate if
someone
could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,4787c210326902143011171!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justin,

I have created some Java classes and encapsulated them in a jar as you
suggested. I have placed the jar file in WEB-INF/lib folder and the CSML
schemas in {GEOSERVER_HOME}\webapps\geoserver\schemas\csml folder. But
when trying to test, I get the following error:

<?xml version="1.0" ?>
- <ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
  <ServiceException>java.lang.RuntimeException: No response: ( object =
class net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat =
CSML ) java.lang.RuntimeException: No response: ( object = class
net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat = CSML
)</ServiceException>
  </ServiceExceptionReport>
The jar file does not have a pom.xml. And should I have included the
applicationContext.xml file in the jar as well?

Please help.

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: 11 January 2008 19:40
To: Shaon, ABS (Arif)
Cc: =?ISO-8859-1?Q?Gabriel_Rold=E1?=@anonymised.com;
geoserver-users@lists.sourceforge.net; n
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Good question. I suppose you just want a place to serve up the schemas
from geoserver. Currently there is not a facility to have geoserver
serve up schemas provided via a plugin, you have to copy them into the
"schemas" directory manually. The schemas directory can be found under
the root of a geoserver installation.

Also... i looked into CSML and unless i am mistaken it is a complex gml
schemas. Unfortunately there is not support for complex features in
geoserver trunk today. So you will be stuck doing all the gml output
from your plugin. Just wanted to make sure that was clear since that is
no small task.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Its very helpful. I will let you know how I get on. A
quick question and probably a stupid one..but where do I place the
schema (.xsd) file for CSML in the project path? Can geoserver handle
imported schemas within the main schema file?

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:49
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Probably not for a few weeks. But we would be happy to help you
directly in the interim. So this is a WFS output format for GetFeature

I assume?

I am not familiar with the CSML output format but something like the
following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format.
Something like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it into

the WEB-INF/lib directory of your geoserver installation. Then if you
make a getfeature request with "OUTPUTFORMAT=CSML" it should engage.

Hope that helps. Please if anything trips you up or you have any more
questions just ask. Also please feel free to hope on the geoserver irc

channel (freenode#geoserver) and ping one of us. We would be happy to
help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be

completed?

I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the
1.6.0 release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output
format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Form
a
t
are quite outdated, as they are for Geoserver v1.5. I also
understand that in the new release of Geoserver, i.e. 1.6, its the
WFSGetFeatureOutputFormat class that needs to be extended in order
to

add a new output format. I need to this to add CSML as one of the
output formats of Geoserver. So, I would greatly appreciate if
someone could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

----------------------------------------------------------------------
--- Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marke
tplace _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,4787c210326902143011171!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

------------------------------------------------------------------------
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything Open
Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp
lace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Arif,

Including the applicationContext.xml is necessary yes... without it
GeoServer will not load your output format plug-in. The pom.xml file is
optional, you can include it if you wish but do not need to.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justin,

I have created some Java classes and encapsulated them in a jar as you
suggested. I have placed the jar file in WEB-INF/lib folder and the CSML
schemas in {GEOSERVER_HOME}\webapps\geoserver\schemas\csml folder. But
when trying to test, I get the following error:

<?xml version="1.0" ?>
- <ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
  <ServiceException>java.lang.RuntimeException: No response: ( object =
class net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat =
CSML ) java.lang.RuntimeException: No response: ( object = class
net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat = CSML
)</ServiceException>
  </ServiceExceptionReport>
The jar file does not have a pom.xml. And should I have included the
applicationContext.xml file in the jar as well?

Please help.

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: 11 January 2008 19:40
To: Shaon, ABS (Arif)
Cc: =?ISO-8859-1?Q?Gabriel_Rold=E1?=@sc8-sf-spam2-b.sourceforge.net;
geoserver-users@lists.sourceforge.net; n
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Good question. I suppose you just want a place to serve up the schemas
from geoserver. Currently there is not a facility to have geoserver
serve up schemas provided via a plugin, you have to copy them into the
"schemas" directory manually. The schemas directory can be found under
the root of a geoserver installation.

Also... i looked into CSML and unless i am mistaken it is a complex gml
schemas. Unfortunately there is not support for complex features in
geoserver trunk today. So you will be stuck doing all the gml output
from your plugin. Just wanted to make sure that was clear since that is
no small task.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Its very helpful. I will let you know how I get on. A
quick question and probably a stupid one..but where do I place the
schema (.xsd) file for CSML in the project path? Can geoserver handle
imported schemas within the main schema file?

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:49
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Probably not for a few weeks. But we would be happy to help you
directly in the interim. So this is a WFS output format for GetFeature

I assume?

I am not familiar with the CSML output format but something like the
following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format.
Something like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it into

the WEB-INF/lib directory of your geoserver installation. Then if you
make a getfeature request with "OUTPUTFORMAT=CSML" it should engage.

Hope that helps. Please if anything trips you up or you have any more
questions just ask. Also please feel free to hope on the geoserver irc

channel (freenode#geoserver) and ping one of us. We would be happy to
help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be

completed?

I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the
1.6.0 release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output
format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Form
a
t
are quite outdated, as they are for Geoserver v1.5. I also
understand that in the new release of Geoserver, i.e. 1.6, its the
WFSGetFeatureOutputFormat class that needs to be extended in order
to
add a new output format. I need to this to add CSML as one of the
output formats of Geoserver. So, I would greatly appreciate if
someone could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

----------------------------------------------------------------------
--- Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marke
tplace _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

------------------------------------------------------------------------
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything Open
Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp
lace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,478cc86d182061804284693!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justine
I have tried with the applicationContext.xml included in the jar file. During my first attempt, geoserver threw some errors due to a namespace conflict in the one of my classes. So I fixed it and now geoserver starts fine but I still get the same error as before, i.e. CSML is not being recognised as an output format by Geoserver. I have attached my applicationContext.xml:
Any sugggestion?

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net [mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Justin Deoliveira
Sent: 15 January 2008 17:27
To: Shaon, ABS (Arif)
Cc: "Gabriel Roldá"@sc8-sf-spam2-b.sourceforge.net; n; geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating customised output format

Hi Arif,

Including the applicationContext.xml is necessary yes... without it GeoServer will not load your output format plug-in. The pom.xml file is optional, you can include it if you wish but do not need to.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justin,

I have created some Java classes and encapsulated them in a jar as you
suggested. I have placed the jar file in WEB-INF/lib folder and the
CSML schemas in {GEOSERVER_HOME}\webapps\geoserver\schemas\csml
folder. But when trying to test, I get the following error:

<?xml version="1.0" ?>
- <ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
  <ServiceException>java.lang.RuntimeException: No response: ( object
= class net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat =
CSML ) java.lang.RuntimeException: No response: ( object = class
net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat = CSML
)</ServiceException>
  </ServiceExceptionReport>
The jar file does not have a pom.xml. And should I have included the
applicationContext.xml file in the jar as well?

Please help.

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: 11 January 2008 19:40
To: Shaon, ABS (Arif)
Cc: =?ISO-8859-1?Q?Gabriel_Rold=E1?=@anonymised.com;
geoserver-users@lists.sourceforge.net; n
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Good question. I suppose you just want a place to serve up the schemas
from geoserver. Currently there is not a facility to have geoserver
serve up schemas provided via a plugin, you have to copy them into the
"schemas" directory manually. The schemas directory can be found under
the root of a geoserver installation.

Also... i looked into CSML and unless i am mistaken it is a complex
gml schemas. Unfortunately there is not support for complex features
in geoserver trunk today. So you will be stuck doing all the gml
output from your plugin. Just wanted to make sure that was clear since
that is no small task.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Its very helpful. I will let you know how I get on. A
quick question and probably a stupid one..but where do I place the
schema (.xsd) file for CSML in the project path? Can geoserver handle
imported schemas within the main schema file?

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:49
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Probably not for a few weeks. But we would be happy to help you
directly in the interim. So this is a WFS output format for
GetFeature

I assume?

I am not familiar with the CSML output format but something like the
following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format.
Something like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it
into

the WEB-INF/lib directory of your geoserver installation. Then if you
make a getfeature request with "OUTPUTFORMAT=CSML" it should engage.

Hope that helps. Please if anything trips you up or you have any more
questions just ask. Also please feel free to hope on the geoserver
irc

channel (freenode#geoserver) and ping one of us. We would be happy to
help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be

completed?

I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the
1.6.0 release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output
format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+For
m
a
t
are quite outdated, as they are for Geoserver v1.5. I also
understand that in the new release of Geoserver, i.e. 1.6, its the
WFSGetFeatureOutputFormat class that needs to be extended in order
to add a new output format. I need to this to add CSML as one of
the output formats of Geoserver. So, I would greatly appreciate if
someone could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

---------------------------------------------------------------------
-
--- Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/mark
e tplace _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

----------------------------------------------------------------------
--
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marke
tp
lace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,478cc86d182061804284693!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

applicationContext.xml (916 Bytes)

Hi Arif,

At first glance I dont see anything wrong. I have never tried an inner
class bean definition like this before but I think it should work. Would
you be able to send the rest of yoru code over. I would be easier if i
could debug it over here.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justine
I have tried with the applicationContext.xml included in the jar file. During my first attempt, geoserver threw some errors due to a namespace conflict in the one of my classes. So I fixed it and now geoserver starts fine but I still get the same error as before, i.e. CSML is not being recognised as an output format by Geoserver. I have attached my applicationContext.xml:
Any sugggestion?

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net [mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Justin Deoliveira
Sent: 15 January 2008 17:27
To: Shaon, ABS (Arif)
Cc: "Gabriel Roldá"@sc8-sf-spam2-b.sourceforge.net; n; geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating customised output format

Hi Arif,

Including the applicationContext.xml is necessary yes... without it GeoServer will not load your output format plug-in. The pom.xml file is optional, you can include it if you wish but do not need to.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justin,

I have created some Java classes and encapsulated them in a jar as you
suggested. I have placed the jar file in WEB-INF/lib folder and the
CSML schemas in {GEOSERVER_HOME}\webapps\geoserver\schemas\csml
folder. But when trying to test, I get the following error:

<?xml version="1.0" ?>
- <ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
  <ServiceException>java.lang.RuntimeException: No response: ( object
= class net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat =
CSML ) java.lang.RuntimeException: No response: ( object = class
net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat = CSML
)</ServiceException>
  </ServiceExceptionReport>
The jar file does not have a pom.xml. And should I have included the
applicationContext.xml file in the jar as well?

Please help.

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: 11 January 2008 19:40
To: Shaon, ABS (Arif)
Cc: =?ISO-8859-1?Q?Gabriel_Rold=E1?=@sc8-sf-spam2-b.sourceforge.net;
geoserver-users@lists.sourceforge.net; n
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Good question. I suppose you just want a place to serve up the schemas
from geoserver. Currently there is not a facility to have geoserver
serve up schemas provided via a plugin, you have to copy them into the
"schemas" directory manually. The schemas directory can be found under
the root of a geoserver installation.

Also... i looked into CSML and unless i am mistaken it is a complex
gml schemas. Unfortunately there is not support for complex features
in geoserver trunk today. So you will be stuck doing all the gml
output from your plugin. Just wanted to make sure that was clear since
that is no small task.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Its very helpful. I will let you know how I get on. A
quick question and probably a stupid one..but where do I place the
schema (.xsd) file for CSML in the project path? Can geoserver handle
imported schemas within the main schema file?

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:49
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Probably not for a few weeks. But we would be happy to help you
directly in the interim. So this is a WFS output format for
GetFeature

I assume?

I am not familiar with the CSML output format but something like the
following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format.
Something like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it
into
the WEB-INF/lib directory of your geoserver installation. Then if you
make a getfeature request with "OUTPUTFORMAT=CSML" it should engage.

Hope that helps. Please if anything trips you up or you have any more
questions just ask. Also please feel free to hope on the geoserver
irc
channel (freenode#geoserver) and ping one of us. We would be happy to
help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be

completed?

I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the
1.6.0 release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but htis
includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own output
format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+For
m
a
t
are quite outdated, as they are for Geoserver v1.5. I also
understand that in the new release of Geoserver, i.e. 1.6, its the
WFSGetFeatureOutputFormat class that needs to be extended in order
to add a new output format. I need to this to add CSML as one of
the output formats of Geoserver. So, I would greatly appreciate if
someone could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

---------------------------------------------------------------------
-
--- Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/mark
e tplace _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

----------------------------------------------------------------------
--
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marke
tp
lace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,478cf54c271241015089218!

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,478cf54c271241015089218!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,478cf54c271241015089218!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

An inner class bean definition will probably have problems if the inner class
is not static, since instances of the inner class will need to exist as
children of some instance of the containing class. I think the reflection
API treats such classes as having an extra argument to the constructor (ie,
the first argument is an instance of the containing class) so perhaps you
could get it to work by adding in a declaration of that class:

<bean id="csmlSchemaBuilder"
class="org.geoserver.midas.output.csml.CSMLFeatureTypeSchemaBuilder$CSML">
<!-- add this --> <constructor-arg
class="org.geoserver.midas.output.csml.CSMLFeatureTypeSchemaBuilder"/>
<constructor-arg ref="wfs"> <!-- and so on -->

-David

On Tuesday 15 January 2008 13:30:15 Justin Deoliveira wrote:

Hi Arif,

At first glance I dont see anything wrong. I have never tried an inner
class bean definition like this before but I think it should work. Would
you be able to send the rest of yoru code over. I would be easier if i
could debug it over here.

-Justin

Shaon, ABS (Arif) wrote:
> Hi Justine
> I have tried with the applicationContext.xml included in the jar file.
> During my first attempt, geoserver threw some errors due to a namespace
> conflict in the one of my classes. So I fixed it and now geoserver starts
> fine but I still get the same error as before, i.e. CSML is not being
> recognised as an output format by Geoserver. I have attached my
> applicationContext.xml: Any sugggestion?
>
> Thanks
> Arif
>
> -----Original Message-----
> From: geoserver-users-bounces@lists.sourceforge.net
> [mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
> Justin Deoliveira Sent: 15 January 2008 17:27
> To: Shaon, ABS (Arif)
> Cc: "Gabriel Roldá"@sc8-sf-spam2-b.sourceforge.net; n;
> geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users]
> Outdated instructions for creating customised output format
>
> Hi Arif,
>
> Including the applicationContext.xml is necessary yes... without it
> GeoServer will not load your output format plug-in. The pom.xml file is
> optional, you can include it if you wish but do not need to.
>
> -Justin
>
> Shaon, ABS (Arif) wrote:
>> Hi Justin,
>>
>> I have created some Java classes and encapsulated them in a jar as you
>> suggested. I have placed the jar file in WEB-INF/lib folder and the
>> CSML schemas in {GEOSERVER_HOME}\webapps\geoserver\schemas\csml
>> folder. But when trying to test, I get the following error:
>>
>> <?xml version="1.0" ?>
>> - <ServiceExceptionReport version="1.2.0"
>> xmlns="http://www.opengis.net/ogc&quot;
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
>> xsi:schemaLocation="http://www.opengis.net/ogc
>> http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
>> <ServiceException>java.lang.RuntimeException: No response: ( object
>> = class net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat =
>> CSML ) java.lang.RuntimeException: No response: ( object = class
>> net.opengis.wfs.impl.FeatureCollectionTypeImpl, outputFormat = CSML
>> )</ServiceException>
>> </ServiceExceptionReport>
>> The jar file does not have a pom.xml. And should I have included the
>> applicationContext.xml file in the jar as well?
>>
>> Please help.
>>
>> Thanks
>> Arif
>>
>> -----Original Message-----
>> From: geoserver-users-bounces@lists.sourceforge.net
>> [mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
>> Justin Deoliveira
>> Sent: 11 January 2008 19:40
>> To: Shaon, ABS (Arif)
>> Cc: =?ISO-8859-1?Q?Gabriel_Rold=E1?=@anonymised.comnet;
>> geoserver-users@lists.sourceforge.net; n
>> Subject: Re: [Geoserver-users] Outdated instructions for creating
>> customised output format
>>
>> Good question. I suppose you just want a place to serve up the schemas
>> from geoserver. Currently there is not a facility to have geoserver
>> serve up schemas provided via a plugin, you have to copy them into the
>> "schemas" directory manually. The schemas directory can be found under
>> the root of a geoserver installation.
>>
>> Also... i looked into CSML and unless i am mistaken it is a complex
>> gml schemas. Unfortunately there is not support for complex features
>> in geoserver trunk today. So you will be stuck doing all the gml
>> output from your plugin. Just wanted to make sure that was clear since
>> that is no small task.
>>
>> -Justin
>>
>> Shaon, ABS (Arif) wrote:
>>> Thanks Justin. Its very helpful. I will let you know how I get on. A
>>> quick question and probably a stupid one..but where do I place the
>>> schema (.xsd) file for CSML in the project path? Can geoserver handle
>>> imported schemas within the main schema file?
>>>
>>> Cheers
>>> Arif
>>>
>>> -----Original Message-----
>>> From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
>>> Sent: 11 January 2008 18:49
>>> To: Shaon, ABS (Arif)
>>> Cc: geoserver-users@lists.sourceforge.net
>>> Subject: Re: [Geoserver-users] Outdated instructions for creating
>>> customised output format
>>>
>>> Hi Arif,
>>>
>>> Probably not for a few weeks. But we would be happy to help you
>>> directly in the interim. So this is a WFS output format for
>>> GetFeature
>>
>> I assume?
>>
>>> I am not familiar with the CSML output format but something like the
>>> following should do:
>>>
>>> class CSMLOutputFormat extends WFSGetFeatureOutputFormat {
>>>
>>>
>>> CSMLOutputFormat() {
>>> super( "CSML" );
>>> }
>>>
>>> String getMimeType(Object value, Operation operation) {
>>> return "..."; //whatever the mime type is
>>> }
>>>
>>> protected void write(FeatureCollectionType results, OutputStream
>>> output, Operation getFeature)
>>> throws ServiceException, IOException {
>>>
>>> //do the output
>>> }
>>> }
>>>
>>> That is the first step. The second step is creating an
>>> applicationContext.xml file which registers the output format.
>>> Something like this:
>>>
>>> <beans>
>>> <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
>>> </beans>
>>>
>>> I recommend structuring your project something like this:
>>>
>>> csml/
>>> pom.xml
>>> src/main/java/
>>> org/xyx/CSMLOutputFormat.java
>>> applicationContext.xml
>>>
>>> After that you can just create a jar for your project and drop it
>>> into
>>> the WEB-INF/lib directory of your geoserver installation. Then if you
>>> make a getfeature request with "OUTPUTFORMAT=CSML" it should engage.
>>>
>>> Hope that helps. Please if anything trips you up or you have any more
>>> questions just ask. Also please feel free to hope on the geoserver
>>> irc
>>> channel (freenode#geoserver) and ping one of us. We would be happy to
>>> help you "hands-on" there.
>>>
>>> -Justin
>>>
>>> Shaon, ABS (Arif) wrote:
>>>> Thanks Justin. Any idea when this documentation task will be
>>>
>>> completed?
>>>
>>>> I need some assistance in this regard fairly soon. At minimum, if
>>>> someone could point me to the classes that need to be modified or
>>>> extended that would be greatly helpful.
>>>>
>>>> Cheers
>>>> Arif
>>>>
>>>> -----Original Message-----
>>>> From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
>>>> Sent: 11 January 2008 18:17
>>>> To: Shaon, ABS (Arif)
>>>> Cc: geoserver-users@lists.sourceforge.net
>>>> Subject: Re: [Geoserver-users] Outdated instructions for creating
>>>> customised output format
>>>>
>>>> Hi Arif,
>>>>
>>>> You are correct indeed. And there is a documentation task for the
>>>> 1.6.0 release to document this properly. It is here:
>>>>
>>>> http://jira.codehaus.org/browse/GEOS-1608
>>>>
>>>> Although somewhat misleading as it specifies refactoring... but htis
>>>> includes documentation.
>>>>
>>>> -Justin
>>>>
>>>> Arif Shaon wrote:
>>>>> I have noticed that the instructions for creating one's own output
>>>>> format as provided at
>>>>> http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+For
>>>>> m
>>>>> a
>>>>> t
>>>>> are quite outdated, as they are for Geoserver v1.5. I also
>>>>> understand that in the new release of Geoserver, i.e. 1.6, its the
>>>>> WFSGetFeatureOutputFormat class that needs to be extended in order
>>>>> to add a new output format. I need to this to add CSML as one of
>>>>> the output formats of Geoserver. So, I would greatly appreciate if
>>>>> someone could provide some updated instructions for this please?
>>>>>
>>>>> Regards
>>>>> Arif
>>>>
>>>> --
>>>> Justin Deoliveira
>>>> The Open Planning Project
>>>> http://topp.openplans.org
>>>
>>> --
>>> Justin Deoliveira
>>> The Open Planning Project
>>> http://topp.openplans.org
>>>
>>> ---------------------------------------------------------------------
>>> -
>>> --- Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for just about anything
>>> Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/mark
>>> e tplace _______________________________________________
>>> Geoserver-users mailing list
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>> --
>> Justin Deoliveira
>> The Open Planning Project
>> http://topp.openplans.org
>>
>> ----------------------------------------------------------------------
>> --
>> -
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for just about anything
>> Open Source.
>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marke
>> tp
>> lace
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>> ----------------------------------------------------------------------
>> --- This SF.net email is sponsored by: Microsoft Defy all challenges.
>> Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> --
> Justin Deoliveira
> The Open Planning Project
> http://topp.openplans.org
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft Defy all challenges.
> Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
> !DSPAM:4007,478cf54c271241015089218!
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> !DSPAM:4007,478cf54c271241015089218!

Thanks very much Justin. Much appreciated. I will let u know it goes.
Thanks again.
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 15 January 2008 20:05
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating customised output format

Hi Arif,

I am send you back a zip file with some changes in it. I changed the applicationContext.xml file a bit, the bean declaration of the output format was a bit off with the parameter order and references.

I also restructured the code a bit to follow maven conventions so that you can compile it with maven. After compiling with maven you should be able to copy over target/csml-1.0-SNAPSHOT.jar and run your output format. I verified with a simple request (outputformat=csml) that indeed the output format is engaging.

If you have any more problems getting this setup on yoru end or any questions about what i did please keep on asking.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justin,

Thanks for ur reply. Please find attached a zip file containing my csml classes. I really appreciate ur help on this.

Thanks again.
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 15 January 2008 18:30
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

At first glance I dont see anything wrong. I have never tried an inner class bean definition like this before but I think it should work. Would you be able to send the rest of yoru code over. I would be easier if i could debug it over here.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justine
I have tried with the applicationContext.xml included in the jar file. During my first attempt, geoserver threw some errors due to a namespace conflict in the one of my classes. So I fixed it and now geoserver starts fine but I still get the same error as before, i.e. CSML is not being recognised as an output format by Geoserver. I have attached my applicationContext.xml:
Any sugggestion?

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: 15 January 2008 17:27
To: Shaon, ABS (Arif)
Cc: "Gabriel Roldá"@sc8-sf-spam2-b.sourceforge.net; n;
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Including the applicationContext.xml is necessary yes... without it GeoServer will not load your output format plug-in. The pom.xml file is optional, you can include it if you wish but do not need to.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justin,

I have created some Java classes and encapsulated them in a jar as
you suggested. I have placed the jar file in WEB-INF/lib folder and
the CSML schemas in {GEOSERVER_HOME}\webapps\geoserver\schemas\csml
folder. But when trying to test, I get the following error:

<?xml version="1.0" ?>
- <ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
  <ServiceException>java.lang.RuntimeException: No response: (
object = class net.opengis.wfs.impl.FeatureCollectionTypeImpl,
outputFormat = CSML ) java.lang.RuntimeException: No response: (
object = class net.opengis.wfs.impl.FeatureCollectionTypeImpl,
outputFormat = CSML )</ServiceException>
  </ServiceExceptionReport>
The jar file does not have a pom.xml. And should I have included the
applicationContext.xml file in the jar as well?

Please help.

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: 11 January 2008 19:40
To: Shaon, ABS (Arif)
Cc: =?ISO-8859-1?Q?Gabriel_Rold=E1?=@anonymised.comet;
geoserver-users@lists.sourceforge.net; n
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Good question. I suppose you just want a place to serve up the
schemas from geoserver. Currently there is not a facility to have
geoserver serve up schemas provided via a plugin, you have to copy
them into the "schemas" directory manually. The schemas directory
can be found under the root of a geoserver installation.

Also... i looked into CSML and unless i am mistaken it is a complex
gml schemas. Unfortunately there is not support for complex features
in geoserver trunk today. So you will be stuck doing all the gml
output from your plugin. Just wanted to make sure that was clear
since that is no small task.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Its very helpful. I will let you know how I get on.
A quick question and probably a stupid one..but where do I place
the schema (.xsd) file for CSML in the project path? Can geoserver
handle imported schemas within the main schema file?

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:49
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Probably not for a few weeks. But we would be happy to help you
directly in the interim. So this is a WFS output format for
GetFeature

I assume?

I am not familiar with the CSML output format but something like
the following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format.
Something like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it
into the WEB-INF/lib directory of your geoserver installation. Then
if you make a getfeature request with "OUTPUTFORMAT=CSML" it should
engage.

Hope that helps. Please if anything trips you up or you have any
more questions just ask. Also please feel free to hope on the
geoserver irc channel (freenode#geoserver) and ping one of us. We
would be happy to help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be

completed?

I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the
1.6.0 release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but
htis includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own
output format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+F
o
r
m
a
t
are quite outdated, as they are for Geoserver v1.5. I also
understand that in the new release of Geoserver, i.e. 1.6, its
the WFSGetFeatureOutputFormat class that needs to be extended in
order to add a new output format. I need to this to add CSML as
one of the output formats of Geoserver. So, I would greatly
appreciate if someone could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------
-
-
-
--- Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/ma
r k e tplace _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--------------------------------------------------------------------
-
-
--
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/mar
k
e
tp
lace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--------------------------------------------------------------------
-
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

---------------------------------------------------------------------
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

---------------------------------------------------------------------
-
--

---------------------------------------------------------------------
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,478cf54c271241015089218!

---------------------------------------------------------------------
-
--

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,478cf54c271241015089218!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

!DSPAM:4007,478cfcce283092090977483!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justin,

Thanks to you I have managed to install the class files in geoserver. Geoserver now recognises CSML as an output format. However, that led me to another problem. I am trying the following getFeature request:
http://localhost:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=poi&outputformat=CSML

Although geoserver recognises CSML as an output format (see excerpt from Geoserver log below), it generates the output in GML;

Request: getFeature
  handle = null
  service = wfs
  version = 1.0.0
  baseUrl = http://localhost:8080/geoserver/
  query = [net.opengis.wfs.impl.QueryTypeImpl@anonymised.com (group: null, propertyName: null, function: null, filter: null, sortBy: null, featureVersion: null, handle: null, srsName: null, typeName: [{http://www.openplans.org/topp\}poi])]
  maxFeatures = null
  outputFormat = CSML
  resultType = results
  traverseXlinkDepth = null
  traverseXlinkExpiry = null

Result:

I am not sure what to do next. If its not too much trouble, could you kindly take another look at the code (attached as zip file along with CSML schemas) please?

Kind regards
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 15 January 2008 20:05
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating customised output format

Hi Arif,

I am send you back a zip file with some changes in it. I changed the applicationContext.xml file a bit, the bean declaration of the output format was a bit off with the parameter order and references.

I also restructured the code a bit to follow maven conventions so that you can compile it with maven. After compiling with maven you should be able to copy over target/csml-1.0-SNAPSHOT.jar and run your output format. I verified with a simple request (outputformat=csml) that indeed the output format is engaging.

If you have any more problems getting this setup on yoru end or any questions about what i did please keep on asking.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justin,

Thanks for ur reply. Please find attached a zip file containing my csml classes. I really appreciate ur help on this.

Thanks again.
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 15 January 2008 18:30
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

At first glance I dont see anything wrong. I have never tried an inner class bean definition like this before but I think it should work. Would you be able to send the rest of yoru code over. I would be easier if i could debug it over here.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justine
I have tried with the applicationContext.xml included in the jar file. During my first attempt, geoserver threw some errors due to a namespace conflict in the one of my classes. So I fixed it and now geoserver starts fine but I still get the same error as before, i.e. CSML is not being recognised as an output format by Geoserver. I have attached my applicationContext.xml:
Any sugggestion?

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: 15 January 2008 17:27
To: Shaon, ABS (Arif)
Cc: "Gabriel Roldá"@sc8-sf-spam2-b.sourceforge.net; n;
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Including the applicationContext.xml is necessary yes... without it GeoServer will not load your output format plug-in. The pom.xml file is optional, you can include it if you wish but do not need to.

-Justin

Shaon, ABS (Arif) wrote:

Hi Justin,

I have created some Java classes and encapsulated them in a jar as
you suggested. I have placed the jar file in WEB-INF/lib folder and
the CSML schemas in {GEOSERVER_HOME}\webapps\geoserver\schemas\csml
folder. But when trying to test, I get the following error:

<?xml version="1.0" ?>
- <ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
  <ServiceException>java.lang.RuntimeException: No response: (
object = class net.opengis.wfs.impl.FeatureCollectionTypeImpl,
outputFormat = CSML ) java.lang.RuntimeException: No response: (
object = class net.opengis.wfs.impl.FeatureCollectionTypeImpl,
outputFormat = CSML )</ServiceException>
  </ServiceExceptionReport>
The jar file does not have a pom.xml. And should I have included the
applicationContext.xml file in the jar as well?

Please help.

Thanks
Arif

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: 11 January 2008 19:40
To: Shaon, ABS (Arif)
Cc: =?ISO-8859-1?Q?Gabriel_Rold=E1?=@anonymised.comet;
geoserver-users@lists.sourceforge.net; n
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Good question. I suppose you just want a place to serve up the
schemas from geoserver. Currently there is not a facility to have
geoserver serve up schemas provided via a plugin, you have to copy
them into the "schemas" directory manually. The schemas directory
can be found under the root of a geoserver installation.

Also... i looked into CSML and unless i am mistaken it is a complex
gml schemas. Unfortunately there is not support for complex features
in geoserver trunk today. So you will be stuck doing all the gml
output from your plugin. Just wanted to make sure that was clear
since that is no small task.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Its very helpful. I will let you know how I get on.
A quick question and probably a stupid one..but where do I place
the schema (.xsd) file for CSML in the project path? Can geoserver
handle imported schemas within the main schema file?

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:49
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

Probably not for a few weeks. But we would be happy to help you
directly in the interim. So this is a WFS output format for
GetFeature

I assume?

I am not familiar with the CSML output format but something like
the following should do:

class CSMLOutputFormat extends WFSGetFeatureOutputFormat {

  CSMLOutputFormat() {
     super( "CSML" );
  }

  String getMimeType(Object value, Operation operation) {
     return "..."; //whatever the mime type is
  }

  protected void write(FeatureCollectionType results, OutputStream
output, Operation getFeature)
        throws ServiceException, IOException {

      //do the output
  }
}

That is the first step. The second step is creating an
applicationContext.xml file which registers the output format.
Something like this:

<beans>
   <bean id="csmlOutputFormat" class="org.xyz.CSMLOutputFormat"/>
</beans>

I recommend structuring your project something like this:

csml/
  pom.xml
  src/main/java/
          org/xyx/CSMLOutputFormat.java
          applicationContext.xml

After that you can just create a jar for your project and drop it
into the WEB-INF/lib directory of your geoserver installation. Then
if you make a getfeature request with "OUTPUTFORMAT=CSML" it should
engage.

Hope that helps. Please if anything trips you up or you have any
more questions just ask. Also please feel free to hope on the
geoserver irc channel (freenode#geoserver) and ping one of us. We
would be happy to help you "hands-on" there.

-Justin

Shaon, ABS (Arif) wrote:

Thanks Justin. Any idea when this documentation task will be

completed?

I need some assistance in this regard fairly soon. At minimum, if
someone could point me to the classes that need to be modified or
extended that would be greatly helpful.

Cheers
Arif

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: 11 January 2008 18:17
To: Shaon, ABS (Arif)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Outdated instructions for creating
customised output format

Hi Arif,

You are correct indeed. And there is a documentation task for the
1.6.0 release to document this properly. It is here:

http://jira.codehaus.org/browse/GEOS-1608

Although somewhat misleading as it specifies refactoring... but
htis includes documentation.

-Justin

Arif Shaon wrote:

I have noticed that the instructions for creating one's own
output format as provided at
http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+F
o
r
m
a
t
are quite outdated, as they are for Geoserver v1.5. I also
understand that in the new release of Geoserver, i.e. 1.6, its
the WFSGetFeatureOutputFormat class that needs to be extended in
order to add a new output format. I need to this to add CSML as
one of the output formats of Geoserver. So, I would greatly
appreciate if someone could provide some updated instructions for this please?

Regards
Arif

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------
-
-
-
--- Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/ma
r k e tplace _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

--------------------------------------------------------------------
-
-
--
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/mar
k
e
tp
lace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--------------------------------------------------------------------
-
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

---------------------------------------------------------------------
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

---------------------------------------------------------------------
-
--

---------------------------------------------------------------------
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,478cf54c271241015089218!

---------------------------------------------------------------------
-
--

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,478cf54c271241015089218!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

!DSPAM:4007,478cfcce283092090977483!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

csml.rar (358 KB)