@Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface WebServiceClient { /** * The local name of the Web service. **/ String name() default "";
/** * The namespace for the Web service. **/ String targetNamespace() default "";
/** * The location of the WSDL document for the service (a URL). **/ String wsdlLocation() default ""; }
2. 注解@WebServiceClient是如何被使用的
使用注解@WebServiceClient:
1 2 3 4 5 6 7
// 1.在类的上方定义注解 @WebServiceClient(name = "databaseService", targetNamespace = "http://server.webservice.com/", wsdlLocation = "http://ip/project_name/databaseService?wsdl") @Component // 2.继承Service public class DatabaseService_Service extends Service {
}
构造器:
1 2 3
public DatabaseService_Service() { super(DATABASESERVICE_WSDL_LOCATION, new QName("http://server.webservice.com/", "databaseService")); }
近期评论