Codota Logo
OperationInfo
Code IndexAdd Codota to your IDE (free)

How to use
OperationInfo
in
org.apache.cxf.service.model

Best Java code snippets using org.apache.cxf.service.model.OperationInfo (Showing top 20 results out of 396)

Refine searchRefine arrow

  • QName
  • MessageInfo
  • MessagePartInfo
  • BindingOperationInfo
  • InterfaceInfo
  • ServiceInfo
  • Exchange
  • Common ways to obtain OperationInfo
private void myMethod () {
OperationInfo o =
  • Codota IconBindingOperationInfo bop;bop.getOperationInfo()
  • Smart code suggestions by Codota
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

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();
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

  bop.getOperationInfo().setUnwrappedOperation(null);
if (o.getInput() != null) {
  final List<MessagePartInfo> messageParts;
  if (o.getInput().getMessagePartsNumber() == 0) {
    MessagePartInfo inf = o.getInput().addMessagePart(o.getName());
    inf.setConcreteName(o.getName());
    messageParts = o.getInput().getMessageParts();
    messageParts = o.getInput().getMessageParts();
if (o.getOutput() != null) {
  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();
    messageParts = o.getOutput().getMessageParts();
OperationInfo op = bind.getInterface().getOperation(catchAll);
if (op == null) {
  op = bind.getInterface().addOperation(catchAll);
  String name = catchAll.getLocalPart();
  MessageInfo mInfo = op.createMessage(new QName(catchAll.getNamespaceURI(),
                          name + "Request"),
                          MessageInfo.Type.INPUT);
  op.setInput(catchAll.getLocalPart() + "Request", mInfo);
origin: org.apache.cxf/cxf-rt-frontend-jaxws

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);
  }
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

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;
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

public Set<Class<?>> generate() {
  for (OperationInfo opInfo : interfaceInfo.getOperations()) {
    if (opInfo.isUnwrappedCapable()) {
      Method method = (Method)opInfo.getProperty(ReflectionServiceFactoryBean.METHOD);
      if (method == null) {
        continue;
      MessagePartInfo inf = opInfo.getInput().getFirstMessagePart();
      if (inf.getTypeClass() == null) {
        MessageInfo messageInfo = opInfo.getUnwrappedOperation().getInput();
        createWrapperClass(inf,
                  messageInfo,
                  true);
      MessageInfo messageInfo = opInfo.getUnwrappedOperation().getOutput();
      if (messageInfo != null) {
        inf = opInfo.getOutput().getFirstMessagePart();
        if (inf.getTypeClass() == null) {
          createWrapperClass(inf,
                    messageInfo,
origin: org.apache.servicemix.cxf/org.apache.servicemix.cxf.binding.nmr

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;
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

@Override
public QName getOutPartName(OperationInfo op, Method method, int paramNumber) {
  method = getDeclaredMethod(method);
  if (paramNumber >= 0) {
    return getPartName(op, method, paramNumber, op.getOutput(), "return", false);
  }
  WebResult webResult = getWebResult(method);
  String tns = op.getOutput().getName().getNamespaceURI();
  String local = null;
  if (webResult != null) {
    if (Boolean.TRUE.equals(isRPC(method)) || isDocumentBare(method)) {
      local = webResult.partName();
    }
    if (local == null || local.length() == 0) {
      local = webResult.name();
    }
  }
  if (local == null || local.length() == 0) {
    if (Boolean.TRUE.equals(isRPC(method)) || !Boolean.FALSE.equals(isWrapped(method))) {
      local = "return";
    } else {
      local = getOperationName(op.getInterface(), method).getLocalPart() + "Response";
    }
  }
  return new QName(tns, local);
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

return getParameterName(op, method, paramNumber, op.getOutput().size(), "return", false);
QName wrappername = getResponseWrapperName(op, method);
if (wrappername != null) {
  tns = wrappername.getNamespaceURI();
tns = op.getName().getNamespaceURI();
  local = getDefaultLocalName(op, method, paramNumber, op.getOutput().size(), "return");
} else {
  local = getOperationName(op.getInterface(),
               method).getLocalPart() + "Response";
origin: org.apache.cxf/cxf-rt-frontend-jaxws

  tns = wrappername.getNamespaceURI();
tns = op.getName().getNamespaceURI();
  local = getDefaultLocalName(op, method, paramNumber, partIndex, prefix);
} else {
  local = getOperationName(op.getInterface(), method).getLocalPart();
  if (!input) {
    local += "Response";
origin: org.apache.cxf/cxf-rt-frontend-jaxws

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);
}
origin: org.apache.cxf/cxf-api

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;
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

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;
}
origin: apache/cxf

private boolean checkPortTypeOperationFault(BindingFaultInfo bfi) {
  InterfaceInfo ini = null;
  if ((bfi.getBindingOperation() != null) && (bfi.getBindingOperation().getOperationInfo() != null)) {
    ini = bfi.getBindingOperation().getOperationInfo().getInterface();
  }
  return (ini != null) && (ini.getName() != null)
    && (bfi.getBindingOperation().getName() != null)
    && (bfi.getFaultInfo().getFaultName() != null)
    && wsdl11XPointer.matchesPortTypeOperationFault(
         ini.getName().getNamespaceURI(),
         ini.getName().getLocalPart(),
         bfi.getBindingOperation().getName().getLocalPart(),
         bfi.getFaultInfo().getFaultName().getLocalPart());
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

  LOG.warning(op.getName() + " requires a wrapper bean but problems with"
    + " ASM has prevented creating one. Operation may not work correctly.");
  return;
QName wrapperElement = messageInfo.getName();
boolean anonymous = factory.getAnonymousWrapperTypes();
  + StringUtils.capitalize(op.getName().getLocalPart());
if (!isRequest) {
  className = className + "Response";
Class<?> def = findClass(pname, method.getDeclaringClass());
if (def == null) {
  generatePackageInfo(pname, wrapperElement.getNamespaceURI(),
            method.getDeclaringClass());
av0.visit("name", wrapperElement.getLocalPart());
av0.visit("namespace", wrapperElement.getNamespaceURI());
av0.visitEnd();
mv.visitEnd();
for (MessagePartInfo mpi : messageInfo.getMessageParts()) {
  generateMessagePart(cw, mpi, method, classFileName);
wrapperPart.setTypeClass(clz);
wrapperBeans.add(clz);
origin: apache/cxf

public void handleMessage(Message message) {
  BindingOperationInfo bop = message.getExchange().getBindingOperationInfo();
  if (bop != null && bop.isUnwrapped()) {
    XMLStreamWriter xmlWriter = message.getContent(XMLStreamWriter.class);
      messageInfo = bop.getWrappedOperation().getOperationInfo().getInput();
    } else {
      messageInfo = bop.getWrappedOperation().getOperationInfo().getOutput();
    QName name = messageInfo.getFirstMessagePart().getConcreteName();
      Service service = message.getExchange().getService();
      if (service.getDataBinding().getDeclaredNamespaceMappings() != null) {
        pfx = service.getDataBinding().getDeclaredNamespaceMappings().get(name.getNamespaceURI());
        pfx = StaxUtils.getUniquePrefix(xmlWriter, name.getNamespaceURI(), false);
      xmlWriter.setPrefix(pfx, name.getNamespaceURI());
      xmlWriter.writeStartElement(pfx, name.getLocalPart(), name.getNamespaceURI());
      if (StringUtils.isEmpty(pfx)) {
origin: org.apache.servicemix/servicemix-cxf-se

private void writeWrapper(Message message, BindingOperationInfo bop, XMLStreamWriter xmlWriter) {
  if (bop.isUnwrapped()) {
    MessageInfo messageInfo;
    if (isRequestor(message)) {
      messageInfo = bop.getWrappedOperation().getOperationInfo().getInput();
    } else {
      messageInfo = bop.getWrappedOperation().getOperationInfo().getOutput();
    }
    MessagePartInfo outPart = messageInfo.getMessageParts().get(0);
    QName name = outPart.getConcreteName();
    try {
      String pfx = StaxUtils.getUniquePrefix(xmlWriter, name.getNamespaceURI());
      xmlWriter.setPrefix(pfx, name.getNamespaceURI());
      xmlWriter.writeStartElement(pfx, name.getLocalPart(), name.getNamespaceURI());
      xmlWriter.writeNamespace(pfx, name.getNamespaceURI());
    } catch (XMLStreamException e) {
      throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_WRITE_EXC", BUNDLE), e);
    }
  }
}

origin: apache/cxf

protected MessagePartInfo getFaultMessagePartInfo(OperationInfo opInfo, QName faultName) {
  Iterator<FaultInfo> faults = opInfo.getFaults().iterator();
  while (faults.hasNext()) {
    FaultInfo fault = faults.next();
    MessagePartInfo partInfo = fault.getMessageParts().get(0);
    if (partInfo.isElement()
      && partInfo.getElementQName().getLocalPart().equals(faultName.getLocalPart())) {
      return partInfo;
    } else if (partInfo.getTypeQName().getLocalPart().equals(faultName.getLocalPart())) {
      return partInfo;
    }
  }
  return null;
}
origin: org.apache.cxf/cxf-rt-transports-http

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>");
}
origin: org.apache.cxf/cxf-rt-frontend-jaxws

  operation.getInput().addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME,
                        inputAction);
  operation.getInput().addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME,
                        inputAction);
  if (operation.getOutput() != null) {
    operation.getOutput().addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME,
                          computeAction(operation, "Response"));
    operation.getOutput().addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME,
                          computeAction(operation, "Response"));
  MessageInfo input = operation.getInput();
  MessageInfo output = operation.getOutput();
  if (faultActions != null && faultActions.length > 0 && operation.getFaults() != null) {
    for (FaultAction faultAction : faultActions) {
      FaultInfo faultInfo = getFaultInfo(operation, faultAction.className());
      if (operation.isUnwrappedCapable()) {
        faultInfo = getFaultInfo(operation.getUnwrappedOperation(), faultAction.className());
        if (faultInfo != null && !StringUtils.isEmpty(faultAction.value())) {
          faultInfo.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, faultAction
for (FaultInfo fi : operation.getFaults()) {
  if (fi.getExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME) == null) {
    String f = "/Fault/" + fi.getName().getLocalPart();
    fi.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME,
                 computeAction(operation, f));
    if (operation.isUnwrappedCapable()) {
origin: apache/cxf

private static String getWSAAction(BindingOperationInfo boi) {
  Object o = boi.getOperationInfo().getInput().getProperty(CALCULATED_WSA_ACTION);
  if (o == null) {
    o = boi.getOperationInfo().getInput().getExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME);
    if (o == null) {
      o = boi.getOperationInfo().getInput().getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
    }
    if (o == null) {
      String start = getActionBaseUri(boi.getOperationInfo());
      if (null == boi.getOperationInfo().getInputName()) {
        o = addPath(start, boi.getOperationInfo().getName().getLocalPart());
      } else {
        o = addPath(start, boi.getOperationInfo().getInputName());
      }
    }
    if (o != null) {
      boi.getOperationInfo().getInput().setProperty(CALCULATED_WSA_ACTION, o);
    }
  }
  return o.toString();
}
private static String getActionBaseUri(final OperationInfo operation) {
org.apache.cxf.service.modelOperationInfo

Most used methods

  • getName
    Returns the name of the Operation.
  • getInput
  • getOutput
  • getInterface
  • getInputName
  • getProperty
  • getUnwrappedOperation
  • isOneWay
  • getFaults
    Returns all faults for this operation.
  • getOutputName
  • isUnwrapped
  • isUnwrappedCapable
  • isUnwrapped,
  • isUnwrappedCapable,
  • setProperty,
  • setInput,
  • setOutput,
  • createMessage,
  • hasOutput,
  • addFault,
  • hasFaults,
  • equals

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • addToBackStack (FragmentTransaction)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JCheckBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now