private int getSendType() { int sendType = Attachments.SEND_TYPE_NOTSET; if ((msgContext != null) && (msgContext.getService() != null)) { sendType = msgContext.getService().getSendType(); } return sendType; }
private int getSendType() { int sendType = Attachments.SEND_TYPE_NOTSET; if ((msgContext != null) && (msgContext.getService() != null)) { sendType = msgContext.getService().getSendType(); } return sendType; }
private int getSendType() { int sendType = Attachments.SEND_TYPE_NOTSET; if ((msgContext != null) && (msgContext.getService() != null)) { sendType = msgContext.getService().getSendType(); } return sendType; }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: URLMapper::invoke"); /** If there's already a targetService then just return. */ if ( msgContext.getService() == null ) { // path may or may not start with a "/". see http://issues.apache.org/jira/browse/AXIS-1372 String path = (String)msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO); if ((path != null) && (path.length() >= 1)) { //rules out the cases of path="", path=null if(path.startsWith("/")) path = path.substring(1); //chop the extra "/" msgContext.setTargetService( path ); } } log.debug("Exit: URLMapper::invoke"); }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: URLMapper::invoke"); /** If there's already a targetService then just return. */ if ( msgContext.getService() == null ) { // path may or may not start with a "/". see http://issues.apache.org/jira/browse/AXIS-1372 String path = (String)msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO); if ((path != null) && (path.length() >= 1)) { //rules out the cases of path="", path=null if(path.startsWith("/")) path = path.substring(1); //chop the extra "/" msgContext.setTargetService( path ); } } log.debug("Exit: URLMapper::invoke"); }
public void invoke(MessageContext msgContext) throws AxisFault { log.debug("Enter: URLMapper::invoke"); /** If there's already a targetService then just return. */ if ( msgContext.getService() == null ) { // path may or may not start with a "/". see http://issues.apache.org/jira/browse/AXIS-1372 String path = (String)msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO); if ((path != null) && (path.length() >= 1)) { //rules out the cases of path="", path=null if(path.startsWith("/")) path = path.substring(1); //chop the extra "/" msgContext.setTargetService( path ); } } log.debug("Exit: URLMapper::invoke"); }
/** * Create an EJB using a remote home object * * @param msgContext the message context * @param beanJndiName The JNDI name of the EJB remote home class * @param homeClass the class of the home interface * @return an EJB */ private Object createRemoteEJB(MessageContext msgContext, String beanJndiName, Class homeClass) throws Exception { // Get the EJB Home object from JNDI Object ejbHome = getEJBHome(msgContext.getService(), msgContext, beanJndiName); Object ehome = javax.rmi.PortableRemoteObject.narrow(ejbHome, homeClass); // Invoke the create method of the ejbHome class without actually // touching any EJB classes (i.e. no cast to EJBHome) Method createMethod = homeClass.getMethod("create", empty_class_array); Object result = createMethod.invoke(ehome, empty_object_array); return result; }
/** * Create an EJB using a remote home object * * @param msgContext the message context * @param beanJndiName The JNDI name of the EJB remote home class * @param homeClass the class of the home interface * @return an EJB */ private Object createRemoteEJB(MessageContext msgContext, String beanJndiName, Class homeClass) throws Exception { // Get the EJB Home object from JNDI Object ejbHome = getEJBHome(msgContext.getService(), msgContext, beanJndiName); Object ehome = javax.rmi.PortableRemoteObject.narrow(ejbHome, homeClass); // Invoke the create method of the ejbHome class without actually // touching any EJB classes (i.e. no cast to EJBHome) Method createMethod = homeClass.getMethod("create", empty_class_array); Object result = createMethod.invoke(ehome, empty_object_array); return result; }
/** * Create an EJB using a remote home object * * @param msgContext the message context * @param beanJndiName The JNDI name of the EJB remote home class * @param homeClass the class of the home interface * @return an EJB */ private Object createRemoteEJB(MessageContext msgContext, String beanJndiName, Class homeClass) throws Exception { // Get the EJB Home object from JNDI Object ejbHome = getEJBHome(msgContext.getService(), msgContext, beanJndiName); Object ehome = javax.rmi.PortableRemoteObject.narrow(ejbHome, homeClass); // Invoke the create method of the ejbHome class without actually // touching any EJB classes (i.e. no cast to EJBHome) Method createMethod = homeClass.getMethod("create", empty_class_array); Object result = createMethod.invoke(ehome, empty_object_array); return result; }
/** * Return a object which implements the service. * * @param msgContext the message context * @param clsName The JNDI name of the EJB home class * @return an object that implements the service */ protected Object makeNewServiceObject(MessageContext msgContext, String clsName) throws Exception { // Read deployment descriptor options String namingLookup = getStrOption(OPTION_NAMING_LOOKUP, msgContext.getService()); if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); } Object targetObject = Naming.lookup(namingLookup); return targetObject; }
/** * Return a object which implements the service. * * @param msgContext the message context * @param clsName The JNDI name of the EJB home class * @return an object that implements the service */ protected Object makeNewServiceObject(MessageContext msgContext, String clsName) throws Exception { // Read deployment descriptor options String namingLookup = getStrOption(OPTION_NAMING_LOOKUP, msgContext.getService()); if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); } Object targetObject = Naming.lookup(namingLookup); return targetObject; }
/** * Return a object which implements the service. * * @param msgContext the message context * @param clsName The JNDI name of the EJB home class * @return an object that implements the service */ protected Object makeNewServiceObject(MessageContext msgContext, String clsName) throws Exception { // Read deployment descriptor options String namingLookup = getStrOption(OPTION_NAMING_LOOKUP, msgContext.getService()); if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); } Object targetObject = Naming.lookup(namingLookup); return targetObject; }
@Override public void invoke(final MessageContext msgContext) throws AxisFault { // Make sure that the method style is correctly set (This does not appear to // be handled by default) this.setOperationStyle(msgContext); // Set the msgClassLoader final String endpointName = msgContext.getService().getName(); final WebServiceClassLoader cl = ClassLoaderMap.getCL(endpointName); msgContext.setClassLoader(cl); final ClassLoader old = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(cl.getOrchestraClassLoader()); super.invoke(msgContext); } finally { Thread.currentThread().setContextClassLoader(old); } }
/** * */ public CommonExecutionConnectorServiceSoapBindingImpl() { try { ServiceDesc servicedesc = org.apache.axis.MessageContext.getCurrentContext().getService().getServiceDescription(); cec = CEAComponentContainer.getInstance().getExecutionController(); //nController(servicedesc); } catch (Throwable e) { logger.fatal("problem instatiating applicationController", e); //we're stuffed - no point continuing. throw new RuntimeException("Could not instantiate application controller",e); } try { query = CEAComponentContainer.getInstance().getQueryService(); } catch (Throwable e) { logger.fatal("problem instantiating querier",e); throw new RuntimeException("Could not instantiate query service",e); } }
/** * isDotNetSoapEncFixNeeded - Do we need to compensate for the dotnet bug. * check the service specific flag before using the global flag * @return */ private boolean isDotNetSoapEncFixNeeded() { MessageContext msgContext = MessageContext.getCurrentContext(); if (msgContext != null) { SOAPService service = msgContext.getService(); if (service != null) { String dotNetSoapEncFix = (String) service.getOption(AxisEngine.PROP_DOTNET_SOAPENC_FIX); if (dotNetSoapEncFix != null) { return JavaUtils.isTrue(dotNetSoapEncFix); } } } return TypeMappingImpl.dotnet_soapenc_bugfix; }
/** * isDotNetSoapEncFixNeeded - Do we need to compensate for the dotnet bug. * check the service specific flag before using the global flag * @return */ private boolean isDotNetSoapEncFixNeeded() { MessageContext msgContext = MessageContext.getCurrentContext(); if (msgContext != null) { SOAPService service = msgContext.getService(); if (service != null) { String dotNetSoapEncFix = (String) service.getOption(AxisEngine.PROP_DOTNET_SOAPENC_FIX); if (dotNetSoapEncFix != null) { return JavaUtils.isTrue(dotNetSoapEncFix); } } } return TypeMappingImpl.dotnet_soapenc_bugfix; }
/** * isDotNetSoapEncFixNeeded - Do we need to compensate for the dotnet bug. * check the service specific flag before using the global flag * @return */ private boolean isDotNetSoapEncFixNeeded() { MessageContext msgContext = MessageContext.getCurrentContext(); if (msgContext != null) { SOAPService service = msgContext.getService(); if (service != null) { String dotNetSoapEncFix = (String) service.getOption(AxisEngine.PROP_DOTNET_SOAPENC_FIX); if (dotNetSoapEncFix != null) { return JavaUtils.isTrue(dotNetSoapEncFix); } } } return TypeMappingImpl.dotnet_soapenc_bugfix; }
/** * Returns the endpoint URL that should be used in the returned WSDL. * * @param msgContext the current Axis JAX-RPC message context * @return the endpoint URL that should be used in the returned WSDL * @throws AxisFault if we fail to obtain the {@link org.apache.axis.description.ServiceDesc} for this service */ protected String getEndpointURL(MessageContext msgContext) throws AxisFault { // First see if a location URL is explicitly set in the MC. String locationUrl = msgContext.getStrProp( MessageContext.WSDLGEN_SERV_LOC_URL); if (locationUrl == null) { // If nothing, try what's explicitly set in the ServiceDesc. locationUrl = msgContext.getService().getInitializedServiceDesc( msgContext) .getEndpointURL(); } if (locationUrl == null) { // If nothing, use the actual transport URL. locationUrl = msgContext.getStrProp(MessageContext.TRANS_URL); } return locationUrl; } }
/** * {@inheritDoc} */ @Override protected void setTargetService(SOAPMessageContext soapMsgContext, AddressingHeaders headers) throws Exception { org.apache.axis.MessageContext axisMsgContext = (org.apache.axis.MessageContext) soapMsgContext; // TODO: why is the below code necessary? - add comments if (axisMsgContext.getService() == null && axisMsgContext.getTargetService() == null) { axisMsgContext.setTargetService(getTargetServiceName(headers)); // This is to ensure the SOAPEnvelope is rebuilt with the right type mappings and // MessageContext is set with the right properties. if (axisMsgContext.getTargetService() != null) { ((Message) axisMsgContext.getMessage()).getSOAPPartAsString(); } } }
public void createResult(final Object object) { messageContext.setPastPivot(true); try { final Message requestMessage = messageContext.getRequestMessage(); final SOAPEnvelope requestEnvelope = requestMessage.getSOAPEnvelope(); final RPCElement requestBody = getBody(requestEnvelope, messageContext); final Message responseMessage = messageContext.getResponseMessage(); final SOAPEnvelope responseEnvelope = responseMessage.getSOAPEnvelope(); final ServiceDesc serviceDescription = messageContext.getService().getServiceDescription(); final RPCElement responseBody = createResponseBody(requestBody, messageContext, operation, serviceDescription, object, responseEnvelope, getInOutParams()); responseEnvelope.removeBody(); responseEnvelope.addBodyElement(responseBody); } catch (final Exception e) { throw new ServerRuntimeException("Failed while creating response message body", e); } }