From 7d3eb05c7a69dc8dca5569ed7d6649dc641d9110 Mon Sep 17 00:00:00 2001 From: Brian Rosenberger Date: Tue, 5 Feb 2013 14:36:59 +0000 Subject: [PATCH] Arbeitsstand Anfang Februar git-svn-id: https://brutex.net/svn/xservices/trunk@110 e7e49efb-446e-492e-b9ec-fcafc1997a86 --- .../net/brutex/xservices/ws/XmlService.java | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 src/java/net/brutex/xservices/ws/XmlService.java diff --git a/src/java/net/brutex/xservices/ws/XmlService.java b/src/java/net/brutex/xservices/ws/XmlService.java new file mode 100644 index 0000000..8b47103 --- /dev/null +++ b/src/java/net/brutex/xservices/ws/XmlService.java @@ -0,0 +1,83 @@ +/* + * Copyright 2012 Brian Rosenberger (Brutex Network) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.brutex.xservices.ws; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlElement; + +import net.brutex.xservices.types.NamespaceListType; +import net.brutex.xservices.types.ant.FileResource; + +import org.apache.cxf.annotations.WSDLDocumentation; + +/** + * @author Brian Rosenberger, bru(at)brutex.de + * + */ +@WebService(targetNamespace="http://ws.xservices.brutex.net") +public abstract interface XmlService +{ + public static final String SERVICE_NAME = "XmlService"; + public static final String OPERATION_APPENDTO = "appendTo"; + public static final String OPERATION_REPLACE = "replaceNode"; + public static final String PARAM_XPATH = "xpath"; + public static final String PARAM_XML = "xmldata"; + + @WebMethod(operationName="insertNodes") + @WSDLDocumentation("Insert an XML fragment into an XML document given as string.") + public abstract String insertNodes( + @WebParam(name="sourcexml") String source, + @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType, + @WebParam(name="xpath") @XmlElement(required=true) String paramString1, + @WebParam(name="xmldata") String paramString2) + throws XServicesFault; + + @WebMethod(operationName="insertNodes2") + @WSDLDocumentation("Insert an XML fragment into an XML document given as file.") + public abstract String insertNodesFromFile( + @WebParam(name="file") FileResource paramFileResource, + @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType, + @WebParam(name="xpath") @XmlElement(required=true) String paramString1, + @WebParam(name="xmldata") String paramString2) + throws XServicesFault; + + @WebMethod(operationName="replaceNodes") + @WSDLDocumentation("Replaces matched XML nodes with an XML document given as string.") + public abstract String replaceNodes( + @WebParam(name="sourcexml") String source, + @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType, + @WebParam(name="xpath") @XmlElement(required=true) String paramString1, + @WebParam(name="xmldata") String paramString2) + throws XServicesFault; + + @WebMethod(operationName="replaceNodes2") + @WSDLDocumentation("Replaces matched XML nodes with an XML document given as file.") + public abstract String replaceNodesFromFile( + @WebParam(name="file") FileResource paramFileResource, + @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType, + @WebParam(name="xpath") @XmlElement(required=true) String paramString1, + @WebParam(name="xmldata") String paramString2) + throws XServicesFault; + + @WebMethod(operationName="wrapInCDATA") + @WSDLDocumentation("Wraps a String into a CDATA element") + public abstract String wrapInCDATA(@WebParam(name="data") @XmlElement(required=true) String data) + throws XServicesFault; + +}