本文整理汇总了Java中org.apache.axis.MessageContext.getProperty方法的典型用法代码示例。如果您正苦于以下问题:Java MessageContext.getProperty方法的具体用法?Java MessageContext.getProperty怎么用?Java MessageContext.getProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis.MessageContext
的用法示例。
在下文中一共展示了MessageContext.getProperty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillHeaders
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Get cookies from message context and add it to the headers
* @param msgContext
* @param header
* @param otherHeaders
*/
private void fillHeaders(MessageContext msgContext, String header, StringBuffer otherHeaders) {
Object ck1 = msgContext.getProperty(header);
if (ck1 != null) {
if (ck1 instanceof String[]) {
String [] cookies = (String[]) ck1;
otherHeaders.append(header).append(": ");
for (int i = 0; i < cookies.length; i++)
{
otherHeaders.append(cookies[i]);
// Append a ';' if not the last cookie
if (i < cookies.length -1)
otherHeaders.append("; ");
}
otherHeaders.append("\r\n");
} else {
addCookie(otherHeaders, header, (String) ck1);
}
}
}
示例2: getDelegatedCredentialRefernce
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
private DelegatedCredentialReference getDelegatedCredentialRefernce(
DelegationIdentifier id) throws CDSInternalFault {
try {
MessageContext ctx = MessageContext.getCurrentContext();
String transportURL = (String) ctx
.getProperty(org.apache.axis.MessageContext.TRANS_URL);
transportURL = transportURL.substring(0, transportURL
.lastIndexOf('/') + 1);
transportURL += "DelegatedCredential";
EndpointReferenceType epr = AddressingUtils
.createEndpointReference(transportURL, home
.getResourceKey(id));
return new DelegatedCredentialReference(epr);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw Errors.getInternalFault("Unexpected error creating EPR.", e);
}
}
示例3: getPropertiesOfInterest
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Find all of the String properties in the message context that start with the value in applicationTransportHeaderPrefix
* These are the application specific headers that the transport should put in some out-of-band comm channel.
* In particular, this class puts them in HTTP headers.
*
* @param msgContext
* @return a Map of property names and values or null if there are no properties of interest
*/
protected Map<String, String> getPropertiesOfInterest(MessageContext msgContext)
{
Map<String, String> propertiesOfInterest = new HashMap<String, String>();
String prefix = getApplicationTransportHeaderPrefix(); // the prefix that defines what an "interesting" property is
Iterator propertyNameIter = msgContext.getPropertyNames();
while(propertyNameIter.hasNext())
{
try
{
String propertyName = (String)propertyNameIter.next();
if(propertyName.startsWith(prefix))
{
String propertyValue = (String)msgContext.getProperty(propertyName);
propertiesOfInterest.put(propertyName, propertyValue);
}
}
catch (ClassCastException ccX)
{
// eat the exception, it means that there is a non-String property
// which we are, by definition, not interested in.
}
}
// return null if there are no interesting properties
return propertiesOfInterest.size() > 0 ? propertiesOfInterest : null;
}
示例4: fillHeaders
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Add cookies from message context
*
* @param msgContext
* @param state
* @param header
* @param host
* @param path
* @param secure
*/
private void fillHeaders(MessageContext msgContext, HttpState state, String header, String host, String path, boolean secure) {
Object ck1 = msgContext.getProperty(header);
if (ck1 != null) {
if (ck1 instanceof String[]) {
String [] cookies = (String[]) ck1;
for (int i = 0; i < cookies.length; i++) {
addCookie(state, cookies[i], host, path, secure);
}
} else {
addCookie(state, (String) ck1, host, path, secure);
}
}
}
示例5: invokeMethod
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
@Override
protected Object invokeMethod(MessageContext mc, Method method, Object trg, Object[] args) throws Exception {
PageContext pc=(PageContext) mc.getProperty(Constants.PAGE_CONTEXT);
Component c= (Component) mc.getProperty(Constants.COMPONENT);
RPCServer server = RPCServer.getInstance(pc.getId(),pc.getServletContext());
TypeMapping tm =mc.getTypeMapping();//TypeMappingUtil.getServerTypeMapping(server.getEngine().getTypeMappingRegistry());
return AxisCaster.toAxisType(tm,c.call(pc,method.getName(),toLuceeType(pc,args)),null);
}
示例6: invokeMethod
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
@Override
protected Object invokeMethod(MessageContext mc, Method method, Object trg, Object[] args) throws Exception {
PageContext pc=(PageContext) mc.getProperty(Constants.PAGE_CONTEXT);
Component c= (Component) mc.getProperty(Constants.COMPONENT);
RPCServer server = RPCServer.getInstance(pc.getId(),pc,pc.getServletContext());
TypeMapping tm =mc.getTypeMapping();//TypeMappingUtil.getServerTypeMapping(server.getEngine().getTypeMappingRegistry());
return AxisCaster.toAxisType(tm,c.call(pc,method.getName(),toLuceeType(pc,args)),null);
}
示例7: fillHeaders
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Add cookies from message context
*
* @param msgContext
* @param state
* @param header
* @param host
* @param path
* @param secure
*/
private void fillHeaders(MessageContext msgContext, HttpState state, String header, String host, String path, boolean secure) {
Object ck1 = msgContext.getProperty(header);
if (ck1 != null) {
if (ck1 instanceof String[]) {
String [] cookies = (String[]) ck1;
for (int i = 0; i < cookies.length; i++) {
addCookie(state, cookies[i], host, path, secure);
}
} else {
addCookie(state, (String) ck1, host, path, secure);
}
}
}
示例8: ping
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
public void ping(
org.apache.ws.axis.oasis.ping.TicketType pingTicket,
StringHolder text
) throws java.rmi.RemoteException {
MessageContext msgContext = MessageContext.getCurrentContext();
Message reqMsg = msgContext.getRequestMessage();
Vector results =
(Vector) msgContext.getProperty(WSHandlerConstants.RECV_RESULTS);
if (results == null) {
System.out.println("No security results!!");
}
// System.out.println("Number of results: " + results.size());
for (int i = 0; i < results.size(); i++) {
WSHandlerResult rResult =
(WSHandlerResult) results.get(i);
Vector wsSecEngineResults = rResult.getResults();
for (int j = 0; j < wsSecEngineResults.size(); j++) {
WSSecurityEngineResult wser =
(WSSecurityEngineResult) wsSecEngineResults.get(j);
int action =
((java.lang.Integer)wser.get(WSSecurityEngineResult.TAG_ACTION)).intValue();
Principal principal =
(Principal)wser.get(WSSecurityEngineResult.TAG_PRINCIPAL);
if (action != WSConstants.ENCR && principal != null) {
// System.out.println(principal.getName());
}
}
}
}
示例9: getResourceReference
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
*/
public org.cagrid.demo.photosharing.gallery.stubs.types.GalleryReference getResourceReference(ResourceKey key) throws Exception {
MessageContext ctx = MessageContext.getCurrentContext();
String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
transportURL += "Gallery";
EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
org.cagrid.demo.photosharing.gallery.stubs.types.GalleryReference ref = new org.cagrid.demo.photosharing.gallery.stubs.types.GalleryReference();
ref.setEndpointReference(epr);
return ref;
}
示例10: getResourceReference
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
*/
public org.cagrid.introduce.tutorial.stockmanager.portfolio.stubs.types.StockPortfolioManagerReference getResourceReference(ResourceKey key) throws Exception {
MessageContext ctx = MessageContext.getCurrentContext();
String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
transportURL += "StockPortfolioManager";
EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
org.cagrid.introduce.tutorial.stockmanager.portfolio.stubs.types.StockPortfolioManagerReference ref = new org.cagrid.introduce.tutorial.stockmanager.portfolio.stubs.types.StockPortfolioManagerReference();
ref.setEndpointReference(epr);
return ref;
}
示例11: getJAXRPChandlerChain
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
protected HandlerChain getJAXRPChandlerChain(MessageContext context) {
QName portQName = (QName) context.getProperty(Call.WSDL_PORT_NAME);
if (portQName == null) {
return null;
}
String portName = portQName.getLocalPart();
SeiFactory seiFactory = (SeiFactory) portNameToSEIFactoryMap.get(portName);
if (seiFactory == null) {
return null;
}
HandlerChain handlerChain = seiFactory.createHandlerChain();
return handlerChain;
}
示例12: getResourceReference
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
*/
public gov.nih.nci.cagrid.workflow.service.impl.stubs.types.TavernaWorkflowServiceImplReference getResourceReference(ResourceKey key) throws Exception {
MessageContext ctx = MessageContext.getCurrentContext();
String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
transportURL += "TavernaWorkflowServiceImpl";
EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
gov.nih.nci.cagrid.workflow.service.impl.stubs.types.TavernaWorkflowServiceImplReference ref = new gov.nih.nci.cagrid.workflow.service.impl.stubs.types.TavernaWorkflowServiceImplReference();
ref.setEndpointReference(epr);
return ref;
}
示例13: getResourceReference
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
*/
public org.cagrid.transfer.context.stubs.types.TransferServiceContextReference getResourceReference(ResourceKey key) throws Exception {
MessageContext ctx = MessageContext.getCurrentContext();
String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
transportURL += "TransferServiceContext";
EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
org.cagrid.transfer.context.stubs.types.TransferServiceContextReference ref = new org.cagrid.transfer.context.stubs.types.TransferServiceContextReference();
ref.setEndpointReference(epr);
return ref;
}
示例14: getResourceReference
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
*/
public gov.nih.nci.cagrid.fqp.resultsretrieval.stubs.types.FederatedQueryResultsRetrievalReference getResourceReference(ResourceKey key) throws Exception {
MessageContext ctx = MessageContext.getCurrentContext();
String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
transportURL += "FederatedQueryResultsRetrieval";
EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
gov.nih.nci.cagrid.fqp.resultsretrieval.stubs.types.FederatedQueryResultsRetrievalReference ref = new gov.nih.nci.cagrid.fqp.resultsretrieval.stubs.types.FederatedQueryResultsRetrievalReference();
ref.setEndpointReference(epr);
return ref;
}
示例15: getResourceReference
import org.apache.axis.MessageContext; //导入方法依赖的package包/类
/**
* Take a resource key managed by this resource, locates the resource, and created a typed EPR for the resource.
*/
public gov.nih.nci.cagrid.fqp.results.stubs.types.FederatedQueryResultsReference getResourceReference(ResourceKey key) throws Exception {
MessageContext ctx = MessageContext.getCurrentContext();
String transportURL = (String) ctx.getProperty(org.apache.axis.MessageContext.TRANS_URL);
transportURL = transportURL.substring(0,transportURL.lastIndexOf('/') +1 );
transportURL += "FederatedQueryResults";
EndpointReferenceType epr = AddressingUtils.createEndpointReference(transportURL,key);
gov.nih.nci.cagrid.fqp.results.stubs.types.FederatedQueryResultsReference ref = new gov.nih.nci.cagrid.fqp.results.stubs.types.FederatedQueryResultsReference();
ref.setEndpointReference(epr);
return ref;
}