public WebServiceRefElement(Member member, PropertyDescriptor pd) { super(member, pd); AnnotatedElement ae = (AnnotatedElement) member; WebServiceRef resource = ae.getAnnotation(WebServiceRef.class); String resourceName = resource.name(); Class<?> resourceType = resource.type(); this.isDefaultName = !StringUtils.hasLength(resourceName); if (this.isDefaultName) { resourceName = this.member.getName(); if (this.member instanceof Method && resourceName.startsWith("set") && resourceName.length() > 3) { resourceName = Introspector.decapitalize(resourceName.substring(3)); } } if (resourceType != null && !Object.class.equals(resourceType)) { checkResourceType(resourceType); } else { // No resource type specified... check field/method. resourceType = getResourceType(); } this.name = resourceName; this.elementType = resourceType; if (Service.class.isAssignableFrom(resourceType)) { this.lookupType = resourceType; } else { this.lookupType = (!Object.class.equals(resource.value()) ? resource.value() : Service.class); } this.mappedName = resource.mappedName(); this.wsdlLocation = resource.wsdlLocation(); }
public WebServiceRefElement(Member member, AnnotatedElement ae, PropertyDescriptor pd) { super(member, pd); WebServiceRef resource = ae.getAnnotation(WebServiceRef.class); String resourceName = resource.name(); Class<?> resourceType = resource.type(); this.isDefaultName = !StringUtils.hasLength(resourceName); if (this.isDefaultName) { resourceName = this.member.getName(); if (this.member instanceof Method && resourceName.startsWith("set") && resourceName.length() > 3) { resourceName = Introspector.decapitalize(resourceName.substring(3)); } } if (resourceType != null && Object.class != resourceType) { checkResourceType(resourceType); } else { // No resource type specified... check field/method. resourceType = getResourceType(); } this.name = resourceName; this.elementType = resourceType; if (Service.class.isAssignableFrom(resourceType)) { this.lookupType = resourceType; } else { this.lookupType = resource.value(); } this.mappedName = resource.mappedName(); this.wsdlLocation = resource.wsdlLocation(); }
/** * This method will be used to attach @WebServiceRefs annotation data to the * <code>DescriptionBuilderComposite</code> * * @param composite - <code>DescriptionBuilderComposite</code> */ private void attachWebServiceRefsAnnotation(DescriptionBuilderComposite composite) { WebServiceRefs webServiceRefs = (WebServiceRefs)ConverterUtils.getAnnotation( WebServiceRefs.class, serviceClass); if (webServiceRefs != null) { WebServiceRef[] refs = webServiceRefs.value(); for (WebServiceRef ref : refs) { WebServiceRefAnnot wsrAnnot = ConverterUtils.createWebServiceRefAnnot( ref); composite.setWebServiceRefAnnot(wsrAnnot); } } }
/** * This is a helper method to create a <code>WebServiceRefAnnot</code> since the * * @param webServiceRef - <code>WebServiceRef</code> * @return - <code>WebServiceRefAnnot</code> * @WebServiceRef annotation may be present on a Type, Method, or Field. */ public static WebServiceRefAnnot createWebServiceRefAnnot(WebServiceRef webServiceRef) { WebServiceRefAnnot wsrAnnot = WebServiceRefAnnot.createWebServiceRefAnnotImpl(); wsrAnnot.setMappedName(webServiceRef.mappedName()); wsrAnnot.setName(webServiceRef.name()); wsrAnnot.setType(webServiceRef.type()); wsrAnnot.setValue(webServiceRef.value()); wsrAnnot.setWsdlLocation(webServiceRef.wsdlLocation()); return wsrAnnot; }
/** * This method is use to attach @WebServiceRef annotation data to a composite object. * * @param composite - <code>TMFAnnotationComposite</code> * @param annotatedElement - <code>AnnotatedElement</code> */ public static void attachWebServiceRefAnnotation(TMFAnnotationComposite composite, AnnotatedElement annotatedElement) { WebServiceRef webServiceRef = (WebServiceRef)ConverterUtils.getAnnotation( WebServiceRef.class, annotatedElement); if (webServiceRef != null) { WebServiceRefAnnot wsrAnnot = ConverterUtils.createWebServiceRefAnnot( webServiceRef); composite.setWebServiceRefAnnot(wsrAnnot); } }
@WebServiceRef(value=OrderServiceService.class, wsdlLocation = "http://localhost:9999/OrderService?wsdl") public void setMyService(OrderService myService) { this.myService = myService; }
@WebServiceRef(name = "EndpointService5") static void setService5(EndpointService service) { EndpointClientOne.service5 = service; }
@WebServiceRef static void setService6(EndpointService service) { EndpointClientOne.service6 = service; }
@WebServiceRef(name = "EndpointService5") public void setService5(EndpointService service) { this.service5 = service; }
@WebServiceRef public void setService6(EndpointService service) { this.service6 = service; }
@WebServiceRef(value = EndpointService.class, mappedName="jbossws-client/service/TestService", wsdlLocation="META-INF/wsdl/TestService.wsdl") public void setEndpoint2(EndpointInterface endpoint2) { this._endpoint2 = endpoint2; }