private Set<Class<?>> generatedWrapperBeanClass() { DataBinding b = getDataBinding(); if (b.getClass().getName().endsWith("JAXBDataBinding") && schemaLocations == null) { ServiceInfo serviceInfo = getService().getServiceInfos().get(0); WrapperClassGenerator wrapperGen = new WrapperClassGenerator(this, serviceInfo.getInterface(), getQualifyWrapperSchema()); return wrapperGen.generate(); } return Collections.emptySet(); }
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; }
BindingOperationInfo boi = getBindingOperationInfo(exchange); if (boi != null) { ret = boi.getBinding().getService().getInterface().getName();
public InterfaceInfo getInterface() { if (service == null) { return null; } return service.getInterface(); }
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); } }
public InterfaceInfo getInterface() { if (service == null) { return null; } return service.getInterface(); }
private void addInvokeOperation(boolean oneWay) { String name = oneWay ? INVOKE_ONEWAY_NAME : INVOKE_NAME; ServiceInfo info = client.getEndpoint().getEndpointInfo().getService(); OperationInfo opInfo = info.getInterface() .addOperation(oneWay ? INVOKE_ONEWAY_QNAME : INVOKE_QNAME); MessageInfo mInfo = opInfo.createMessage(new QName(DISPATCH_NS, name + "Request"), Type.INPUT); opInfo.setInput(name + "Request", mInfo); MessagePartInfo mpi = mInfo.addMessagePart("parameters"); if (context == null) { mpi.setTypeClass(cl); } mpi.setElement(true); if (!oneWay) { mInfo = opInfo.createMessage(new QName(DISPATCH_NS, name + "Response"), Type.OUTPUT); opInfo.setOutput(name + "Response", mInfo); mpi = mInfo.addMessagePart("parameters"); mpi.setElement(true); if (context == null) { mpi.setTypeClass(cl); } } for (BindingInfo bind : client.getEndpoint().getEndpointInfo().getService().getBindings()) { BindingOperationInfo bo = new BindingOperationInfo(bind, opInfo); bind.addOperation(bo); } }
private boolean checkNameCollision() { InterfaceInfo interfaceInfo = service.getInterface(); if (interfaceInfo != null) { for (OperationInfo operation : interfaceInfo.getOperations()) { if (!isValidOperation(operation)) { return false; } } } return true; } private boolean checkArray(String[] ar, String n) {
private MessageInfo getMessage(QName operationName, boolean isIn) { for (OperationInfo operation : service.getInterface().getOperations()) { if (operationName.equals(operation.getName()) && isIn) { return operation.getInput(); } return operation.getOutput(); } 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; }
protected InterfaceInfo getInterfaceInfo() { if (getEndpointInfo() != null) { return getEndpointInfo().getInterface(); } QName qn = this.getInterfaceName(); for (ServiceInfo si : getService().getServiceInfos()) { if (qn.equals(si.getInterface().getName())) { return si.getInterface(); } } throw new ServiceConstructionException(new Message("COULD_NOT_FIND_PORTTYPE", LOG, qn)); }
private void setServiceInfo(ServiceInfo service, LogEvent event) { event.setServiceName(service.getName()); InterfaceInfo iface = service.getInterface(); event.setPortTypeName(iface.getName()); }
private void setServiceInfo(ServiceInfo service, LogEvent event) { event.setServiceName(service.getName()); InterfaceInfo iface = service.getInterface(); event.setPortTypeName(iface.getName()); }
private void initMessagesMap() { messages = new ConcurrentHashMap<>(16, 0.75f, 2); for (OperationInfo operation : getInterface().getOperations()) { if (operation.getInput() != null) { messages.put(operation.getInput().getName(), operation.getInput()); } if (operation.getOutput() != null) { messages.put(operation.getOutput().getName(), operation.getOutput()); } } }
private void initMessagesMap() { messages = new ConcurrentHashMap<QName, MessageInfo>(16, 0.75f, 2); for (OperationInfo operation : getInterface().getOperations()) { if (operation.getInput() != null) { messages.put(operation.getInput().getName(), operation.getInput()); } if (operation.getOutput() != null) { messages.put(operation.getOutput().getName(), operation.getOutput()); } } }
public BindingInfo createBindingInfo(ServiceInfo service, String namespace, Object config) { NMRBindingInfo info = new NMRBindingInfo(service, NMRConstants.NS_NMR_BINDING); info.setName(new QName(service.getName().getNamespaceURI(), service.getName().getLocalPart() + "NMRBinding")); for (OperationInfo op : service.getInterface().getOperations()) { BindingOperationInfo bop = info.buildOperation(op.getName(), op.getInputName(), op.getOutputName()); info.addOperation(bop); } return info; }
void createSequenceResponse(final Object createResponse, ProtocolVariation protocol) throws RMException { LOG.fine("sending CreateSequenceResponse from client side"); RMConstants constants = protocol.getConstants(); final OperationInfo oi = reliableEndpoint.getEndpoint(protocol).getEndpointInfo().getService() .getInterface().getOperation(constants.getCreateSequenceResponseOnewayOperationName()); // TODO: need to set relatesTo invoke(oi, protocol, new Object[] {createResponse}); }
void acknowledge(DestinationSequence ds) throws RMException { final ProtocolVariation protocol = ds.getProtocol(); String address = ds.getAcksTo().getAddress().getValue(); if (RMUtils.getAddressingConstants().getAnonymousURI().equals(address)) { LOG.log(Level.WARNING, "STANDALONE_ANON_ACKS_NOT_SUPPORTED"); return; } RMConstants constants = protocol.getConstants(); OperationInfo oi = reliableEndpoint.getEndpoint(protocol).getEndpointInfo() .getService().getInterface().getOperation(constants.getSequenceAckOperationName()); invoke(oi, protocol, new Object[] {ds}, this.sequenceContext); }
void terminate(DestinationSequence ds) throws RMException { ProtocolVariation protocol = ds.getProtocol(); RMConstants constants = protocol.getConstants(); OperationInfo oi = reliableEndpoint.getEndpoint(protocol).getEndpointInfo() .getService().getInterface().getOperation(constants.getTerminateSequenceOperationName()); TerminateSequenceType ts = new TerminateSequenceType(); ts.setIdentifier(ds.getIdentifier()); ts.setLastMsgNumber(ds.getLastMessageNumber()); EncoderDecoder codec = protocol.getCodec(); invoke(oi, protocol, new Object[] {codec.convertToSend(ts)}, this.sequenceContext); }
void terminate(SourceSequence ss) throws RMException { ProtocolVariation protocol = ss.getProtocol(); RMConstants constants = protocol.getConstants(); OperationInfo oi = reliableEndpoint.getEndpoint(protocol).getEndpointInfo() .getService().getInterface().getOperation(constants.getTerminateSequenceOperationName()); TerminateSequenceType ts = new TerminateSequenceType(); ts.setIdentifier(ss.getIdentifier()); ts.setLastMsgNumber(ss.getCurrentMessageNr()); EncoderDecoder codec = protocol.getCodec(); invoke(oi, protocol, new Object[] {codec.convertToSend(ts)}, this.sequenceContext); }