本文整理汇总了Java中org.apache.cxf.ws.addressing.AttributedURIType类的典型用法代码示例。如果您正苦于以下问题:Java AttributedURIType类的具体用法?Java AttributedURIType怎么用?Java AttributedURIType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AttributedURIType类属于org.apache.cxf.ws.addressing包,在下文中一共展示了AttributedURIType类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testServletRequestAvailability
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的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);
}
示例2: testOneWayFaultTo
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的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);
}
示例3: testRequestResponseFaultTo
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的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);
}
示例4: newEndpoint
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的package包/类
public MAPEndpoint newEndpoint(String address)
{
EndpointReferenceType implementation = new EndpointReferenceType();
AttributedURIType uri = new AttributedURIType();
uri.setValue(address);
implementation.setAddress(uri);
return new CXFMAPEndpoint(implementation);
}
示例5: setTo
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的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);
}
}
示例6: setMessageID
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的package包/类
public void setMessageID(String messageID)
{
if (messageID != null)
{
AttributedURIType uri = new AttributedURIType();
uri.setValue(messageID);
implementation.setMessageID(uri);
}
else
{
implementation.setMessageID(null);
}
}
示例7: setAction
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的package包/类
public void setAction(String action)
{
if (action != null)
{
AttributedURIType uri = new AttributedURIType();
uri.setValue(action);
implementation.setAction(uri);
}
else
{
implementation.setAction(null);
}
}
示例8: createReference
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的package包/类
EndpointReferenceType createReference(EndpointInfo ei) {
EndpointReferenceType epr = new EndpointReferenceType();
AttributedURIType address = new AttributedURIType();
address.setValue(ei.getAddress());
epr.setAddress(address);
return epr;
}
示例9: createAddressingPropertiesMap
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的package包/类
private static AddressingProperties createAddressingPropertiesMap() {
AddressingProperties maps = new AddressingProperties();
AttributedURIType address = WSA_OBJECT_FACTORY.createAttributedURIType();
EndpointReferenceType ref = WSA_OBJECT_FACTORY.createEndpointReferenceType();
address.setValue(VersionTransformer.Names200408.WSA_ANONYMOUS_ADDRESS);
ref.setAddress(address);
maps.setReplyTo(ref);
maps.setFaultTo(ref);
return maps;
}
示例10: getTo
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的package包/类
public String getTo()
{
AttributedURIType to = implementation.getTo();
return (to != null ? to.getValue() : null);
}
示例11: getMessageID
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的package包/类
public String getMessageID()
{
AttributedURIType messageId = implementation.getMessageID();
return (messageId != null ? messageId.getValue() : null);
}
示例12: getAction
import org.apache.cxf.ws.addressing.AttributedURIType; //导入依赖的package包/类
public String getAction()
{
AttributedURIType action = implementation.getAction();
return (action != null ? action.getValue() : null);
}