maven apache wrote:
> Thanks for Justin's reply and sorry for my crossing posting, it won't 
> happen again.  :) .
> 
No problem :)

> 2009/12/22 Justin Deoliveira <[email protected] 
> <mailto:[email protected]>>
> 
>     If you could avoid cross posting to both lists that would be
>     appreciated. As this is a development question it is more suited to
>     the geoserver-devel list.
> 
>     That said, we are happy about the contribution. However have you
>     thought about collaborating with the existing wps effort? David
>     Robison and Andrea have been putting a lot of effort into the
>     existing wps module so it is definitely starting to gain momentum.
>     It is built with teh common ows architecture used by services, and
>     it integrates nicely with the geotools process api.
> 
> Yes, the gs-wps is fine. However we have not only wps but also other swe 
> owses(sps,and sos).
> 
>     It would be nice to have some more information about your WPS
>     service. How does it work internally? What is the range of processes
>     that it includes? etc...
> 
>  The front controller is to get the request string (for get it maybe 
> "request=wps&version=1.0.0....." and for post it maybe a xml fragment" ) 
> ,then parser the string to identify the request type(getCapabilities or 
> DescirbeProcess),then do the business work, build the response document 
> and return. 
Ok, and you don't intend to use the current ows dispatcher?

>     That said, the easiest way to wire up your servlet is to add a
>     mapping for it directly in the web.xml file, and it can totally
>     bypass spring all together. This approach has a number of downsides
>     in that you won't be able to access any of the geoserver internals
>     such as the catalog. But it is probably easiest.
> 
> yes, this is a easier way to implement my requirement, and I also want 
> to build some pages to manager the service just like the web pages to 
> config the wcs wms and wcs in the gs.

Plugging into the wicket UI is generally easy. It is documented in the 
developer guide:

http://docs.geoserver.org/2.0.x/en/developer/programming-guide/wicket-pages/index.html

> Actually I prefer I can add my service in a plugin way like the other 
> ows in the gs.

Ok, so what I would recommend is the following:

1) modify web.xml to create a mapping for your specific servlet, 
something like:

    <servlet-mapping>
       <servlet-name>dispatcher</servlet-name>
       <url-pattern>/foobar/*</url-pattern>
     </servlet-mapping>

   This will map certain urls (everything under foobar) to the spring 
dispatcher.

2) In your modules applicationContext.xml file create a spring 
controller that wraps up your servlet. See the javadoc of 
org.springframework.web.servlet.mvc.ServletWrappingController for 
details on how to do this.

3) Creating a second mapping that maps urls of the form foobar/** to the 
controller created in step (2). Look in the applicationContext.xml for 
wfs,wms,wcs,etc... for example, but it looks like:

  <bean id="wfsURLMapping"
 
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
   <property name="alwaysUseFullPath" value="true"/>
     <property name="mappings">
      <props>
         <prop key="/foobar">servletWrappingBeanFromStep2</prop>
         <prop key="/foobar/*">servletWrappingBeanFromStep2</prop>
      </props>
     </property>
  </bean>

This approach will let you tie into spring and access the internals of 
geoserver, but will also allow you to avoid using the current ows 
service framework.

Hope that helps.

-Justin

> Thanks anyway.
> 
> 
>     -Justin
> 
>     maven apache wrote:
> 
>         Hi:
> 
>         We have implemented a WPS instance, and now we want to integrate
>         it to gs to replace the wps under the community module of
>         geoserver 2.0.0(for easily written, I call it gs-wps).
> 
>         The problem is that our wps have a different architecture with
>         the gs-wps.  I found the other ows such as wcs wms and wfs all
>         have some common struts: the kvp-parser, response and so on.
>         Also they all communicate with spring. And each operation of a
>         ows will be built as a java object for example the
>         “org.vfny.geoserver.wms.servlets.DescribeLayer” in the wms and
>         so on.
> 
>         However in our wps there is only a WPSServlet acted as a front
>         controller which receive the httpservletrequest and
>         httpservletResponse as parameters. No matter which kind of
>         request is received (getCapabilities or DescribeProcess) , they
>         are all handled by the front controller
> 
>         So I do not know how to dispatch the request from the client to
>         the WPSServlet and do some initialization work.
> 
>         I have seen the gs sources for a long time ,but I have no idea
>         because of my unfamiliar with the spring.
> 
>         I also referred to the hello plugin at
>         http://geoserver.org/display/GEOSDOC/3+A+Simple+PlugIn
> 
>         But it seems that it does not work.
> 
>         I hope someone can give me some further advise.
> 
>         Sorry to bother you.
> 
> 
>         
> ------------------------------------------------------------------------
> 
>         
> ------------------------------------------------------------------------------
>         This SF.Net email is sponsored by the Verizon Developer Community
>         Take advantage of Verizon's best-in-class app development support
>         A streamlined, 14 day to market process makes app distribution
>         fast and easy
>         Join now and get one step closer to millions of Verizon customers
>         http://p.sf.net/sfu/verizon-dev2dev
> 
>         
> ------------------------------------------------------------------------
> 
>         _______________________________________________
>         Geoserver-devel mailing list
>         [email protected]
>         <mailto:[email protected]>
>         https://lists.sourceforge.net/lists/listinfo/geoserver-devel
> 
> 
>     -- 
>     Justin Deoliveira
>     OpenGeo - http://opengeo.org
>     Enterprise support for open source geospatial.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel

-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to