本文整理汇总了Java中org.apache.cxf.ws.addressing.EndpointReferenceType类的典型用法代码示例。如果您正苦于以下问题:Java EndpointReferenceType类的具体用法?Java EndpointReferenceType怎么用?Java EndpointReferenceType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EndpointReferenceType类属于org.apache.cxf.ws.addressing包,在下文中一共展示了EndpointReferenceType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CamelConduit
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
public CamelConduit(CamelContext context, Bus b, EndpointInfo epInfo, EndpointReferenceType targetReference,
HeaderFilterStrategy headerFilterStrategy) {
super(getTargetReference(epInfo, targetReference, b));
String address = epInfo.getAddress();
if (address != null) {
targetCamelEndpointUri = address.substring(CamelTransportConstants.CAMEL_TRANSPORT_PREFIX.length());
if (targetCamelEndpointUri.startsWith("//")) {
targetCamelEndpointUri = targetCamelEndpointUri.substring(2);
}
}
camelContext = context;
endpointInfo = epInfo;
bus = b;
initConfig();
this.headerFilterStrategy = headerFilterStrategy;
Endpoint target = getCamelContext().getEndpoint(targetCamelEndpointUri);
try {
producer = target.createProducer();
producer.start();
} catch (Exception e) {
throw new RuntimeCamelException("Cannot create the producer rightly", e);
}
}
示例2: setupCamelConduit
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
protected CamelConduit setupCamelConduit(EndpointInfo endpointInfo, boolean send, boolean decoupled) {
if (decoupled) {
// setup the reference type
} else {
target = EasyMock.createMock(EndpointReferenceType.class);
}
CamelConduit camelConduit = new CamelConduit(context, bus, endpointInfo, target);
if (send) {
// setMessageObserver
observer = new MessageObserver() {
public void onMessage(Message m) {
inMessage = m;
}
};
camelConduit.setMessageObserver(observer);
}
return camelConduit;
}
示例3: testServletRequestAvailability
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
@Test
@RunAsClient
public void testServletRequestAvailability() throws Exception
{
Greeter greeter = initPort();
AddressingProperties addrProperties = new AddressingProperties();
EndpointReferenceType replyTo = new EndpointReferenceType();
AttributedURIType replyToURI = new AttributedURIType();
replyToURI.setValue(baseURL + "/target/replyTo");
replyTo.setAddress(replyToURI);
addrProperties.setReplyTo(replyTo);
BindingProvider provider = (BindingProvider)greeter;
Map<String, Object> requestContext = provider.getRequestContext();
requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);
greeter.sayHi("Foo");
Thread.sleep(1500);
String result = getTargetServletResult();
assertTrue("Expected ReplyTo:", result.startsWith("ReplyTo:"));
assertTrue("Expected <return>http</return>:", result.indexOf("<return>http</return>") > 0);
}
示例4: createConduit
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
@Override
public HTTPConduit createConduit(HTTPTransportFactory f, Bus b, EndpointInfo localInfo, EndpointReferenceType target)
throws IOException
{
HTTPConduit conduit = null;
if (delegate != null)
{
conduit = delegate.createConduit(f, b, localInfo, target);
}
else
{
conduit = createNewConduit(f, b, localInfo, target);
}
if (conduit != null)
{
configureConduit(conduit);
}
return conduit;
}
示例5: getConduit
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
private Conduit getConduit(Message inMessage) throws IOException {
Exchange exchange = inMessage.getExchange();
EndpointReferenceType target = exchange.get(EndpointReferenceType.class);
Conduit conduit =
exchange.getDestination().getBackChannel(inMessage, null, target);
exchange.setConduit(conduit);
return conduit;
}
示例6: getEndpointAddress
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
private String getEndpointAddress(Message message) {
AddressingProperties addressProp = (AddressingProperties) message.get(ADDRESSING_PROPERTIES_INBOUND);
if (addressProp == null) {
return null;
}
EndpointReferenceType from = addressProp.getFrom();
if (ContextUtils.isGenericAddress(from)) {
return null;
} else {
return from.getAddress().getValue();
}
}
示例7: getReplyTo
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
private EndpointReferenceType getReplyTo(Object o) {
try {
return (EndpointReferenceType)o.getClass().getMethod("getReplyTo").invoke(o);
} catch (Throwable t) {
throw new Fault(t);
}
}
示例8: testOneWayFaultTo
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
@Test
@RunAsClient
public void testOneWayFaultTo() throws Exception
{
Greeter greeter = initPort();
AddressingProperties addrProperties = new AddressingProperties();
EndpointReferenceType faultTo = new EndpointReferenceType();
AttributedURIType epr = new AttributedURIType();
String serverHost = getServerHost();
int serverPort = getServerPort();
epr.setValue("http://" + serverHost + ":" + serverPort + "/jaxws-cxf-jbws3516/target/faultTo");
faultTo.setAddress(epr);
addrProperties.setFaultTo(faultTo);
EndpointReferenceType replyTo = new EndpointReferenceType();
AttributedURIType replyToURI = new AttributedURIType();
replyToURI.setValue("http://" + serverHost + ":" + serverPort + "/jaxws-cxf-jbws3516/target/replyTo");
replyTo.setAddress(replyToURI);
addrProperties.setReplyTo(replyTo);
BindingProvider provider = (BindingProvider)greeter;
Map<String, Object> requestContext = provider.getRequestContext();
requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);
greeter.pingMe();
Thread.sleep(1000);
String result = getTargetServletResult();
assertTrue("Expected FaultTo:", result.startsWith("FaultTo:"));
assertTrue("Expected PingMeFault:", result.indexOf("Intended PingMe Fault") > 0);
}
示例9: testRequestResponseFaultTo
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
@Test
@RunAsClient
public void testRequestResponseFaultTo() throws Exception
{
Greeter greeter = initPort();
AddressingProperties addrProperties = new AddressingProperties();
EndpointReferenceType faultTo = new EndpointReferenceType();
AttributedURIType epr = new AttributedURIType();
String serverHost = getServerHost();
int serverPort = getServerPort();
epr.setValue("http://" + serverHost + ":" + serverPort + "/jaxws-cxf-jbws3516/target/faultTo");
faultTo.setAddress(epr);
addrProperties.setFaultTo(faultTo);
EndpointReferenceType replyTo = new EndpointReferenceType();
AttributedURIType replyToURI = new AttributedURIType();
replyToURI.setValue("http://" + serverHost + ":" + serverPort + "/jaxws-cxf-jbws3516/target/replyTo");
replyTo.setAddress(replyToURI);
addrProperties.setReplyTo(replyTo);
BindingProvider provider = (BindingProvider)greeter;
Map<String, Object> requestContext = provider.getRequestContext();
requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);
greeter.sayHi("hello");
Thread.sleep(1000);
String result = getTargetServletResult();
assertTrue("Expected Replyto:", result.startsWith("ReplyTo:"));
assertTrue("Expected sayHiResponse:", result.indexOf("sayHiResponse") > 0);
greeter.sayHi("fault");
Thread.sleep(1000);
result = getTargetServletResult();
assertTrue("Expected FaultTo:", result.startsWith("FaultTo:"));
assertTrue("Expected sayHiFault:", result.indexOf("Intended SayHi Fault") > 0);
}
示例10: createPort
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
@Override
protected <T> T createPort(QName portName, EndpointReferenceType epr, Class<T> serviceEndpointInterface,
WebServiceFeature... features) {
T port = super.createPort(portName, epr, serviceEndpointInterface, features);
setupClient(port, serviceEndpointInterface, features);
return port;
}
示例11: newEndpoint
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
public MAPEndpoint newEndpoint(String address)
{
EndpointReferenceType implementation = new EndpointReferenceType();
AttributedURIType uri = new AttributedURIType();
uri.setValue(address);
implementation.setAddress(uri);
return new CXFMAPEndpoint(implementation);
}
示例12: setTo
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
public void setTo(String address)
{
if (address != null)
{
EndpointReferenceType epref = new EndpointReferenceType();
AttributedURIType uri = new AttributedURIType();
uri.setValue(address);
epref.setAddress(uri);
implementation.setTo(epref);
}
else
{
implementation.setTo((EndpointReferenceType)null);
}
}
示例13: addReferenceParameter
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
public void addReferenceParameter(Element refParam)
{
EndpointReferenceType eprt = implementation.getToEndpointReference();
ReferenceParametersType refParams = eprt.getReferenceParameters();
if (refParams == null)
{
refParams = new ReferenceParametersType();
eprt.setReferenceParameters(refParams);
}
eprt.getReferenceParameters().getAny().add(refParam);
//implementation.getToEndpointReference().getReferenceParameters().getAny().add(refParam);
}
示例14: getDestination
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
protected Destination getDestination(EndpointInfo ei,
EndpointReferenceType reference,
Bus bus)
throws IOException {
if (reference == null) {
reference = createReference(ei);
}
return new UDPDestination(bus, reference, ei);
}
示例15: getConduit
import org.apache.cxf.ws.addressing.EndpointReferenceType; //导入依赖的package包/类
public Conduit getConduit(EndpointInfo ei, EndpointReferenceType target, Bus bus) throws IOException {
LOG.log(Level.FINE, "Creating conduit for {0}", ei.getAddress());
if (target == null) {
target = createReference(ei);
}
return new UDPConduit(target, bus);
}