Package org.codehaus.xfire

Examples of org.codehaus.xfire.XFireException


                {
                    writer.close();
                }
                catch (XMLStreamException e)
                {
                    throw new XFireException("Couldn't close stream.", e);
                }
            }
            else
            {
                // Send a response from the Channel to the client
                MessageContext oldContext = (MessageContext)context.getProperty( OLD_CONTEXT );

                Channel channel = oldContext.getOutMessage().getChannel();
                sendViaNewChannel( context, oldContext, message, channel, (String)context.getProperty( SENDER_URI ) );
            }
        }
        else
        {
            // Send a request from the channel to the service
            MessageContext receivingContext = new MessageContext();
            receivingContext.setXFire( context.getXFire() );
            receivingContext.setService( getService( context.getXFire(), message.getUri() ) );
            receivingContext.setProperty( OLD_CONTEXT, context );
            receivingContext.setProperty( SENDER_URI, getUri() );
            receivingContext.setSession( session );

            final Channel channel;
            final String uri = message.getUri();
            try
            {
                channel = getTransport().createChannel( uri );
            }
            catch( Exception e )
            {
                throw new XFireException( "Couldn't create channel.", e );
            }
           
            sendViaNewChannel( context, receivingContext, message, channel, uri );
        }
    }
View Full Code Here


        int i = uri.indexOf( "//" );

        if( i == -1 )
        {
            throw new XFireException( "Malformed service URI" );
        }

        String name = uri.substring( i + 2 );
        Service service = xfire.getServiceRegistry().getService( name );
View Full Code Here

        if (serializer == null)
        {
            AbstractSoapBinding binding = (AbstractSoapBinding) context.getBinding();
            if (binding == null)
            {
                throw new XFireException("Couldn't find the binding!");
            }
            serializer = AbstractSoapBinding.getSerializer(binding.getStyle(), binding.getUse());
        }
       
        context.getOutMessage().setSerializer(new SoapSerializer(serializer));
View Full Code Here

     */
    private ApplicationContext getXFireApplicationContext(String configPath, ApplicationContext parent) throws XFireException
    {
        if (configPath == null)
        {
            throw new XFireException("Configuration file required");
        }
       
        GenericApplicationContext ctx = createContext(parent);

        XmlBeanDefinitionReader xmlReader = XBeanHelper.createBeanDefinitionReader((SpringApplicationContext) ctx,
View Full Code Here

            {
                msgIs.close();
            }
            catch (IOException e)
            {
                throw new XFireException("Could not close connection.", e);
            }
        }
       
        if (source != null)
        {
View Full Code Here

            if (is != null)
                is.close();
        }
        catch (IOException e)
        {
            throw new XFireException("Couldn't close stream.", e);
        }
        finally
        {
            if (urlConn != null)
                urlConn.disconnect();
View Full Code Here

            writer.flush();
        }
        catch (XMLStreamException e)
        {
            log.error(e);
            throw new XFireException("Couldn't send message.", e);
        }
    }
View Full Code Here

            }
        }
        catch (IOException e)
        {
            log.error(e);
            throw new XFireException("Couldn't send message.", e);
        }
        finally
        {
            sender.close();
        }
View Full Code Here

           
            out.close();
        }
        catch (IOException e)
        {
            throw new XFireException("Couldn't send message.", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.XFireException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.