Added specific webService class and changed from Multiprintstream to java.logger.Logger
This commit is contained in:
parent
3d4b05c697
commit
19b5b822a9
11 changed files with 464 additions and 279 deletions
56
src/zutil/network/ws/WSObject.java
Normal file
56
src/zutil/network/ws/WSObject.java
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
package zutil.network.ws;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* This class is used as an return Object for a web service.
|
||||
* If an class implements this interface then it can return
|
||||
* multiple values through the SOAPInterface. Example:
|
||||
* <pre>
|
||||
* private static class TestObject implements WSObject{
|
||||
* @SOAPFieldName("name")
|
||||
* public String name;
|
||||
* @SOAPFieldName("lastname")
|
||||
* public String lastname;
|
||||
*
|
||||
* public TestObject(String n, String l){
|
||||
* name = n;
|
||||
* lastname = l;
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @author Ziver
|
||||
*
|
||||
*/
|
||||
public interface WSObject{
|
||||
/**
|
||||
* Specifies the name of a field.
|
||||
* The fields that are available in the service should
|
||||
* be declared public.
|
||||
*
|
||||
* @author Ziver
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface WSFieldName {
|
||||
String value();
|
||||
boolean optional() default false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This generates an documentation tag in the
|
||||
* WSDL for the object type
|
||||
*
|
||||
* @author Ziver
|
||||
*/
|
||||
/*
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface WSDLDocumentation {
|
||||
String value();
|
||||
}*/
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue