Subversion Repositories XServices

Rev

Rev 93 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 93 Rev 112
Line 1... Line 1...
1
/*
1
/*
2
 *   Copyright 2012 Brian Rosenberger (Brutex Network)
2
 *   Copyright 2013 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
 *
Line 14... Line 14...
14
 *   limitations under the License.
14
 *   limitations under the License.
15
 */
15
 */
Line 16... Line 16...
16
 
16
 
Line -... Line 17...
-
 
17
package net.brutex.xservices.ws;
-
 
18
 
17
package net.brutex.xservices.ws;
19
import java.util.ArrayList;
18
 
20
 
19
import javax.jws.WebMethod;
21
import javax.jws.WebMethod;
-
 
22
import javax.jws.WebParam;
Line 20... Line -...
20
import javax.jws.WebParam;
-
 
21
import javax.jws.WebService;
23
import javax.jws.WebService;
22
 
24
import javax.xml.bind.annotation.XmlElement;
23
import net.brutex.xservices.types.ReturnCode;
25
 
24
import net.brutex.xservices.types.StringMatchType;
-
 
25
import net.brutex.xservices.types.StringReplaceType;
-
 
26
import net.brutex.xservices.types.TargetNodeType;
-
 
27
import net.brutex.xservices.types.ant.AttachmentType;
-
 
Line 28... Line 26...
28
import net.brutex.xservices.types.ant.CollectionType;
26
import net.brutex.xservices.types.StringMatchType;
Line 29... Line 27...
29
import net.brutex.xservices.types.ant.FileResource;
27
import net.brutex.xservices.types.StringReplaceType;
30
import net.brutex.xservices.util.BrutexNamespaces;
-
 
31
 
28
import net.brutex.xservices.types.StringSplitType;
32
import org.apache.cxf.annotations.WSDLDocumentation;
-
 
33
 
29
 
34
/**
30
import org.apache.cxf.annotations.WSDLDocumentation;
35
 * String operation services.
31
 
36
 * @author Brian Rosenberger
32
/**
37
 * @since 0.5.0
33
 * @author Brian Rosenberger, bru(at)brutex.de
38
 *
34
 *
-
 
35
 */
-
 
36
@WebService(targetNamespace="http://ws.xservices.brutex.net")
-
 
37
public abstract interface StringService
-
 
38
{
-
 
39
  public static final String SERVICE_NAME = "StringService";
-
 
40
  public static final String OPERATION_REPLACEREGEX = "replaceRegEx";
-
 
41
  public static final String OPERATION_MATCHREGEX = "matchRegEx";
Line 39... Line -...
39
 */
-
 
40
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
-
 
41
public interface StringService {
-
 
42
	
-
 
43
	public static final String SERVICE_NAME = "StringService";
-
 
44
	
-
 
45
	final String OPERATION_REPLACEREGEX = "replaceRegEx";
-
 
46
	final String OPERATION_MATCHREGEX = "matchRegEx";
-
 
47
 
-
 
48
 
-
 
49
	final static String PARAM_STRING = "string";
-
 
50
	final static String PARAM_SEARCH = "search";
-
 
51
	final static String PARAM_REPLACE = "replace";
-
 
52
	final static String PARAM_FLAGS = "regexflags";
-
 
53
		;
-
 
54
	/**
-
 
55
	 * String replace using regular expression.
-
 
56
	 * @param res String
-
 
57
	 * @param search regex search pattern
-
 
58
	 * @param replace string replacement
42
  public static final String OPERATION_ENCODETOENTITIES = "encodeToXMLEntities";
59
	 * @param flags regex flags
43
  public static final String PARAM_STRING = "string";
60
	 * 
44
  public static final String PARAM_SEARCH = "search";
61
	 * @return replacement
45
  public static final String PARAM_REPLACE = "replace";
62
	 * @throws XServicesFault
46
  public static final String PARAM_FLAGS = "regexflags";
63
	 */
47
 
64
	@WebMethod(operationName=OPERATION_REPLACEREGEX)
48
  @WebMethod(operationName="replaceRegEx")
-
 
49
  @WSDLDocumentation("Store text based data")
Line 65... Line 50...
65
	@WSDLDocumentation(value="Store text based data")
50
  public abstract StringReplaceType replaceRegEx(
66
	public abstract StringReplaceType replaceRegEx(
51
		  @WebParam(name="string") String paramString1, 
67
			@WebParam(name = PARAM_STRING) String res,
52
		  @WebParam(name="search") String paramString2, 
68
			@WebParam(name = PARAM_SEARCH) String search,
53
		  @WebParam(name="replace") String paramString3, 
69
			@WebParam(name = PARAM_REPLACE) String replace,
54
		  @WebParam(name="regexflags") String paramString4)
70
			@WebParam(name = PARAM_FLAGS) String flags) throws XServicesFault;
55
    throws XServicesFault;
-
 
56
 
-
 
57
  @WebMethod(operationName="matchRegEx")
-
 
58
  @WSDLDocumentation("Match text based data")
-
 
59
  public abstract StringMatchType matchRegEx(
-
 
60
		  @WebParam(name="string") String paramString1, 
-
 
61
		  @WebParam(name="search") String paramString2, 
-
 
62
		  @WebParam(name="regexflags") String paramString3)
71
	
63
    throws XServicesFault;
-
 
64
 
-
 
65
  @WebMethod(operationName="encodeToXMLEntities")
-
 
66
  @WSDLDocumentation("Match text based data")
-
 
67
  public abstract String encodeToXMLEntities(
-
 
68
		  @WebParam(name="string") @XmlElement(required=true) String paramString)
-
 
69
    throws XServicesFault;
Line 72... Line 70...
72
	@WebMethod(operationName=OPERATION_MATCHREGEX)
70