private java.lang.Object fromOM( final org.apache.axiom.om.OMElement param, final java.lang.Class<?> type, final java.util.Map<String, String> extraNamespaces) throws org.apache.axis2.AxisFault { try { if (CadConsultaCadastro2Stub.NfeDadosMsg.class.equals(type)) { return CadConsultaCadastro2Stub.NfeDadosMsg.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (CadConsultaCadastro2Stub.ConsultaCadastro2Result.class.equals(type)) { return CadConsultaCadastro2Stub.ConsultaCadastro2Result.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (CadConsultaCadastro2Stub.NfeCabecMsgE.class.equals(type)) { return CadConsultaCadastro2Stub.NfeCabecMsgE.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (CadConsultaCadastro2Stub.NfeCabecMsgE.class.equals(type)) { return CadConsultaCadastro2Stub.NfeCabecMsgE.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } } catch (final java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } return null; }
/** * Executes the OperationClient * * @param opClient - Fully configured OperationClient * @param block - Indicates if blocking or non-blocking execute * @param msgContext - Axis2 MessageContext * @throws AxisFault - All exceptions are returned as AxisFaults */ private void execute( OperationClient opClient, boolean block, org.apache.axis2.context.MessageContext msgContext) throws AxisFault { try { // Pre-Execute logging and setup preExecute(opClient, block, msgContext); // check if Exception should be thrown on SOAPFault if (log.isDebugEnabled()) { log.debug("Read throwExceptionIfSOAPFault property"); } boolean exceptionToBeThrownOnSOAPFault = ClientUtils.getExceptionToBeThrownOnSOAPFault(msgContext); if (log.isDebugEnabled()) { log.debug( "throwExceptionIfSOAPFault property set on OperationClient.options " + exceptionToBeThrownOnSOAPFault); } opClient.getOptions().setExceptionToBeThrownOnSOAPFault(exceptionToBeThrownOnSOAPFault); // Invoke the OperationClient opClient.execute(block); } catch (Throwable e) { // Catch all Throwable (including runtime exceptions and Errors) and // throw as AxisFault. // Since e could be a Throwable (or Error) instead of an Exception, we'll have to wrap it: throw AxisFault.makeFault(ExceptionFactory.makeWebServiceException(e)); } finally { // Post-Execute logging and setup postExecute(opClient, block, msgContext); } }
private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault { try { if (com.pa.SetEmp.class.equals(type)) { return com.pa.SetEmp.Factory.parse(param.getXMLStreamReaderWithoutCaching()); } if (com.pa.GetEmp.class.equals(type)) { return com.pa.GetEmp.Factory.parse(param.getXMLStreamReaderWithoutCaching()); } if (com.pa.GetEmpResponse.class.equals(type)) { return com.pa.GetEmpResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching()); } } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } return null; }
/** * Invokes the bussiness logic invocation on the service implementation class * * @param msgContext the incoming message context * @param newmsgContext the response message context * @throws AxisFault on invalid method (wrong signature) or behaviour (return null) */ public void invokeBusinessLogic(MessageContext msgContext, MessageContext newmsgContext) throws AxisFault { try { // get the implementation class for the Web Service Object obj = getTheImplementationObject(msgContext); // find the WebService method Class implClass = obj.getClass(); AxisOperation opDesc = msgContext.getAxisOperation(); Method method = findOperation(opDesc, implClass); if (method == null) { throw new AxisFault( Messages.getMessage("methodDoesNotExistInOut", opDesc.getName().toString())); } OMElement result = (OMElement) method.invoke( obj, new Object[] {msgContext.getEnvelope().getBody().getFirstElement()}); SOAPFactory fac = getSOAPFactory(msgContext); SOAPEnvelope envelope = fac.getDefaultEnvelope(); if (result != null) { envelope.getBody().addChild(result); } newmsgContext.setEnvelope(envelope); } catch (Exception e) { throw AxisFault.makeFault(e); } }
private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault { try { if (org.example.www.site.PassInfo.class.equals(type)) { return org.example.www.site.PassInfo.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.example.www.site.PassInfoResponse.class.equals(type)) { return org.example.www.site.PassInfoResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.example.www.site.SearchSite.class.equals(type)) { return org.example.www.site.SearchSite.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.example.www.site.SearchSiteResponse.class.equals(type)) { return org.example.www.site.SearchSiteResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.example.www.site.GetSite.class.equals(type)) { return org.example.www.site.GetSite.Factory.parse(param.getXMLStreamReaderWithoutCaching()); } if (org.example.www.site.GetSiteResponse.class.equals(type)) { return org.example.www.site.GetSiteResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.example.www.site.ParallelInfo.class.equals(type)) { return org.example.www.site.ParallelInfo.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.example.www.site.ParallelInfoResponse.class.equals(type)) { return org.example.www.site.ParallelInfoResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } return null; }
public void invokeBusinessLogic(org.apache.axis2.context.MessageContext msgContext) throws org.apache.axis2.AxisFault { try { // get the implementation class for the Web Service Object obj = getTheImplementationObject(msgContext); MultitenancyThrottlingServiceSkeletonInterface skel = (MultitenancyThrottlingServiceSkeletonInterface) obj; // Out Envelop org.apache.axiom.soap.SOAPEnvelope envelope = null; // Find the axisOperation that has been set by the Dispatch phase. org.apache.axis2.description.AxisOperation op = msgContext.getOperationContext().getAxisOperation(); if (op == null) { throw new org.apache.axis2.AxisFault( "Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider"); } java.lang.String methodName; if ((op.getName() != null) && ((methodName = org.apache.axis2.util.JavaUtils.xmlNameToJavaIdentifier( op.getName().getLocalPart())) != null)) { if ("executeThrottlingRules".equals(methodName)) { // doc style org.wso2.carbon.throttling.manager.services.ExecuteThrottlingRules wrappedParam = (org.wso2.carbon.throttling.manager.services.ExecuteThrottlingRules) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.wso2.carbon.throttling.manager.services.ExecuteThrottlingRules.class, getEnvelopeNamespaces(msgContext.getEnvelope())); skel.executeThrottlingRules(wrappedParam); envelope = getSOAPFactory(msgContext).getDefaultEnvelope(); } else { throw new java.lang.RuntimeException("method not found"); } } } catch (MultitenancyThrottlingServiceExceptionException e) { msgContext.setProperty( org.apache.axis2.Constants.FAULT_NAME, "MultitenancyThrottlingServiceException"); org.apache.axis2.AxisFault f = createAxisFault(e); if (e.getFaultMessage() != null) { f.setDetail(toOM(e.getFaultMessage(), false)); } throw f; } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
private org.apache.axiom.om.OMElement toOM(com.pa.GetEmpResponse param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { return param.getOMElement( com.pa.GetEmpResponse.MY_QNAME, org.apache.axiom.om.OMAbstractFactory.getOMFactory()); } catch (org.apache.axis2.databinding.ADBException e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
private void loadObjectSupplierClass(String objectSupplierValue) throws AxisFault { try { ClassLoader loader = service.getClassLoader(); Class objectSupplierImpl = Loader.loadClass(loader, objectSupplierValue.trim()); ObjectSupplier objectSupplier = (ObjectSupplier) objectSupplierImpl.newInstance(); service.setObjectSupplier(objectSupplier); } catch (Exception e) { throw AxisFault.makeFault(e); } }
private org.apache.axiom.om.OMElement toOM( org.example.www.site.ParallelInfo param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { return param.getOMElement( org.example.www.site.ParallelInfo.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( final CadConsultaCadastro2Stub.NfeCabecMsgE param, final boolean optimizeContent) throws org.apache.axis2.AxisFault { try { return param.getOMElement( CadConsultaCadastro2Stub.NfeCabecMsgE.MY_QNAME, org.apache.axiom.om.OMAbstractFactory.getOMFactory()); } catch (final org.apache.axis2.databinding.ADBException e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
private org.apache.axiom.om.OMElement toOM( axis2.apache.org.xsd.GetTaskDescription param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { return param.getOMElement( axis2.apache.org.xsd.GetTaskDescription.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( org.pahospital.www.labservice.LabOrderId param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { return param.getOMElement( org.pahospital.www.labservice.LabOrderId.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( gsn.webservice.standard.DeleteVirtualSensorResponse param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { return param.getOMElement( gsn.webservice.standard.DeleteVirtualSensorResponse.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( org.wso2.carbon.billing.mgt.services.GetPaginatedBalances param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { return param.getOMElement( org.wso2.carbon.billing.mgt.services.GetPaginatedBalances.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( org.wso2.carbon.throttling.manager.services.ExecuteThrottlingRules param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { return param.getOMElement( org.wso2.carbon.throttling.manager.services.ExecuteThrottlingRules.MY_QNAME, org.apache.axiom.om.OMAbstractFactory.getOMFactory()); } catch (org.apache.axis2.databinding.ADBException e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
private Method findOperation(AxisOperation op, Class implClass) throws AxisFault { Method method = (Method) (op.getParameterValue("myMethod")); if (method != null) return method; String methodName = op.getName().getLocalPart(); try { // Looking for a method of the form "void method(OMElement)" method = implClass.getMethod(methodName, new Class[] {OMElement.class}); // if (1 == 1) // throw new Exception("return type is " + method.getReturnType().getName() + "\n" + // "methodName is " + methodName + "\n" + // "class is " + implClass.getName()); if (method.getReturnType().getName().equals("void")) { try { op.addParameter("myMethod", method); } catch (AxisFault axisFault) { throw AxisFault.makeFault(axisFault); } return method; } } catch (Exception e) { throw AxisFault.makeFault(e); } if (logger.isDebugEnabled()) { logger.debug("return class is " + method.getReturnType().getName()); } return null; }
private org.apache.axiom.soap.SOAPEnvelope toEnvelope( org.apache.axiom.soap.SOAPFactory factory, com.pa.GetEmp param, boolean optimizeContent, javax.xml.namespace.QName methodQName) throws org.apache.axis2.AxisFault { try { org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope(); emptyEnvelope.getBody().addChild(param.getOMElement(com.pa.GetEmp.MY_QNAME, factory)); return emptyEnvelope; } catch (org.apache.axis2.databinding.ADBException e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
private org.apache.axiom.soap.SOAPEnvelope toEnvelope( org.apache.axiom.soap.SOAPFactory factory, org.example.www.site.GetSiteResponse param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope(); emptyEnvelope .getBody() .addChild(param.getOMElement(org.example.www.site.GetSiteResponse.MY_QNAME, factory)); return emptyEnvelope; } catch (org.apache.axis2.databinding.ADBException e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
private org.apache.axiom.soap.SOAPEnvelope toEnvelope( org.apache.axiom.soap.SOAPFactory factory, gsn.webservice.standard.RegisterQueryResponse param, boolean optimizeContent) throws org.apache.axis2.AxisFault { try { org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope(); emptyEnvelope .getBody() .addChild( param.getOMElement(gsn.webservice.standard.RegisterQueryResponse.MY_QNAME, factory)); return emptyEnvelope; } catch (org.apache.axis2.databinding.ADBException e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
private org.apache.axiom.soap.SOAPEnvelope toEnvelope( final org.apache.axiom.soap.SOAPFactory factory, final CadConsultaCadastro2Stub.NfeDadosMsg param, final boolean optimizeContent, final javax.xml.namespace.QName methodQName) throws org.apache.axis2.AxisFault { try { final org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope(); emptyEnvelope .getBody() .addChild(param.getOMElement(CadConsultaCadastro2Stub.NfeDadosMsg.MY_QNAME, factory)); return emptyEnvelope; } catch (final org.apache.axis2.databinding.ADBException e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
private org.apache.axiom.soap.SOAPEnvelope toEnvelope( org.apache.axiom.soap.SOAPFactory factory, org.wso2.carbon.billing.mgt.services.AddPaymentResponse param, boolean optimizeContent, javax.xml.namespace.QName methodQName) throws org.apache.axis2.AxisFault { try { org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope(); emptyEnvelope .getBody() .addChild( param.getOMElement( org.wso2.carbon.billing.mgt.services.AddPaymentResponse.MY_QNAME, factory)); return emptyEnvelope; } catch (org.apache.axis2.databinding.ADBException e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
/** * Creates the AxisConfiguration object using an XML document. Subclasses of this class must * provide the XML via an input stream. The concrete implementation can store the XML file * wherever it wants as we only need an InputStream */ public AxisConfiguration getAxisConfiguration() throws AxisFault { if (axisConfig != null) { // we have already initialized return axisConfig; } try { // create a new AxisConfiguration axisConfig = new AxisConfiguration(); // get the config XML input stream InputStream in = getConfigXml(); // build the configuration AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig, null); builder.populateConfig(); } catch (Exception e) { e.printStackTrace(); throw AxisFault.makeFault(e); } // set this object as the Axis configurator. Axis will call loadServices(). axisConfig.setConfigurator(this); return axisConfig; }
private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault { try { if (org.pahospital.www.labservice.LabOrder.class.equals(type)) { return org.pahospital.www.labservice.LabOrder.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.pahospital.www.labservice.LabOrderId.class.equals(type)) { return org.pahospital.www.labservice.LabOrderId.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } return null; }
private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault { try { if (org.wso2.carbon.throttling.manager.services.ExecuteThrottlingRules.class.equals(type)) { return org.wso2.carbon.throttling.manager.services.ExecuteThrottlingRules.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.throttling.manager.services.MultitenancyThrottlingServiceException.class .equals(type)) { return org.wso2.carbon.throttling.manager.services.MultitenancyThrottlingServiceException .Factory.parse(param.getXMLStreamReaderWithoutCaching()); } } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } return null; }
private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault { try { if (org.wso2.carbon.billing.mgt.services.GetOutstandingBalance.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetOutstandingBalance.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetOutstandingBalanceResponse.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetOutstandingBalanceResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.class.equals( type)) { return org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.Factory .parse(param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetCurrentInvoice.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetCurrentInvoice.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetCurrentInvoiceResponse.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetCurrentInvoiceResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.class.equals( type)) { return org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.Factory .parse(param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetPastInvoice.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetPastInvoice.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetPastInvoiceResponse.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetPastInvoiceResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.class.equals( type)) { return org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.Factory .parse(param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.AddPayment.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.AddPayment.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.AddPaymentResponse.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.AddPaymentResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.class.equals( type)) { return org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.Factory .parse(param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetAvailableBillingPeriods.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetAvailableBillingPeriods.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetAvailableBillingPeriodsResponse.class.equals( type)) { return org.wso2.carbon.billing.mgt.services.GetAvailableBillingPeriodsResponse.Factory .parse(param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.class.equals( type)) { return org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.Factory .parse(param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetPaginatedBalances.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetPaginatedBalances.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.GetPaginatedBalancesResponse.class.equals(type)) { return org.wso2.carbon.billing.mgt.services.GetPaginatedBalancesResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.class.equals( type)) { return org.wso2.carbon.billing.mgt.services.MultitenancyBillingServiceException.Factory .parse(param.getXMLStreamReaderWithoutCaching()); } } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } return null; }
private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault { try { if (gsn.webservice.standard.GetVirtualSensorsDetails.class.equals(type)) { return gsn.webservice.standard.GetVirtualSensorsDetails.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetVirtualSensorsDetailsResponse.class.equals(type)) { return gsn.webservice.standard.GetVirtualSensorsDetailsResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetNextData.class.equals(type)) { return gsn.webservice.standard.GetNextData.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetNextDataResponse.class.equals(type)) { return gsn.webservice.standard.GetNextDataResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.ListWrapperURLs.class.equals(type)) { return gsn.webservice.standard.ListWrapperURLs.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.ListWrapperURLsResponse.class.equals(type)) { return gsn.webservice.standard.ListWrapperURLsResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetLatestMultiData.class.equals(type)) { return gsn.webservice.standard.GetLatestMultiData.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetLatestMultiDataResponse.class.equals(type)) { return gsn.webservice.standard.GetLatestMultiDataResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.UnregisterQuery.class.equals(type)) { return gsn.webservice.standard.UnregisterQuery.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.UnregisterQueryResponse.class.equals(type)) { return gsn.webservice.standard.UnregisterQueryResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.CreateVirtualSensor.class.equals(type)) { return gsn.webservice.standard.CreateVirtualSensor.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.CreateVirtualSensorResponse.class.equals(type)) { return gsn.webservice.standard.CreateVirtualSensorResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetMultiData.class.equals(type)) { return gsn.webservice.standard.GetMultiData.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetMultiDataResponse.class.equals(type)) { return gsn.webservice.standard.GetMultiDataResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.RegisterQuery.class.equals(type)) { return gsn.webservice.standard.RegisterQuery.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.RegisterQueryResponse.class.equals(type)) { return gsn.webservice.standard.RegisterQueryResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetContainerInfo.class.equals(type)) { return gsn.webservice.standard.GetContainerInfo.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.GetContainerInfoResponse.class.equals(type)) { return gsn.webservice.standard.GetContainerInfoResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.ListVirtualSensorNames.class.equals(type)) { return gsn.webservice.standard.ListVirtualSensorNames.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.ListVirtualSensorNamesResponse.class.equals(type)) { return gsn.webservice.standard.ListVirtualSensorNamesResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.DeleteVirtualSensor.class.equals(type)) { return gsn.webservice.standard.DeleteVirtualSensor.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } if (gsn.webservice.standard.DeleteVirtualSensorResponse.class.equals(type)) { return gsn.webservice.standard.DeleteVirtualSensorResponse.Factory.parse( param.getXMLStreamReaderWithoutCaching()); } } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } return null; }
/** * Invokes the bussiness logic invocation on the service implementation class * * @param msgContext the incoming message context * @param newmsgContext the response message context * @throws AxisFault on invalid method (wrong signature) or behaviour (return null) */ public void invokeBusinessLogic(MessageContext msgContext) throws AxisFault { Object obj = null; try { String in_action = msgContext.getWSAAction(); if (logger.isDebugEnabled()) { logger.debug("In MEP: in_action = " + in_action); } validate_action(msgContext); // get the implementation class for the Web Service obj = getTheImplementationObject(msgContext); // make return message context available to service if (obj instanceof AppendixV) { AppendixV xo = (AppendixV) obj; } } catch (Exception e) { logger.error( "Error in XDSRawXMLIn:\n" + ExceptionUtil.exception_details(e) + "\ngetSoapAction = " + msgContext.getSoapAction()); throw AxisFault.makeFault(e); } // find the WebService method Class implClass = obj.getClass(); AxisOperation opDesc = msgContext.getAxisOperation(); Method method = findOperation(opDesc, implClass); Method methodDisplay; try { methodDisplay = implClass.getMethod("setMessageContextIn", new Class[] {MessageContext.class}); } catch (SecurityException e) { logger.error( "Error in XDSRawXMLIn:\n" + "class is " + implClass.getName() + " method is setMessageContextIn" + ExceptionUtil.exception_details(e) + "\ngetSoapAction = " + msgContext.getSoapAction()); throw AxisFault.makeFault(e); } catch (NoSuchMethodException e) { logger.error( "Error in XDSRawXMLIn:\n" + "class is " + implClass.getName() + " method is setMessageContextIn" + ExceptionUtil.exception_details(e) + "\ngetSoapAction = " + msgContext.getSoapAction()); throw AxisFault.makeFault(e); } try { methodDisplay.invoke(obj, new Object[] {msgContext}); } catch (Exception e) { logger.error( "Error in XDSRawXMLIn:\n" + "class is " + implClass.getName() + " method is setMessageContextIn" + ExceptionUtil.exception_details(e) + "\ngetSoapAction = " + msgContext.getSoapAction()); throw AxisFault.makeFault(e); } if (method == null) { throw new AxisFault(Messages.getMessage("methodDoesNotExistIn", opDesc.getName().toString())); } try { method.invoke(obj, new Object[] {msgContext.getEnvelope().getBody().getFirstElement()}); } catch (Exception e) { logger.error( "Error in XDSRawXMLIn:\n" + "class is " + implClass.getName() + " method is setMessageContextIn" + ExceptionUtil.exception_details(e) + "\ngetSoapAction = " + msgContext.getSoapAction()); throw AxisFault.makeFault(e); } }
public void invokeBusinessLogic( org.apache.axis2.context.MessageContext msgContext, org.apache.axis2.context.MessageContext newMsgContext) throws org.apache.axis2.AxisFault { try { // get the implementation class for the Web Service Object obj = getTheImplementationObject(msgContext); MultitenancyBillingServiceSkeletonInterface skel = (MultitenancyBillingServiceSkeletonInterface) obj; // Out Envelop org.apache.axiom.soap.SOAPEnvelope envelope = null; // Find the axisOperation that has been set by the Dispatch phase. org.apache.axis2.description.AxisOperation op = msgContext.getOperationContext().getAxisOperation(); if (op == null) { throw new org.apache.axis2.AxisFault( "Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider"); } java.lang.String methodName; if ((op.getName() != null) && ((methodName = org.apache.axis2.util.JavaUtils.xmlNameToJavaIdentifier( op.getName().getLocalPart())) != null)) { if ("getOutstandingBalance".equals(methodName)) { org.wso2.carbon.billing.mgt.services.GetOutstandingBalanceResponse getOutstandingBalanceResponse13 = null; org.wso2.carbon.billing.mgt.services.GetOutstandingBalance wrappedParam = (org.wso2.carbon.billing.mgt.services.GetOutstandingBalance) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.wso2.carbon.billing.mgt.services.GetOutstandingBalance.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getOutstandingBalanceResponse13 = skel.getOutstandingBalance(wrappedParam); envelope = toEnvelope( getSOAPFactory(msgContext), getOutstandingBalanceResponse13, false, new javax.xml.namespace.QName( "http://services.mgt.billing.carbon.wso2.org", "getOutstandingBalance")); } else if ("getCurrentInvoice".equals(methodName)) { org.wso2.carbon.billing.mgt.services.GetCurrentInvoiceResponse getCurrentInvoiceResponse15 = null; org.wso2.carbon.billing.mgt.services.GetCurrentInvoice wrappedParam = (org.wso2.carbon.billing.mgt.services.GetCurrentInvoice) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.wso2.carbon.billing.mgt.services.GetCurrentInvoice.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getCurrentInvoiceResponse15 = skel.getCurrentInvoice(wrappedParam); envelope = toEnvelope( getSOAPFactory(msgContext), getCurrentInvoiceResponse15, false, new javax.xml.namespace.QName( "http://services.mgt.billing.carbon.wso2.org", "getCurrentInvoice")); } else if ("getPastInvoice".equals(methodName)) { org.wso2.carbon.billing.mgt.services.GetPastInvoiceResponse getPastInvoiceResponse17 = null; org.wso2.carbon.billing.mgt.services.GetPastInvoice wrappedParam = (org.wso2.carbon.billing.mgt.services.GetPastInvoice) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.wso2.carbon.billing.mgt.services.GetPastInvoice.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getPastInvoiceResponse17 = skel.getPastInvoice(wrappedParam); envelope = toEnvelope( getSOAPFactory(msgContext), getPastInvoiceResponse17, false, new javax.xml.namespace.QName( "http://services.mgt.billing.carbon.wso2.org", "getPastInvoice")); } else if ("addPayment".equals(methodName)) { org.wso2.carbon.billing.mgt.services.AddPaymentResponse addPaymentResponse19 = null; org.wso2.carbon.billing.mgt.services.AddPayment wrappedParam = (org.wso2.carbon.billing.mgt.services.AddPayment) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.wso2.carbon.billing.mgt.services.AddPayment.class, getEnvelopeNamespaces(msgContext.getEnvelope())); addPaymentResponse19 = skel.addPayment(wrappedParam); envelope = toEnvelope( getSOAPFactory(msgContext), addPaymentResponse19, false, new javax.xml.namespace.QName( "http://services.mgt.billing.carbon.wso2.org", "addPayment")); } else if ("getAvailableBillingPeriods".equals(methodName)) { org.wso2.carbon.billing.mgt.services.GetAvailableBillingPeriodsResponse getAvailableBillingPeriodsResponse21 = null; org.wso2.carbon.billing.mgt.services.GetAvailableBillingPeriods wrappedParam = (org.wso2.carbon.billing.mgt.services.GetAvailableBillingPeriods) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.wso2.carbon.billing.mgt.services.GetAvailableBillingPeriods.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getAvailableBillingPeriodsResponse21 = skel.getAvailableBillingPeriods(wrappedParam); envelope = toEnvelope( getSOAPFactory(msgContext), getAvailableBillingPeriodsResponse21, false, new javax.xml.namespace.QName( "http://services.mgt.billing.carbon.wso2.org", "getAvailableBillingPeriods")); } else if ("getPaginatedBalances".equals(methodName)) { org.wso2.carbon.billing.mgt.services.GetPaginatedBalancesResponse getPaginatedBalancesResponse23 = null; org.wso2.carbon.billing.mgt.services.GetPaginatedBalances wrappedParam = (org.wso2.carbon.billing.mgt.services.GetPaginatedBalances) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.wso2.carbon.billing.mgt.services.GetPaginatedBalances.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getPaginatedBalancesResponse23 = skel.getPaginatedBalances(wrappedParam); envelope = toEnvelope( getSOAPFactory(msgContext), getPaginatedBalancesResponse23, false, new javax.xml.namespace.QName( "http://services.mgt.billing.carbon.wso2.org", "getPaginatedBalances")); } else { throw new java.lang.RuntimeException("method not found"); } newMsgContext.setEnvelope(envelope); } } catch (MultitenancyBillingServiceExceptionException e) { msgContext.setProperty( org.apache.axis2.Constants.FAULT_NAME, "MultitenancyBillingServiceException"); org.apache.axis2.AxisFault f = createAxisFault(e); if (e.getFaultMessage() != null) { f.setDetail(toOM(e.getFaultMessage(), false)); } throw f; } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
public void invokeBusinessLogic( org.apache.axis2.context.MessageContext msgContext, org.apache.axis2.context.MessageContext newMsgContext) throws org.apache.axis2.AxisFault { try { // get the implementation class for the Web Service Object obj = getTheImplementationObject(msgContext); GSNWebServiceSkeleton skel = (GSNWebServiceSkeleton) obj; // Out Envelop org.apache.axiom.soap.SOAPEnvelope envelope = null; // Find the axisOperation that has been set by the Dispatch phase. org.apache.axis2.description.AxisOperation op = msgContext.getOperationContext().getAxisOperation(); if (op == null) { throw new org.apache.axis2.AxisFault( "Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider"); } java.lang.String methodName; if ((op.getName() != null) && ((methodName = org.apache.axis2.util.JavaUtils.xmlNameToJava(op.getName().getLocalPart())) != null)) { if ("getVirtualSensorsDetails".equals(methodName)) { gsn.webservice.standard.GetVirtualSensorsDetailsResponse getVirtualSensorsDetailsResponse1 = null; gsn.webservice.standard.GetVirtualSensorsDetails wrappedParam = (gsn.webservice.standard.GetVirtualSensorsDetails) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.GetVirtualSensorsDetails.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getVirtualSensorsDetailsResponse1 = skel.getVirtualSensorsDetails(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getVirtualSensorsDetailsResponse1, false); } else if ("getNextData".equals(methodName)) { gsn.webservice.standard.GetNextDataResponse getNextDataResponse3 = null; gsn.webservice.standard.GetNextData wrappedParam = (gsn.webservice.standard.GetNextData) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.GetNextData.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getNextDataResponse3 = skel.getNextData(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getNextDataResponse3, false); } else if ("listWrapperURLs".equals(methodName)) { gsn.webservice.standard.ListWrapperURLsResponse listWrapperURLsResponse5 = null; gsn.webservice.standard.ListWrapperURLs wrappedParam = (gsn.webservice.standard.ListWrapperURLs) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.ListWrapperURLs.class, getEnvelopeNamespaces(msgContext.getEnvelope())); listWrapperURLsResponse5 = skel.listWrapperURLs(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), listWrapperURLsResponse5, false); } else if ("getLatestMultiData".equals(methodName)) { gsn.webservice.standard.GetLatestMultiDataResponse getLatestMultiDataResponse7 = null; gsn.webservice.standard.GetLatestMultiData wrappedParam = (gsn.webservice.standard.GetLatestMultiData) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.GetLatestMultiData.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getLatestMultiDataResponse7 = skel.getLatestMultiData(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getLatestMultiDataResponse7, false); } else if ("unregisterQuery".equals(methodName)) { gsn.webservice.standard.UnregisterQueryResponse unregisterQueryResponse9 = null; gsn.webservice.standard.UnregisterQuery wrappedParam = (gsn.webservice.standard.UnregisterQuery) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.UnregisterQuery.class, getEnvelopeNamespaces(msgContext.getEnvelope())); unregisterQueryResponse9 = skel.unregisterQuery(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), unregisterQueryResponse9, false); } else if ("createVirtualSensor".equals(methodName)) { gsn.webservice.standard.CreateVirtualSensorResponse createVirtualSensorResponse11 = null; gsn.webservice.standard.CreateVirtualSensor wrappedParam = (gsn.webservice.standard.CreateVirtualSensor) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.CreateVirtualSensor.class, getEnvelopeNamespaces(msgContext.getEnvelope())); createVirtualSensorResponse11 = skel.createVirtualSensor(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createVirtualSensorResponse11, false); } else if ("getMultiData".equals(methodName)) { gsn.webservice.standard.GetMultiDataResponse getMultiDataResponse13 = null; gsn.webservice.standard.GetMultiData wrappedParam = (gsn.webservice.standard.GetMultiData) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.GetMultiData.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getMultiDataResponse13 = skel.getMultiData(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getMultiDataResponse13, false); } else if ("registerQuery".equals(methodName)) { gsn.webservice.standard.RegisterQueryResponse registerQueryResponse15 = null; gsn.webservice.standard.RegisterQuery wrappedParam = (gsn.webservice.standard.RegisterQuery) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.RegisterQuery.class, getEnvelopeNamespaces(msgContext.getEnvelope())); registerQueryResponse15 = skel.registerQuery(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), registerQueryResponse15, false); } else if ("getContainerInfo".equals(methodName)) { gsn.webservice.standard.GetContainerInfoResponse getContainerInfoResponse17 = null; gsn.webservice.standard.GetContainerInfo wrappedParam = (gsn.webservice.standard.GetContainerInfo) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.GetContainerInfo.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getContainerInfoResponse17 = skel.getContainerInfo(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getContainerInfoResponse17, false); } else if ("listVirtualSensorNames".equals(methodName)) { gsn.webservice.standard.ListVirtualSensorNamesResponse listVirtualSensorNamesResponse19 = null; gsn.webservice.standard.ListVirtualSensorNames wrappedParam = (gsn.webservice.standard.ListVirtualSensorNames) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.ListVirtualSensorNames.class, getEnvelopeNamespaces(msgContext.getEnvelope())); listVirtualSensorNamesResponse19 = skel.listVirtualSensorNames(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), listVirtualSensorNamesResponse19, false); } else if ("deleteVirtualSensor".equals(methodName)) { gsn.webservice.standard.DeleteVirtualSensorResponse deleteVirtualSensorResponse21 = null; gsn.webservice.standard.DeleteVirtualSensor wrappedParam = (gsn.webservice.standard.DeleteVirtualSensor) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), gsn.webservice.standard.DeleteVirtualSensor.class, getEnvelopeNamespaces(msgContext.getEnvelope())); deleteVirtualSensorResponse21 = skel.deleteVirtualSensor(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteVirtualSensorResponse21, false); } else { throw new java.lang.RuntimeException("method not found"); } newMsgContext.setEnvelope(envelope); } } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } }
public void invokeBusinessLogic( org.apache.axis2.context.MessageContext msgContext, org.apache.axis2.context.MessageContext newMsgContext) throws org.apache.axis2.AxisFault { try { // get the implementation class for the Web Service Object obj = getTheImplementationObject(msgContext); SiteSkeletonInterface skel = (SiteSkeletonInterface) obj; // Out Envelop org.apache.axiom.soap.SOAPEnvelope envelope = null; // Find the axisOperation that has been set by the Dispatch phase. org.apache.axis2.description.AxisOperation op = msgContext.getOperationContext().getAxisOperation(); if (op == null) { throw new org.apache.axis2.AxisFault( "Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider"); } java.lang.String methodName; if ((op.getName() != null) && ((methodName = org.apache.axis2.util.JavaUtils.xmlNameToJavaIdentifier( op.getName().getLocalPart())) != null)) { if ("passInfo".equals(methodName)) { org.example.www.site.PassInfoResponse passInfoResponse9 = null; org.example.www.site.PassInfo wrappedParam = (org.example.www.site.PassInfo) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.example.www.site.PassInfo.class, getEnvelopeNamespaces(msgContext.getEnvelope())); passInfoResponse9 = skel.passInfo(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), passInfoResponse9, false); } else if ("searchSite".equals(methodName)) { org.example.www.site.SearchSiteResponse searchSiteResponse11 = null; org.example.www.site.SearchSite wrappedParam = (org.example.www.site.SearchSite) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.example.www.site.SearchSite.class, getEnvelopeNamespaces(msgContext.getEnvelope())); searchSiteResponse11 = skel.searchSite(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), searchSiteResponse11, false); } else if ("getSite".equals(methodName)) { org.example.www.site.GetSiteResponse getSiteResponse13 = null; org.example.www.site.GetSite wrappedParam = (org.example.www.site.GetSite) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.example.www.site.GetSite.class, getEnvelopeNamespaces(msgContext.getEnvelope())); getSiteResponse13 = skel.getSite(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getSiteResponse13, false); } else if ("parallelInfo".equals(methodName)) { org.example.www.site.ParallelInfoResponse parallelInfoResponse15 = null; org.example.www.site.ParallelInfo wrappedParam = (org.example.www.site.ParallelInfo) fromOM( msgContext.getEnvelope().getBody().getFirstElement(), org.example.www.site.ParallelInfo.class, getEnvelopeNamespaces(msgContext.getEnvelope())); parallelInfoResponse15 = skel.parallelInfo(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), parallelInfoResponse15, false); } else { throw new java.lang.RuntimeException("method not found"); } newMsgContext.setEnvelope(envelope); } } catch (java.lang.Exception e) { throw org.apache.axis2.AxisFault.makeFault(e); } }