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; }
public JAXWSHttpSpiDestination(Bus b, DestinationRegistry registry, EndpointInfo ei) throws IOException { super(b, registry, ei, ei.getAddress(), false); }
private Annotation[] getMethodParameterAnnotations(final MessagePartInfo mpi) { Annotation[] a = (Annotation[])mpi.getProperty(ReflectionServiceFactoryBean.PARAM_ANNOTATION); if (a != null) { return a; } Annotation[][] paramAnno = (Annotation[][])mpi .getProperty(ReflectionServiceFactoryBean.METHOD_PARAM_ANNOTATIONS); int index = mpi.getIndex(); if (paramAnno != null && index < paramAnno.length && index >= 0) { return paramAnno[index]; } return null; }
private void addInvokeOperation(QName operationName, boolean oneWay) { ServiceInfo info = client.getEndpoint().getEndpointInfo().getService(); OperationInfo invokeOpInfo = info.getInterface() .getOperation(oneWay ? INVOKE_ONEWAY_QNAME : INVOKE_QNAME); OperationInfo opInfo = info.getInterface().addOperation(operationName); opInfo.setInput(invokeOpInfo.getInputName(), invokeOpInfo.getInput()); if (!oneWay) { opInfo.setOutput(invokeOpInfo.getOutputName(), invokeOpInfo.getOutput()); } for (BindingInfo bind : client.getEndpoint().getEndpointInfo().getService().getBindings()) { BindingOperationInfo bo = new BindingOperationInfo(bind, opInfo); bind.addOperation(bo); } }
private MessagePartInfo getFaultMessagePart(QName qname, OperationInfo op) { for (FaultInfo faultInfo : op.getFaults()) { for (MessagePartInfo mpi : faultInfo.getMessageParts()) { String ns = null; if (mpi.isElement()) { ns = mpi.getElementQName().getNamespaceURI(); } else { ns = mpi.getTypeQName().getNamespaceURI(); } if (qname.getLocalPart().equals(mpi.getConcreteName().getLocalPart()) && qname.getNamespaceURI().equals(ns)) { return mpi; } } } return null; }
void initializeWrapping(OperationInfo o, Method selected) { Class<?> responseWrapper = getResponseWrapper(selected); if (responseWrapper != null) { o.getOutput().getFirstMessagePart().setTypeClass(responseWrapper); } if (getResponseWrapperClassName(selected) != null) { o.getOutput().getFirstMessagePart().setProperty("RESPONSE.WRAPPER.CLASSNAME", getResponseWrapperClassName(selected)); } Class<?> requestWrapper = getRequestWrapper(selected); if (requestWrapper != null) { o.getInput().getFirstMessagePart().setTypeClass(requestWrapper); } if (getRequestWrapperClassName(selected) != null) { o.getInput().getFirstMessagePart().setProperty("REQUEST.WRAPPER.CLASSNAME", getRequestWrapperClassName(selected)); } }
private String computeAction(OperationInfo op, String postFix) { StringBuilder s = new StringBuilder(op.getName().getNamespaceURI()); if (s.charAt(s.length() - 1) != '/') { s.append('/'); } s.append(op.getInterface().getName().getLocalPart()) .append('/').append(op.getName().getLocalPart()).append(postFix); return s.toString(); }
/** * This method returns the name of the conduit, which is based on the * endpoint name plus the SC_HTTP_CONDUIT_SUFFIX. * @return */ public final String getConduitName() { return endpointInfo.getName() + SC_HTTP_CONDUIT_SUFFIX; }
public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocation(s); } }
private FaultInfo getFaultInfo(final OperationInfo operation, final Class<?> expClass) { for (FaultInfo fault : operation.getFaults()) { if (fault.getProperty(Class.class.getName()) == expClass) { return fault; } } return null; } private void buildWSAActions(OperationInfo operation, Method method) {
@Override public QName getInPartName(OperationInfo op, Method method, int paramNumber) { if (paramNumber < 0) { return null; } return getPartName(op, method, paramNumber, op.getInput(), "arg", true); }
/** * This call creates a new HTTPConduit for the endpoint. It is equivalent * to calling getConduit without an EndpointReferenceType. */ public Conduit getConduit(EndpointInfo endpointInfo, Bus bus) throws IOException { return getConduit(endpointInfo, endpointInfo.getTarget(), bus); }
public void addExtensor(Object el) { super.addExtensor(el); if (el instanceof AddressType) { saddress = (AddressType)el; } } }
public void setMTOMEnabled(boolean flag) { soapBinding.setProperty(Message.MTOM_ENABLED, flag); }
private List<ExtensibilityElement> getExtensors(Extensible extensibleInfo) { return (null != extensibleInfo) ? extensibleInfo.getExtensors(ExtensibilityElement.class) : null; }
private boolean isPrivate(EndpointInfo ei, List<String> privateEndpoints) { if (privateEndpoints != null) { for (String s : privateEndpoints) { if (ei.getAddress().endsWith(s)) { return true; } } } return false; }
public AbstractHTTPDestination createDestination(EndpointInfo endpointInfo, Bus bus, DestinationRegistry registry) throws IOException { return new ServletDestination(bus, registry, endpointInfo, endpointInfo.getAddress()); } }
/** * This is part of the Configurable interface which retrieves the * configuration from spring injection. */ // REVISIT:What happens when the endpoint/bean name is null? public String getBeanName() { if (endpointInfo.getName() != null) { return endpointInfo.getName().toString() + ".http-conduit"; } return null; }