Omaha #3199 new edex.soap plugin
new plugin for soap utilities Former-commit-id:b8da36c198
[formerlyb75fbf3c0a
] [formerlya94cf29ab5
] [formerlya94cf29ab5
[formerly4b984b2d70
]] [formerlyb8da36c198
[formerlyb75fbf3c0a
] [formerlya94cf29ab5
] [formerlya94cf29ab5
[formerly4b984b2d70
]] [formerly09fba26a56
[formerlya94cf29ab5
[formerly4b984b2d70
] [formerly09fba26a56
[formerly 7c7f7f4f4a821a80d0bf6dcb7e59e3880a7bf4e2]]]]] Former-commit-id:09fba26a56
Former-commit-id:e08755696c
[formerly0233751629
] [formerlya02928d703
] [formerly adb53627a3fbe8fc333daa3a54925f2123efb6f6 [formerly e36f9b9b001aa36328deba32ed0462c37edec9ab] [formerlya02928d703
[formerlyf934e868ec
]]] Former-commit-id: 99c51cfb3c507217a72edd5a3e19150699b3a814 [formerly 494d881852441afce8611fe736e23813e61d7610] [formerlyd63e1eaa22
[formerly161a6b1624
]] Former-commit-id:d63e1eaa22
Former-commit-id:9a5b7fc825
This commit is contained in:
parent
f3e824ee03
commit
4521541f47
19 changed files with 312 additions and 10 deletions
|
@ -4,7 +4,7 @@ architecture=x86_64
|
|||
includegen.filter=raytheon|noaa\.nws|noaa\.gsd
|
||||
|
||||
# AWIPSII core repositores required for build
|
||||
core.repositories=ufcore,ufcore-foss
|
||||
core.repositories=ufcore,ufcore-foss,AWIPS2_foss
|
||||
|
||||
# Note: currently, there is a limit of 99 plugin directories.
|
||||
dir.01=cave
|
||||
|
|
|
@ -102,4 +102,10 @@
|
|||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.commons.cxf"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -137,4 +137,11 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.soap"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -23,7 +23,8 @@ Require-Bundle: net.opengis;bundle-version="1.0.2",
|
|||
org.eclipse.jetty;bundle-version="7.6.9",
|
||||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.edex.log;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.http
|
||||
com.raytheon.uf.common.http,
|
||||
com.raytheon.uf.edex.soap;bundle-version="1.14.0"
|
||||
Export-Package: com.raytheon.uf.edex.ogc.common,
|
||||
com.raytheon.uf.edex.ogc.common.db,
|
||||
com.raytheon.uf.edex.ogc.common.feature,
|
||||
|
|
|
@ -31,11 +31,11 @@ import org.apache.camel.Processor;
|
|||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.edex.log.cxf.RequestLogController;
|
||||
import com.raytheon.uf.edex.ogc.common.stats.IStatsRecorder;
|
||||
import com.raytheon.uf.edex.ogc.common.stats.OperationType;
|
||||
import com.raytheon.uf.edex.ogc.common.stats.ServiceType;
|
||||
import com.raytheon.uf.edex.ogc.common.stats.StatsRecorderFinder;
|
||||
import com.raytheon.uf.edex.soap.RequestLogController;
|
||||
|
||||
/**
|
||||
* HTTP Camel Processor for OGC REST Services
|
||||
|
|
7
edexOsgi/com.raytheon.uf.edex.soap/.classpath
Normal file
7
edexOsgi/com.raytheon.uf.edex.soap/.classpath
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
28
edexOsgi/com.raytheon.uf.edex.soap/.project
Normal file
28
edexOsgi/com.raytheon.uf.edex.soap/.project
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.edex.soap</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,7 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
11
edexOsgi/com.raytheon.uf.edex.soap/META-INF/MANIFEST.MF
Normal file
11
edexOsgi/com.raytheon.uf.edex.soap/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,11 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: EDEX Soap
|
||||
Bundle-SymbolicName: com.raytheon.uf.edex.soap
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Require-Bundle: org.apache.commons.cxf;bundle-version="2.5.10",
|
||||
com.raytheon.uf.common.status;bundle-version="1.12.1174",
|
||||
com.sun.xml.bind;bundle-version="1.0.0"
|
||||
Export-Package: com.raytheon.uf.edex.soap
|
4
edexOsgi/com.raytheon.uf.edex.soap/build.properties
Normal file
4
edexOsgi/com.raytheon.uf.edex.soap/build.properties
Normal file
|
@ -0,0 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
|
@ -0,0 +1,153 @@
|
|||
/**
|
||||
* Copyright 09/24/12 Raytheon Company.
|
||||
*
|
||||
* Unlimited Rights
|
||||
* This software was developed pursuant to Contract Number
|
||||
* DTFAWA-10-D-00028 with the US Government. The US Government’s rights
|
||||
* in and to this copyrighted software are as specified in DFARS
|
||||
* 252.227-7014 which was made part of the above contract.
|
||||
*/
|
||||
package com.raytheon.uf.edex.soap;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.cxf.helpers.IOUtils;
|
||||
import org.apache.cxf.interceptor.Fault;
|
||||
import org.apache.cxf.interceptor.LoggingMessage;
|
||||
import org.apache.cxf.io.CachedOutputStream;
|
||||
import org.apache.cxf.io.DelegatingInputStream;
|
||||
import org.apache.cxf.message.Message;
|
||||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
|
||||
/**
|
||||
* Web Services interceptor that logs incoming requests
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* September, 2013 behemmi Initial creation
|
||||
* May 23, 2014 3199 bclement moved to edex.soap from edex.log
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author behemmi
|
||||
* @version 1.0
|
||||
*/
|
||||
public class CXFLogger extends org.apache.cxf.interceptor.LoggingInInterceptor {
|
||||
|
||||
protected IUFStatusHandler log = UFStatus.getHandler(this.getClass());
|
||||
|
||||
@Override
|
||||
public void handleMessage(Message message) throws Fault {
|
||||
if (writer != null ||
|
||||
RequestLogController.getInstance().shouldLogRequestsInfo() &&
|
||||
log.isPriorityEnabled(RequestLogController.getInstance().getRequestLogLevel())) {
|
||||
logging(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* implement custom content for incoming requests in our own log format
|
||||
* @param message
|
||||
* @throws Fault
|
||||
*/
|
||||
protected void logging(Message message) throws Fault {
|
||||
if (message.containsKey(LoggingMessage.ID_KEY)) {
|
||||
return;
|
||||
}
|
||||
String id = (String)message.getExchange().get(LoggingMessage.ID_KEY);
|
||||
if (id == null) {
|
||||
id = LoggingMessage.nextId();
|
||||
message.getExchange().put(LoggingMessage.ID_KEY, id);
|
||||
}
|
||||
message.put(LoggingMessage.ID_KEY, id);
|
||||
final LoggingMessage buffer
|
||||
= new LoggingMessage("Inbound Message\n--------------------------", id);
|
||||
|
||||
Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE);
|
||||
if (responseCode != null) {
|
||||
buffer.getResponseCode().append(responseCode);
|
||||
}
|
||||
|
||||
String encoding = (String)message.get(Message.ENCODING);
|
||||
|
||||
if (encoding != null) {
|
||||
buffer.getEncoding().append(encoding);
|
||||
}
|
||||
String httpMethod = (String)message.get(Message.HTTP_REQUEST_METHOD);
|
||||
if (httpMethod != null) {
|
||||
buffer.getHttpMethod().append(httpMethod);
|
||||
}
|
||||
String ct = (String)message.get(Message.CONTENT_TYPE);
|
||||
if (ct != null) {
|
||||
buffer.getContentType().append(ct);
|
||||
}
|
||||
Object headers = message.get(Message.PROTOCOL_HEADERS);
|
||||
|
||||
if (headers != null) {
|
||||
buffer.getHeader().append(headers);
|
||||
}
|
||||
String uri = (String)message.get(Message.REQUEST_URL);
|
||||
if (uri != null) {
|
||||
buffer.getAddress().append(uri);
|
||||
String query = (String)message.get(Message.QUERY_STRING);
|
||||
if (query != null) {
|
||||
buffer.getAddress().append("?").append(query);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isShowBinaryContent() && isBinaryContent(ct)) {
|
||||
buffer.getMessage().append(BINARY_CONTENT_MESSAGE).append('\n');
|
||||
log.handle(RequestLogController.getInstance().getRequestLogLevel(),
|
||||
buffer.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
InputStream is = message.getContent(InputStream.class);
|
||||
if (is != null) {
|
||||
CachedOutputStream bos = new CachedOutputStream();
|
||||
if (threshold > 0) {
|
||||
bos.setThreshold(threshold);
|
||||
}
|
||||
try {
|
||||
// use the appropriate input stream and restore it later
|
||||
InputStream bis = is instanceof DelegatingInputStream
|
||||
? ((DelegatingInputStream)is).getInputStream() : is;
|
||||
|
||||
IOUtils.copyAndCloseInput(bis, bos);
|
||||
bos.flush();
|
||||
bis = bos.getInputStream();
|
||||
|
||||
// restore the delegating input stream or the input stream
|
||||
if (is instanceof DelegatingInputStream) {
|
||||
((DelegatingInputStream)is).setInputStream(bis);
|
||||
} else {
|
||||
message.setContent(InputStream.class, bis);
|
||||
}
|
||||
|
||||
if (bos.getTempFile() != null) {
|
||||
//large thing on disk...
|
||||
buffer.getMessage().append("\nMessage (saved to tmp file):\n");
|
||||
buffer.getMessage().append("Filename: " + bos.getTempFile().getAbsolutePath() + "\n");
|
||||
}
|
||||
if (bos.size() > limit) {
|
||||
buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
|
||||
}
|
||||
writePayload(buffer.getPayload(), bos, encoding, ct);
|
||||
|
||||
bos.close();
|
||||
} catch (Exception e) {
|
||||
throw new Fault(e);
|
||||
}
|
||||
}
|
||||
log.handle(RequestLogController.getInstance().getRequestLogLevel(),
|
||||
buffer.toString());
|
||||
}
|
||||
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
* in and to this copyrighted software are as specified in DFARS
|
||||
* 252.227-7014 which was made part of the above contract.
|
||||
*/
|
||||
package com.raytheon.uf.edex.ogc.common.soap;
|
||||
package com.raytheon.uf.edex.soap;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -41,6 +41,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 28, 2013 bclement Initial creation
|
||||
* 5/2/2014 #3192 bhillip Minor fix for CXF upgrade to 2.7.10
|
||||
* May 23, 2014 3199 bclement moved to edex.soap from edex.ogc.common
|
||||
*
|
||||
* </pre>
|
||||
*
|
|
@ -7,7 +7,7 @@
|
|||
* in and to this copyrighted software are as specified in DFARS
|
||||
* 252.227-7014 which was made part of the above contract.
|
||||
*/
|
||||
package com.raytheon.uf.edex.ogc.common.soap;
|
||||
package com.raytheon.uf.edex.soap;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
@ -34,6 +34,7 @@ import com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 21, 2012 bclement Initial creation
|
||||
* May 23, 2014 3199 bclement moved to edex.soap from edex.ogc.common
|
||||
*
|
||||
* </pre>
|
||||
*
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* Copyright 09/24/12 Raytheon Company.
|
||||
*
|
||||
* Unlimited Rights
|
||||
* This software was developed pursuant to Contract Number
|
||||
* DTFAWA-10-D-00028 with the US Government. The US Government’s rights
|
||||
* in and to this copyrighted software are as specified in DFARS
|
||||
* 252.227-7014 which was made part of the above contract.
|
||||
*/
|
||||
package com.raytheon.uf.edex.soap;
|
||||
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
/**
|
||||
* Singleton to control how incoming request information is logged. Implemented
|
||||
* as a singleton to allow runtime control from a Web Client
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* September, 2013 behemmi Initial creation
|
||||
* May 23, 2014 3199 bclement moved to edex.soap from edex.log
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author behemmi
|
||||
* @version 1.0
|
||||
*/
|
||||
public class RequestLogController {
|
||||
|
||||
private static RequestLogController instance = null;
|
||||
|
||||
private Priority requestLogLevel;
|
||||
private boolean shouldLogRequestsInfo;
|
||||
|
||||
private RequestLogController(){
|
||||
requestLogLevel = Priority.DEBUG;
|
||||
shouldLogRequestsInfo = true;
|
||||
}
|
||||
|
||||
public static RequestLogController getInstance() {
|
||||
if(instance == null) {
|
||||
instance = new RequestLogController();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public Priority getRequestLogLevel() {
|
||||
return requestLogLevel;
|
||||
}
|
||||
|
||||
public void setRequestLogLevel(Priority requestLogLevel) {
|
||||
this.requestLogLevel = requestLogLevel;
|
||||
}
|
||||
|
||||
public boolean shouldLogRequestsInfo() {
|
||||
return getShouldLogRequestsInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Traditional getter for Jackson serialization.
|
||||
*
|
||||
* @return shouldLogRequestsInfo - if this logger is enabled
|
||||
*/
|
||||
public boolean getShouldLogRequestsInfo() {
|
||||
return shouldLogRequestsInfo;
|
||||
}
|
||||
|
||||
public void setShouldLogRequestsInfo(boolean shouldLogRequestsInfo) {
|
||||
this.shouldLogRequestsInfo = shouldLogRequestsInfo;
|
||||
}
|
||||
}
|
|
@ -23,7 +23,8 @@ Require-Bundle: org.geotools;bundle-version="2.6.4",
|
|||
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
|
||||
org.apache.commons.collections;bundle-version="3.2.0",
|
||||
org.apache.commons.cxf;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.http
|
||||
com.raytheon.uf.common.http,
|
||||
com.raytheon.uf.edex.soap;bundle-version="1.14.0"
|
||||
Export-Package: com.raytheon.uf.edex.wfs,
|
||||
com.raytheon.uf.edex.wfs.feature,
|
||||
com.raytheon.uf.edex.wfs.filter,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</bean>
|
||||
|
||||
<bean id="wfsSoapService"
|
||||
class="com.raytheon.uf.edex.ogc.common.soap.JaxWsConfigServerFactoryBean"
|
||||
class="com.raytheon.uf.edex.soap.JaxWsConfigServerFactoryBean"
|
||||
init-method="create">
|
||||
<property name="serviceClass" value="com.raytheon.uf.edex.wfs.soap2_0_0.Wfs" />
|
||||
<property name="address" value="http://0.0.0.0:8086/wfs2.0.0" />
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||
|
||||
<bean id="wfsWsdlInterceptor"
|
||||
class="com.raytheon.uf.edex.ogc.common.soap.CustomWsdlInterceptor">
|
||||
class="com.raytheon.uf.edex.soap.CustomWsdlInterceptor">
|
||||
<constructor-arg value="META-INF/wsdl/wfs.wsdl" />
|
||||
</bean>
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ import com.raytheon.uf.edex.wfs.soap2_0_0.util.DescribeFeatureTypeResponseType;
|
|||
* @version 1.0
|
||||
*/
|
||||
@GZIP
|
||||
@InInterceptors(interceptors = "com.raytheon.uf.edex.log.cxf.CXFLogger")
|
||||
@InInterceptors(interceptors = "com.raytheon.uf.edex.soap.CXFLogger")
|
||||
@WebService(name = "wfs", targetNamespace = "http://www.opengis.net/wfs/requests/2.0")
|
||||
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
|
||||
@BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
|
||||
|
|
|
@ -35,7 +35,6 @@ import net.opengis.wfs.v_2_0_0.WFSCapabilitiesType;
|
|||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.edex.log.cxf.RequestLogController;
|
||||
import com.raytheon.uf.edex.ogc.common.http.EndpointInfo;
|
||||
import com.raytheon.uf.edex.ogc.common.soap.AbstractOwsService;
|
||||
import com.raytheon.uf.edex.ogc.common.soap.ServiceExceptionReport;
|
||||
|
@ -43,6 +42,7 @@ import com.raytheon.uf.edex.ogc.common.stats.IStatsRecorder;
|
|||
import com.raytheon.uf.edex.ogc.common.stats.OperationType;
|
||||
import com.raytheon.uf.edex.ogc.common.stats.ServiceType;
|
||||
import com.raytheon.uf.edex.ogc.common.stats.StatsRecorderFinder;
|
||||
import com.raytheon.uf.edex.soap.RequestLogController;
|
||||
import com.raytheon.uf.edex.wfs.WfsException;
|
||||
import com.raytheon.uf.edex.wfs.WfsException.Code;
|
||||
import com.raytheon.uf.edex.wfs.request.DescFeatureTypeReq;
|
||||
|
|
Loading…
Add table
Reference in a new issue