Subversion Repositories XServices

Rev

Rev 110 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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