Package com.sun.xml.internal.ws.api.addressing

Examples of com.sun.xml.internal.ws.api.addressing.WSEndpointReference$Metadata


            return;

        HeaderList hl = responsePacket.getMessage().getHeaders();

        // 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));

        // populate reference parameters
        WSEndpointReference refpEPR;
        if (responsePacket.getMessage().isFault()) {
            // choose FaultTo
            refpEPR = message.getHeaders().getFaultTo(av, sv);

            // if FaultTo is null, then use ReplyTo
            if (refpEPR == null)
                refpEPR = replyTo;
        } else {
            // choose ReplyTo
            refpEPR = replyTo;
        }
        if (refpEPR != null) {
            refpEPR.addReferenceParameters(hl);
        }
    }
View Full Code Here


        return dispatch;
    }

    public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeature... features) {
        WebServiceFeatureList featureList =  new WebServiceFeatureList(features);
        WSEndpointReference wsepr = null;
        if(featureList.isEnabled(AddressingFeature.class) && wsdlService != null && wsdlService.get(portName) != null) {
            wsepr = wsdlService.get(portName).getEPR();
        }
        return createDispatch(portName, wsepr, aClass, mode, features);
    }
View Full Code Here

        }
        return createDispatch(portName, wsepr, aClass, mode, features);
    }

    public <T> Dispatch<T> createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features) {
        WSEndpointReference wsepr = new WSEndpointReference(endpointReference);
        QName portName = addPortEpr(wsepr);
        return createDispatch(portName, wsepr, type, mode, features);
    }
View Full Code Here

        return container;
    }

    public Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeature... webServiceFeatures) {
        WebServiceFeatureList featureList =  new WebServiceFeatureList(webServiceFeatures);
        WSEndpointReference wsepr = null;
        if(featureList.isEnabled(AddressingFeature.class) && wsdlService != null && wsdlService.get(portName) != null) {
            wsepr = wsdlService.get(portName).getEPR();
        }
        return createDispatch(portName, wsepr, jaxbContext, mode, webServiceFeatures);
    }
View Full Code Here

        }
        return createDispatch(portName, wsepr, jaxbContext, mode, webServiceFeatures);
    }

    public Dispatch<Object> createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features) {
        WSEndpointReference wsepr = new WSEndpointReference(endpointReference);
        QName portName = addPortEpr(wsepr);
        return createDispatch(portName, wsepr, context, mode, features);
    }
View Full Code Here

        }
        AddressingVersion av = AddressingVersion.fromSpecClass(clazz);
        if (av == AddressingVersion.W3C) {
            // Supress writing ServiceName and EndpointName in W3C EPR,
            // Until the ns for those metadata elements is resolved.
            return new WSEndpointReference(
                    AddressingVersion.W3C,
                    eprAddress, null /*getServiceName()*/, null/*getPortName()*/, null /* portTypeName*/, null, null /*wsdlAddress*/, null).toSpec(clazz);
        } else {
            return new WSEndpointReference(
                    AddressingVersion.MEMBER,
                    eprAddress, getServiceName(), getPortName(), portTypeName, null, wsdlAddress, null).toSpec(clazz);
        }
    }
View Full Code Here

    /**
     * Default implementation that copies the infoset. Not terribly efficient.
     */
    public WSEndpointReference readAsEPR(AddressingVersion expected) throws XMLStreamException {
        XMLStreamReader xsr = readHeader();
        WSEndpointReference epr = new WSEndpointReference(xsr, expected);
        XMLStreamReaderFactory.recycle(xsr);
        return epr;
    }
View Full Code Here

     * This is the most common implementation on which {@link Header#readAsEPR(AddressingVersion)}
     * is invoked on.
     */
    @Override @NotNull
    public WSEndpointReference readAsEPR(AddressingVersion expected) throws XMLStreamException {
        return new WSEndpointReference(_mark,expected);
    }
View Full Code Here

    public @NotNull NextAction processResponse(Packet response) {
        Message msg = response.getMessage();
        if (msg ==null)
            return doReturnWith(response)// one way message. Nothing to see here. Move on.

        WSEndpointReference target = msg.isFault()?faultTo:replyTo;

        if(target.isAnonymous() || isAnonymousRequired )
            // the response will go back the back channel. most common case
            return doReturnWith(response);

        if(target.isNone()) {
            // the caller doesn't want to hear about it, so proceed like one-way
            response.setMessage(null);
            return doReturnWith(response);
        }
View Full Code Here

                }
                XMLStreamReaderUtil.next(reader);
            } else if (AddressingVersion.W3C.nsUri.equals(name.getNamespaceURI()) &&
                    "EndpointReference".equals(name.getLocalPart())) {
                try {
                    WSEndpointReference wsepr = new WSEndpointReference(reader, AddressingVersion.W3C);
                    port.setEPR(wsepr);
                    /** XMLStreamBuffer.createNewBufferFromXMLStreamReader(reader) called from inside WSEndpointReference()
                     *  consumes the complete EPR infoset and moves to the next element. This breaks the normal wsdl parser
                     *  processing where it expects anyone reading the infoset to move to the end of the element that its reading
                     *  and not to the next element.
View Full Code Here

TOP

Related Classes of com.sun.xml.internal.ws.api.addressing.WSEndpointReference$Metadata

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.