Package com.sun.xml.wss.impl.misc

Examples of com.sun.xml.wss.impl.misc.URI


      XMLSignatureInput result = new XMLSignatureInput(resultSet);

      result.setMIMEType("text/xml");

      try {
         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());
         result.setSourceURI(uriNew.toString());
      } catch (URI.MalformedURIException ex) {
         result.setSourceURI(BaseURI);        
      }

      return result;
View Full Code Here


      Set resultSet = prepareNodeSet(selectedElem);
      result = new XMLSignatureInput(resultSet);
      result.setMIMEType(MimeConstants.TEXT_XML_TYPE);

      try {
         URI uriNew = new URI(new URI(baseUri), uriNodeValue);
         result.setSourceURI(uriNew.toString());
      } catch (URI.MalformedURIException ex) {
         result.setSourceURI(baseUri);
      }
      return result;
   }
View Full Code Here

         // log
         throw new ResourceResolverException("empty", e, uri, baseUri);
      }

      try {
         URI uriNew = new URI(new URI(baseUri), uriNodeValue);
         result.setSourceURI(uriNew.toString());
      } catch (URI.MalformedURIException ex) {
         result.setSourceURI(baseUri);
      }
      return result;
   }
View Full Code Here

      return result;
   }

   private XMLSignatureInput _resolveClocation(Attr uri, String baseUri)
                throws ResourceResolverException, URIResolverException {
      URI uriNew = null;
      XMLSignatureInput result = null;
      try {
         uriNew = getNewURI(uri.getNodeValue(), baseUri);
      } catch (URI.MalformedURIException ex) {
         // log         
         throw new ResourceResolverException("empty", ex, uri, baseUri);
      }

      if (soapMsg == null) throw generateException(uri, baseUri, errors[1]);

      try
         AttachmentPart _part = ((SecurableSoapMessage)soapMsg).getAttachmentPart(uriNew.toString());
         if (_part == null) {
             // log 
             throw new URIResolverException();
         }
         Object[] obj = AttachmentSignatureInput._getSignatureInput(_part);
         result = new AttachmentSignatureInput((byte[])obj[1]);
         ((AttachmentSignatureInput)result).setMimeHeaders((Vector)obj[0]);
         ((AttachmentSignatureInput)result).setContentType(_part.getContentType());
      } catch (XWSSecurityException e) {
         throw new ResourceResolverException("empty", e, uri, baseUri);
      } catch (SOAPException spe) {
         // log
         throw new ResourceResolverException("empty", spe, uri, baseUri);
      } catch (java.io.IOException ioe) {
         // log
         throw new ResourceResolverException("empty", ioe, uri, baseUri);
      }


      result.setSourceURI(uriNew.toString());
      return result;
   }
View Full Code Here

      if (uriNodeValue.startsWith("attachmentRef:")) {
          referenceType = CID_REFERENCE;
          return true;
      }

      URI uriNew = null;
      try {
         uriNew = getNewURI(uriNodeValue, baseURI);
      } catch (URI.MalformedURIException ex) {
         // log
         return false;
      }

      /* content-location of the type http:// (for now) */
      if ((uriNew != null) &&
           uriNew.getScheme().equals("http") ||
           uriNodeValue.startsWith("thismessage:/") ||
          !(uriNew.getScheme().equals("ftp") ||
            uriNew.getScheme().equals("telnet") ||
            uriNew.getScheme().equals("gopher") ||
            uriNew.getScheme().equals("news") ||
            uriNew.getScheme().equals("mailto") ||
            uriNew.getScheme().equals("file"))) {
          // log
          referenceType = CLOCATION_REFERENCE;
          return true;
      }

View Full Code Here

    }

    private URI getNewURI(String uri, String baseUri)
                throws URI.MalformedURIException {
        if ((baseUri == null) || "".equals(baseUri)) {
             return new URI(uri);
        } else {
             return new URI(new URI(baseUri), uri);
        }
    }
View Full Code Here

      Set resultSet = prepareNodeSet(selectedElem);
      result = new XMLSignatureInput(resultSet);
      result.setMIMEType(MimeConstants.TEXT_XML_TYPE);

      try {
         URI uriNew = new URI(new URI(baseUri), uriNodeValue);
         result.setSourceURI(uriNew.toString());
      } catch (URI.MalformedURIException ex) {
         result.setSourceURI(baseUri);
      }
      return result;
   }
View Full Code Here

         // log
         throw new ResourceResolverException("empty", e, uri, baseUri);
      }

      try {
         URI uriNew = new URI(new URI(baseUri), uriNodeValue);
         result.setSourceURI(uriNew.toString());
      } catch (URI.MalformedURIException ex) {
         result.setSourceURI(baseUri);
      }
      return result;
   }
View Full Code Here

      return result;
   }

   private XMLSignatureInput _resolveClocation(Attr uri, String baseUri)
                throws ResourceResolverException, URIResolverException {
      URI uriNew = null;
      XMLSignatureInput result = null;
      try {
         uriNew = getNewURI(uri.getNodeValue(), baseUri);
      } catch (URI.MalformedURIException ex) {
         // log         
         throw new ResourceResolverException("empty", ex, uri, baseUri);
      }

      if (soapMsg == null) throw generateException(uri, baseUri, errors[1]);

      try
         AttachmentPart _part = ((SecurableSoapMessage)soapMsg).getAttachmentPart(uriNew.toString());
         if (_part == null) {
             // log 
             throw new URIResolverException();
         }
         Object[] obj = AttachmentSignatureInput._getSignatureInput(_part);
         result = new AttachmentSignatureInput((byte[])obj[1]);
         ((AttachmentSignatureInput)result).setMimeHeaders((Vector)obj[0]);
         ((AttachmentSignatureInput)result).setContentType(_part.getContentType());
      } catch (XWSSecurityException e) {
         throw new ResourceResolverException("empty", e, uri, baseUri);
      } catch (SOAPException spe) {
         // log
         throw new ResourceResolverException("empty", spe, uri, baseUri);
      } catch (java.io.IOException ioe) {
         // log
         throw new ResourceResolverException("empty", ioe, uri, baseUri);
      }


      result.setSourceURI(uriNew.toString());
      return result;
   }
View Full Code Here

      if (uriNodeValue.startsWith("attachmentRef:")) {
          referenceType = CID_REFERENCE;
          return true;
      }

      URI uriNew = null;
      try {
         uriNew = getNewURI(uriNodeValue, baseURI);
      } catch (URI.MalformedURIException ex) {
         // log
         return false;
      }

      /* content-location of the type http:// (for now) */
      if ((uriNew != null) &&
           uriNew.getScheme().equals("http") ||
           uriNodeValue.startsWith("thismessage:/") ||
          !(uriNew.getScheme().equals("ftp") ||
            uriNew.getScheme().equals("telnet") ||
            uriNew.getScheme().equals("gopher") ||
            uriNew.getScheme().equals("news") ||
            uriNew.getScheme().equals("mailto") ||
            uriNew.getScheme().equals("file"))) {
          // log
          referenceType = CLOCATION_REFERENCE;
          return true;
      }

View Full Code Here

TOP

Related Classes of com.sun.xml.wss.impl.misc.URI

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.