Package javax.xml.crypto

Examples of javax.xml.crypto.URIReferenceException


        if (uriMap.containsKey(uri)) {
            try {
                FileInputStream fis = new FileInputStream(uriMap.get(uri));
                return new OctetStreamData(
                    fis, uriReference.getURI(), uriReference.getType());
            } catch (Exception e) { throw new URIReferenceException(e); }
        }

        // fallback on builtin deref
        return ud.dereference(uriReference, context);
    }
View Full Code Here


          {
            ds = dataSource;
            break;
          }
        if (ds == null)
          throw new URIReferenceException("Reference URI = " + uriReference.getURI() + " does not exist!");
        XMLSignatureInput in = new XMLSignatureInput(ds.getInputStream());
        if (in.isOctetStream())
          return new ApacheOctetStreamData(in);
        else
          return new ApacheNodeSetData(in);
      }
      else
        return DOMURIDereferencer.INSTANCE.dereference(uriReference,context);
    }
    catch (Exception e)
    {
      throw new URIReferenceException(e);
    }
  }
View Full Code Here

        //Node parentNode = node.getParentNode();
        Iterator nodeIterator =  ((NodeSetData)data).iterator();
        if(nodeIterator.hasNext()){
            return (Node)nodeIterator.next();
        }else{
            throw new URIReferenceException("URI "+((Element)node).getAttribute("URI") + "not found");
        }
    }
View Full Code Here

            }
        }catch(XWSSecurityException ex){
            if(logger.getLevel () == Level.FINEST){
                logger.log (Level.FINEST,"Error occurred while resolving"+uri,ex);
            }
            throw new URIReferenceException (ex.getMessage ());
        }
        return null;
    }
View Full Code Here

        context.get (MessageConstants.WSS_PROCESSING_CONTEXT);
       
        SecurableSoapMessage secureMsg = filterContext.getSecurableSoapMessage ();
        AttachmentPart attachment = secureMsg.getAttachmentPart (uri);
        if(attachment == null){
            throw new URIReferenceException ("Attachment Resource with Identifier  "+uri+" was not found");
        }
        if(sunAttachmentTransformProvider){
            AttachmentData attachData = new AttachmentData ();
            attachData.setAttachmentPart (attachment);
            return attachData;
View Full Code Here

            }
        }
        SecurableSoapMessage secureMsg = filterContext.getSecurableSoapMessage ();
        Element element = secureMsg.getElementById (uri);
        if(element == null){
            throw new URIReferenceException ("Resource with fragment Identifier  "+uri+" was not found");
            //log;
        }
        if(_constructor == null){
            return convertToData (element,true);
        }else{
View Full Code Here

            String tokenId = uri.substring (1);
            secToken = (SecurityToken)tokenCache.get (tokenId);
            if(secToken == null){
                tokenElement = secureMessage.getElementById (tokenId);
                if(tokenElement == null){
                    throw new URIReferenceException ("Could not locate token with following ID"+tokenId);
                }
            
            } else {
                tokenElement = secToken.getAsSoapElement();
            }
View Full Code Here

        }

        String uriString = uriReference.getURI();

        if (uriString == null) {
            throw new URIReferenceException("Cannot resolve a URI of value 'null'.");
        }

        if (uriString != null && ((uriString.length() != 0 && uriString.charAt(0) == '#') || uriString.isEmpty())) {
            // same document uri
            XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
            return fac.getURIDereferencer().dereference(uriReference, context);
        }

        throw new URIReferenceException(String.format("URI reference %s not supported", uriString));
    }
View Full Code Here

                String uri = null;
                uri = uriRef.getURI();
                return dereferenceURI(uri,context);
            }catch(Exception ex){
                // log here
                throw new URIReferenceException(ex);
            }
        }
View Full Code Here

        if (uriMap.containsKey(uri)) {
            try {
                FileInputStream fis = new FileInputStream(uriMap.get(uri));
                return new OctetStreamData(
                    fis, uriReference.getURI(), uriReference.getType());
            } catch (Exception e) { throw new URIReferenceException(e); }
        }

        // fallback on builtin deref
        return ud.dereference(uriReference, context);
    }
View Full Code Here

TOP

Related Classes of javax.xml.crypto.URIReferenceException

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.