gpt4 book ai didi

org.codehaus.xfire.XFireException.()方法的使用及代码示例

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

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

XFireException.<init>介绍

[英]Constructs a new XFireException with the specified detail message.
[中]使用指定的详细信息构造新的XFireException。

代码示例

代码示例来源: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.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.mule.transports/mule-transport-xfire

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

代码示例来源: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 );

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

writer.close();
  } catch (XMLStreamException e) {
    throw new XFireException("Error closing output stream", e);
  msg.setContent(getContent(context, message));
  if (!channel.sendSync(me)) {
    throw new XFireException("Unable to send jbi exchange: sendSync returned false");
  throw e;
} catch (Exception e) {
  throw new XFireException("Error sending jbi exchange", e);

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