Package org.jboss.identity.federation.org.xmlsoap.schemas.soap.envelope

Examples of org.jboss.identity.federation.org.xmlsoap.schemas.soap.envelope.Envelope


   @Override
   protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
   {
      JAXBElement<RequestAbstractType> jaxbRequestType = null;
     
      Envelope envelope = null;
      XACMLAuthzDecisionQueryType xacmlRequest = null;
     
      try
      {
         Document inputDoc = DocumentUtil.getDocument(req.getInputStream());
         if(debug)
            log.trace("Received SOAP:"+DocumentUtil.getDocumentAsString(inputDoc));
        
         Unmarshaller un = JAXBUtil.getUnmarshaller(SOAPSAMLXACMLUtil.getPackage());
         if(debug)
           un.setEventHandler(new DefaultValidationEventHandler());

         Object unmarshalledObject = un.unmarshal(DocumentUtil.getNodeAsStream(inputDoc));
        
         if(unmarshalledObject instanceof JAXBElement)
         {
            JAXBElement<?> jaxbElement = (JAXBElement<?>) unmarshalledObject;
            Object element = jaxbElement.getValue();
            if(element instanceof Envelope)
            {
               envelope = (Envelope)element;
               Body soapBody = envelope.getBody();
               Object samlRequest = soapBody.getAny().get(0);
               if(samlRequest instanceof JAXBElement)
               {
                  jaxbRequestType = (JAXBElement<RequestAbstractType>)samlRequest;
                  jaxbRequestType = (JAXBElement<RequestAbstractType>)samlRequest;
View Full Code Here


      return new JBossPDP(is);
   }
  
   private Envelope createEnvelope(Object obj)
   {
      Envelope envelope = SOAPFactory.getObjectFactory().createEnvelope();
      Body body = SOAPFactory.getObjectFactory().createBody();
      body.getAny().add(obj);
      envelope.setBody(body);
      return envelope;
   }
View Full Code Here

         nameIDType.setValue(issuer);
         queryType.setIssuer(nameIDType);
        
         JAXBElement<?> jaxbQueryType = SOAPSAMLXACMLUtil.getJAXB(queryType);
        
         Envelope envelope = createEnvelope(jaxbQueryType);
        
         JAXBElement<?> soapRequest = SOAPFactory.getObjectFactory().createEnvelope(envelope);
        
         Marshaller marshaller = SOAPSAMLXACMLUtil.getMarshaller();
         Unmarshaller unmarshaller = SOAPSAMLXACMLUtil.getUnmarshaller();
        
         //Send it across the wire
         URL url = new URL(endpoint);
         URLConnection conn = url.openConnection();
         conn.setDoOutput(true);
         marshaller.marshal(soapRequest, conn.getOutputStream());
        
         JAXBElement<?> result = (JAXBElement<?>) unmarshaller.unmarshal(conn.getInputStream());
         Envelope resultEnvelope = (Envelope) result.getValue();
        
         JAXBElement<?> samlResponse = (JAXBElement<?>) resultEnvelope.getBody().getAny().get(0);
         Object response = samlResponse.getValue();
         if(response instanceof Fault)
         {
            Fault fault = (Fault) response;
            return new Result(null,fault);
View Full Code Here

      }
   }
  
   private Envelope createEnvelope(JAXBElement<?> jaxbElement)
   {
      Envelope envelope = SOAPFactory.getObjectFactory().createEnvelope();
      Body body = SOAPFactory.getObjectFactory().createBody();
      body.getAny().add(jaxbElement);
      envelope.setBody(body);
      return envelope;
   }
View Full Code Here

         nameIDType.setValue(issuer);
         queryType.setIssuer(nameIDType);
        
         JAXBElement<?> jaxbQueryType = SOAPSAMLXACMLUtil.getJAXB(queryType);
        
         Envelope envelope = createEnvelope(jaxbQueryType);
        
         JAXBElement<?> soapRequest = SOAPFactory.getObjectFactory().createEnvelope(envelope);
        
         Marshaller marshaller = SOAPSAMLXACMLUtil.getMarshaller();
         Unmarshaller unmarshaller = SOAPSAMLXACMLUtil.getUnmarshaller();
        
         //Send it across the wire
         URL url = new URL(endpoint);
         URLConnection conn = url.openConnection();
         conn.setDoOutput(true);
         marshaller.marshal(soapRequest, conn.getOutputStream());
        
         JAXBElement<?> result = (JAXBElement<?>) unmarshaller.unmarshal(conn.getInputStream());
         Envelope resultEnvelope = (Envelope) result.getValue();
        
         JAXBElement<?> samlResponse = (JAXBElement<?>) resultEnvelope.getBody().getAny().get(0);
         Object response = samlResponse.getValue();
         if(response instanceof Fault)
         {
            Fault fault = (Fault) response;
            return new Result(null,fault);
View Full Code Here

      }
   }
  
   private Envelope createEnvelope(JAXBElement<?> jaxbElement)
   {
      Envelope envelope = SOAPFactory.getObjectFactory().createEnvelope();
      Body body = SOAPFactory.getObjectFactory().createBody();
      body.getAny().add(jaxbElement);
      envelope.setBody(body);
      return envelope;
   }
View Full Code Here

   @Override
   protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
   {
      JAXBElement<RequestAbstractType> jaxbRequestType = null;
     
      Envelope envelope = null;
      XACMLAuthzDecisionQueryType xacmlRequest = null;
     
      try
      {
         Document inputDoc = DocumentUtil.getDocument(req.getInputStream());
         if(debug && trace)
            log.trace("Received SOAP:"+DocumentUtil.getDocumentAsString(inputDoc));
        
         Unmarshaller un = JAXBUtil.getUnmarshaller(SOAPSAMLXACMLUtil.getPackage());
         if(debug)
           un.setEventHandler(new DefaultValidationEventHandler());

         Object unmarshalledObject = un.unmarshal(DocumentUtil.getNodeAsStream(inputDoc));
        
         if(unmarshalledObject instanceof JAXBElement)
         {
            JAXBElement<?> jaxbElement = (JAXBElement<?>) unmarshalledObject;
            Object element = jaxbElement.getValue();
            if(element instanceof Envelope)
            {
               envelope = (Envelope)element;
               Body soapBody = envelope.getBody();
               Object samlRequest = soapBody.getAny().get(0);
               if(samlRequest instanceof JAXBElement)
               {
                  jaxbRequestType = (JAXBElement<RequestAbstractType>)samlRequest;
                  jaxbRequestType = (JAXBElement<RequestAbstractType>)samlRequest;
View Full Code Here

      return new JBossPDP(is);
   }
  
   private Envelope createEnvelope(Object obj)
   {
      Envelope envelope = SOAPFactory.getObjectFactory().createEnvelope();
      Body body = SOAPFactory.getObjectFactory().createBody();
      body.getAny().add(obj);
      envelope.setBody(body);
      return envelope;
   }
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.org.xmlsoap.schemas.soap.envelope.Envelope

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.