Package com.sun.xml.ws.api.message

Examples of com.sun.xml.ws.api.message.Header.readAsJAXB()


            // read the header
            Message msg = context.getMessage();
            HeaderList hl = msg.getHeaders();
            Header securityHeader = hl.get(WSSE_SECURITY, true);

            JAXBElement<SecurityHeaderType> sht = securityHeader.readAsJAXB(WSSE_CONTEXT.createUnmarshaller());

            for (Object uno : sht.getValue().getAny()) {
                if ((uno instanceof JAXBElement) && ((JAXBElement<?>) uno).getValue() instanceof UsernameTokenType) {
                    UsernameTokenType utt = ((JAXBElement<UsernameTokenType>) uno).getValue();
                    username = utt.getUsername().getValue();
View Full Code Here


            // read the header
            Message msg = context.getMessage();
            HeaderList hl = msg.getHeaders();
            Header securityHeader = hl.get(WSSE_SECURITY, true);

            JAXBElement<SecurityHeaderType> sht = securityHeader.readAsJAXB(WSSE_CONTEXT.createUnmarshaller());

            for (Object uno : sht.getValue().getAny()) {
                if ((uno instanceof JAXBElement) && ((JAXBElement<?>) uno).getValue() instanceof UsernameTokenType) {
                    UsernameTokenType utt = (UsernameTokenType) ((JAXBElement<UsernameTokenType>) uno).getValue();
                    username = utt.getUsername().getValue();
View Full Code Here

            // read the header
            Message msg = context.getMessage();
            HeaderList hl = msg.getHeaders();
            Header securityHeader = hl.get(WSSE_SECURITY, true);

            JAXBElement<SecurityHeaderType> sht = securityHeader.readAsJAXB(WSSE_CONTEXT.createUnmarshaller());

            for (Object uno : sht.getValue().getAny()) {
                if ((uno instanceof JAXBElement) && ((JAXBElement<?>) uno).getValue() instanceof UsernameTokenType) {
                    UsernameTokenType utt = (UsernameTokenType) ((JAXBElement<UsernameTokenType>) uno).getValue();
                    username = utt.getUsername().getValue();
View Full Code Here

                while(itr.hasNext()) {
                    Header soapHeader = itr.next();
                    //Check if the role is one of the roles on this Binding
                    String role = soapHeader.getRole(soapVersion);
                    if(getRoles().contains(role)) {
                        beanList.add(soapHeader.readAsJAXB(jaxbContext.createUnmarshaller()));
                    }
                }
            }
            return beanList.toArray();
        } catch(Exception e) {
View Full Code Here

                while(itr.hasNext()) {
                    Header soapHeader = itr.next();
                    //Check if the role is one of the roles on this Binding
                    String role = soapHeader.getRole(soapVersion);
                    if(getRoles().contains(role)) {
                        beanList.add(soapHeader.readAsJAXB(jaxbContext.createUnmarshaller()));
                    }
                }
            }
            return beanList.toArray();
        } catch(Exception e) {
View Full Code Here

            return null;
        }

        try {
            @SuppressWarnings("unchecked")
            T result = (T) header.readAsJAXB(configuration.getRuntimeVersion().getUnmarshaller(configuration.getAddressingVersion()));
            return result;
        } catch (JAXBException ex) {
            throw LOGGER.logSevereException(new RxRuntimeException(String.format("Error unmarshalling header %s", headerName), ex));
        }
    }
View Full Code Here

            if (elementCache.size() > 0) {
                Object obj = elementCache.get(uri);
                if (obj != null && obj instanceof Header) {
                    Header reqdHeader = (Header) obj;
                    JAXBContext jaxbContext = JAXBUtil.getJAXBContext();
                    JAXBElement jb = reqdHeader.readAsJAXB(jaxbContext.createUnmarshaller());
                    JAXBData jData = new JAXBDataImpl(jb, jaxbContext, filterContext.getNamespaceContext());
                    return jData;
                }
            }
View Full Code Here

        if (header == null) {
            return null;
        }
        try {
            @SuppressWarnings(value = "unchecked")
            T result = (T) header.readAsJAXB(getJaxbUnmarshaller());
            return result;
        } catch (JAXBException ex) {
            throw LOGGER.logSevereException(new RxRuntimeException(LocalizationMessages.WSRM_1122_ERROR_MARSHALLING_RM_HEADER(nsUri + "#" + name), ex));
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.