当前位置: 首页>>代码示例>>Java>>正文


Java MessageContext.getProperty方法代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:swarmbox,项目名称:netsuite-export,代码行数:26,代码来源:HTTPSender.java

示例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);
	}

}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:22,代码来源:CredentialDelegationServiceImpl.java

示例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;
 }
 
开发者ID:VHAINNOVATIONS,项目名称:Telepathology,代码行数:35,代码来源:ImageXChangeHttpCommonsSender.java

示例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);
          }
      }
  }
 
开发者ID:VHAINNOVATIONS,项目名称:Telepathology,代码行数:24,代码来源:ImageXChangeHttpCommonsSender.java

示例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);
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:11,代码来源:ComponentProvider.java

示例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);
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:11,代码来源:ComponentProvider.java

示例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);
        }
    }
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:24,代码来源:CommonsHTTPSender.java

示例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());
            }
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-wss4j,代码行数:32,代码来源:PingBindingImpl.java

示例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;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:14,代码来源:GalleryResourceHome.java

示例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;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:14,代码来源:StockPortfolioManagerResourceHome.java

示例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;
}
 
开发者ID:apache,项目名称:tomee,代码行数:15,代码来源:AxisClientImpl.java

示例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;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:TavernaWorkflowServiceImplResourceHome.java

示例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;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:TransferServiceContextResourceHome.java

示例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;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:FederatedQueryResultsRetrievalResourceHome.java

示例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;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:14,代码来源:FederatedQueryResultsResourceHome.java


注:本文中的org.apache.axis.MessageContext.getProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。