Examples of StringHeader


Examples of com.sun.xml.internal.ws.message.StringHeader

     *
     * @param name QName of the header element
     * @param value text value of the header
     */
    public static Header createMustUnderstand(@NotNull SOAPVersion soapVersion, @NotNull QName name,@NotNull String value) {
        return new StringHeader(name, value,soapVersion,true);
    }
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

        // wsa:Action, add if the message doesn't already contain it,
        // generally true for SEI case where there is SEIModel or WSDLModel
        //           false for Provider with no wsdl, Expects User to set the coresponding header on the Message.
        if (AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), av, sv) == null) {
            //wsa:Action header is not set in the message, so use the wsa:Action  passed as the parameter.
            hl.add(new StringHeader(av.actionTag, action, sv, mustUnderstand));
        }

        // wsa:MessageID
        if (responsePacket.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
            // if header doesn't exist, method getID creates a new random id
            String newID = Message.generateMessageID();
            hl.add(new StringHeader(av.messageIDTag, newID));
        }

        // wsa:RelatesTo
        String mid = null;
        if (wpb != null) {
            mid = wpb.getMessageID();
        }
        if (mid == null) {
            mid = AddressingUtils.getMessageID(msg.getHeaders(), av, sv);
        }
        if (mid != null) {
            hl.addOrReplace(new RelatesToHeader(av.relatesToTag, mid));
        }
   

        // populate reference parameters
        WSEndpointReference refpEPR = null;
        if (responsePacket.getMessage().isFault()) {
            // choose FaultTo
            if (wpb != null) {
                refpEPR = wpb.getFaultToFromRequest();
            }
            if (refpEPR == null) {
                refpEPR = AddressingUtils.getFaultTo(msg.getHeaders(), av, sv);
            }
            // if FaultTo is null, then use ReplyTo
            if (refpEPR == null) {
                refpEPR = replyTo;
            }
        } else {
            // choose ReplyTo
            refpEPR = replyTo;
        }
        if (replaceToTag && refpEPR != null) {
            hl.addOrReplace(new StringHeader(av.toTag, refpEPR.getAddress()));
            refpEPR.addReferenceParametersToList(hl);
        }
    }
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

        // wsa:Action, add if the message doesn't already contain it,
        // generally true for SEI case where there is SEIModel or WSDLModel
        //           false for Provider with no wsdl, Expects User to set the coresponding header on the Message.
        if (AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), av, sv) == null) {
            //wsa:Action header is not set in the message, so use the wsa:Action  passed as the parameter.
            hl.add(new StringHeader(av.actionTag, action, sv, mustUnderstand));
        }

        // wsa:MessageID
        if (responsePacket.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
            // if header doesn't exist, method getID creates a new random id
            String newID = Message.generateMessageID();
            hl.add(new StringHeader(av.messageIDTag, newID));
        }

        // wsa:RelatesTo
        String mid = null;
        if (wpb != null) {
            mid = wpb.getMessageID();
        }
        if (mid == null) {
            mid = AddressingUtils.getMessageID(msg.getHeaders(), av, sv);
        }
        if (mid != null) {
            hl.addOrReplace(new RelatesToHeader(av.relatesToTag, mid));
        }
   

        // populate reference parameters
        WSEndpointReference refpEPR = null;
        if (responsePacket.getMessage().isFault()) {
            // choose FaultTo
            if (wpb != null) {
                refpEPR = wpb.getFaultToFromRequest();
            }
            if (refpEPR == null) {
                refpEPR = AddressingUtils.getFaultTo(msg.getHeaders(), av, sv);
            }
            // if FaultTo is null, then use ReplyTo
            if (refpEPR == null) {
                refpEPR = replyTo;
            }
        } else {
            // choose ReplyTo
            refpEPR = replyTo;
        }
        if (replaceToTag && refpEPR != null) {
            hl.addOrReplace(new StringHeader(av.toTag, refpEPR.getAddress()));
            refpEPR.addReferenceParametersToList(hl);
        }
    }
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

        if (av != null) {
            uuid = AddressingUtils.getMessageID(getHeaders(), av, sv);
        }
        if (uuid == null) {
            uuid = generateMessageID();
            getHeaders().add(new StringHeader(av.messageIDTag, uuid));
        }
        return uuid;
    }
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

        // wsa:To
        WSEndpointReference replyTo;
        try {
        replyTo = message.getHeaders().getReplyTo(av, sv);
        if (replyTo != null)
            hl.add(new StringHeader(av.toTag, replyTo.getAddress()));
        } catch (InvalidAddressingHeaderException e) {
            replyTo = null;
        }

        // wsa:Action, add if the message doesn't already contain it,
        // generally true for SEI case where there is SEIModel or WSDLModel
        //           false for Provider with no wsdl, Expects User to set the coresponding header on the Message.
        if(responsePacket.getMessage().getHeaders().getAction(av,sv) == null) {
            //wsa:Action header is not set in the message, so use the wsa:Action  passed as the parameter.
            hl.add(new StringHeader(av.actionTag, action));
        }

        // wsa:MessageID
        hl.add(new StringHeader(av.messageIDTag, responsePacket.getMessage().getID(av, sv)));

        // wsa:RelatesTo
        String mid = getMessage().getHeaders().getMessageID(av,sv);
        if (mid != null)
            hl.add(new RelatesToHeader(av.relatesToTag, mid));
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

     *
     * @param name QName of the header element
     * @param value text value of the header
     */
    public static Header create(QName name, String value) {
        return new StringHeader(name, value);
    }   
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

        if (!oneway) {
            WSEndpointReference epr = av.anonymousEpr;
            add(epr.createHeader(av.replyToTag));

            // wsa:MessageID
            Header h = new StringHeader(av.messageIDTag, packet.getMessage().getID(av, sv));
            add(h);
        }
    }
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

        // wsa:ReplyTo
        if (of.getReplyTo() != null) {
            add(of.getReplyTo().createHeader(av.replyToTag));

            // add wsa:MessageID only for non-null ReplyTo
            Header h = new StringHeader(av.messageIDTag, packet.getMessage().getID(av, sv));
            add(h);
        }

        // wsa:From
        if (of.getFrom() != null) {
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

        if (action == null) {
            throw new IllegalArgumentException(AddressingMessages.NULL_ACTION());
        }

        // wsa:To
        StringHeader h = new StringHeader(av.toTag, packet.endpointAddress.toString());
        add(h);

        // wsa:Action
        packet.soapAction = action;
        h = new StringHeader(av.actionTag, action);
        add(h);
    }
View Full Code Here

Examples of com.sun.xml.ws.message.StringHeader

        // wsa:Action, add if the message doesn't already contain it,
        // generally true for SEI case where there is SEIModel or WSDLModel
        //           false for Provider with no wsdl, Expects User to set the coresponding header on the Message.
        if (AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), av, sv) == null) {
            //wsa:Action header is not set in the message, so use the wsa:Action  passed as the parameter.
            hl.add(new StringHeader(av.actionTag, action, sv, mustUnderstand));
        }

        // wsa:MessageID
        if (responsePacket.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
            // if header doesn't exist, method getID creates a new random id
            String newID = Message.generateMessageID();
            hl.add(new StringHeader(av.messageIDTag, newID));
        }

        // wsa:RelatesTo
        String mid = null;
        if (wpb != null) {
            mid = wpb.getMessageID();
        }
        if (mid == null) {
            mid = AddressingUtils.getMessageID(msg.getHeaders(), av, sv);
        }
        if (mid != null) {
            hl.addOrReplace(new RelatesToHeader(av.relatesToTag, mid));
        }
   

        // populate reference parameters
        WSEndpointReference refpEPR = null;
        if (responsePacket.getMessage().isFault()) {
            // choose FaultTo
            if (wpb != null) {
                refpEPR = wpb.getFaultToFromRequest();
            }
            if (refpEPR == null) {
                refpEPR = AddressingUtils.getFaultTo(msg.getHeaders(), av, sv);
            }
            // if FaultTo is null, then use ReplyTo
            if (refpEPR == null) {
                refpEPR = replyTo;
            }
        } else {
            // choose ReplyTo
            refpEPR = replyTo;
        }
        if (replaceToTag && refpEPR != null) {
            hl.addOrReplace(new StringHeader(av.toTag, refpEPR.getAddress()));
            refpEPR.addReferenceParametersToList(hl);
        }
    }
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.