Examples of AddressingProperties


Examples of javax.xml.ws.addressing.AddressingProperties

   @Override
   public boolean handleInbound(MessageContext msgContext)
   {
      log.info("handleRequest");

      AddressingProperties addrProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
      if (addrProps == null)
         throw new IllegalStateException("Cannot obtain AddressingProperties");

      String clientid = null;
      EndpointReference replyTo = addrProps.getReplyTo();
      ReferenceParameters refParams = replyTo!=null ? replyTo.getReferenceParameters() : null;
      if (refParams != null)
      {
         for (Object obj : refParams.getElements())
         {
View Full Code Here

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

        }
        addAddressing(dispatch, false, action);
        return dispatch;
    }
    private void addAddressing(BindingProvider p, boolean addSeq, String action) {
        AddressingProperties addrProperties = new AddressingPropertiesImpl();
        if (action != null) {
            AttributedURIType act = new AttributedURIType();
            act.setValue(action);
            addrProperties.setAction(act);
        }
        if (adHoc) {
            EndpointReferenceType to = new EndpointReferenceType();
            addrProperties.exposeAs(version.getAddressingNamespace());
            AttributedURIType epr = new AttributedURIType();
            epr.setValue(version.getToAddress());
            to.setAddress(epr);
            addrProperties.setTo(to);
       
            if (addSeq) {
                AppSequenceType s = new AppSequenceType();
                s.setInstanceId(instanceId);
                s.setMessageNumber(msgId.getAndIncrement());
                JAXBElement<AppSequenceType> seq = new ObjectFactory().createAppSequence(s);
                Header h = new Header(seq.getName(),
                                      seq,
                                      new JAXBDataBinding(getJAXBContext()));
                List<Header> headers = new ArrayList<Header>();
                headers.add(h);
                p.getRequestContext()
                    .put(Header.HEADER_LIST, headers);
            }
        } else {
            addrProperties.exposeAs(version.getAddressingNamespace());
        }
        p.getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);
    }
View Full Code Here

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

        // element as well as disable the output stream optimizations (doesn't really
        // matter on such small messages anyway) to make sure we pickup those
        // namespaces that are declared there.
        p.getOutInterceptors().add(new AbstractSoapInterceptor(Phase.POST_LOGICAL) {
            public void handleMessage(SoapMessage message) throws Fault {
                AddressingProperties p = ContextUtils.retrieveMAPs(message, false, true);
                if (p == null) {
                    return;
                }
                String ns = p.getNamespaceURI();
                Map<String, String> nsMap = message.getEnvelopeNs();
                if (nsMap == null) {
                    nsMap = new HashMap<String, String>();
                } else {
                    nsMap = new HashMap<String, String>(nsMap);
View Full Code Here

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

        EndpointReferenceType refWithId = destination.getAddressWithId(id);
       
        Map<String, Object> context = new HashMap<String, Object>();
        assertNull("fails with no context", destination.getId(context));
       
        AddressingProperties maps = EasyMock.createMock(AddressingProperties.class);
        maps.getToEndpointReference();
        EasyMock.expectLastCall().andReturn(refWithId);
        EasyMock.replay(maps);     
        context.put(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND, maps);
        String result = destination.getId(context);
        assertNotNull(result);
View Full Code Here

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

            InTransformReader reader = new InTransformReader(domReader, inMap , null, false);
            doc = StaxUtils.read(reader);
            return new DOMSource(doc);           
        }
        private void updateOutputAction(String append) {
            AddressingProperties p = ContextUtils.retrieveMAPs(PhaseInterceptorChain.getCurrentMessage(),
                                                               false, false);
            AddressingProperties pout = new AddressingPropertiesImpl();
            AttributedURIType action = new AttributedURIType();
            action.setValue(p.getAction().getValue() + append);
            pout.exposeAs(p.getNamespaceURI());
            pout.setAction(action);
            ContextUtils.storeMAPs(pout, PhaseInterceptorChain.getCurrentMessage(), true);

        }
View Full Code Here

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

    private String getMessageID() {
        String id = null;
        if (context.getMessageContext() != null) {
            String property =
                JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND;
            AddressingProperties maps = (AddressingProperties)
                context.getMessageContext().get(property);
            id = maps != null && maps.getMessageID() != null
                 ? maps.getMessageID().getValue()
                 : null;
        }
        return id;
    }
View Full Code Here

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

        super(Phase.PRE_PROTOCOL);
    }
   
    public void handleMessage(SoapMessage message) throws Fault {
       
        AddressingProperties inProps = (AddressingProperties)message
            .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND);
        AddressingProperties outProps = (AddressingProperties)message
            .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_OUTBOUND);
        if (inProps != null) {
            if (outProps == null) {
                outProps = new AddressingPropertiesImpl(inProps.getNamespaceURI());
            }
            AttributedURIType action = new AttributedURIType();
            action.setValue(inProps.getAction().getValue().replace("/RST/", "/RSTR/"));
            outProps.setAction(action);
            message.put(JAXWSAConstants.ADDRESSING_PROPERTIES_OUTBOUND, outProps);
        }
    }
View Full Code Here

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

    }
   
    public void handleMessage(SoapMessage message) throws Fault {
       
        String s = (String)message.get(SoapBindingConstants.SOAP_ACTION);
        AddressingProperties inProps = (AddressingProperties)message
            .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND);
        if (inProps != null && s == null) {
            //MS/WCF doesn't put a soap action out for this, must check the headers
            s = inProps.getAction().getValue();
        }

        if (s != null
            && s.contains("/RST/SCT")
            && (s.startsWith(STSUtils.WST_NS_05_02)
View Full Code Here

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

     * @return the id from the reference parameters of the  ws-a-to address or null if not found
     * @see org.apache.cxf.transport.MultiplexDestination#getId(java.util.Map)
     */
    public String getId(Map<String, Object> contextMap) {
        String markedParam = null;
        AddressingProperties maps = (AddressingProperties)contextMap
            .get(SERVER_ADDRESSING_PROPERTIES_INBOUND);
        if (null != maps) {
            EndpointReferenceType toEpr = maps.getToEndpointReference();
            if (null != toEpr) {
                markedParam = extractStringElementFromAny(MULTIPLEX_ID_QNAME, toEpr);
            }
        }
        return markedParam;
View Full Code Here

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

                    exchange.getInMessage().put(HTTP_REQUEST, new HttpServletRequestSnapshot(req));
                }
                super.cacheInput();
            }
            private boolean isWSAddressingReplyToSpecified(Exchange ex) {
                AddressingProperties map = ContextUtils.retrieveMAPs(ex.getInMessage(), false, false, false);
                return map != null && !ContextUtils.isGenericAddress(map.getReplyTo());
            }
        };
       
        inMessage.setContent(DelegatingInputStream.class, in);
        inMessage.setContent(InputStream.class, in);
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.