Package org.apache.wsif

Examples of org.apache.wsif.WSIFException


   */
  public synchronized Serializable get(WSIFCorrelationId id)
    throws WSIFException {
    Trc.entry(this, id);
    if (correlatorStore == null) {
      throw new WSIFException("get called on correlation service but put never done");
    } else if (id == null) {
      throw new IllegalArgumentException("cannot get null");
    } else {
      try {
        Serializable s =
          (Serializable) unserialize((byte[]) correlatorStore
            .get(id));
        Trc.exit(s);
        return s;
      } catch (Exception ex) {
        Trc.exception(ex);
        throw new WSIFException(ex.toString());
      }
    }
  }
View Full Code Here


   */
  public synchronized void remove(WSIFCorrelationId id)
    throws WSIFException {
    Trc.entry(this, id);
    if (correlatorStore == null) {
      throw new WSIFException("corelation service has been shutdown");
    } else if (id == null) {
      throw new IllegalArgumentException("cannot remove null");
    } else {
      correlatorStore.remove(id);
      if (timeouts != null) {
View Full Code Here

            for (Iterator i = extElems.iterator(); i.hasNext();) {
                // if so return new
                Object o = i.next();
                if (extType.isAssignableFrom(o.getClass())) {
                    if (found != null) {
                        throw new WSIFException(
                            "duplicated extensibility element "
                                + extType.getClass().getName()
                                + " in "
                                + ctx);
                    }
View Full Code Here

        contextCopy = new WSIFDefaultMessage();
      } else {
        try {
          contextCopy = (WSIFMessage) this.context.clone();
        } catch (CloneNotSupportedException e) {
          throw new WSIFException(
              "CloneNotSupportedException cloning context", e);
        }
      }
        Trc.exit(contextCopy);
      return contextCopy;
View Full Code Here

                        + portTypeName };
            Method m = initContextClass.getMethod("lookup", lookupSig);
            ws = (WSIFService) m.invoke(ic, lookupArgs);
        } catch (Exception e) {
            Trc.exception(e);
            throw new WSIFException(
                "Exception while looking up JNDI factory: " + e.getMessage(),
                e);
        }
        Trc.exit(ws);
        return ws;
View Full Code Here

            if (item != null) {
                Trc.exit(item);
                return item;
            } else {
                throw new WSIFException(
                    itemType
                        + " '"
                        + qname
                        + "' not found. Choices are: "
                        + getCommaListFromQNameMap(items));
            }
        } else {
            int size = items.size();

            if (size == 1) {
                Iterator valueIterator = items.values().iterator();

                Object o = valueIterator.next();
                Trc.exit(o);
                return o;
            } else if (size == 0) {
                throw new WSIFException(
                    "WSDL document contains no " + itemType + "s.");
            } else {
                throw new WSIFException(
                    "Please specify a "
                        + itemType
                        + ". Choices are: "
                        + getCommaListFromQNameMap(items));
            }
View Full Code Here

        String location)
        throws WSIFException {
        Trc.entry(null, contextURL, location);

        if (location == null) {
            throw new WSIFException("WSDL location must not be null.");
        }

        Definition def = null;
        try {
            def = WSIFUtils.readWSDL(contextURL, location);
        } catch (WSDLException e) {
            Trc.exception(e);
            throw new WSIFException("Problem reading WSDL document.", e);
        }
        Trc.exitExpandWsdl(def);
        return def;
    }
View Full Code Here

        String contextURL,
        String content)
        throws WSIFException {
        Trc.entry(null, contextURL, content);
        if (content == null) {
            throw new WSIFException("WSDL content must not be null.");
        }

        Definition def = null;
        try {
            def = WSIFUtils.readWSDL(contextURL, new StringReader(content));
        } catch (WSDLException e) {
            Trc.exception(e);
            throw new WSIFException("Problem reading WSDL document.", e);
        }
        Trc.exitExpandWsdl(def);
        return def;
    }
View Full Code Here

               ? boutName == null
               : outName.equalsIgnoreCase(boutName)) {
               if ( choosenOp == null ) {
                  choosenOp = bop;
               } else {
                  throw new WSIFException(
                     "duplicate operation in binding: " +
                     bop.getName() +
                     ":" + inName +
                     ":" + outName );
               }
View Full Code Here

  public static List unWrapPart(Part p, Definition def) throws WSIFException {

    ArrayList l = new ArrayList();
    Parser.getAllSchemaTypes(def, l, null);
    if (l == null || l.size()<1) {
      throw new WSIFException("no schema elements found");
    }

      QName partQN = p.getElementName();
    if (partQN == null) {
      throw new WSIFException("part has no QName");
    }
     
    ElementType et = null;
    for (int i=0; i<l.size() && et==null; i++ ){
      Object o = l.get(i);
      if ( o instanceof ElementType ) {
                QName etQN = ((ElementType)o).getTypeName();
        if ( partQN.equals(etQN) ){
          et = (ElementType)o;
        }
      }
    }
    if (et == null) {
      throw new WSIFException("no ElementType found for part: " + p);
    }

    List children = et.getChildren();
    if (children == null || l.size()<1) {
      throw new WSIFException("no ComplexType children on elementType: " + et);
    }
   
    ComplexType ct = (ComplexType) children.get(0);
    SequenceElement[] se = ct.getSequenceElements();
    if (se == null) {
      throw new WSIFException("no sequence elements found on: " + ct);
    }
   
    ArrayList unWrappedParts = new ArrayList();
    for (int i=0; i< se.length; i++) {
       PartImpl np = new PartImpl();
       QName type = se[i].getTypeName();
       if (type==null) {
        throw new WSIFException("sequence element has no type name: " + se[i]);
       }
       np.setName(type.getLocalPart());
       np.setElementName(se[i].getElementType());
          unWrappedParts.add(np);
    }
View Full Code Here

TOP

Related Classes of org.apache.wsif.WSIFException

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.