Subversion Repositories XServices

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
110 brianR 1
/*
2
 *   Copyright 2012 Brian Rosenberger (Brutex Network)
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
15
 */
16
 
17
package net.brutex.xservices.ws;
18
 
19
import javax.jws.WebMethod;
20
import javax.jws.WebParam;
21
import javax.jws.WebService;
22
import javax.xml.bind.annotation.XmlElement;
23
 
127 brianR 24
import net.brutex.xservices.types.AttributeType;
110 brianR 25
import net.brutex.xservices.types.NamespaceListType;
127 brianR 26
import net.brutex.xservices.types.StringSplitType;
110 brianR 27
import net.brutex.xservices.types.ant.FileResource;
28
 
29
import org.apache.cxf.annotations.WSDLDocumentation;
177 brianR 30
import org.apache.shiro.authz.annotation.RequiresPermissions;
110 brianR 31
 
32
/**
33
 * @author Brian Rosenberger, bru(at)brutex.de
34
 *
35
 */
36
@WebService(targetNamespace="http://ws.xservices.brutex.net")
37
public abstract interface XmlService
38
{
39
  public static final String SERVICE_NAME = "XmlService";
40
  public static final String OPERATION_APPENDTO = "appendTo";
41
  public static final String OPERATION_REPLACE = "replaceNode";
42
  public static final String PARAM_XPATH = "xpath";
43
  public static final String PARAM_XML = "xmldata";
44
 
177 brianR 45
  @RequiresPermissions("insertNodes")
110 brianR 46
  @WebMethod(operationName="insertNodes")
47
  @WSDLDocumentation("Insert an XML fragment into an XML document given as string.")
48
  public abstract String insertNodes(
49
		  @WebParam(name="sourcexml") String source,
127 brianR 50
		  @WebParam(name="encoding") String encoding,
110 brianR 51
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
52
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
53
		  @WebParam(name="xmldata") String paramString2)
54
    throws XServicesFault;
55
 
56
  @WebMethod(operationName="insertNodes2")
57
  @WSDLDocumentation("Insert an XML fragment into an XML document given as file.")
58
  public abstract String insertNodesFromFile(
59
		  @WebParam(name="file") FileResource paramFileResource,
60
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
61
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
62
		  @WebParam(name="xmldata") String paramString2)
63
    throws XServicesFault;
64
 
65
  @WebMethod(operationName="replaceNodes")
66
  @WSDLDocumentation("Replaces matched XML nodes with an XML document given as string.")
67
  public abstract String replaceNodes(
127 brianR 68
		  @WebParam(name="sourcexml") String source,
69
		  @WebParam(name="encoding") String encoding,
110 brianR 70
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
71
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
72
		  @WebParam(name="xmldata") String paramString2)
73
    throws XServicesFault;
74
 
75
  @WebMethod(operationName="replaceNodes2")
76
  @WSDLDocumentation("Replaces matched XML nodes with an XML document given as file.")
77
  public abstract String replaceNodesFromFile(
78
		  @WebParam(name="file") FileResource paramFileResource,
79
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
80
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
81
		  @WebParam(name="xmldata") String paramString2)
82
    throws XServicesFault;
83
 
84
  @WebMethod(operationName="wrapInCDATA")
85
  @WSDLDocumentation("Wraps a String into a CDATA element")
86
  public abstract String wrapInCDATA(@WebParam(name="data") @XmlElement(required=true) String data)
87
  	throws XServicesFault;
127 brianR 88
 
89
  @WebMethod(operationName="selectXPath")
90
  @WSDLDocumentation("Select from xml document given as string using an XPath expression.")
91
  public abstract StringSplitType selectXPath(
92
		  @WebParam(name="sourcexml") @XmlElement(required=true) String source,
93
		  @WebParam(name="encoding") String encoding,
94
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
95
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1)
96
  	throws XServicesFault;
97
 
98
  @WebMethod(operationName="setAttribute")
99
  @WSDLDocumentation("Set an attribute.")
100
  public abstract String setAttribute(
101
		  @WebParam(name="sourcexml") @XmlElement(required=true) String source,
102
		  @WebParam(name="encoding") String encoding,
103
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
104
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
105
		  @WebParam(name="attribute") @XmlElement(nillable=false, required=true) AttributeType attr)
106
  	throws XServicesFault;
110 brianR 107
 
108
}