本文整理汇总了Java中org.apache.axis2.description.AxisOperation.setMessageReceiver方法的典型用法代码示例。如果您正苦于以下问题:Java AxisOperation.setMessageReceiver方法的具体用法?Java AxisOperation.setMessageReceiver怎么用?Java AxisOperation.setMessageReceiver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.description.AxisOperation
的用法示例。
在下文中一共展示了AxisOperation.setMessageReceiver方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSpringService
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
private AxisService createSpringService(QName springServiceName,
MessageReceiver messageReceiver, String supplierName,
String beanName, QName opName) throws AxisFault {
AxisService service = new AxisService(springServiceName.getLocalPart());
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(new Parameter(Constants.SERVICE_OBJECT_SUPPLIER, supplierName));
service.addParameter(new Parameter(Constants.SERVICE_TCCL, Constants.TCCL_COMPOSITE));
service.addParameter(new Parameter(
SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME, beanName));
AxisOperation axisOp = new InOutAxisOperation(opName);
axisOp.setMessageReceiver(messageReceiver);
axisOp.setStyle(WSDLConstants.STYLE_RPC);
service.addOperation(axisOp);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + opName.getLocalPart(),
axisOp);
return service;
}
示例2: createSpringServiceforClient
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public AxisService createSpringServiceforClient(QName springServiceName,
MessageReceiver messageReceiver,
String supplierName,
String beanName,
QName opName)
throws AxisFault {
AxisService service = new AxisService(springServiceName.getLocalPart());
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(new Parameter(Constants.SERVICE_OBJECT_SUPPLIER, supplierName));
service.addParameter(new Parameter(Constants.SERVICE_TCCL, Constants.TCCL_COMPOSITE));
service.addParameter(new Parameter(
SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME, beanName));
AxisOperation axisOp = new OutInAxisOperation(opName);
axisOp.setMessageReceiver(messageReceiver);
axisOp.setStyle(WSDLConstants.STYLE_RPC);
service.addOperation(axisOp);
return service;
}
示例3: createRedirectReceiverService
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
AxisService createRedirectReceiverService() throws AxisFault {
AxisService service = new AxisService("RedirectReceiverService");
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(
new Parameter(Constants.SERVICE_CLASS, RedirectReceiver.class.getName()));
AxisOperation axisOp = new InOnlyAxisOperation(new QName("echoOMElementResponse"));
axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
axisOp.setStyle(WSDLConstants.STYLE_RPC);
service.addOperation(axisOp);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoOMElementResponse",
axisOp);
AxisOperation axisOp2 = new InOnlyAxisOperation(new QName("fault"));
axisOp2.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
axisOp2.setStyle(WSDLConstants.STYLE_RPC);
service.addOperation(axisOp2);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "fault", axisOp2);
return service;
}
示例4: createSimpleOneWayServiceforClient
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public static AxisService createSimpleOneWayServiceforClient(QName serviceName,
String className,
QName opName)
throws AxisFault {
AxisService service = new AxisService(serviceName.getLocalPart());
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(new Parameter(Constants.SERVICE_CLASS, className));
AxisOperation axisOp = new OutOnlyAxisOperation(opName);
axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
axisOp.setStyle(WSDLConstants.STYLE_RPC);
service.addOperation(axisOp);
return service;
}
示例5: createSimpleInOnlyService
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public static AxisService createSimpleInOnlyService(QName serviceName,
MessageReceiver messageReceiver,
QName opName)
throws AxisFault {
AxisService service = new AxisService(serviceName.getLocalPart());
service.setClassLoader(getContextClassLoader_DoPriv());
AxisOperation axisOp = new InOnlyAxisOperation(opName);
axisOp.setMessageReceiver(messageReceiver);
axisOp.setStyle(WSDLConstants.STYLE_RPC);
service.addOperation(axisOp);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + opName.getLocalPart(),
axisOp);
return service;
}
示例6: createSimpleService
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public static AxisService createSimpleService(QName serviceName,
MessageReceiver messageReceiver, String className,
QName opName)
throws AxisFault {
AxisService service = new AxisService(serviceName.getLocalPart());
service.setClassLoader(getContextClassLoader_DoPriv());
service.addParameter(new Parameter(Constants.SERVICE_CLASS, className));
AxisOperation axisOp = new InOutAxisOperation(opName);
axisOp.setMessageReceiver(messageReceiver);
axisOp.setStyle(WSDLConstants.STYLE_RPC);
service.addOperation(axisOp);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + opName.getLocalPart(),
axisOp);
return service;
}
示例7: createSimpleServiceforClient
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public static AxisService createSimpleServiceforClient(QName serviceName,
MessageReceiver messageReceiver,
String className,
QName opName)
throws AxisFault {
AxisService service = new AxisService(serviceName.getLocalPart());
service.setClassLoader(getContextClassLoader_DoPriv());
service.addParameter(new Parameter(Constants.SERVICE_CLASS, className));
AxisOperation axisOp = new OutInAxisOperation(opName);
axisOp.setMessageReceiver(messageReceiver);
axisOp.setStyle(WSDLConstants.STYLE_RPC);
service.addOperation(axisOp);
return service;
}
示例8: setUp
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
protected void setUp() throws Exception {
AxisService service = new AxisService(serviceName.getLocalPart());
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(new Parameter(
Constants.SERVICE_CLASS, EchoSwA.class
.getName()));
AxisOperation axisOp = new InOutAxisOperation(operationName);
axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
axisOp.setStyle(WSDLConstants.STYLE_DOC);
service.addOperation(axisOp);
UtilServer.deployService(service);
}
示例9: createMultiHopRedirectService1
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
AxisService createMultiHopRedirectService1() throws AxisFault {
AxisService service = new AxisService("MultiHopRedirectService1");
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(
new Parameter(Constants.SERVICE_CLASS, MultiHopRedirectService1.class.getName()));
AxisOperation axisOp = new InOutAxisOperation(new QName("echoRedirect"));
axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
service.addOperation(axisOp);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect", axisOp);
return service;
}
示例10: createMultiHopRedirectService2
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
AxisService createMultiHopRedirectService2() throws AxisFault {
AxisService service = new AxisService("MultiHopRedirectService2");
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(
new Parameter(Constants.SERVICE_CLASS, MultiHopRedirectService2.class.getName()));
AxisOperation axisOp = new InOutAxisOperation(new QName("echoRedirect"));
axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
service.addOperation(axisOp);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect", axisOp);
return service;
}
示例11: createServiceClient
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
private ServiceClient createServiceClient() throws AxisFault {
AxisService service = new AxisService("MultiHopRedirectService1");
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(
new Parameter(Constants.SERVICE_CLASS, MultiHopRedirectService1.class.getName()));
AxisOperation axisOp = new OutInAxisOperation(new QName("echoRedirect"));
axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
axisOp.setSoapAction(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect");
axisOp.setOutputAction(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect");
service.addOperation(axisOp);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect", axisOp);
ConfigurationContext configcontext = UtilServer.createClientConfigurationContext();
ServiceClient sender;
Options options = new Options();
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setUseSeparateListener(true);
options.setTimeOutInMilliSeconds(5000);
sender = new ServiceClient(configcontext, service);
sender.setOptions(options);
sender.engageModule("addressing");
return sender;
}
示例12: setUp
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
protected void setUp() throws Exception {
AxisService service = new AxisService(serviceName.getLocalPart());
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(new Parameter(Constants.SERVICE_CLASS,
EchoService.class.getName()));
AxisOperation axisOp = new OutInAxisOperation(operationName);
axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
axisOp.setStyle(WSDLConstants.STYLE_DOC);
service.addOperation(axisOp);
UtilServer.deployService(service);
}
示例13: createAxisService
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
protected AxisService createAxisService(ClassLoader classLoader,
String className,
URL serviceLocation) throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
AxisFault {
Class<?> pojoClass = Loader.loadClass(classLoader, className);
AxisService axisService;
try {
axisService = DescriptionFactory.createAxisService(pojoClass, configCtx);
} catch (Throwable t) {
log.info("Exception creating Axis Service : " + t.getCause(), t);
return null;
}
if (axisService != null) {
Iterator<AxisOperation> operations = axisService.getOperations();
while (operations.hasNext()) {
AxisOperation axisOperation = operations.next();
if (axisOperation.getMessageReceiver() == null) {
axisOperation.setMessageReceiver(new JAXWSMessageReceiver());
}
}
axisService.addParameter("serviceType", "jaxws");
axisService.setElementFormDefault(false);
axisService.setFileName(serviceLocation);
axisService.setClassLoader(classLoader);
axisService.addParameter(new Parameter(org.apache.axis2.jaxws.spi.Constants.CACHE_CLASSLOADER, classLoader));
axisService.addParameter(new Parameter("modifyUserWSDLPortAddress", "true"));
}
return axisService;
}
示例14: createAxisService
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
private AxisService createAxisService(WSDL11ToAxisServiceBuilder serviceBuilder, HumanTaskBaseConfiguration config)
throws AxisFault {
AxisService axisService;
axisService = serviceBuilder.populateService();
axisService.setParent(getTenantAxisConfig());
axisService.setWsdlFound(true);
axisService.setCustomWsdl(true);
//axisService.setFileName(new URL(taskConfig.getWsdlDefLocation()));
axisService.setClassLoader(getTenantAxisConfig().getServiceClassLoader());
Utils.setEndpointsToAllUsedBindings(axisService);
axisService.addParameter(new Parameter("modifyUserWSDLPortAddress", "true"));
/* Setting service type to use in service management*/
axisService.addParameter(ServerConstants.SERVICE_TYPE, "humantask");
/* Fix for losing of security configuration when updating human-task package*/
axisService.addParameter(new Parameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM,
"true"));
Iterator operations = axisService.getOperations();
AxisHumanTaskMessageReceiver msgReceiver = new AxisHumanTaskMessageReceiver();
msgReceiver.setHumanTaskEngine(HumanTaskServiceComponent.getHumanTaskServer().
getTaskEngine());
// Setting the task configuration to the message receiver. Hence no need to search for task configuration, when
// the actual task invocation happens, we will already have the task configuration attached to the message receiver
// itself
msgReceiver.setTaskBaseConfiguration(config);
while (operations.hasNext()) {
AxisOperation operation = (AxisOperation) operations.next();
// Setting Message Receiver even if operation has a message receiver specified.
// This is to fix the issue when build service configuration using services.xml(Always RPCMessageReceiver
// is set to operations).
operation.setMessageReceiver(msgReceiver);
getTenantAxisConfig().getPhasesInfo().setOperationPhases(operation);
}
Set<String> exposedTransports = getTenantAxisConfig().getTransportsIn().keySet();
//Add the transports to axis2 service by reading from the tenant transport config
for (String transport : exposedTransports) {
axisService.addExposedTransport(transport);
}
if (HumanTaskServiceComponent.getHumanTaskServer().getServerConfig().isHtCoordinationEnabled()
&& HumanTaskServiceComponent.getHumanTaskServer().getServerConfig().isTaskRegistrationEnabled()
&& config.getConfigurationType() == HumanTaskBaseConfiguration.ConfigurationType.TASK) {
// Only Engage coordination module in-case of Tasks. Coordination module is not required for notifications
axisService.engageModule(getConfigContext().getAxisConfiguration().getModule("htcoordination"));
}
return axisService;
}
示例15: createAxisService
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
/**
* Build the underlying Axis Service from Service QName and Port Name of interest using given WSDL
* for BPEL document.
* In the current implementation we are extracting service name from the soap:address' location property.
* But specified port may not contain soap:adress instead it may contains http:address. We need to handle that
* situation.
*
* @param axisConfiguration AxisConfiguration to which we should publish the service
* @param processProxy BPELProcessProxy
* @return Axis Service build using WSDL, Service and Port
* @throws org.apache.axis2.AxisFault on error
*/
public static AxisService createAxisService(AxisConfiguration axisConfiguration,
BPELProcessProxy processProxy) throws AxisFault {
QName serviceName = processProxy.getServiceName();
String portName = processProxy.getPort();
Definition wsdlDefinition = processProxy.getWsdlDefinition();
ProcessConf processConfiguration = processProxy.getProcessConfiguration();
if (log.isDebugEnabled()) {
log.debug("Creating AxisService: Service=" + serviceName + " port=" + portName +
" WSDL=" + wsdlDefinition.getDocumentBaseURI() + " BPEL=" +
processConfiguration.getBpelDocument());
}
WSDL11ToAxisServiceBuilder serviceBuilder = createAxisServiceBuilder(processProxy);
/** Need to figure out a way to handle service name extractoin. According to my perspective extracting
* the service name from the EPR is not a good decision. But we need to handle JMS case properly.
* I am keeping JMS handling untouched until we figureout best solution. */
/* String axisServiceName = extractServiceName(processConf, wsdlServiceName, portName);*/
AxisService axisService = populateAxisService(processProxy, axisConfiguration, serviceBuilder);
Iterator operations = axisService.getOperations();
BPELMessageReceiver messageRec = new BPELMessageReceiver();
/** Set the corresponding BPELService to message receivers */
messageRec.setProcessProxy(processProxy);
while (operations.hasNext()) {
AxisOperation operation = (AxisOperation) operations.next();
// Setting WSDLAwareMessage Receiver even if operation has a message receiver specified.
// This is to fix the issue when build service configuration using services.xml(Always RPCMessageReceiver
// is set to operations).
operation.setMessageReceiver(messageRec);
axisConfiguration.getPhasesInfo().setOperationPhases(operation);
}
/**
* TODO: JMS Destination handling.
*/
return axisService;
}