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>"); }
builder.endpointName(this.endpoint.getEndpointInfo().getName()); if (this.endpoint.getEndpointInfo().getService().getDescription() != null) { builder.wsdlDocumentLocation(this.endpoint.getEndpointInfo().getService().getDescription() .getBaseURI());
/** * updates the HTTPClientPolicy that is compatible with the assertions * included in the service, endpoint, operation and message policy subjects * if a PolicyDataEngine is installed * * wsdl extensors are superseded by policies which in * turn are superseded by injection */ private void updateClientPolicy(Message m) { if (!clientSidePolicyCalced) { PolicyDataEngine policyEngine = bus.getExtension(PolicyDataEngine.class); if (policyEngine != null && endpointInfo.getService() != null) { clientSidePolicy = policyEngine.getClientEndpointPolicy(m, endpointInfo, this, new ClientPolicyCalculator()); if (clientSidePolicy != null) { clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice clientSidePolicy.addPropertyChangeListener(this); } } } clientSidePolicyCalced = true; }
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 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); } }
Definition def = endpointInfo.getService() .getProperty(WSDLServiceBuilder.WSDL_DEFINITION, Definition.class); if (def == null) {
@Override public boolean appliesTo(EndpointInfo ei) { if (ei == null) { return false; } return (ei.getService() != null) && (ei.getService().getName() != null) && (ei.getName() != null) && wsdl11XPointer.matchesPort(ei.getService().getTargetNamespace(), ei.getService().getName().getLocalPart(), ei.getName().getLocalPart()); }
@Override public boolean appliesTo(EndpointInfo ei) { if (ei == null) { return false; } return (ei.getService() != null) && (ei.getService().getName() != null) && (ei.getName() != null) && wsdl11XPointer.matchesPort(ei.getService().getTargetNamespace(), ei.getService().getName().getLocalPart(), ei.getName().getLocalPart()); }
public ServiceInfo createService() { try { return createEndpoint().getEndpointInfo().getService(); } catch (Exception e) { throw new RuntimeException(e); } }
public static QName getServiceQName(EndpointInfo ei) { InterfaceInfo ii = ei.getInterface(); if (ii != null) { return ii.getName(); } else if (ei.getService() != null) { return ei.getService().getName(); } else { return ei.getName(); } } }
public static QName getServiceQName(EndpointInfo ei) { InterfaceInfo ii = ei.getInterface(); if (ii != null) { return ii.getName(); } else if (ei.getService() != null) { return ei.getService().getName(); } else { return ei.getName(); } } }
public CorbaConduit(EndpointInfo ei, EndpointReferenceType ref, OrbConfig config) { endpointInfo = ei; target = getTargetReference(ref); orbConfig = config; typeMap = TypeMapCache.get(ei.getService()); }
public static QName getServiceQName(EndpointInfo ei) { InterfaceInfo ii = ei.getInterface(); if (ii != null) { return ii.getName(); } else if (ei.getService() != null) { return ei.getService().getName(); } else { return ei.getName(); } } }
public void setEpInfo(Message message, final LogEvent event) { EndpointInfo endpoint = getEPInfo(message); event.setPortName(endpoint.getName()); event.setPortTypeName(endpoint.getName()); String opName = isSOAPMessage(message) ? getOperationName(message) : getRestOperationName(message); event.setOperationName(opName); if (endpoint.getService() != null) { setServiceInfo(endpoint.getService(), event); } }
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}); }
public void setEpInfo(Message message, final LogEvent event) { EndpointInfo endpoint = getEPInfo(message); event.setPortName(endpoint.getName()); event.setPortTypeName(endpoint.getName()); String opName = isSOAPMessage(message) ? getOperationName(message) : getRestOperationName(message); event.setOperationName(opName); if (endpoint.getService() != null) { setServiceInfo(endpoint.getService(), event); } }
void initializePolicy(Message m) { if (engine != null) { policy = engine.getAggregatedServicePolicy(ei.getService(), m); policy = policy.merge(engine.getAggregatedEndpointPolicy(ei, m)); if (!policy.isEmpty()) { policy = policy.normalize(engine.getRegistry(), true); } } }
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); }