Package org.jboss.ws

Examples of org.jboss.ws.WSException


   private void assertSOAPParent()
   {
      org.w3c.dom.Node domParent = domNode.getParentNode();
      if (domParent != null && soapParent == null)
         throw new WSException("Inconsistent node, has a DOM parent but no SOAP parent [" + this + "] " + DOMWriter.printNode(this, false));
      if (domParent != null && soapParent != null && domParent != soapParent.domNode)
         throw new WSException("Inconsistent node, SOAP parent is not identical with DOM parent [" + this + "] " + DOMWriter.printNode(this, false));
   }
View Full Code Here


            wsdl.registerNamespaceURI(element.getNamespaceURI(),element.getPrefix());
         }
      }
      catch (IOException ioe)
      {
         throw new WSException("Error while converting policy to element!");
      }
   }
View Full Code Here

            {
               ((TextImpl)node).writeNode(out);
            }
            else
            {
               throw new WSException("Unhandled soap node: " + node.getClass().getName());
            }
         }
      }
      else
      {
View Full Code Here

         {
            buildBodyElementDefault(soapBody, domBodyElement);
         }
         else
         {
            throw new WSException("Unsupported message style: " + style);
         }
      }

      return soapBodyElement;
   }
View Full Code Here

         {
            wsConfig = unmarshaller.unmarshal(is, new OMFactoryJAXWS(), null);
         }
         else
         {
            throw new WSException("Invalid config namespace: " + nsURI);
         }

      }
      catch (JBossXBException e)
      {
         throw new WSException("Error while parsing configuration", e);
      }
      catch (IOException e)
      {
         throw new WSException("Failed to read config file: " + configURL, e);
      }
      finally
      {
         if (is != null)
         {
View Full Code Here

         Element root = DOMUtils.parse(configURL.openStream());
         return root.getNamespaceURI();
      }
      catch (IOException ex)
      {
         throw new WSException(ex);
      }
   }
View Full Code Here

      {
         config = ((ConfigRootJAXWS)configRoot).getConfigByName(configName);
      }

      if (config == null)
         throw new WSException("Cannot obtain config: " + configName);

      return config;
   }
View Full Code Here

            // ignore
         }
      }
     
      if (configURL == null)
         throw new WSException("Cannot find configFile: " + configFile);
     
      return configURL;
   }
View Full Code Here

      log.debug("getXMLFragment from Object [xmlType=" + xmlType + ",javaType=" + javaType + "]");

      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
      if (msgContext == null)
         throw new WSException("MessageContext not available");

      SerializationContext serContext = msgContext.getSerializationContext();
      serContext.setJavaType(javaType);
      ParameterMetaData pmd = container.getParamMetaData();
      OperationMetaData opMetaData = pmd.getOperationMetaData();
      List<Class> registeredTypes = opMetaData.getEndpointMetaData().getRegisteredTypes();
      serContext.setProperty(SerializationContextJAXWS.JAXB_CONTEXT_TYPES, registeredTypes.toArray(new Class[0]));

      TypeMappingImpl typeMapping = serContext.getTypeMapping();
      XMLFragment xmlFragment = null;
      try
      {
         SerializerSupport ser;
         if (objectValue != null)
         {
            AbstractSerializerFactory serializerFactory = getSerializerFactory(typeMapping, javaType, xmlType);
            ser = (SerializerSupport)serializerFactory.getSerializer();
         }
         else
         {
            ser = new NullValueSerializer();
         }

         Result result = ser.serialize(container, serContext);

         xmlFragment = new XMLFragment(result);
         log.debug("xmlFragment: " + xmlFragment);
      }
      catch (BindingException e)
      {
         throw new WSException(e);
      }

      return xmlFragment;
   }
View Full Code Here

            }
         }
      }

      if (serializerFactory == null)
         throw new WSException("Cannot obtain serializer factory for: [xmlType=" + xmlType + ",javaType=" + javaType + "]");

      return serializerFactory;
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.WSException

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.