Author: alessio.soldano(a)jboss.com
Date: 2009-05-27 05:53:36 -0400 (Wed, 27 May 2009)
New Revision: 10119
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilderFactory.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPConstants.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPEndpoint.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPRelatesTo.java
stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.common.addressing.MAPBuilderFactory
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/org.jboss.wsf.common.addressing.MAPBuilderFactory
Log:
[JBWS-2106] Adding CXF impl of common JSR-261 API
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java 2009-05-27
09:53:36 UTC (rev 10119)
@@ -0,0 +1,306 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.extensions.addressing.map;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.ws.addressing.AddressingProperties;
+import org.apache.cxf.ws.addressing.AttributedURIType;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.ws.addressing.ReferenceParametersType;
+import org.apache.cxf.ws.addressing.RelatesToType;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.addressing.MAP;
+import org.jboss.wsf.common.addressing.MAPBuilder;
+import org.jboss.wsf.common.addressing.MAPEndpoint;
+import org.jboss.wsf.common.addressing.MAPRelatesTo;
+import org.w3c.dom.Element;
+
+/**
+ * Message Addressing Properties is a wrapper for the stack-specific addressing
properties
+ * classes implemented by JBossWS Native and CXF. It is used to localize dependence upon
the WS
+ * stack. This is the JBossWS CXF specific implementation.
+ *
+ * @author Andrew Dinn - adinn(a)redhat.com
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2009
+ *
+ */
+public class CXFMAP implements MAP
+{
+ private static final Logger log = Logger.getLogger(CXFMAP.class);
+
+ /**
+ * the wrapped instance which this class delegates to
+ */
+ private AddressingProperties implementation;
+
+ /**
+ * JBossWS Native specific constructor
+ * @param implementation
+ */
+ CXFMAP(AddressingProperties implementation)
+ {
+ this.implementation = implementation;
+ }
+
+ public String getTo()
+ {
+ AttributedURIType to = implementation.getTo();
+ return (to != null ? to.getValue() : null);
+ }
+
+ public MAPEndpoint getFrom()
+ {
+ EndpointReferenceType from = implementation.getFrom();
+ return (from != null ? new CXFMAPEndpoint(from) : null);
+ }
+
+ public String getMessageID()
+ {
+ AttributedURIType messageId = implementation.getMessageID();
+ return (messageId != null ? messageId.getValue() : null);
+ }
+
+ public String getAction()
+ {
+ AttributedURIType action = implementation.getAction();
+ return (action != null ? action.getValue() : null);
+ }
+
+ public MAPEndpoint getFaultTo()
+ {
+ EndpointReferenceType faultTo = implementation.getFaultTo();
+ return (faultTo != null ? new CXFMAPEndpoint(faultTo) : null);
+ }
+
+ public MAPEndpoint getReplyTo()
+ {
+ EndpointReferenceType replyTo = implementation.getReplyTo();
+ return (replyTo != null ? new CXFMAPEndpoint(replyTo) : null);
+ }
+
+ public MAPRelatesTo getRelatesTo()
+ {
+ MAPBuilder builder = CXFMAPBuilder.getBuilder();
+ RelatesToType relatesTo = implementation.getRelatesTo();
+ if (relatesTo != null)
+ {
+ String type = relatesTo.getRelationshipType();
+ int index = type.indexOf("}");
+ String ns = type.substring(1, index + 1);
+ String name = type.substring(index + 1);
+ return builder.newRelatesTo(relatesTo.getValue(), new QName(ns, name));
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public void setTo(String address)
+ {
+ if (address != null)
+ {
+ EndpointReferenceType epref = new EndpointReferenceType();
+ AttributedURIType uri = new AttributedURIType();
+ uri.setValue(address);
+ epref.setAddress(uri);
+ implementation.setTo(epref);
+ }
+ else
+ {
+ implementation.setTo(null);
+ }
+ }
+
+ public void setFrom(MAPEndpoint epref)
+ {
+ if (epref != null)
+ {
+ if (epref instanceof CXFMAPEndpoint)
+ {
+ implementation.setFrom(((CXFMAPEndpoint)epref).getImplementation());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unsupported MAPEndpoint: " +
epref);
+ }
+ }
+ else
+ {
+ implementation.setFrom(null);
+ }
+ }
+
+ public void setMessageID(String messageID)
+ {
+ if (messageID != null)
+ {
+ AttributedURIType uri = new AttributedURIType();
+ uri.setValue(messageID);
+ implementation.setMessageID(uri);
+ }
+ else
+ {
+ implementation.setMessageID(null);
+ }
+ }
+
+ public void setAction(String action)
+ {
+ if (action != null)
+ {
+ AttributedURIType uri = new AttributedURIType();
+ uri.setValue(action);
+ implementation.setAction(uri);
+ }
+ else
+ {
+ implementation.setAction(null);
+ }
+ }
+
+ public void setReplyTo(MAPEndpoint epref)
+ {
+ if (epref != null)
+ {
+ if (epref instanceof CXFMAPEndpoint)
+ {
+ implementation.setReplyTo(((CXFMAPEndpoint)epref).getImplementation());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unsupported MAPEndpoint: " +
epref);
+ }
+ }
+ else
+ {
+ implementation.setReplyTo(null);
+ }
+ }
+
+ public void setFaultTo(MAPEndpoint epref)
+ {
+ if (epref != null)
+ {
+ if (epref instanceof CXFMAPEndpoint)
+ {
+ implementation.setFaultTo(((CXFMAPEndpoint)epref).getImplementation());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unsupported MAPEndpoint: " +
epref);
+ }
+ }
+ else
+ {
+ implementation.setFaultTo(null);
+ }
+ }
+
+ public void setRelatesTo(MAPRelatesTo relatesTo)
+ {
+ if (relatesTo != null)
+ {
+ RelatesToType relatesToImpl = new RelatesToType();
+ relatesToImpl.setValue(relatesTo.getRelatesTo());
+ relatesToImpl.setRelationshipType(relatesTo.getType().toString());
+ implementation.setRelatesTo(relatesToImpl);
+ }
+ else
+ {
+ implementation.setRelatesTo(null);
+ }
+ }
+
+ public void addReferenceParameter(Element refParam)
+ {
+ EndpointReferenceType eprt = implementation.getToEndpointReference();
+ ReferenceParametersType refParams = eprt.getReferenceParameters();
+ if (refParams == null)
+ {
+ refParams = new ReferenceParametersType();
+ eprt.setReferenceParameters(refParams);
+ }
+ eprt.getReferenceParameters().getAny().add(refParam);
+
//implementation.getToEndpointReference().getReferenceParameters().getAny().add(refParam);
+ }
+
+ public void initializeAsDestination(MAPEndpoint epref)
+ {
+ if (epref == null)
+ throw new IllegalArgumentException("Invalid null endpoint
reference");
+
+ if (epref instanceof CXFMAPEndpoint)
+ {
+ implementation.setTo(((CXFMAPEndpoint)epref).getImplementation());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unsupported MAPEndpoint: " +
epref);
+ }
+ }
+
+ public List<Object> getReferenceParameters()
+ {
+ List<Object> list = new LinkedList<Object>();
+ ReferenceParametersType refParams =
implementation.getToEndpointReference().getReferenceParameters();
+ if (refParams != null)
+ {
+ List<Object> any = refParams.getAny();
+ if (any != null)
+ {
+ list.addAll(any);
+ }
+ }
+ return list;
+ }
+
+ public void installOutboundMapOnClientSide(Map<String, Object> requestContext,
MAP map)
+ {
+ if (!(map instanceof CXFMAP))
+ {
+ throw new IllegalArgumentException("Unsupported MAP: " + map);
+ }
+ AddressingProperties addressingProperties = ((CXFMAP)map).implementation;
+
+ requestContext.put(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES,
addressingProperties);
+ requestContext.put(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND,
addressingProperties);
+ }
+
+ public void installOutboundMapOnServerSide(Map<String, Object> requestContext,
MAP map)
+ {
+ if (!(map instanceof CXFMAP))
+ {
+ throw new IllegalArgumentException("Unsupported MAP: " + map);
+ }
+ AddressingProperties addressingProperties = ((CXFMAP)map).implementation;
+
+ requestContext.put(CXFMAPConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND,
addressingProperties);
+ }
+
+}
Property changes on:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java 2009-05-27
09:53:36 UTC (rev 10119)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.extensions.addressing.map;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+
+import org.apache.cxf.ws.addressing.AddressingBuilder;
+import org.apache.cxf.ws.addressing.AddressingConstants;
+import org.apache.cxf.ws.addressing.AddressingProperties;
+import org.apache.cxf.ws.addressing.AttributedURIType;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.jboss.wsf.common.addressing.MAP;
+import org.jboss.wsf.common.addressing.MAPBuilder;
+import org.jboss.wsf.common.addressing.MAPConstants;
+import org.jboss.wsf.common.addressing.MAPEndpoint;
+import org.jboss.wsf.common.addressing.MAPRelatesTo;
+
+/**
+ * MAPBuilder is a helper used to create objects used with class MAP. This is the JBossWS
CXF
+ * implementation.
+ *
+ * @author Andrew Dinn - adinn(a)redhat.com
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2009
+ *
+ */
+public class CXFMAPBuilder implements MAPBuilder
+{
+ private AddressingBuilder addressingBuilder;
+
+ private static MAPBuilder theBuilder = new CXFMAPBuilder();
+
+ public static MAPBuilder getBuilder()
+ {
+ return theBuilder;
+ }
+
+ private CXFMAPBuilder()
+ {
+ AddressingBuilder implementation = AddressingBuilder.getAddressingBuilder();
+ this.addressingBuilder = implementation;
+ }
+
+ public MAP newMap()
+ {
+ AddressingProperties implementation = addressingBuilder.newAddressingProperties();
+ return new CXFMAP(implementation);
+ }
+
+ /**
+ * retrieve the inbound server message address properties attached to a message
context
+ * @param ctx the server message context
+ * @return
+ */
+ public MAP inboundMap(Map<String, Object> ctx)
+ {
+ AddressingProperties implementation =
(AddressingProperties)ctx.get(CXFMAPConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ return newMap(implementation);
+ }
+
+ /**
+ * retrieve the outbound client message address properties attached to a message
request map
+ * @param ctx the client request properties map
+ * @return
+ */
+ public MAP outboundMap(Map<String, Object> ctx)
+ {
+ AddressingProperties implementation =
(AddressingProperties)ctx.get(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
+ if (implementation == null)
+ {
+ implementation = addressingBuilder.newAddressingProperties();
+ ctx.put(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES, implementation);
+ ctx.put(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, implementation);
+ }
+ return newMap(implementation);
+ }
+
+ // n.b. this is package public only!
+ MAP newMap(AddressingProperties implementation)
+ {
+ return new CXFMAP(implementation);
+ }
+
+ public MAPConstants newConstants()
+ {
+ AddressingConstants implementation = addressingBuilder.newAddressingConstants();
+ return new CXFMAPConstants(implementation);
+ }
+
+ public MAPEndpoint newEndpoint(String address)
+ {
+ EndpointReferenceType implementation = new EndpointReferenceType();
+ AttributedURIType uri = new AttributedURIType();
+ uri.setValue(address);
+ implementation.setAddress(uri);
+ return new CXFMAPEndpoint(implementation);
+ }
+
+ public MAPRelatesTo newRelatesTo(String id, QName type)
+ {
+ return new CXFMAPRelatesTo(id, type);
+ }
+
+}
Property changes on:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilderFactory.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilderFactory.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilderFactory.java 2009-05-27
09:53:36 UTC (rev 10119)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.extensions.addressing.map;
+
+import org.jboss.wsf.common.addressing.MAPBuilder;
+import org.jboss.wsf.common.addressing.MAPBuilderFactory;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2009
+ *
+ */
+public class CXFMAPBuilderFactory extends MAPBuilderFactory
+{
+ public MAPBuilder getBuilderInstance()
+ {
+ return CXFMAPBuilder.getBuilder();
+ }
+}
Property changes on:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilderFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPConstants.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPConstants.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPConstants.java 2009-05-27
09:53:36 UTC (rev 10119)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.extensions.addressing.map;
+
+import org.apache.cxf.ws.addressing.AddressingConstants;
+import org.apache.cxf.ws.addressing.JAXWSAConstants;
+import org.jboss.wsf.common.addressing.MAPConstants;
+
+/**
+ * MAPConstants is a wrapper which works with class MAP. This is the JBossWS CXF
version.
+ *
+ * @author Andrew Dinn - adinn(a)redhat.com
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2009
+ *
+ */
+public class CXFMAPConstants implements MAPConstants
+{
+ public static final String CLIENT_ADDRESSING_PROPERTIES =
JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES;
+ public static final String CLIENT_ADDRESSING_PROPERTIES_INBOUND =
JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND;
+ public static final String CLIENT_ADDRESSING_PROPERTIES_OUTBOUND =
JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND;
+ public static final String SERVER_ADDRESSING_PROPERTIES_INBOUND =
JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND;
+ public static final String SERVER_ADDRESSING_PROPERTIES_OUTBOUND =
JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND;
+
+ private AddressingConstants implementation;
+
+
+ CXFMAPConstants(AddressingConstants implementation)
+ {
+ this.implementation = implementation;
+ }
+
+ public String getClientAddressingProperties()
+ {
+ return CLIENT_ADDRESSING_PROPERTIES;
+ }
+
+ public String getClientAddressingPropertiesInbound()
+ {
+ return CLIENT_ADDRESSING_PROPERTIES_INBOUND;
+ }
+
+ public String getClientAddressingPropertiesOutbound()
+ {
+ return CLIENT_ADDRESSING_PROPERTIES_OUTBOUND;
+ }
+
+ public String getNoneURI()
+ {
+ return implementation.getNoneURI();
+ }
+
+ public String getAnonymousURI()
+ {
+ return implementation.getAnonymousURI();
+ }
+
+ public String getServerAddressingPropertiesInbound()
+ {
+ return SERVER_ADDRESSING_PROPERTIES_INBOUND;
+ }
+
+ public String getServerAddressingPropertiesOutbound()
+ {
+ return SERVER_ADDRESSING_PROPERTIES_OUTBOUND;
+ }
+
+}
Property changes on:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPConstants.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPEndpoint.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPEndpoint.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPEndpoint.java 2009-05-27
09:53:36 UTC (rev 10119)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.extensions.addressing.map;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.ws.addressing.ReferenceParametersType;
+import org.jboss.wsf.common.addressing.MAPEndpoint;
+import org.w3c.dom.Element;
+
+/**
+ * MAPEndpoint is a wrapper which works with class MAP. This is the JBossWS CXF
implementation.
+ *
+ * @author Andrew Dinn - adinn(a)redhat.com
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2009
+ *
+ */
+public class CXFMAPEndpoint implements MAPEndpoint
+{
+ private EndpointReferenceType implementation;
+
+ CXFMAPEndpoint(EndpointReferenceType implementation)
+ {
+ this.implementation = implementation;
+ }
+
+ public String getAddress()
+ {
+ return implementation.getAddress().getValue();
+ }
+
+ public void addReferenceParameter(Element element)
+ {
+ ReferenceParametersType refParams = implementation.getReferenceParameters();
+ if (refParams == null)
+ {
+ refParams = new ReferenceParametersType();
+ implementation.setReferenceParameters(refParams);
+ }
+ refParams.getAny().add(element);
+ }
+
+ EndpointReferenceType getImplementation()
+ {
+ return implementation;
+ }
+
+ public List<Object> getReferenceParameters()
+ {
+ List<Object> list = new LinkedList<Object>();
+ ReferenceParametersType refParams = implementation.getReferenceParameters();
+ if (refParams != null)
+ {
+ List<Object> any = refParams.getAny();
+ if (any != null)
+ {
+ list.addAll(any);
+ }
+ }
+ return list;
+ }
+
+}
Property changes on:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPRelatesTo.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPRelatesTo.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPRelatesTo.java 2009-05-27
09:53:36 UTC (rev 10119)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.extensions.addressing.map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.wsf.common.addressing.MAPRelatesTo;
+
+/**
+ * MAPRelationship is a wrapper class which works with class MAP. This is the JBossWS CXF
implementation.
+ *
+ * @author Andrew Dinn - adinn(a)redhat.com
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2009
+ *
+ */
+public class CXFMAPRelatesTo implements MAPRelatesTo
+{
+ private String relatesTo;
+ private QName type;
+
+ CXFMAPRelatesTo(String relatesTo, QName type)
+ {
+ this.relatesTo = relatesTo;
+ this.type = type;
+ }
+
+ public String getRelatesTo()
+ {
+ return relatesTo;
+ }
+
+ public QName getType()
+ {
+ return type;
+ }
+
+ public void setType(QName type)
+ {
+ this.type = type;
+ }
+
+}
Property changes on:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPRelatesTo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.common.addressing.MAPBuilderFactory
===================================================================
---
stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.common.addressing.MAPBuilderFactory
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.common.addressing.MAPBuilderFactory 2009-05-27
09:53:36 UTC (rev 10119)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.cxf.extensions.addressing.map.CXFMAPBuilderFactory
\ No newline at end of file
Added:
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/org.jboss.wsf.common.addressing.MAPBuilderFactory
===================================================================
---
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/org.jboss.wsf.common.addressing.MAPBuilderFactory
(rev 0)
+++
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/org.jboss.wsf.common.addressing.MAPBuilderFactory 2009-05-27
09:53:36 UTC (rev 10119)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.cxf.extensions.addressing.map.CXFMAPBuilderFactory
\ No newline at end of file