Skip to content

Commit

Permalink
Fix a small issue with literalData in WPS 2.0
Browse files Browse the repository at this point in the history
Integrate WPS 2.0 ETS within the teamengine deployed
  • Loading branch information
gfenoy committed May 25, 2023
1 parent baae047 commit 45eeec8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
23 changes: 11 additions & 12 deletions docker/ets-ogcapi-processes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,14 @@ COPY docker/ets-ogcapi-processes/src /home/app/src
COPY docker/ets-ogcapi-processes/src1 /home/app/src1
RUN apt-get update && \
apt-get install -y $BUILD_DEPS && \
#curl -L -o 5.5.2.zip https://github.com/opengeospatial/teamengine/archive/refs/tags/5.5.2.zip && \
#unzip 5.5.2.zip && \
#mv teamengine-5.5.2 src && \
#git clone https://github.com/opengeospatial/teamengine src && \
#git clone https://github.com/opengeospatial/ets-common.git src1 && \
#cd src1 && \
#git clone https://github.com/opengeospatial/ets-ogcapi-processes10.git && \
echo "teamengine building..." && \
mvn -f /home/app/src/pom.xml clean install && \
mvn -f /home/app/src/pom.xml clean install > log && \
echo "common building..." && \
mvn -f /home/app/src1/pom.xml clean install && \
echo "teamengine building..." && \
echo "OGC API - Processes ETS building..." && \
mvn -f /home/app/src1/ets-ogcapi-processes10/pom.xml clean install && \
rm -f *zip && \
echo "WPS 2.0 ETS building..." && \
mvn -f /home/app/src1/ets-wps20/pom.xml clean install && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $BUILD_DEPS && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -38,6 +32,9 @@ COPY --from=build /home/app/src/teamengine-console/target/teamengine-console-*-b
COPY --from=build /home/app/src1/ets-ogcapi-processes10/target/ets-ogcapi-processes10-*-aio.jar /root
COPY --from=build /home/app/src1/ets-ogcapi-processes10/target/ets-ogcapi-processes10-*-ctl.zip /root
COPY --from=build /home/app/src1/ets-ogcapi-processes10/target/ets-ogcapi-processes10-*-deps.zip /root
COPY --from=build /home/app/src1/ets-wps20/target/ets-wps20-*-aio.jar /root
COPY --from=build /home/app/src1/ets-wps20/target/ets-wps20-*-ctl.zip /root
COPY --from=build /home/app/src1/ets-wps20/target/ets-wps20-*-deps.zip /root
ENV JAVA_OPTS="-Xms1024m -Xmx2048m -DTE_BASE=/root/te_base"
RUN cd /root && \
mkdir te_base && \
Expand All @@ -48,8 +45,10 @@ RUN cd /root && \
unzip -q -o teamengine*.war -d /usr/local/tomcat/webapps/teamengine && \
unzip -q -o teamengine-*common-libs.zip -d /usr/local/tomcat/lib && \
unzip -q -o teamengine-console-*-base.zip -d /root/te_base && \
unzip -q -o ets-ogcapi-processes10-*-ctl.zip -d /root/te_base/scripts && \
unzip -q -o ets-ogcapi-processes10-*-deps.zip -d /usr/local/tomcat/webapps/teamengine/WEB-INF/lib && \
for i in ets-ogcapi-processes10 ets-wps20 ; do \
unzip -q -o ${i}-*-ctl.zip -d /root/te_base/scripts ; \
unzip -q -o ${i}-*-deps.zip -d /usr/local/tomcat/webapps/teamengine/WEB-INF/lib ; \
done && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $BUILD_DEPS && \
rm -rf /var/lib/apt/lists/* /root/*zip /root/*war

Expand Down
3 changes: 2 additions & 1 deletion docker/ets-ogcapi-processes/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash

cd docker/ets-ogcapi-processes
curl -L -o 5.5.2.zip https://github.com/opengeospatial/teamengine/archive/refs/tags/5.5.2.zip
Expand All @@ -8,6 +8,7 @@ mv teamengine-5.5.2 src
git clone https://github.com/opengeospatial/ets-common.git src1
cd src1
git clone https://github.com/opengeospatial/ets-ogcapi-processes10.git
git clone https://github.com/opengeospatial/ets-wps20.git

cd ../../..

Expand Down
2 changes: 1 addition & 1 deletion docker/ets-ogcapi-processes/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# run the following sed "s/tb17.geolabs.fr:8120/$(hostname)/g" -i /root/test-run-props.xml
java -jar $(find /root -name "*aio.jar") -o /tmp /root/test-run-props.xml
java -jar $(find /root -name "ets-ogcapi-processes10-*aio.jar") -o /tmp /root/test-run-props.xml
cat $(find /tmp -name "*results.xml")
echo Success: $(grep PASS $(find /tmp -name "*results.xml") | wc -l)
echo Failed: $(grep FAIL $(find /tmp -name "*results.xml") | grep -v FAILURE | wc -l)
Expand Down
14 changes: 10 additions & 4 deletions zoo-project/zoo-kernel/response_print.c
Original file line number Diff line number Diff line change
Expand Up @@ -2368,8 +2368,10 @@ void printIOType(xmlDocPtr doc,xmlNodePtr nc,xmlNsPtr ns_wps,xmlNsPtr ns_ows,xml
if(vid==0)
xmlNewProp(nc3,BAD_CAST tmp->name,BAD_CAST tmp->value);
else{
if(strcasecmp(tmp->name,"datatype")==0)
xmlNewProp(nc2,BAD_CAST "mimeType",BAD_CAST "text/plain");
if(strcasecmp(tmp->name,"datatype")==0){
if(getMap(m->content,"mimeType")==NULL)
xmlNewProp(nc2,BAD_CAST "mimeType",BAD_CAST "text/plain");
}
else
if(strcasecmp(tmp->name,"uom")!=0)
xmlNewProp(nc2,BAD_CAST tmp->name,BAD_CAST tmp->value);
Expand Down Expand Up @@ -2498,8 +2500,10 @@ void printIOType(xmlDocPtr doc,xmlNodePtr nc,xmlNsPtr ns_wps,xmlNsPtr ns_ows,xml
strcasecmp(tmp->name,"datatype")==0 ||
strcasecmp(tmp->name,"uom")==0){

if(strcasecmp(tmp->name,"datatype")==0)
xmlNewProp(nc3,BAD_CAST "mimeType",BAD_CAST "text/plain");
if(strcasecmp(tmp->name,"datatype")==0){
if(getMap(m->content,"mimeType")==NULL)
xmlNewProp(nc3,BAD_CAST "mimeType",BAD_CAST "text/plain");
}
else
xmlNewProp(nc3,BAD_CAST tmp->name,BAD_CAST tmp->value);
}
Expand Down Expand Up @@ -3094,6 +3098,8 @@ void* printRawdataOutputs(maps* conf,service* s,maps* outputs){
else
sprintf(mime,"Content-Type: text/plain; charset=utf-8\r\nStatus: 200 OK\r\n\r\n");
map* pmTransmissionMode=getMap(pmsOut->content,"transmissionMode");
if(pmTransmissionMode==NULL)
pmTransmissionMode=getMap(pmsOut->content,"transmission");
if(pmTransmissionMode!=NULL && strcasecmp(pmTransmissionMode->value,"reference")==0){
char *pcaFileUrl=produceFileUrl(s,conf,pmsOut,NULL,itn);
printf("%s",mime);
Expand Down

0 comments on commit 45eeec8

Please sign in to comment.