Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 81907 invoked from network); 22 Oct 2008 21:14:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Oct 2008 21:14:13 -0000 Received: (qmail 65208 invoked by uid 500); 22 Oct 2008 21:14:16 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 65151 invoked by uid 500); 22 Oct 2008 21:14:16 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 65142 invoked by uid 99); 22 Oct 2008 21:14:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 14:14:16 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 21:13:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 144CD23888EB; Wed, 22 Oct 2008 14:13:11 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r707195 - in /cxf/branches/2.0.x-fixes: rt/core/src/main/java/org/apache/cxf/attachment/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/ rt/frontend/simple/src/main/java/or... Date: Wed, 22 Oct 2008 21:13:10 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081022211311.144CD23888EB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Wed Oct 22 14:13:10 2008 New Revision: 707195 URL: http://svn.apache.org/viewvc?rev=707195&view=rev Log: More stuff to get the async stuff ported to 2.0.x. Modified: cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/LazyAttachmentCollection.java cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java Modified: cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/LazyAttachmentCollection.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/LazyAttachmentCollection.java?rev=707195&r1=707194&r2=707195&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/LazyAttachmentCollection.java (original) +++ cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/attachment/LazyAttachmentCollection.java Wed Oct 22 14:13:10 2008 @@ -19,14 +19,22 @@ package org.apache.cxf.attachment; import java.io.IOException; +import java.util.AbstractCollection; +import java.util.AbstractSet; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.activation.DataHandler; import org.apache.cxf.message.Attachment; -public class LazyAttachmentCollection implements Collection { +public class LazyAttachmentCollection + implements Collection { + private AttachmentDeserializer deserializer; private final List attachments = new ArrayList(); @@ -140,7 +148,175 @@ return attachments.toArray(arg0); } + + public Map createDataHandlerMap() { + return new LazyAttachmentMap(this); + } + + private static class LazyAttachmentMap implements Map { + LazyAttachmentCollection collection; + + LazyAttachmentMap(LazyAttachmentCollection c) { + collection = c; + } + + public void clear() { + collection.clear(); + } + + public boolean containsKey(Object key) { + Iterator it = collection.iterator(); + while (it.hasNext()) { + Attachment at = it.next(); + if (key.equals(at.getId())) { + return true; + } + } + return false; + } + public boolean containsValue(Object value) { + Iterator it = collection.iterator(); + while (it.hasNext()) { + Attachment at = it.next(); + if (value.equals(at.getDataHandler())) { + return true; + } + } + return false; + } + + public DataHandler get(Object key) { + Iterator it = collection.iterator(); + while (it.hasNext()) { + Attachment at = it.next(); + if (key.equals(at.getId())) { + return at.getDataHandler(); + } + } + return null; + } + + public boolean isEmpty() { + return collection.isEmpty(); + } + public int size() { + return collection.size(); + } + + public DataHandler remove(Object key) { + Iterator it = collection.iterator(); + while (it.hasNext()) { + Attachment at = it.next(); + if (key.equals(at.getId())) { + collection.remove(at); + return at.getDataHandler(); + } + } + return null; + } + public DataHandler put(String key, DataHandler value) { + Attachment at = new AttachmentImpl(key, value); + collection.add(at); + return value; + } + + public void putAll(Map t) { + for (Map.Entry ent : t.entrySet()) { + put(ent.getKey(), ent.getValue()); + } + } + + + public Set> entrySet() { + return new AbstractSet>() { + public Iterator> iterator() { + return new Iterator>() { + Iterator it = collection.iterator(); + public boolean hasNext() { + return it.hasNext(); + } + public Map.Entry next() { + return new Map.Entry() { + Attachment at = it.next(); + public String getKey() { + return at.getId(); + } + public DataHandler getValue() { + return at.getDataHandler(); + } + public DataHandler setValue(DataHandler value) { + if (at instanceof AttachmentImpl) { + DataHandler h = at.getDataHandler(); + ((AttachmentImpl)at).setDataHandler(value); + return h; + } else { + throw new UnsupportedOperationException(); + } + } + }; + } + public void remove() { + it.remove(); + } + }; + } + public int size() { + return collection.size(); + } + }; + } + + public Set keySet() { + return new AbstractSet() { + public Iterator iterator() { + return new Iterator() { + Iterator it = collection.iterator(); + public boolean hasNext() { + return it.hasNext(); + } + + public String next() { + return it.next().getId(); + } + + public void remove() { + it.remove(); + } + }; + } + + public int size() { + return collection.size(); + } + }; + } + + + public Collection values() { + return new AbstractCollection() { + public Iterator iterator() { + return new Iterator() { + Iterator it = collection.iterator(); + public boolean hasNext() { + return it.hasNext(); + } + public DataHandler next() { + return it.next().getDataHandler(); + } + public void remove() { + it.remove(); + } + }; + } + + public int size() { + return collection.size(); + } + }; + } + + } } Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java?rev=707195&r1=707194&r2=707195&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java (original) +++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java Wed Oct 22 14:13:10 2008 @@ -105,6 +105,9 @@ client.getRequestContext().put(Method.class.getName(), method); boolean isAsync = method.getName().endsWith("Async"); + + // need to do context mapping from jax-ws to cxf message + ContextPropertiesMapping.mapRequestfromJaxws2Cxf(client.getRequestContext()); Object result = null; try { @@ -269,11 +272,11 @@ public Map getRequestContext() { - return new WrappedMessageContext(this.getClient().getRequestContext(), + return new WrappedMessageContext(this.getClient().getRequestContext(), null, Scope.APPLICATION); } public Map getResponseContext() { - return new WrappedMessageContext(this.getClient().getResponseContext(), + return new WrappedMessageContext(this.getClient().getResponseContext(), null, Scope.APPLICATION); } @@ -281,16 +284,4 @@ return binding; } - /* - // TODO JAX-WS 2.1 - public EndpointReference getEndpointReference() { - // TODO - throw new UnsupportedOperationException(); - } - - public T getEndpointReference(Class clazz) { - // TODO - throw new UnsupportedOperationException(); - } - */ } Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java?rev=707195&r1=707194&r2=707195&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java (original) +++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java Wed Oct 22 14:13:10 2008 @@ -20,129 +20,381 @@ package org.apache.cxf.jaxws.context; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; +import javax.activation.DataHandler; import javax.xml.ws.BindingProvider; import javax.xml.ws.handler.MessageContext; +import javax.xml.ws.handler.MessageContext.Scope; +import org.apache.cxf.attachment.LazyAttachmentCollection; +import org.apache.cxf.binding.soap.SoapBindingConstants; import org.apache.cxf.configuration.security.AuthorizationPolicy; +import org.apache.cxf.endpoint.Endpoint; import org.apache.cxf.helpers.CastUtils; +import org.apache.cxf.message.Attachment; import org.apache.cxf.message.Exchange; import org.apache.cxf.message.Message; public class WrappedMessageContext implements MessageContext { public static final String SCOPES = WrappedMessageContext.class.getName() + ".SCOPES"; - private final Map contextMap; - private final Message message; + private static Map cxf2jaxwsMap = new HashMap(); + private static Map jaxws2cxfMap = new HashMap(); + + static { + cxf2jaxwsMap.put(Message.ENDPOINT_ADDRESS, + BindingProvider.ENDPOINT_ADDRESS_PROPERTY); + cxf2jaxwsMap.put(Message.MAINTAIN_SESSION, + BindingProvider.SESSION_MAINTAIN_PROPERTY); + + cxf2jaxwsMap.put(Message.HTTP_REQUEST_METHOD, + MessageContext.HTTP_REQUEST_METHOD); + cxf2jaxwsMap.put(Message.RESPONSE_CODE, + MessageContext.HTTP_RESPONSE_CODE); + cxf2jaxwsMap.put(Message.PATH_INFO, + MessageContext.PATH_INFO); + cxf2jaxwsMap.put(Message.QUERY_STRING, + MessageContext.QUERY_STRING); + cxf2jaxwsMap.put("HTTP.REQUEST", + MessageContext.SERVLET_REQUEST); + cxf2jaxwsMap.put("HTTP.RESPONSE", + MessageContext.SERVLET_RESPONSE); + cxf2jaxwsMap.put("HTTP.CONTEXT", + MessageContext.SERVLET_CONTEXT); + + jaxws2cxfMap.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, + Message.ENDPOINT_ADDRESS); + jaxws2cxfMap.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, + Message.MAINTAIN_SESSION); + + jaxws2cxfMap.put(MessageContext.HTTP_REQUEST_METHOD, + Message.HTTP_REQUEST_METHOD); + jaxws2cxfMap.put(MessageContext.HTTP_RESPONSE_CODE, + Message.RESPONSE_CODE); + jaxws2cxfMap.put(MessageContext.PATH_INFO, + Message.PATH_INFO); + jaxws2cxfMap.put(MessageContext.QUERY_STRING, + Message.QUERY_STRING); + + jaxws2cxfMap.put(MessageContext.SERVLET_REQUEST, + "HTTP.REQUEST"); + jaxws2cxfMap.put(MessageContext.SERVLET_RESPONSE, + "HTTP.RESPONSE"); + jaxws2cxfMap.put(MessageContext.SERVLET_CONTEXT, + "HTTP.CONTEXT"); + + jaxws2cxfMap.put(BindingProvider.SOAPACTION_URI_PROPERTY, SoapBindingConstants.SOAP_ACTION); + } + + private final Map message; + private final Map reqMessage; + private final Exchange exchange; private Map scopes; private Scope defaultScope; public WrappedMessageContext(Message m) { - this(m, m, Scope.HANDLER); + this(m, Scope.HANDLER); } public WrappedMessageContext(Message m, Scope defScope) { - this(m, m, defScope); - } - - public WrappedMessageContext(Map m, Scope defScope) { - this(null, m, defScope); - } - - public WrappedMessageContext(Message m, Map map, Scope defScope) { + this(m, m.getExchange(), defScope); + } + public WrappedMessageContext(Map m, Exchange ex, Scope defScope) { message = m; - contextMap = map; + exchange = ex; defaultScope = defScope; - scopes = CastUtils.cast((Map)contextMap.get(SCOPES)); - if (scopes == null && message != null && message.getExchange() != null) { - if (isRequestor() && !isOutbound() && m.getExchange().getOutMessage() != null) { - scopes = CastUtils.cast((Map)m.getExchange().getOutMessage().get(SCOPES)); - copyScopedProperties(m.getExchange().getOutMessage()); - m.put(SCOPES, scopes); - } else if (!isRequestor() && isOutbound() && m.getExchange().getInMessage() != null) { - scopes = CastUtils.cast((Map)m.getExchange().getInMessage().get(SCOPES)); - copyScopedProperties(m.getExchange().getInMessage()); + scopes = CastUtils.cast((Map)message.get(SCOPES)); + + if (isResponse() && exchange != null) { + if (isRequestor()) { + reqMessage = exchange.getOutMessage(); + } else { + reqMessage = exchange.getInMessage(); + } + } else { + reqMessage = null; + } + + if (scopes == null && reqMessage != null) { + scopes = CastUtils.cast((Map)reqMessage.get(SCOPES)); + if (scopes != null) { m.put(SCOPES, scopes); + copyScoped(reqMessage); } } if (scopes == null) { scopes = new HashMap(); - contextMap.put(SCOPES, scopes); + message.put(SCOPES, scopes); + } + } + private void copyScoped(Map msg) { + for (String s : scopes.keySet()) { + message.put(s, msg.get(s)); } } - protected final void copyScopedProperties(Message m) { - for (String k : scopes.keySet()) { - if (!contextMap.containsKey(k) - && !MessageContext.MESSAGE_OUTBOUND_PROPERTY.equals(k)) { - contextMap.put(k, m.get(k)); - } + private String mapKey(String key) { + String k2 = jaxws2cxfMap.get(key); + if (k2 != null) { + return k2; } + return key; + } + private String mapKeyReverse(String key) { + String k2 = cxf2jaxwsMap.get(key); + if (k2 != null) { + return k2; + } + if (Message.PROTOCOL_HEADERS.equals(key)) { + return isResponse() ? MessageContext.HTTP_RESPONSE_HEADERS : MessageContext.HTTP_REQUEST_HEADERS; + } + return key; + } + + + protected final boolean isResponse() { + return isOutbound() ^ isRequestor(); } protected final boolean isRequestor() { - return Boolean.TRUE.equals(contextMap.containsKey(Message.REQUESTOR_ROLE)); + return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE)); } protected final boolean isOutbound() { - Exchange ex = message.getExchange(); return message != null - && (message == ex.getOutMessage() - || message == ex.getOutFaultMessage()); + && exchange != null + && (message == exchange.getOutMessage() + || message == exchange.getOutFaultMessage()); } public final Message getWrappedMessage() { - return message; + return message instanceof Message ? (Message)message : null; } public final Map getWrappedMap() { return message; } public void clear() { - contextMap.clear(); + //just clear the JAXWS things.... + for (String key : jaxws2cxfMap.keySet()) { + remove(key); + } } public final boolean containsKey(Object key) { - return contextMap.containsKey(key); + return message.containsKey(mapKey((String)key)); } public final boolean containsValue(Object value) { - return contextMap.containsValue(value); - } - - public final Set> entrySet() { - return contextMap.entrySet(); + return message.containsValue(value); } - public final Object get(Object key) { - Object ret = contextMap.get(key); - if (ret == null - && Message.class.getName().equals(key)) { - return message; + public Object get(Object key) { + String mappedkey = mapKey((String)key); + Object ret = message.get(mappedkey); + if (ret == null) { + if (Message.class.getName().equals(mappedkey)) { + return message; + } + if (exchange != null) { + ret = exchange.get(mappedkey); + if (ret != null) { + return ret; + } + } + if (MessageContext.INBOUND_MESSAGE_ATTACHMENTS.equals(key)) { + if (isOutbound()) { + ret = reqMessage.get(key); + } + ret = createAttachments(getWrappedMessage(), MessageContext.INBOUND_MESSAGE_ATTACHMENTS); + } else if (MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS.equals(key)) { + ret = createAttachments(isRequestor() ? getWrappedMessage() : createResponseMessage(), + MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); + } else if (MessageContext.MESSAGE_OUTBOUND_PROPERTY.equals(key)) { + ret = isOutbound(); + } else if (MessageContext.HTTP_REQUEST_HEADERS.equals(key)) { + if (!isResponse()) { + ret = message.get(Message.PROTOCOL_HEADERS); + } else if (reqMessage != null && !isRequestor()) { + ret = reqMessage.get(Message.PROTOCOL_HEADERS); + } + } else if (MessageContext.HTTP_RESPONSE_HEADERS.equals(key)) { + Map mp = null; + if (isResponse()) { + mp = (Map)message.get(Message.PROTOCOL_HEADERS); + } else if (exchange != null) { + //may have to create the out message and add the headers + Message tmp = createResponseMessage(); + if (tmp != null) { + ret = (Map)tmp.get(Message.PROTOCOL_HEADERS); + } + } + ret = mp; + } else if (BindingProvider.USERNAME_PROPERTY.equals(key)) { + AuthorizationPolicy authPolicy = + (AuthorizationPolicy)message.get(AuthorizationPolicy.class.getName()); + if (authPolicy != null) { + ret = authPolicy.getUserName(); + } + } else if (BindingProvider.PASSWORD_PROPERTY.equals(key)) { + AuthorizationPolicy authPolicy = + (AuthorizationPolicy)message.get(AuthorizationPolicy.class.getName()); + if (authPolicy != null) { + ret = authPolicy.getPassword(); + } + } + + if (ret == null && reqMessage != null) { + ret = reqMessage.get(mappedkey); + } } return ret; } + private Message createResponseMessage() { + if (exchange == null || exchange.isOneWay()) { + return null; + } + if (isResponse()) { + return getWrappedMessage(); + } + Message m = null; + if (isRequestor()) { + m = exchange.getInFaultMessage(); + if (m == null) { + m = exchange.getInMessage(); + } + if (m == null) { + Endpoint ep = exchange.get(Endpoint.class); + m = ep.getBinding().createMessage(); + exchange.setInMessage(m); + } + } else { + m = exchange.getOutMessage(); + if (m == null) { + m = exchange.getOutFaultMessage(); + } + if (m == null) { + Endpoint ep = exchange.get(Endpoint.class); + m = ep.getBinding().createMessage(); + exchange.setOutMessage(m); + } + } + return m; + } + private Object createAttachments(Message mc, String propertyName) { + if (mc == null) { + return null; + } + Collection attachments = mc.getAttachments(); + Map dataHandlers = getDHMap(attachments); + mc.put(propertyName, + dataHandlers); + scopes.put(propertyName, Scope.APPLICATION); + return dataHandlers; + } + private static Map getDHMap(Collection attachments) { + Map dataHandlers = null; + if (attachments != null) { + if (attachments instanceof LazyAttachmentCollection) { + dataHandlers = ((LazyAttachmentCollection)attachments).createDataHandlerMap(); + } else { + //preserve the order of iteration + dataHandlers = new LinkedHashMap(); + for (Attachment attachment : attachments) { + dataHandlers.put(attachment.getId(), attachment.getDataHandler()); + } + } + } + return dataHandlers == null ? new LinkedHashMap() : dataHandlers; + } public final boolean isEmpty() { - return contextMap.isEmpty(); + return message.isEmpty(); } + // map to jaxws public final Set keySet() { - return contextMap.keySet(); + Set set = new HashSet(); + for (String s : message.keySet()) { + set.add(s); + set.add(mapKeyReverse(s)); + } + return Collections.unmodifiableSet(set); + } + public final Set> entrySet() { + Set> set = new HashSet>(); + for (Map.Entry s : message.entrySet()) { + set.add(s); + + final String s2 = mapKeyReverse(s.getKey()); + final Object o = s.getValue(); + if (s2.equals(s.getKey())) { + Map.Entry entry = new Map.Entry() { + public String getKey() { + return s2; + } + public Object getValue() { + return o; + } + public Object setValue(Object value) { + throw new UnsupportedOperationException(); + } + }; + set.add(entry); + } + } + return Collections.unmodifiableSet(set); } + public final Object put(String key, Object value) { - if (!MessageContext.MESSAGE_OUTBOUND_PROPERTY.equals(key) - && !scopes.containsKey(key)) { - scopes.put(key, defaultScope); - } - return contextMap.put(key, value); + return put(key, value, defaultScope); } public final Object put(String key, Object value, Scope scope) { - if (!MessageContext.MESSAGE_OUTBOUND_PROPERTY.equals(key)) { - scopes.put(key, scope); + String mappedKey = mapKey(key); + if (!MessageContext.MESSAGE_OUTBOUND_PROPERTY.equals(mappedKey)) { + scopes.put(mappedKey, scope); + } + if ((MessageContext.HTTP_RESPONSE_HEADERS.equals(key) + || MessageContext.HTTP_RESPONSE_CODE.equals(key) + || MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS.equals(key) + || MessageContext.HTTP_RESPONSE_CODE.equals(key)) + && !isResponse() && !isRequestor()) { + Message tmp = createResponseMessage(); + if (tmp != null) { + if (MessageContext.HTTP_RESPONSE_HEADERS.equals(key)) { + return tmp.put(Message.PROTOCOL_HEADERS, value); + } else { + return tmp.put(mappedKey, value); + } + } + return null; + } else if (BindingProvider.USERNAME_PROPERTY.equals(key)) { + AuthorizationPolicy authPolicy = + (AuthorizationPolicy)message.get(AuthorizationPolicy.class.getName()); + if (authPolicy == null) { + authPolicy = new AuthorizationPolicy(); + message.put(AuthorizationPolicy.class.getName(), authPolicy); + } + String ret = authPolicy.getUserName(); + authPolicy.setUserName((String)value); + return ret; + } else if (BindingProvider.PASSWORD_PROPERTY.equals(key)) { + AuthorizationPolicy authPolicy = + (AuthorizationPolicy)message.get(AuthorizationPolicy.class.getName()); + if (authPolicy == null) { + authPolicy = new AuthorizationPolicy(); + message.put(AuthorizationPolicy.class.getName(), authPolicy); + } + String ret = authPolicy.getPassword(); + authPolicy.setPassword((String)value); + return ret; + } else { + return message.put(mappedKey, value); } - return contextMap.put(key, value); } public final void putAll(Map t) { @@ -152,6 +404,7 @@ } public final Object remove(Object key) { + key = mapKey((String)key); scopes.remove(key); if (BindingProvider.PASSWORD_PROPERTY.equals(key) || BindingProvider.USERNAME_PROPERTY.equals(key)) { @@ -161,11 +414,11 @@ } public final int size() { - return contextMap.size(); + return message.size(); } public final Collection values() { - return contextMap.values(); + return message.values(); } public final void setScope(String key, Scope arg1) { Modified: cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=707195&r1=707194&r2=707195&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original) +++ cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Wed Oct 22 14:13:10 2008 @@ -279,8 +279,8 @@ } protected void buildServiceFromWSDL(String url) { - if (LOG.isLoggable(Level.FINE)) { - LOG.fine("Creating Service " + getServiceQName() + " from WSDL: " + url); + if (LOG.isLoggable(Level.INFO)) { + LOG.info("Creating Service " + getServiceQName() + " from WSDL: " + url); } populateFromClass = false; WSDLServiceFactory factory = new WSDLServiceFactory(getBus(), url, getServiceQName()); @@ -302,8 +302,8 @@ } protected void buildServiceFromClass() { - if (LOG.isLoggable(Level.FINE)) { - LOG.fine("Creating Service " + getServiceQName() + " from class " + getServiceClass().getName()); + if (LOG.isLoggable(Level.INFO)) { + LOG.info("Creating Service " + getServiceQName() + " from class " + getServiceClass().getName()); } populateFromClass = true; Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java?rev=707195&r1=707194&r2=707195&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java (original) +++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java Wed Oct 22 14:13:10 2008 @@ -41,10 +41,6 @@ return CONFIG; } - @Test - public void foo() { - - } @Test public void testUsingKeepAliveConnection() throws Exception {