Subversion Repositories XServices

Rev

Rev 127 | Details | Compare with Previous | 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;
30
 
31
/**
32
 * @author Brian Rosenberger, bru(at)brutex.de
33
 *
34
 */
35
@WebService(targetNamespace="http://ws.xservices.brutex.net")
36
public abstract interface XmlService
37
{
38
  public static final String SERVICE_NAME = "XmlService";
39
  public static final String OPERATION_APPENDTO = "appendTo";
40
  public static final String OPERATION_REPLACE = "replaceNode";
41
  public static final String PARAM_XPATH = "xpath";
42
  public static final String PARAM_XML = "xmldata";
43
 
44
  @WebMethod(operationName="insertNodes")
45
  @WSDLDocumentation("Insert an XML fragment into an XML document given as string.")
46
  public abstract String insertNodes(
47
		  @WebParam(name="sourcexml") String source,
127 brianR 48
		  @WebParam(name="encoding") String encoding,
110 brianR 49
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
50
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
51
		  @WebParam(name="xmldata") String paramString2)
52
    throws XServicesFault;
53
 
54
  @WebMethod(operationName="insertNodes2")
55
  @WSDLDocumentation("Insert an XML fragment into an XML document given as file.")
56
  public abstract String insertNodesFromFile(
57
		  @WebParam(name="file") FileResource paramFileResource,
58
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
59
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
60
		  @WebParam(name="xmldata") String paramString2)
61
    throws XServicesFault;
62
 
63
  @WebMethod(operationName="replaceNodes")
64
  @WSDLDocumentation("Replaces matched XML nodes with an XML document given as string.")
65
  public abstract String replaceNodes(
127 brianR 66
		  @WebParam(name="sourcexml") String source,
67
		  @WebParam(name="encoding") String encoding,
110 brianR 68
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
69
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
70
		  @WebParam(name="xmldata") String paramString2)
71
    throws XServicesFault;
72
 
73
  @WebMethod(operationName="replaceNodes2")
74
  @WSDLDocumentation("Replaces matched XML nodes with an XML document given as file.")
75
  public abstract String replaceNodesFromFile(
76
		  @WebParam(name="file") FileResource paramFileResource,
77
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
78
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
79
		  @WebParam(name="xmldata") String paramString2)
80
    throws XServicesFault;
81
 
82
  @WebMethod(operationName="wrapInCDATA")
83
  @WSDLDocumentation("Wraps a String into a CDATA element")
84
  public abstract String wrapInCDATA(@WebParam(name="data") @XmlElement(required=true) String data)
85
  	throws XServicesFault;
127 brianR 86
 
87
  @WebMethod(operationName="selectXPath")
88
  @WSDLDocumentation("Select from xml document given as string using an XPath expression.")
89
  public abstract StringSplitType selectXPath(
90
		  @WebParam(name="sourcexml") @XmlElement(required=true) String source,
91
		  @WebParam(name="encoding") String encoding,
92
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
93
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1)
94
  	throws XServicesFault;
95
 
96
  @WebMethod(operationName="setAttribute")
97
  @WSDLDocumentation("Set an attribute.")
98
  public abstract String setAttribute(
99
		  @WebParam(name="sourcexml") @XmlElement(required=true) String source,
100
		  @WebParam(name="encoding") String encoding,
101
		  @WebParam(name="namespaceList") NamespaceListType paramNamespaceListType,
102
		  @WebParam(name="xpath") @XmlElement(required=true) String paramString1,
103
		  @WebParam(name="attribute") @XmlElement(nillable=false, required=true) AttributeType attr)
104
  	throws XServicesFault;
110 brianR 105
 
106
}