Subversion Repositories XServices

Rev

Rev 93 | Go to most recent revision | Show entire file | Ignore 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
 *
39
 */
-
 
40
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
35
 */
41
public interface StringService {
36
@WebService(targetNamespace="http://ws.xservices.brutex.net")
42
	
-
 
43
	public static final String SERVICE_NAME = "StringService";
-
 
-
 
37
public abstract interface StringService
44
	
38
{
45
	final String OPERATION_REPLACEREGEX = "replaceRegEx";
39
  public static final String SERVICE_NAME = "StringService";
46
	final String OPERATION_MATCHREGEX = "matchRegEx";
40
  public static final String OPERATION_REPLACEREGEX = "replaceRegEx";
47
 
41
  public static final String OPERATION_MATCHREGEX = "matchRegEx";
48
 
42
  public static final String OPERATION_ENCODETOENTITIES = "encodeToXMLEntities";
49
	final static String PARAM_STRING = "string";
-
 
-
 
43
  public static final String PARAM_STRING = "string";
50
	final static String PARAM_SEARCH = "search";
44
  public static final String PARAM_SEARCH = "search";
51
	final static String PARAM_REPLACE = "replace";
45
  public static final String PARAM_REPLACE = "replace";
52
	final static String PARAM_FLAGS = "regexflags";
46
  public static final String PARAM_FLAGS = "regexflags";
53
		;
47
 
54
	/**
48
  @WebMethod(operationName="replaceRegEx")
55
	 * String replace using regular expression.
-
 
56
	 * @param res String
49
  @WSDLDocumentation("Store text based data")
57
	 * @param search regex search pattern
50
  public abstract StringReplaceType replaceRegEx(
58
	 * @param replace string replacement
51
		  @WebParam(name="string") String paramString1, 
59
	 * @param flags regex flags
52
		  @WebParam(name="search") String paramString2, 
60
	 * 
53
		  @WebParam(name="replace") String paramString3, 
61
	 * @return replacement
54
		  @WebParam(name="regexflags") String paramString4)
62
	 * @throws XServicesFault
55
    throws XServicesFault;
63
	 */
56
 
64
	@WebMethod(operationName=OPERATION_REPLACEREGEX)
57
  @WebMethod(operationName="matchRegEx")
65
	@WSDLDocumentation(value="Store text based data")
58
  @WSDLDocumentation("Match text based data")
66
	public abstract StringReplaceType replaceRegEx(
59
  public abstract StringMatchType matchRegEx(
67
			@WebParam(name = PARAM_STRING) String res,
60
		  @WebParam(name="string") String paramString1, 
68
			@WebParam(name = PARAM_SEARCH) String search,
61
		  @WebParam(name="search") String paramString2, 
69
			@WebParam(name = PARAM_REPLACE) String replace,
62
		  @WebParam(name="regexflags") String paramString3)
70
			@WebParam(name = PARAM_FLAGS) String flags) throws XServicesFault;
-
 
71
	
63
    throws XServicesFault;
72
	@WebMethod(operationName=OPERATION_MATCHREGEX)
64
 
73
	@WSDLDocumentation(value="Match text based data")
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;
-
 
70
  
-
 
71
  @WebMethod(operationName="splitString")
74
	public abstract StringMatchType matchRegEx(
72
  @WSDLDocumentation("Split a string into tokens")
75
			@WebParam(name = PARAM_STRING) String res,
73
  public abstract StringSplitType splitString( 
76
			@WebParam(name = PARAM_SEARCH) String search,
74
		  @WebParam(name="string") @XmlElement(required=true) String paramString,