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(); }
private QName getFaultName(WebFault wf, Class<?> cls, OperationInfo op) { String ns = wf.targetNamespace(); if (StringUtils.isEmpty(ns)) { ns = op.getName().getNamespaceURI(); } String name = wf.name(); if (StringUtils.isEmpty(name)) { name = cls.getSimpleName(); } return new QName(ns, name); }
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 public QName getRequestWrapperName(OperationInfo op, Method method) { Method m = getDeclaredMethod(method); RequestWrapper rw = m.getAnnotation(RequestWrapper.class); String nm = null; String lp = null; if (rw != null) { nm = rw.targetNamespace(); lp = rw.localName(); } WebMethod meth = m.getAnnotation(WebMethod.class); if (meth != null && StringUtils.isEmpty(lp)) { lp = meth.operationName(); } if (StringUtils.isEmpty(nm)) { nm = op.getName().getNamespaceURI(); } if (!StringUtils.isEmpty(nm) && !StringUtils.isEmpty(lp)) { return new QName(nm, lp); } return null; }
tns = op.getName().getNamespaceURI();
@Override public QName getResponseWrapperName(OperationInfo op, Method method) { Method m = getDeclaredMethod(method); ResponseWrapper rw = m.getAnnotation(ResponseWrapper.class); String nm = null; String lp = null; if (rw != null) { nm = rw.targetNamespace(); lp = rw.localName(); } WebMethod meth = m.getAnnotation(WebMethod.class); if (meth != null && StringUtils.isEmpty(lp)) { lp = meth.operationName(); if (!StringUtils.isEmpty(lp)) { lp += "Response"; } } if (StringUtils.isEmpty(nm)) { nm = op.getName().getNamespaceURI(); } if (!StringUtils.isEmpty(nm) && !StringUtils.isEmpty(lp)) { return new QName(nm, lp); } return null; }
tns = op.getName().getNamespaceURI();
/** * Adds an operation to this service. * * @param operation the operation. */ void addOperation(OperationInfo operation) { operations.put(operation.getName(), operation); }
/** * Removes an operation from this service. * * @param operation the operation. */ public void removeOperation(OperationInfo operation) { operations.remove(operation.getName()); }
final List<MessagePartInfo> messageParts; if (o.getInput().getMessagePartsNumber() == 0) { MessagePartInfo inf = o.getInput().addMessagePart(o.getName()); inf.setConcreteName(o.getName()); messageParts = o.getInput().getMessageParts(); bop.getInput().setMessageParts(messageParts); final List<MessagePartInfo> messageParts; if (o.getOutput().getMessagePartsNumber() == 0) { MessagePartInfo inf = o.getOutput().addMessagePart(o.getName()); inf.setConcreteName(new QName(o.getName().getNamespaceURI(), o.getName().getLocalPart() + "Response")); messageParts = o.getOutput().getMessageParts(); bop.getOutput().setMessageParts(messageParts);
@Override public QName getOutParameterName(OperationInfo op, Method method, int paramNumber) { return new QName(op.getName().getNamespaceURI(), getDefaultLocalName(op, method, paramNumber, "return")); }
/** {@inheritDoc}*/ @Override public String getAction(OperationInfo op, Method method) { String action = op.getName().getLocalPart(); if (StringUtils.isEmpty(action)) { action = method.getName(); } return action; } }
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(); }
public BindingOperationInfo buildOperation(QName opName, String inName, String outName) { for (OperationInfo op : getInterface().getOperations()) { if (opName.equals(op.getName()) && nameEquals(inName, op.getInputName(), op.getName().getLocalPart() + "Request") && nameEquals(outName, op.getOutputName(), op.getName().getLocalPart() + "Response")) { return new BindingOperationInfo(this, op); } } return null; }
private static String getActionBaseUri(final OperationInfo operation) { String interfaceName = operation.getInterface().getName().getLocalPart(); return addPath(operation.getName().getNamespaceURI(), interfaceName); } private static String getDelimiter(String uri) {
public String getStyle(OperationInfo operation) { SoapOperationInfo opInfo = getOperation(operation.getName()).getExtensor(SoapOperationInfo.class); if (opInfo != null) { return opInfo.getStyle(); } return style; }
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; }
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()); } }