gpt4 book ai didi

org.codehaus.xfire.XFireException类的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 09:15:05 28 4
gpt4 key购买 nike

本文整理了Java中org.codehaus.xfire.XFireException类的一些代码示例,展示了XFireException类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XFireException类的具体详情如下:
包路径:org.codehaus.xfire.XFireException
类名称:XFireException

XFireException介绍

[英]A catchable non-runtime exception
[中]可捕获的非运行时异常

代码示例

代码示例来源:origin: org.codehaus.xfire/xfire-core

public void close() throws XFireException
{
  
  try
  {
    if (is != null)
      is.close();
  }
  catch (IOException e)
  {
    throw new XFireException("Couldn't close stream.", e);
  }
  finally
  {
    if (urlConn != null)
      urlConn.disconnect();
  }
}

代码示例来源:origin: org.mule.transports/mule-transport-xfire

throw new XFireException("Couldn't send message.", e);
throw new IOException(e.getMessage());

代码示例来源:origin: org.codehaus.xfire/xfire-core

public void writeRequest(OutputStream out)
  throws IOException
{
  if (CommonsHttpMessageSender.isGzipRequestEnabled(context))
  {
    out = new GZIPOutputStream(out);
  }
  
  try
  {
    Attachments atts = message.getAttachments();
    if (atts != null)
    {
      atts.write(out);
    }
    else
    {
      HttpChannel.writeWithoutAttachments(context, message, out);
    }
  }
  catch (XFireException e)
  {
    log.error("Couldn't send message.", e);
    throw new IOException(e.getMessage());
  }
  
  out.close();
}

代码示例来源:origin: org.codehaus.xfire/xfire-core

protected Service getService( XFire xfire, String uri ) throws XFireException
{
  if( null == xfire )
  {
    return null;
  }
  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 );
  if( null == service )
  {
    logger.info( "Unable to locate '" + name + "' in ServiceRegistry" );
  }
  return service;
}

代码示例来源:origin: org.mule.transports/mule-transport-xfire

protected Service getService(XFire xfire, String uri) throws XFireException
{
  if (null == xfire)
  {
    logger.warn("No XFire instance in context, unable to determine service");
    return null;
  }
  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);
  if (null == service)
  {
    // TODO this should be an exception...
    logger.warn("Unable to locate '" + name + "' in ServiceRegistry");
  }
  return service;
}

代码示例来源:origin: org.codehaus.xfire/xfire-core

public void close()
  throws XFireException
{
  if (msgIs != null)
  {
    try
    {
      msgIs.close();
    }
    catch (IOException e)
    {
      throw new XFireException("Could not close connection.", e);
    }
  }
  
  if (source != null)
  {
    source.dispose();
  }
  
  if (postMethod != null)
    postMethod.releaseConnection();
}

代码示例来源:origin: org.mule.transports/mule-transport-xfire

void writeWithoutAttachments(MessageContext context, OutMessage message, OutputStream out)
  throws XFireException
{
  XMLStreamWriter writer = STAXUtils.createXMLStreamWriter(out, message.getEncoding(), context);
  message.getSerializer().writeMessage(message, writer, context);
  try
  {
    writer.flush();
  }
  catch (XMLStreamException e)
  {
    logger.error(e);
    throw new XFireException("Couldn't send message.", e);
  }
}

代码示例来源:origin: org.codehaus.xfire/xfire-core

public static void writeWithoutAttachments(MessageContext context, OutMessage message, OutputStream out) 
  throws XFireException
{
  XMLStreamWriter writer = STAXUtils.createXMLStreamWriter(out, message.getEncoding(), context);
  
  message.getSerializer().writeMessage(message, writer, context);
  
  try
  {
    writer.flush();
  }
  catch (XMLStreamException e)
  {
    log.error(e);
    throw new XFireException("Couldn't send message.", e);
  }
}

代码示例来源:origin: org.apache.servicemix/servicemix-jsr181

protected Source getContent(MessageContext context, 
              OutMessage message) throws XMLStreamException, IOException, XFireException {
  ByteArrayOutputStream outStream = new ByteArrayOutputStream();
  XMLStreamWriter writer = getTransformer().getOutputFactory()
    .createXMLStreamWriter(outStream, message.getEncoding());
  MessageSerializer serializer = context.getOutMessage().getSerializer();
  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());
  }
  serializer.writeMessage(message, writer, context);
  writer.close();
  outStream.close();
  return new StreamSource(new ByteArrayInputStream(outStream.toByteArray()));
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-xfire-client-tools

public void invoke(MessageContext context) throws Exception {
  AbstractSoapBinding binding = (AbstractSoapBinding) context.getBinding();
  if (binding == null) {
   throw new XFireException("Couldn't find the binding!");
  }

  context.getOutMessage().setSerializer(binding.getSerializer());
 }
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

public void invoke(MessageContext context) throws Exception {
  AbstractSoapBinding binding = (AbstractSoapBinding) context.getBinding();
  if (binding == null) {
   throw new XFireException("Couldn't find the binding!");
  }

  context.getOutMessage().setSerializer(binding.getSerializer());
 }
}

代码示例来源:origin: org.codehaus.xfire/xfire-core

public InputStream createInputStream()
  throws XFireException
{
  try
  {
    // TODO: its really not necessary to cache this...
    out = new CachedOutputStream(1024*1000, null);
    XMLStreamWriter writer = STAXUtils.createXMLStreamWriter(out, msg.getEncoding(), context);
    msg.setProperty(Channel.OUTPUTSTREAM, out);
    msg.getSerializer().writeMessage(msg, writer, context);
        writer.flush();
    writer.close();
    out.close();
        return out.getInputStream();
  }
  catch (XMLStreamException e)
  {
    throw new XFireException("Couldn't send message.", e);
  }
  catch (IOException e)
  {
    throw new XFireException("Couldn't send message.", e);
  }
}

代码示例来源:origin: org.codehaus.xfire/xfire-spring

throw new XFireException("Configuration file required");

代码示例来源:origin: org.codehaus.xfire/xfire-core

throw new XFireException("Couldn't send message.", e);

代码示例来源:origin: org.codehaus.xfire/xfire-core

throw new XFireException("Couldn't send message.", e);

代码示例来源:origin: org.mule.transports/mule-transport-xfire

throw new XFireException("Couldn't create channel.", e);
throw new XFireException("Couldn't schedule worker threads. " + e.getMessage(), e);

代码示例来源:origin: org.mule.transports/mule-transport-xfire

throw new XFireException("Couldn't send message.", e);
throw new XFireException("Failed to Send via MuleUniversalChannel: " + e.getMessage(), e);

代码示例来源:origin: org.codehaus.xfire/xfire-generator

throw new XFireException("Could not find wsdl " + wsdl + " with a base URI of " + baseURI 
             + ".");

代码示例来源:origin: org.codehaus.xfire/xfire-core

/**
 * Validates that the mustUnderstand and role headers are processed correctly.
 *
 * @param context
 * @throws XFireFault
 */
public void invoke(MessageContext context)
  throws Exception
{
  MessageSerializer serializer = context.getOutMessage().getSerializer();
  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));
}

代码示例来源:origin: org.codehaus.xfire/xfire-core

throw new XFireException("Couldn't close stream.", e);
throw new XFireException( "Couldn't create channel.", e );

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com