public String getStyle(OperationInfo op) { Method m = op.getProperty("operation.method", Method.class); if (m != null) { return serviceFactory.isRPC(m) ? "rpc" : "document"; } return getStyle(); }
private boolean needWrapperClassInterceptor(ServiceInfo serviceInfo) { if (serviceInfo == null) { return false; } for (OperationInfo opInfo : serviceInfo.getInterface().getOperations()) { if (opInfo.isUnwrappedCapable() && opInfo.getProperty(ReflectionServiceFactoryBean.WRAPPERGEN_NEEDED) != null) { return true; } } return false; }
private void writerSoapEndpoint(PrintWriter writer, String basePath, AbstractDestination sd) { String absoluteURL = getAbsoluteAddress(basePath, sd); if (absoluteURL == null) { return; } writer.write("<tr><td>"); writer.write("<span class=\"porttypename\">" + sd.getEndpointInfo().getInterface().getName().getLocalPart() + "</span>"); writer.write("<ul>"); for (OperationInfo oi : sd.getEndpointInfo().getInterface().getOperations()) { if (!Boolean.TRUE.equals(oi.getProperty("operation.is.synthetic"))) { writer.write("<li>" + oi.getName().getLocalPart() + "</li>"); } } writer.write("</ul>"); writer.write("</td><td>"); writer.write("<span class=\"field\">Endpoint address:</span> " + "<span class=\"value\">" + absoluteURL + "</span>"); writer.write("<br/><span class=\"field\">WSDL :</span> " + "<a href=\"" + absoluteURL + "?wsdl\">" + sd.getEndpointInfo().getService().getName() + "</a>"); writer.write("<br/><span class=\"field\">Target namespace:</span> " + "<span class=\"value\">" + sd.getEndpointInfo().getService().getTargetNamespace() + "</span>"); addAtomLinkIfNeeded(absoluteURL, atomMap, writer); writer.write("</td></tr>"); }
@Override protected void initializeWSDLOperation(InterfaceInfo intf, OperationInfo o, Method method) { method = ((JaxWsServiceConfiguration)jaxWsConfiguration).getDeclaredMethod(method); o.setProperty(Method.class.getName(), method); o.setProperty(METHOD, method); initializeWrapping(o, method); // rpc out-message-part-info class mapping Operation op = (Operation)o.getProperty(WSDLServiceBuilder.WSDL_OPERATION); initializeClassInfo(o, method, op == null ? null : CastUtils.cast(op.getParameterOrdering(), String.class)); bindOperation(o, method); sendEvent(Event.INTERFACE_OPERATION_BOUND, o, method); }
public String getSoapAction(OperationInfo op) { String action = (String)op.getProperty("action"); if (action == null) { return defaultSoapAction; } return action; }
public String getSoapAction(OperationInfo op) { String action = (String)op.getProperty("action"); if (action == null) { return defaultSoapAction; } return action; }
public void setOperationInfo(final OperationInfo op) { this.operationInfo = op; setMethod((Method) op.getProperty("operation.method")); }
public void setOperationInfo(final OperationInfo op) { this.operationInfo = op; setMethod((Method) op.getProperty("operation.method")); }
public Set<Class<?>> generate() { for (OperationInfo opInfo : interfaceInfo.getOperations()) { if (opInfo.isUnwrappedCapable()) { Method method = (Method)opInfo.getProperty(ReflectionServiceFactoryBean.METHOD); if (method == null) { continue;
/** * Utility method for getting the method which is going to be invoked on the service by underlying invoker. */ public Method getTargetMethod(Exchange exchange) { Object o = exchange.getBindingOperationInfo().getOperationInfo().getProperty(Method.class.getName()); if (o != null && o instanceof Method) { return (Method)o; } else { throw new RuntimeException("Target method not found on OperationInfo"); } }
private Method getMethod(Service s, OperationInfo op) { Method m = op.getProperty(Method.class.getName(), Method.class); if (m != null) { return m; } MethodDispatcher md = (MethodDispatcher)s.get(MethodDispatcher.class.getName()); // The ibm jdk requires the simple frontend dependency to be // present for the SimpleMethodDispatcher cast below even if // md is null (sun jdk does not). So, for the jaxrs frontend, // we can exclude the simple frontend from the aegis databinding // dependency as long as this null check is here. if (md == null) { return null; } SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md; return smd.getPrimaryMethod(op); }
public String getStyle(OperationInfo op) { Method m = op.getProperty("operation.method", Method.class); if (m != null) { return serviceFactory.isRPC(m) ? "rpc" : "document"; } return getStyle(); }
protected Class<?> getDateType() { if (getServiceModel() == null) { return null; } for (OperationInfo op : getServiceModel().getInterface().getOperations()) { Method m = (Method) op.getProperty("operation.method"); for (Class<?> clz : m.getParameterTypes()) { if (clz == Date.class || clz == Calendar.class) { return clz; } } if (m.getReturnType() == Date.class || m.getReturnType() == Calendar.class) { return m.getReturnType(); } } return null; } }
private boolean needWrapperClassInterceptor(ServiceInfo serviceInfo) { if (serviceInfo == null) { return false; } for (OperationInfo opInfo : serviceInfo.getInterface().getOperations()) { if (opInfo.isUnwrappedCapable() && opInfo.getProperty(ReflectionServiceFactoryBean.WRAPPERGEN_NEEDED) != null) { return true; } } return false; }
private Annotation[] getReturnMethodAnnotations(MessagePartInfo mpi) { AbstractMessageContainer mi = mpi.getMessageInfo(); if (mi == null || !isOutputMessage(mi)) { return null; } OperationInfo oi = mi != null ? mi.getOperation() : null; return oi != null ? (Annotation[])oi.getProperty("method.return.annotations") : null; }
protected Collection<JavaClass> generateBeanClasses(final ServiceInfo serviceInfo) { Set<Class<?>> exceptionClasses = new HashSet<>(); String seiPackageName = null; for (OperationInfo op : serviceInfo.getInterface().getOperations()) { Method method = (Method) op.getProperty("operation.method"); exceptionClasses.addAll(getExceptionClasses(method)); seiPackageName = getSEIPackage(method); } Collection<JavaClass> faultBeanClasses = new HashSet<>(); String defaultPackage = seiPackageName + ".jaxws"; FaultBean bean = new FaultBean(); for (Class<?> clz : exceptionClasses) { if (!bean.faultBeanExists(clz)) { faultBeanClasses.add(bean.transform(clz, defaultPackage)); } } return faultBeanClasses; }
protected void initializeWSDLOperation(InterfaceInfo intf, OperationInfo o, Method method) { // rpc out-message-part-info class mapping Operation op = (Operation)o.getProperty(WSDLServiceBuilder.WSDL_OPERATION); if (initializeClassInfo(o, method, op == null ? null : CastUtils.cast(op.getParameterOrdering(), String.class))) { bindOperation(o, method); o.setProperty(ReflectionServiceFactoryBean.METHOD, method); sendEvent(Event.INTERFACE_OPERATION_BOUND, o, method); } else { LOG.log(Level.WARNING, "NO_METHOD_FOR_OP", o.getName()); } }
protected void initializeWSDLOperation(InterfaceInfo intf, OperationInfo o, Method method) { // rpc out-message-part-info class mapping Operation op = (Operation)o.getProperty(WSDLServiceBuilder.WSDL_OPERATION); if (initializeClassInfo(o, method, op == null ? null : CastUtils.cast(op.getParameterOrdering(), String.class))) { bindOperation(o, method); o.setProperty(ReflectionServiceFactoryBean.METHOD, method); sendEvent(Event.INTERFACE_OPERATION_BOUND, o, method); } else { LOG.log(Level.WARNING, "NO_METHOD_FOR_OP", o.getName()); } }
protected void initializeWSDLOperation(InterfaceInfo intf, OperationInfo o, Method method) { // rpc out-message-part-info class mapping Operation op = (Operation)o.getProperty(WSDLServiceBuilder.WSDL_OPERATION); if (initializeClassInfo(o, method, op == null ? null : CastUtils.cast(op.getParameterOrdering(), String.class))) { bindOperation(o, method); o.setProperty(ReflectionServiceFactoryBean.METHOD, method); sendEvent(Event.INTERFACE_OPERATION_BOUND, o, method); } else { LOG.log(Level.WARNING, "NO_METHOD_FOR_OP", o.getName()); } }
@Override protected void initializeWSDLOperation(InterfaceInfo intf, OperationInfo o, Method method) { method = ((JaxWsServiceConfiguration)jaxWsConfiguration).getDeclaredMethod(method); o.setProperty(Method.class.getName(), method); o.setProperty(METHOD, method); initializeWrapping(o, method); // rpc out-message-part-info class mapping Operation op = (Operation)o.getProperty(WSDLServiceBuilder.WSDL_OPERATION); initializeClassInfo(o, method, op == null ? null : CastUtils.cast(op.getParameterOrdering(), String.class)); bindOperation(o, method); sendEvent(Event.INTERFACE_OPERATION_BOUND, o, method); }