📄 terminallocationnotificationmanagerservicestub.java
字号:
_messageContext.setEnvelope(env);
// add the message context to the operation client
_operationClient.addMessageContext(_messageContext);
_operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
public void onMessage(
org.apache.axis2.context.MessageContext resultContext) {
try {
org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
java.lang.Object object = fromOM(resultEnv.getBody()
.getFirstElement(),
cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.EndNotificationResponse5.class,
getEnvelopeNamespaces(resultEnv));
callback.receiveResultendNotification((cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.EndNotificationResponse5) object);
} catch (org.apache.axis2.AxisFault e) {
callback.receiveErrorendNotification(e);
}
}
public void onError(java.lang.Exception error) {
if (error instanceof org.apache.axis2.AxisFault) {
org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
faultElt.getQName())) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(faultElt.getQName());
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.Exception ex = (java.lang.Exception) exceptionClass.newInstance();
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(faultElt.getQName());
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass, null);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex,
new java.lang.Object[] { messageObject });
if (ex instanceof cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.PolicyException) {
callback.receiveErrorendNotification((cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.PolicyException) ex);
return;
}
if (ex instanceof cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.ServiceException) {
callback.receiveErrorendNotification((cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.ServiceException) ex);
return;
}
callback.receiveErrorendNotification(new java.rmi.RemoteException(
ex.getMessage(), ex));
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorendNotification(f);
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorendNotification(f);
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorendNotification(f);
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorendNotification(f);
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorendNotification(f);
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorendNotification(f);
} catch (org.apache.axis2.AxisFault e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorendNotification(f);
}
} else {
callback.receiveErrorendNotification(f);
}
} else {
callback.receiveErrorendNotification(f);
}
} else {
callback.receiveErrorendNotification(error);
}
}
public void onFault(
org.apache.axis2.context.MessageContext faultContext) {
org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
onError(fault);
}
public void onComplete() {
// Do nothing by default
}
});
org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
if ((_operations[2].getMessageReceiver() == null) &&
_operationClient.getOptions().isUseSeparateListener()) {
_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
_operations[2].setMessageReceiver(_callbackReceiver);
}
//execute the operation client
_operationClient.execute(false);
}
/**
* A utility method that copies the namepaces from the SOAPEnvelope
*/
private java.util.Map getEnvelopeNamespaces(
org.apache.axiom.soap.SOAPEnvelope env) {
java.util.Map returnMap = new java.util.HashMap();
java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
while (namespaceIterator.hasNext()) {
org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator.next();
returnMap.put(ns.getPrefix(), ns.getNamespaceURI());
}
return returnMap;
}
private boolean optimizeContent(javax.xml.namespace.QName opName) {
if (opNameArray == null) {
return false;
}
for (int i = 0; i < opNameArray.length; i++) {
if (opName.equals(opNameArray[i])) {
return true;
}
}
return false;
}
private org.apache.axiom.om.OMElement toOM(
cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.EndNotification8 param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.EndNotification8.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.EndNotificationResponse5 param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.EndNotificationResponse5.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.PolicyException1 param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.PolicyException1.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.ServiceException2 param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.ServiceException2.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.StartGeographicalNotification7 param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.StartGeographicalNotification7.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.StartGeographicalNotificationResponse4 param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.StartGeographicalNotificationResponse4.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.notification_manager.v2_2.service.TerminalLocationNotificationManagerServiceStub.StartPeriodicNotification9 param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(cn.com.chinatelecom.www.wsdl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -