Tabnine Logo
EndpointReferenceUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
EndpointReferenceUtils
in
org.apache.cxf.wsdl

Best Java code snippets using org.apache.cxf.wsdl.EndpointReferenceUtils (Showing top 20 results out of 315)

origin: org.ow2.petals.dsb/dsb-kernel

/**
 * @param inMessage
 *            the incoming message
 * @return the inbuilt backchannel
 */
protected Conduit getInbuiltBackChannel(Message inMessage) {
  // get a back channel to send back the response to the client
  return new BackChannelConduit(EndpointReferenceUtils.getAnonymousEndpointReference(),
      inMessage);
}
origin: org.apache.cxf/cxf-bundle-jaxrs

public static QName getPortQName(EndpointReferenceType ref, Bus bus) {
  QName serviceName = getServiceName(ref, bus); 
  return new QName(serviceName.getNamespaceURI(), getPortName(ref));
}

origin: org.apache.cxf/cxf-api

public static Schema getSchema(ServiceInfo serviceInfo) {
  return getSchema(serviceInfo, null);
}
public static Schema getSchema(ServiceInfo serviceInfo, Bus b) {
origin: org.apache.cxf/cxf-bundle-jaxrs

public EndpointReferenceType getAddressWithId(String id) {
  EndpointReferenceType ref = null;
  if (isMultiplexWithAddress()) {
    String address = EndpointReferenceUtils.getAddress(reference);
    ref = EndpointReferenceUtils.duplicate(reference);
    if (address.endsWith("/")) {
      EndpointReferenceUtils.setAddress(ref, address + id);
    } else {
      EndpointReferenceUtils.setAddress(ref, address + "/" + id);
    }
  } else {
    ref = super.getAddressWithId(id);
  }
  return ref;
}
origin: org.apache.cxf/cxf-api

/**
 * Create an endpoint reference for the provided wsdl, service and portname.
 * @param wsdlUrl - url of the wsdl that describes the service.
 * @param serviceName - the <code>QName</code> of the service.
 * @param portName - the name of the port.
 * @return EndpointReferenceType - the endpoint reference
 */
public static EndpointReferenceType getEndpointReference(URL wsdlUrl, 
                             QName serviceName,
                             String portName) {
  EndpointReferenceType reference = 
    WSAEndpointReferenceUtils.createEndpointReferenceWithMetadata();
  setServiceAndPortName(reference, serviceName, portName);
  //TODO To Ensure it is a valid URI syntax.
  setWSDLLocation(reference, wsdlUrl.toString());
  return reference;
}

origin: org.apache.cxf/cxf-api

Definition def = getWSDLDefinition(manager, ref);
if (def == null) {
  throw new WSDLException(WSDLException.OTHER_ERROR, "unable to find definition for reference");
QName serviceName = getServiceName(ref, null);
if (null != serviceName) {
  if (StringUtils.isEmpty(serviceName.getNamespaceURI())) {
    return (Port)service.getPorts().values().iterator().next();
  String str = getPortName(ref);
  LOG.log(Level.FINE, "getting port " + str + " from service " + service.getQName());
  Port port = service.getPort(str);
origin: org.apache.servicemix.cxf/org.apache.servicemix.cxf.transport.nmr

String portName = null;
if (target != null) {
  serviceName = EndpointReferenceUtils.getServiceName(target, conduit.getBus());
  address = EndpointReferenceUtils.getAddress(target);
  portName = EndpointReferenceUtils.getPortName(target);
} else {
  serviceName = message.getExchange().get(org.apache.cxf.service.Service.class).getName();
origin: org.apache.cxf/cxf-api

  namespaceURI = getNameSpaceUri(node, content, namespaceURI);
  if (StringUtils.isEmpty(namespaceURI)) {
    namespaceURI = findNamespaceHack(ref, bus);                                
  content = getService(content);
} else {
  Node nodeAttr = node.getAttributes().getNamedItem("xmlns");
origin: org.ow2.petals.dsb/dsb-kernel

QName serviceName = null;
if (target != null) {
  serviceName = EndpointReferenceUtils.getServiceName(target, message.getExchange()
      .get(Bus.class));
} else {
origin: org.apache.cxf/cxf-api

/**
 * Get the target endpoint reference.
 * 
 * @param ei the corresponding EndpointInfo
 * @param t the given target EPR if available
 * @param bus the Bus
 * @return the actual target
 */
protected static EndpointReferenceType getTargetReference(EndpointInfo ei,
                             EndpointReferenceType t,
                             Bus bus) {
  EndpointReferenceType ref = null;
  if (null == t) {
    ref = new EndpointReferenceType();
    AttributedURIType address = new AttributedURIType();
    address.setValue(ei.getAddress());
    ref.setAddress(address);
    if (ei.getService() != null) {
      EndpointReferenceUtils.setServiceAndPortName(ref, 
                             ei.getService().getName(), 
                             ei.getName().getLocalPart());
    }
  } else {
    ref = t;
  }
  return ref;
}

origin: org.apache.cxf/cxf-api

/**
 * Builds an new endpoint reference using the current target reference as a template. 
 * The supplied id is endcoded using a reference parameter.
 * This requires the ws-a interceptors to propagate the reference parameters
 * on subsequent invokes using the returned reference.
 * @param id the id to encode in the new reference
 * @return the new reference with the id encoded as a reference parameter
 * @see org.apache.cxf.transport.MultiplexDestination#getAddressWithId(java.lang.String)
 
 */
public EndpointReferenceType getAddressWithId(String id) {
  EndpointReferenceType epr = EndpointReferenceUtils.duplicate(
    EndpointReferenceUtils.mint(reference, bus));
  ReferenceParametersType newParams = new org.apache.cxf.ws.addressing.ObjectFactory()
    .createReferenceParametersType();
  
  ReferenceParametersType existingParams = epr.getReferenceParameters();
  if (null != existingParams) {
    newParams.getAny().addAll(existingParams.getAny());
  }
  
  newParams.getAny().add(new JAXBElement<String>(MULTIPLEX_ID_QNAME, String.class, id));
  epr.setReferenceParameters(newParams);
  return epr;
}
origin: org.apache.cxf/cxf-api

private static JAXBContext getJAXBContextForEPR() throws JAXBException {
  Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get();
  JAXBContext ctx = rctx.get();
  if (ctx == null) {
    ctx = createContextForEPR();
  }
  return ctx;
}
public static Source convertToXML(EndpointReferenceType epr) {
origin: org.apache.cxf/cxf-api

public static Schema getSchema(ServiceInfo serviceInfo, Bus b) {
  if (serviceInfo == null) {
    return null;
  }
  Schema schema = serviceInfo.getProperty(Schema.class.getName(), Schema.class);
  if (schema == null && !serviceInfo.hasProperty(Schema.class.getName() + ".CHECKED")) {
    try {
      synchronized (serviceInfo) {
        return createSchema(serviceInfo, b);
      }
    } finally {
      serviceInfo.setProperty(Schema.class.getName() + ".CHECKED", Boolean.TRUE);
    }
  }
  return schema;
}

origin: org.apache.cxf/cxf-bundle-jaxrs

Definition def = getWSDLDefinition(manager, ref);
if (def == null) {
  throw new WSDLException(WSDLException.OTHER_ERROR, "unable to find definition for reference");
QName serviceName = getServiceName(ref, null);
if (null != serviceName) {
  if (StringUtils.isEmpty(serviceName.getNamespaceURI())) {
    return (Port)service.getPorts().values().iterator().next();
  String str = getPortName(ref);
  LOG.log(Level.FINE, "getting port " + str + " from service " + service.getQName());
  Port port = service.getPort(str);
origin: org.apache.cxf/cxf-bundle-jaxrs

  namespaceURI = getNameSpaceUri(node, content, namespaceURI);
  if (StringUtils.isEmpty(namespaceURI)) {
    namespaceURI = findNamespaceHack(ref, bus);                                
  content = getService(content);
} else {
  Node nodeAttr = node.getAttributes().getNamedItem("xmlns");
origin: org.apache.cxf/cxf-rt-transports-jbi

QName serviceName = null;
if (target != null) {
  serviceName = EndpointReferenceUtils.getServiceName(target,
                            message.getExchange().get(Bus.class));
} else {
origin: org.apache.cxf/cxf-bundle-jaxrs

/**
 * Get the target endpoint reference.
 * 
 * @param ei the corresponding EndpointInfo
 * @param t the given target EPR if available
 * @param bus the Bus
 * @return the actual target
 */
protected static EndpointReferenceType getTargetReference(EndpointInfo ei,
                             EndpointReferenceType t,
                             Bus bus) {
  EndpointReferenceType ref = null;
  if (null == t) {
    ref = new EndpointReferenceType();
    AttributedURIType address = new AttributedURIType();
    address.setValue(ei.getAddress());
    ref.setAddress(address);
    if (ei.getService() != null) {
      EndpointReferenceUtils.setServiceAndPortName(ref, 
                             ei.getService().getName(), 
                             ei.getName().getLocalPart());
    }
  } else {
    ref = t;
  }
  return ref;
}

origin: org.apache.cxf/cxf-bundle-jaxrs

/**
 * Create an endpoint reference for the provided wsdl, service and portname.
 * @param wsdlUrl - url of the wsdl that describes the service.
 * @param serviceName - the <code>QName</code> of the service.
 * @param portName - the name of the port.
 * @return EndpointReferenceType - the endpoint reference
 */
public static EndpointReferenceType getEndpointReference(URL wsdlUrl, 
                             QName serviceName,
                             String portName) {
  EndpointReferenceType reference = 
    WSAEndpointReferenceUtils.createEndpointReferenceWithMetadata();
  setServiceAndPortName(reference, serviceName, portName);
  //TODO To Ensure it is a valid URI syntax.
  setWSDLLocation(reference, wsdlUrl.toString());
  return reference;
}

origin: org.apache.cxf/cxf-bundle-jaxrs

/**
 * Builds an new endpoint reference using the current target reference as a template. 
 * The supplied id is endcoded using a reference parameter.
 * This requires the ws-a interceptors to propagate the reference parameters
 * on subsequent invokes using the returned reference.
 * @param id the id to encode in the new reference
 * @return the new reference with the id encoded as a reference parameter
 * @see org.apache.cxf.transport.MultiplexDestination#getAddressWithId(java.lang.String)
 
 */
public EndpointReferenceType getAddressWithId(String id) {
  EndpointReferenceType epr = EndpointReferenceUtils.duplicate(
    EndpointReferenceUtils.mint(reference, bus));
  ReferenceParametersType newParams = new org.apache.cxf.ws.addressing.ObjectFactory()
    .createReferenceParametersType();
  
  ReferenceParametersType existingParams = epr.getReferenceParameters();
  if (null != existingParams) {
    newParams.getAny().addAll(existingParams.getAny());
  }
  
  newParams.getAny().add(new JAXBElement<String>(MULTIPLEX_ID_QNAME, String.class, id));
  epr.setReferenceParameters(newParams);
  return epr;
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private static JAXBContext getJAXBContextForEPR() throws JAXBException {
  Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get();
  JAXBContext ctx = rctx.get();
  if (ctx == null) {
    ctx = createContextForEPR();
  }
  return ctx;
}
public static Source convertToXML(EndpointReferenceType epr) {
org.apache.cxf.wsdlEndpointReferenceUtils

Javadoc

Provides utility methods for obtaining endpoint references, wsdl definitions, etc.

Most used methods

  • getAnonymousEndpointReference
    Create an anonymous endpoint reference.
  • getServiceName
    Gets the service name of the provided endpoint reference.
  • getPortName
    Gets the port name of the provided endpoint reference.
  • getSchema
  • setServiceAndPortName
    Sets the service and port name of the provided endpoint reference.
  • createContextForEPR
  • createSchema
  • duplicate
    Create a duplicate endpoint reference sharing all atributes
  • findNamespaceHack
  • getAddress
    Get the address from the provided endpoint reference.
  • getJAXBContextForEPR
  • getMatchingMultiplexDestination
  • getJAXBContextForEPR,
  • getMatchingMultiplexDestination,
  • getNameSpaceUri,
  • getService,
  • getServiceNameType,
  • getWSDLDefinition,
  • getWSDLLocation,
  • mint,
  • portNameMatches,
  • setWSDLLocation

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now