2013-02-05 15:36:59 +01:00
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
|
2013-02-11 09:15:11 +01:00
|
|
|
import net.brutex.xservices.types.AttributeType;
|
2013-02-05 15:36:59 +01:00
|
|
|
import net.brutex.xservices.types.NamespaceListType;
|
2013-02-11 09:15:11 +01:00
|
|
|
import net.brutex.xservices.types.StringSplitType;
|
2013-02-05 15:36:59 +01:00
|
|
|
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,
|
2013-02-11 09:15:11 +01:00
|
|
|
@WebParam(name="encoding") String encoding,
|
2013-02-05 15:36:59 +01:00
|
|
|
@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(
|
2013-02-11 09:15:11 +01:00
|
|
|
@WebParam(name="sourcexml") String source,
|
|
|
|
@WebParam(name="encoding") String encoding,
|
2013-02-05 15:36:59 +01:00
|
|
|
@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;
|
2013-02-11 09:15:11 +01:00
|
|
|
|
|
|
|
@WebMethod(operationName="selectXPath")
|
|
|
|
@WSDLDocumentation("Select from xml document given as string using an XPath expression.")
|
|
|
|
public abstract StringSplitType selectXPath(
|
|
|
|
@WebParam(name="sourcexml") @XmlElement(required=true) String source,
|
|
|
|
@WebParam(name="encoding") String encoding,
|
|
|
|
@WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
|
|
|
|
@WebParam(name="xpath") @XmlElement(required=true) String paramString1)
|
|
|
|
throws XServicesFault;
|
|
|
|
|
|
|
|
@WebMethod(operationName="setAttribute")
|
|
|
|
@WSDLDocumentation("Set an attribute.")
|
|
|
|
public abstract String setAttribute(
|
|
|
|
@WebParam(name="sourcexml") @XmlElement(required=true) String source,
|
|
|
|
@WebParam(name="encoding") String encoding,
|
|
|
|
@WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
|
|
|
|
@WebParam(name="xpath") @XmlElement(required=true) String paramString1,
|
|
|
|
@WebParam(name="attribute") @XmlElement(nillable=false, required=true) AttributeType attr)
|
|
|
|
throws XServicesFault;
|
2013-02-05 15:36:59 +01:00
|
|
|
|
|
|
|
}
|