Examples of EndpointReference


Examples of org.apache.axis2.addressing.EndpointReference

    public void setFrom(String reference) {
        mc.setFrom(new EndpointReference(reference));
    }

    public void setReplyTo(String reference) {
        mc.setReplyTo(new EndpointReference(reference));
    }
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

            }

            // if the transport to use for sending is not specified, try to find it from the URL
      TransportOutDescription transportOut = options.getTransportOut();
      if (transportOut == null) {
        EndpointReference toEPR =
                    (options.getTo() != null) ? options.getTo() : outMsgCtx.getTo();
        transportOut =
                    ClientUtils.inferOutTransport(cfgCtx.getAxisConfiguration(), toEPR, outMsgCtx);
      }
      outMsgCtx.setTransportOut(transportOut);

      if (options.getTransportIn() == null && outMsgCtx.getTransportIn() == null) {
        outMsgCtx.setTransportIn(ClientUtils.inferInTransport(
                        cfgCtx.getAxisConfiguration(), options, outMsgCtx));
      } else if (outMsgCtx.getTransportIn() == null) {
        outMsgCtx.setTransportIn(options.getTransportIn());
      }

            // add reference parameters to To EPR
            addReferenceParameters(outMsgCtx);

            if (options.isUseSeparateListener()) {

        options.setTransportIn(outMsgCtx.getConfigurationContext()
            .getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP));

        SynapseCallbackReceiver callbackReceiver =
                        (SynapseCallbackReceiver) axisOp.getMessageReceiver();
               
                ((Axis2MessageContext)((AsyncCallback)
                        axisCallback).getSynapseOutMsgCtx()).getAxis2MessageContext().setProperty(
                        NhttpConstants.IGNORE_SC_ACCEPTED, Constants.VALUE_TRUE);
                callbackReceiver.addCallback(outMsgCtx.getMessageID(), axisCallback);
               
                EndpointReference replyToFromTransport = outMsgCtx.getConfigurationContext()
                        .getListenerManager().getEPRforService(sc.getAxisService().getName(),
                        axisOp.getName().getLocalPart(), outMsgCtx.getTransportOut().getName());

        if (outMsgCtx.getReplyTo() == null) {
          outMsgCtx.setReplyTo(replyToFromTransport);
        } else {
          outMsgCtx.getReplyTo().setAddress(replyToFromTransport.getAddress());
        }

        outMsgCtx.getConfigurationContext().registerOperationContext(
            outMsgCtx.getMessageID(), oc);
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        return null;
    }

    public AxisService findService(MessageContext messageContext) throws AxisFault {

        EndpointReference toEPR = messageContext.getTo();
        if (toEPR != null) {
            String toAddress = toEPR.getAddress();
            int index = toAddress.indexOf("//");
            if (index != -1) {
                toAddress = toAddress.substring(index + 2);
                index = toAddress.indexOf("/");
                toAddress = toAddress.substring(index + 1);
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        }

        if (XMLConfigConstants.SCOPE_DEFAULT.equals(scope)) {

            if (SynapseConstants.HEADER_TO.equals(key)) {
                EndpointReference toEPR = synCtx.getTo();
                if (toEPR != null) {
                    return toEPR.getAddress();
                } else {
                    return NULL_STRING;
                }
            } else if (SynapseConstants.HEADER_FROM.equals(key)) {
                EndpointReference fromEPR = synCtx.getFrom();
                if (fromEPR != null) {
                    return fromEPR.getAddress();
                } else {
                    return NULL_STRING;
                }
            } else if (SynapseConstants.HEADER_ACTION.equals(key)) {
                String wsaAction = synCtx.getWSAAction();
                if (wsaAction != null) {
                    return wsaAction;
                } else {
                    return NULL_STRING;
                }
            } else if (SynapseConstants.HEADER_FAULT.equals(key)) {
                EndpointReference faultEPR = synCtx.getFaultTo();
                if (faultEPR != null) {
                    return faultEPR.getAddress();
                } else {
                    return NULL_STRING;
                }
            } else if (SynapseConstants.HEADER_REPLY_TO.equals(key)) {
                EndpointReference replyToEPR = synCtx.getReplyTo();
                if (replyToEPR != null) {
                    return replyToEPR.getAddress();
                } else {
                    return NULL_STRING;
                }
            } else if (SynapseConstants.HEADER_MESSAGE_ID.equals(key)) {
                String messageID = synCtx.getMessageID();
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

                "</wse:Subscribe>";

        try {
            MessageContext msgCtx = TestUtils.getAxis2MessageContext(message, null).
                    getAxis2MessageContext();
            msgCtx.setTo(new EndpointReference(subManUrl));

            SynapseSubscription sub = SubscriptionMessageBuilder.createSubscription(msgCtx);
            assertEquals(subManUrl, sub.getSubManUrl());
            assertEquals(addressUrl, sub.getAddressUrl());
            assertEquals(addressUrl, sub.getEndpointUrl());
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        String message = "<wse:Unsubscribe xmlns:wse=\"http://schemas.xmlsoap.org/ws/2004/08/eventing\"/>";
        try {
            MessageContext msgCtx = TestUtils.getAxis2MessageContext(message, null).
                        getAxis2MessageContext();
            msgCtx.setTo(new EndpointReference(addressUrl));
            String id = addIdentifierHeader(msgCtx);

            SynapseSubscription sub = SubscriptionMessageBuilder.createUnSubscribeMessage(msgCtx);
            assertEquals(id, sub.getId());
            assertEquals(addressUrl, sub.getAddressUrl());
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

                "   <wse:Expires>" + ConverterUtil.convertToString(cal) + "</wse:Expires>\n" +
                "</wse:Renew>";
        try {
            MessageContext msgCtx = TestUtils.getAxis2MessageContext(message, null).
                        getAxis2MessageContext();
            msgCtx.setTo(new EndpointReference(addressUrl));
            String id = addIdentifierHeader(msgCtx);

            SynapseSubscription sub = SubscriptionMessageBuilder.
                    createRenewSubscribeMessage(msgCtx);
            assertEquals(id, sub.getId());
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        String message =
                "<wse:GetStatus xmlns:wse=\"http://schemas.xmlsoap.org/ws/2004/08/eventing\"/>";
        try {
            MessageContext msgCtx = TestUtils.getAxis2MessageContext(message, null).
                        getAxis2MessageContext();
            msgCtx.setTo(new EndpointReference(addressUrl));
            String id = addIdentifierHeader(msgCtx);

            SynapseSubscription sub = SubscriptionMessageBuilder.createGetStatusMessage(msgCtx);
            assertEquals(id, sub.getId());
            assertEquals(addressUrl, sub.getAddressUrl());
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

                "   <wse:Expires>2004-06-26T21:07:00.000-08:00</wse:Expires>\n" +
                "</wse:Renew>";
        try {
            MessageContext msgCtx = TestUtils.getAxis2MessageContext(message, null).
                        getAxis2MessageContext();
            msgCtx.setTo(new EndpointReference(addressUrl));
            String id = addIdentifierHeader(msgCtx);

            SynapseSubscription sub = SubscriptionMessageBuilder.
                    createRenewSubscribeMessage(msgCtx);
            assertNull(id, sub.getId());
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

    }

        MessageContext mc = synapseEnvironment.createMessageContext();
//        AspectHelper.setGlobalAudit(mc);    TODO
        mc.pushFaultHandler(new MediatorFaultHandler(mc.getFaultSequence()));
        mc.setTo(new EndpointReference(to));
        if (format == null) {
            PayloadHelper.setXMLPayload(mc, message.cloneOMElement());
        } else {
            try {
                if (SOAP11_FORMAT.equalsIgnoreCase(format)) {
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.