Examples of AttributedURIType


Examples of org.apache.cxf.ws.addressing.AttributedURIType

        Identifier inSid = control.createMock(Identifier.class);       
        AddressingProperties maps = control.createMock(AddressingProperties.class);
        Source source = control.createMock(Source.class);
        EasyMock.expect(manager.getSource(message)).andReturn(source);
        EasyMock.expect(source.getCurrent(inSid)).andReturn(null);
        AttributedURIType uri = control.createMock(AttributedURIType.class);
        EasyMock.expect(maps.getTo()).andReturn(uri);
        EasyMock.expect(uri.getValue()).andReturn("http://localhost:9001/TestPort");
        EndpointReferenceType epr = RMUtils.createNoneReference();
        EasyMock.expect(maps.getReplyTo()).andReturn(epr);
        RMEndpoint rme = control.createMock(RMEndpoint.class);
        EasyMock.expect(source.getReliableEndpoint()).andReturn(rme).times(2);
        Proxy proxy = control.createMock(Proxy.class);
View Full Code Here

Examples of org.jboss.identity.federation.ws.addressing.AttributedURIType

    * @param endpointURI a {@code String} representing the endpoint URI.
    * @return the constructed {@code AppliesTo} instance.
    */
   public static AppliesTo createAppliesTo(String endpointURI)
   {
      AttributedURIType attributedURI = new AttributedURIType();
      attributedURI.setValue(endpointURI);
      EndpointReferenceType reference = new EndpointReferenceType();
      reference.setAddress(attributedURI);
      AppliesTo appliesTo = new AppliesTo();
      appliesTo.getAny().add(new ObjectFactory().createEndpointReference(reference));

View Full Code Here

Examples of org.jboss.ws.extensions.eventing.jaxws.AttributedURIType

      try
      {
         DeliveryType delivery = new DeliveryType();
         delivery.setMode(EventingConstants.getDeliveryPush().toString());
         EndpointReferenceType notifyEPR = new EndpointReferenceType();
         AttributedURIType attURI = new AttributedURIType();
         attURI.setValue("http://" + getServerHost() + ":8080/jaxws-wseventing/eventSink");
         notifyEPR.setAddress(attURI);                       
         delivery.setNotifyTo(notifyEPR);
         return delivery;
      }
      catch (Exception e)
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.AttributedURIType

     * @param context
     */
    private void storeBindingInfo(MessageContext context) {
        assert !ContextUtils.isOutbound(context);
        AddressingProperties maps = ContextUtils.retrieveMAPs(context, false, false);
        AttributedURIType actionURI = null == maps ? null : maps.getAction();
        String action = null == actionURI ? null : actionURI.getValue();
        DataBindingCallback callback = null;
        String operationName = null;
        boolean rmProtocolMessage = true;

        if (RMUtils.getRMConstants().getCreateSequenceAction().equals(action)) {
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.AttributedURIType

    private AddressingPropertiesImpl getMAPs(String uri, boolean outbound) {
        AddressingPropertiesImpl maps = new AddressingPropertiesImpl();
        boolean exposeAsNative = Names.WSA_NAMESPACE_NAME.equals(uri);
        boolean exposeAs200408 =
            VersionTransformer.Names200408.WSA_NAMESPACE_NAME.equals(uri);
        AttributedURIType id =
            ContextUtils.getAttributedURI("urn:uuid:12345");
        maps.setMessageID(id);
        AttributedURIType to =
            ContextUtils.getAttributedURI("foobar");
        maps.setTo(to);
        EndpointReferenceType replyTo = new EndpointReferenceType();
        String anonymous =
            exposeAsNative
            ? Names.WSA_ANONYMOUS_ADDRESS
            : VersionTransformer.Names200408.WSA_ANONYMOUS_ADDRESS;
        replyTo.setAddress(
            ContextUtils.getAttributedURI(anonymous));
        maps.setReplyTo(replyTo);
        EndpointReferenceType faultTo = new EndpointReferenceType();
        anonymous =
            exposeAsNative
            ? Names.WSA_ANONYMOUS_ADDRESS
            : VersionTransformer.Names200408.WSA_ANONYMOUS_ADDRESS;
        faultTo.setAddress(
            ContextUtils.getAttributedURI(anonymous));
        maps.setFaultTo(faultTo);
        RelatesToType relatesTo = new RelatesToType();
        relatesTo.setValue("urn:uuid:67890");
        maps.setRelatesTo(relatesTo);
        AttributedURIType action =
            ContextUtils.getAttributedURI("http://foo/bar/SEI/opRequest");
        maps.setAction(action);
        maps.exposeAs(uri);
        expectedNamespaceURI = uri;
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.AttributedURIType

    public void testExplicitMAPs() throws Exception {
        try {
            Map<String, Object> requestContext =
                ((BindingProvider)greeter).getRequestContext();
            AddressingProperties maps = new AddressingPropertiesImpl();
            AttributedURIType id =
                ContextUtils.getAttributedURI("urn:uuid:12345");
            maps.setMessageID(id);
            requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
            String greeting = greeter.greetMe("explicit1");
            assertEquals("unexpected response received from service",
                         "Hello explicit1",
                         greeting);
            checkVerification();

            // the previous addition to the request context impacts
            // on all subsequent invocations on this proxy => a duplicate
            // message ID fault is expected
            try {
                greeter.greetMe("explicit2");
                fail("expected ProtocolException on duplicate message ID");
            } catch (ProtocolException pe) {
                assertTrue("expected duplicate message ID failure",
                           "Duplicate Message ID urn:uuid:12345".equals(pe.getMessage()));
                checkVerification();
            }

            // clearing the message ID ensure a duplicate is not sent
            maps.setMessageID(null);
            maps.setRelatesTo(ContextUtils.getRelatesTo(id.getValue()));
            greeting = greeter.greetMe("explicit3");
            assertEquals("unexpected response received from service",
                         "Hello explicit3",
                         greeting);
        } catch (UndeclaredThrowableException ex) {
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.AttributedURIType

    }

    private void marshallFrom(String from, SOAPHeader header, Marshaller marshaller)
        throws JAXBException {
        if (Names.WSA_NAMESPACE_NAME.equals(currentNamespaceURI)) {
            AttributedURIType value =
                ContextUtils.getAttributedURI("urn:piggyback_responder");
            marshaller.marshal(
                new JAXBElement<AttributedURIType>(Names.WSA_FROM_QNAME,
                                                   AttributedURIType.class,
                                                   value),
                header);
        } else if (VersionTransformer.Names200408.WSA_NAMESPACE_NAME.equals(
                                                      currentNamespaceURI)) {
            AttributedURI value =
                VersionTransformer.Names200408.WSA_OBJECT_FACTORY.createAttributedURI();
            value.setValue(from);
            QName qname = new QName(VersionTransformer.Names200408.WSA_NAMESPACE_NAME,
                                    Names.WSA_FROM_NAME);
            marshaller.marshal(
                new JAXBElement<AttributedURI>(qname,
                                               AttributedURI.class,
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.AttributedURIType

        dest = control.createMock(RMDestination.class);
        to = control.createMock(AttributedURIType.class);
        dp = control.createMock(DestinationPolicyType.class);
        sid = control.createMock(Identifier.class);
        cs = control.createMock(CreateSequenceType.class);
        AttributedURIType messageID = control.createMock(AttributedURIType.class);
        maps = control.createMock(AddressingProperties.class);
        maps.getMessageID();
        expectLastCall().andReturn(messageID);
       
        dest.generateSequenceIdentifier();
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.AttributedURIType

    public void testExplicitMAPs() throws Exception {
        try {
            Map<String, Object> requestContext =
                ((BindingProvider)greeter).getRequestContext();
            AddressingProperties maps = new AddressingPropertiesImpl();
            AttributedURIType id =
                ContextUtils.getAttributedURI("urn:uuid:12345");
            maps.setMessageID(id);
            requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
            String greeting = greeter.greetMe("explicit1");
            assertEquals("unexpected response received from service",
                         "Hello explicit1",
                         greeting);
            checkVerification();

            // the previous addition to the request context impacts
            // on all subsequent invocations on this proxy => a duplicate
            // message ID fault is expected
            try {
                greeter.greetMe("explicit2");
                fail("expected ProtocolException on duplicate message ID");
            } catch (ProtocolException pe) {
                assertTrue("expected duplicate message ID failure",
                           "Duplicate Message ID urn:uuid:12345".equals(pe.getMessage()));
                checkVerification();
            }

            // clearing the message ID ensure a duplicate is not sent
            maps.setMessageID(null);
            maps.setRelatesTo(ContextUtils.getRelatesTo(id.getValue()));
            greeting = greeter.greetMe("explicit3");
            assertEquals("unexpected response received from service",
                         "Hello explicit3",
                         greeting);
        } catch (UndeclaredThrowableException ex) {
View Full Code Here

Examples of org.objectweb.celtix.ws.addressing.AttributedURIType

        ContextUtils.storeUsingAddressing(true, getObjectMessageContext());

        getObjectMessageContext().setRequestorRole(true);
       
        AddressingProperties maps = new AddressingPropertiesImpl();
        AttributedURIType actionURI = ContextUtils.WSA_OBJECT_FACTORY.createAttributedURIType();
        actionURI.setValue(RMUtils.getRMConstants().getCreateSequenceAction());
        maps.setAction(actionURI);
        maps.setRelatesTo(relatesTo);
        ContextUtils.storeMAPs(maps, getObjectMessageContext(), true, true, true, true);
           
        setMessageParameters(source, acksTo);
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.