Trouble Deploying Custom WPS Process in GeoServer 2.23.0

28 views Asked by At

I am currently facing challenges deploying a custom Web Processing Service (WPS) process in GeoServer 2.23.0 and am seeking assistance in resolving this matter.

Following the steps outlined in the GeoServer Documentation, specifically the tutorial named gs:helloWPS https://docs.geoserver.org/maintain/en/developer/programming-guide/wps-services/implementing.html, I successfully created a JAR file, hello_wps-2.8-SNAPSHOT.jar, and deployed it by placing it in GeoServer's WEB/INF directory.

Despite these efforts, the deployed WPS process is not visible in either the GeoServer WPS Request Builder or the logs. I have thoroughly reviewed the documentation and forum discussions, but unfortunately, I haven't found any relevant information pertaining to GeoServer 2.23.0.

If any of you have experience or insights into deploying custom WPS processes in GeoServer 2.23.0, I would greatly appreciate your guidance. The key issue I am facing is the lack of visibility for the deployed process in both the WPS Request Builder and the logs.

I create a processfactory path and class but i didnt resolve the probleme- --> pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    http://maven.apache.org/maven-v4_0_0.xsd ">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.geoserver</groupId>
    <artifactId>hello_wps</artifactId>
    <packaging>jar</packaging>
    <version>2.8-SNAPSHOT</version>
    <name>hello_wps</name>

<profiles>
    <profile>
        <id>wps</id>
        <!-- Configuration for the "wps" profile -->
    </profile>
</profiles>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gt.version>29.0</gt.version> <!-- GeoTools version -->
        <gs.version>2.23.0</gs.version> <!-- GeoServer version -->
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-process</artifactId>
            <version>${gt.version}</version>
        </dependency>
        <dependency>
            <groupId>org.geoserver.extension</groupId>
            <artifactId>gs-wps-core</artifactId>
            <version>${gs.version}</version>
        </dependency>
        <dependency>
            <groupId>org.geoserver</groupId>
            <artifactId>gs-main</artifactId>
            <version>${gs.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <!-- Add your other dependencies here -->
    </dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version> <!-- Replace with the appropriate version -->
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <!-- Other plugins... -->
    </plugins>
</build>

    <repositories>
        <repository>
            <id>osgeo-snapshot</id>
            <name>OSGeo Snapshot Repository</name>
            <url>https://repo.osgeo.org/repository/Geoserver-releases/</url>
        </repository>
        <repository>
            <id>osgeo</id>
            <name>Open Source Geospatial Foundation Repository</name>
            <url>https://repo.osgeo.org/repository/release/</url>
        </repository>
    </repositories>

</project>

--> Java class:

package org.geoserver.hello.wps;

import org.geotools.process.factory.DescribeParameter;
import org.geotools.process.factory.DescribeProcess;
import org.geotools.process.factory.DescribeResult;
import org.geoserver.wps.gs.GeoServerProcess;

@DescribeProcess(title="helloWPS", description="Hello WPS Sample")
public class HelloWPS implements GeoServerProcess {

   @DescribeResult(name="result", description="output result")
   public String execute(@DescribeParameter(name="name", description="name to return") String name) {
        return "Hello, " + name;
   }
}
0

There are 0 answers