diff org/jboss/ws/extensions/addressing/AddressingClientUtil.java /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingClientUtil.java 0a1,21 > /* > * 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. > */ 12c33 < import org.jboss.ws.core.utils.UUIDGenerator; --- > import org.jboss.wsf.common.utils.UUIDGenerator; diff org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java 29c27,28 < import org.jboss.ws.extensions.addressing.util.NotImplementedException; --- > import org.jboss.util.NotImplementedException; > import org.jboss.ws.Constants; 41,42d39 < static final String NS_WSDL11 = "http://schemas.xmlsoap.org/wsdl/"; < static final String PREFIX_WSDL = "wsdl"; 56c53 < return NS_WSDL11; --- > return Constants.NS_WSDL11; 61c58 < return PREFIX_WSDL; --- > return Constants.PREFIX_WSDL; 149c146 < public String getIsReferenceParameterName() throws Exception --- > public String getIsReferenceParameterName() diff org/jboss/ws/extensions/addressing/EndpointReferenceImpl.java /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/EndpointReferenceImpl.java 42c40 < import org.jboss.ws.extensions.addressing.util.WSException; --- > import org.jboss.ws.WSException; 44,45c42,43 < import org.jboss.ws.extensions.addressing.util.DOMUtils; < import org.jboss.ws.extensions.addressing.util.DOMWriter; --- > import org.jboss.wsf.common.DOMUtils; > import org.jboss.wsf.common.DOMWriter; Only in /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing: jaxrpc Common subdirectories: org/jboss/ws/extensions/addressing/jaxws and /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws Common subdirectories: org/jboss/ws/extensions/addressing/metadata and /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata Common subdirectories: org/jboss/ws/extensions/addressing/soap and /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap Common subdirectories: org/jboss/ws/extensions/addressing/.svn and /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/.svn Only in org/jboss/ws/extensions/addressing: util Common subdirectories: org/jboss/ws/extensions/addressing/jaxws/.svn and /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/.svn diff org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 23a24 > import org.jboss.logging.Logger; 25a27,29 > import org.jboss.ws.metadata.umdm.OperationMetaData; > import org.jboss.ws.core.CommonMessageContext; > import org.jboss.wsf.common.handler.GenericSOAPHandler; 37d40 < import javax.xml.ws.handler.soap.SOAPHandler; 39,40c42,43 < import java.io.OutputStream; < import java.io.StringWriter; --- > > import java.net.URISyntaxException; 44,45d46 < import java.util.logging.Level; < import java.util.logging.Logger; 55c56 < public class WSAddressingClientHandler implements SOAPHandler --- > public class WSAddressingClientHandler extends GenericSOAPHandler 58c59 < private static Logger log = Logger.getLogger(WSAddressingClientHandler.class.getCanonicalName()); --- > private static Logger log = Logger.getLogger(WSAddressingClientHandler.class); 78,97c79 < public boolean handleMessage(SOAPMessageContext msgContext) < { < Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); < if (outbound == null || !outbound) { < return handleInbound(msgContext); < } else { < return handleOutbound(msgContext); < } < } < < public boolean handleFault(SOAPMessageContext msgContext) < { < return true; < } < < public void close(MessageContext context) < { < } < < protected boolean handleOutbound(SOAPMessageContext msgContext) --- > protected boolean handleOutbound(MessageContext msgContext) 99c81 < // log.log(Level.INFO, "handleOutbound"); --- > log.debug("handleOutbound"); 101,120c83,113 < SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND); < if (addrProps != null) < { < SOAPMessage soapMessage = msgContext.getMessage(); < addrProps.writeHeaders(soapMessage); < < /* < try { < soapMessage.writeTo(System.out); < } catch (Exception e) { < } < */ < } < else < { < // supply default addressing properties < addrProps = (SOAPAddressingPropertiesImpl)ADDR_BUILDER.newAddressingProperties(); < msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addrProps); < msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION); < } --- > SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES); > if (addrProps != null) > { > msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addrProps); > msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION); > } > > addrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND); > if (addrProps == null) > { > // supply default addressing properties > addrProps = (SOAPAddressingPropertiesImpl)ADDR_BUILDER.newAddressingProperties(); > msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addrProps); > msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION); > } > > if (addrProps.getAction() == null) > { > try > { > OperationMetaData opMetaData = ((CommonMessageContext)msgContext).getOperationMetaData(); > addrProps.setAction(ADDR_BUILDER.newURI(opMetaData.getJavaName())); > } > catch (URISyntaxException ex) > { > // ignore > } > } > > SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); > addrProps.writeHeaders(soapMessage); 125c118 < protected boolean handleInbound(SOAPMessageContext msgContext) --- > protected boolean handleInbound(MessageContext msgContext) 127c120 < // log.log(Level.INFO, "handleInbound"); --- > log.debug("handleInbound"); 131c124 < SOAPMessage soapMessage = msgContext.getMessage(); --- > SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); 137,138c130,133 < msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps); < msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, Scope.APPLICATION); --- > msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProps); > msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, Scope.APPLICATION); > msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps); > msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, Scope.APPLICATION); 148d142 < diff org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 23a24,25 > import org.jboss.logging.Logger; > import org.jboss.ws.core.CommonMessageContext; 24a27,29 > import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt; > import org.jboss.ws.metadata.umdm.OperationMetaData; > import org.jboss.wsf.common.handler.GenericSOAPHandler; 28d32 < import javax.xml.ws.BindingProvider; 30d33 < import javax.xml.ws.addressing.AttributedURI; 36d38 < import javax.xml.ws.handler.soap.SOAPHandler; 37a40 > import java.net.URISyntaxException; 41,42d43 < import java.util.logging.Level; < import java.util.logging.Logger; 52c53 < public class WSAddressingServerHandler implements SOAPHandler --- > public class WSAddressingServerHandler extends GenericSOAPHandler 55c56 < private static Logger log = Logger.getLogger(WSAddressingServerHandler.class.getCanonicalName()); --- > private static Logger log = Logger.getLogger(WSAddressingServerHandler.class); 75,89c76 < public boolean handleMessage(SOAPMessageContext msgContext) < { < Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); < if (outbound == null || !outbound) { < return handleInbound(msgContext); < } else { < return handleOutbound(msgContext); < } < } < < public void close(MessageContext context) < { < } < < protected boolean handleInbound(SOAPMessageContext msgContext) --- > protected boolean handleInbound(MessageContext msgContext) 91c78 < // log.log(Level.INFO, "handleInbound"); --- > if(log.isDebugEnabled()) log.debug("handleInbound"); 94c81 < SOAPMessage soapMessage = msgContext.getMessage(); --- > SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); 98,105c85,86 < // use any supplied action as the value for the context's soap action property < // TODO do we realy need to do this? < AttributedURI action = addrProps.getAction(); < if (action != null) { < msgContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, new Boolean("true")); < msgContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, action.getURI().toString()); < } < return true; --- > > return true; 108c89 < protected boolean handleOutbound(SOAPMessageContext msgContext) --- > protected boolean handleOutbound(MessageContext msgContext) 110c91 < // log.log(Level.INFO, "handleOutbound"); --- > if(log.isDebugEnabled()) log.debug("handleOutbound"); 119c100 < public boolean handleFault(SOAPMessageContext msgContext) --- > public boolean handleFault(MessageContext msgContext) 121c102 < // log.log(Level.INFO, "handleFault"); --- > if(log.isDebugEnabled()) log.debug("handleFault"); 126c107 < private void handleResponseOrFault(SOAPMessageContext msgContext, boolean isFault) --- > private void handleResponseOrFault(MessageContext msgContext, boolean isFault) 129c110 < SOAPMessage soapMessage = msgContext.getMessage(); --- > SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); 144,151d124 < /* < try { < soapMessage.writeTo(System.out); < } catch (Exception e) { < } < */ < /* < * cannot do this bit but we don't care 157d129 < msgContext. 159c131 < if (!isFault && !opMetaData.isOneWay()) --- > if (!isFault && !opMetaData.isOneWay()) 183d154 < */ 185,186c156 < // don't need to do this < // outProps.writeHeaders(soapMessage); --- > outProps.writeHeaders(soapMessage); diff org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java 2,5c2,5 < * JBoss, Home of Professional Open Source < * Copyright 2005, JBoss Inc., and individual contributors as indicated < * by the @authors tag. See the copyright.txt in the distribution for a < * full listing of individual contributors. --- > * 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. 24,26c24 < // $Id: AddressingOpMetaExt.java 1757 2006-12-22 15:40:24Z thomas.diesler@jboss.com $ < < import org.jboss.ws.extensions.addressing.util.MetaDataExtension; --- > import org.jboss.ws.metadata.umdm.MetaDataExtension; Common subdirectories: org/jboss/ws/extensions/addressing/metadata/.svn and /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/.svn diff org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 24,36d23 < //$Id: SOAPAddressingPropertiesImpl.java 3959 2007-07-20 14:44:19Z heiko.braun@jboss.com $ < < import javax.xml.soap.*; < import org.jboss.ws.extensions.addressing.AddressingConstantsImpl; < import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl; < import org.jboss.ws.extensions.addressing.EndpointReferenceImpl; < import org.jboss.ws.extensions.addressing.util.DOMUtils; < import org.w3c.dom.Element; < < import javax.xml.namespace.QName; < import javax.xml.ws.addressing.*; < import javax.xml.ws.addressing.soap.SOAPAddressingBuilder; < import javax.xml.ws.addressing.soap.SOAPAddressingProperties; 44a32,57 > import javax.xml.namespace.QName; > import javax.xml.soap.SOAPElement; > import javax.xml.soap.SOAPException; > import javax.xml.soap.SOAPFactory; > import javax.xml.soap.SOAPHeader; > import javax.xml.soap.SOAPHeaderElement; > import javax.xml.soap.SOAPMessage; > import javax.xml.ws.addressing.AddressingConstants; > import javax.xml.ws.addressing.AddressingException; > import javax.xml.ws.addressing.AttributedURI; > import javax.xml.ws.addressing.ReferenceParameters; > import javax.xml.ws.addressing.Relationship; > import javax.xml.ws.addressing.soap.SOAPAddressingBuilder; > import javax.xml.ws.addressing.soap.SOAPAddressingProperties; > > import org.jboss.ws.core.soap.NameImpl; > import org.jboss.ws.core.soap.SOAPFactoryImpl; > import org.jboss.ws.extensions.addressing.AddressingConstantsImpl; > import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl; > import org.jboss.ws.extensions.addressing.EndpointReferenceImpl; > import org.jboss.wsf.common.DOMUtils; > import org.jboss.xb.binding.NamespaceRegistry; > import org.w3c.dom.Attr; > import org.w3c.dom.Element; > import org.w3c.dom.NamedNodeMap; > 58a72 > private NamespaceRegistry nsRegistry = new NamespaceRegistry(); 91a106 > registerNamespaces(ADDR, soapHeader); 182a198,217 > private void registerNamespaces(AddressingConstants ADDR, SOAPHeader soapHeader) > { > // Register wsa namespace > nsRegistry.registerURI(ADDR.getNamespaceURI(), ADDR.getNamespacePrefix()); > > // Register namespaces > NamedNodeMap attribs = soapHeader.getAttributes(); > for (int i = 0; i < attribs.getLength(); i++) > { > Attr attr = (Attr)attribs.item(i); > String attrName = attr.getName(); > String attrValue = attr.getValue(); > if (attrName.startsWith("xmlns:")) > { > String prefix = attrName.substring(6); > nsRegistry.registerURI(attrValue, prefix); > } > } > } > 187,194c222,225 < SOAPFactory factory = (SOAPFactory)SOAPFactory.newInstance(); < SOAPHeader soapHeader = message.getSOAPHeader(); < < if (soapHeader == null) { < soapHeader = message.getSOAPPart().getEnvelope().addHeader(); < } < < // Add the xmlns:wsa declaration --- > SOAPFactoryImpl factory = (SOAPFactoryImpl)SOAPFactory.newInstance(); > SOAPHeader soapHeader = message.getSOAPHeader(); > > // Add the xmlns:wsa declaration 196,199c227,228 < < Iterator iter; < < // Write wsa:To --- > > // Write wsa:To 202,214c231,233 < // To header may already be present -- ensure it is the same < iter = soapHeader.getChildElements(ADDR.getToQName()); < if (iter.hasNext()) { < String toAddress = getTo().getURI().toString(); < SOAPElement element =(SOAPElement)iter.next(); < if (!element.getTextContent().equals(toAddress)) { < throw new AddressingException("Invalid To: header in addressing properties : " + toAddress); < } < } else { < SOAPElement element = soapHeader.addChildElement(ADDR.getToQName()); < element.addTextNode(getTo().getURI().toString()); < } < } --- > SOAPElement element = soapHeader.addChildElement(new NameImpl(ADDR.getToQName())); > element.addTextNode(getTo().getURI().toString()); > } 219,234c238,243 < // From header may already be present -- ensure it is the same < iter = soapHeader.getChildElements(ADDR.getFromQName()); < if (iter.hasNext()) { < String fromAddress = getFrom().getAddress().getURI().toString(); < SOAPElement element =(SOAPElement)iter.next(); < if (!element.getTextContent().equals(fromAddress)) { < throw new AddressingException("Invalid From: header in addressing properties : " + fromAddress); < } < } else { < EndpointReferenceImpl epr = (EndpointReferenceImpl)getFrom(); < epr.setRootQName(ADDR.getFromQName()); < SOAPElement soapElement = factory.createElement(epr.toElement()); < soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix()); < soapHeader.addChildElement(soapElement); < } < } --- > EndpointReferenceImpl epr = (EndpointReferenceImpl)getFrom(); > epr.setRootQName(ADDR.getFromQName()); > SOAPElement soapElement = factory.createElement(epr.toElement()); > soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix()); > soapHeader.addChildElement(soapElement); > } 236c245 < // Write wsa:ReplyTo --- > // Write wsa:ReplyTo 239,254c248,253 < // ReplyTo header may already be present -- ensure it is the same < iter = soapHeader.getChildElements(ADDR.getReplyToQName()); < if (iter.hasNext()) { < String replyToAddress = getReplyTo().getAddress().getURI().toString(); < SOAPElement element =(SOAPElement)iter.next(); < if (!element.getTextContent().equals(replyToAddress)) { < throw new AddressingException("Invalid ReplyTo: header in addressing properties : " + replyToAddress); < } < } else { < EndpointReferenceImpl epr = (EndpointReferenceImpl)getReplyTo(); < epr.setRootQName(ADDR.getReplyToQName()); < SOAPElement soapElement = factory.createElement(epr.toElement()); < soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix()); < soapHeader.addChildElement(soapElement); < } < } --- > EndpointReferenceImpl epr = (EndpointReferenceImpl)getReplyTo(); > epr.setRootQName(ADDR.getReplyToQName()); > SOAPElement soapElement = factory.createElement(epr.toElement()); > soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix()); > soapHeader.addChildElement(soapElement); > } 256c255 < // Write wsa:FaultTo --- > // Write wsa:FaultTo 259,286c258,263 < // FaultTo header may already be present -- ensure it is the same < iter = soapHeader.getChildElements(ADDR.getFaultToQName()); < if (iter.hasNext()) { < String faultToAddress = getReplyTo().getAddress().getURI().toString(); < SOAPElement element =(SOAPElement)iter.next(); < if (!element.getTextContent().equals(faultToAddress)) { < throw new AddressingException("Invalid FaultTo: header in addressing properties : " + faultToAddress); < } < } else { < EndpointReferenceImpl epr = (EndpointReferenceImpl)getFaultTo(); < epr.setRootQName(ADDR.getFaultToQName()); < SOAPElement soapElement = factory.createElement(epr.toElement()); < soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix()); < soapHeader.addChildElement(soapElement); < } < } < < // Action header may already be present -- ensure it is the same < iter = soapHeader.getChildElements(ADDR.getActionQName()); < if (iter.hasNext()) { < String action = getAction().getURI().toString(); < SOAPElement element =(SOAPElement)iter.next(); < if (!element.getTextContent().equals(action)) { < throw new AddressingException("Invalid Action: header in addressing properties : " + action); < } < } else { < appendRequiredHeader(soapHeader, ADDR.getActionQName(), getAction()); < } --- > EndpointReferenceImpl epr = (EndpointReferenceImpl)getFaultTo(); > epr.setRootQName(ADDR.getFaultToQName()); > SOAPElement soapElement = factory.createElement(epr.toElement()); > soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix()); > soapHeader.addChildElement(soapElement); > } 288c265,267 < // Write wsa:MessageID --- > appendRequiredHeader(soapHeader, ADDR.getActionQName(), getAction()); > > // Write wsa:MessageID 295,303c274 < // messageID header may already be present -- if so override it using the one supplied in the < // addressing properties -- we need to be able to wait on the reply using our rather than the < // one supplied by the Glassfish WS Addressing code < iter = soapHeader.getChildElements(ADDR.getMessageIDQName()); < if (iter.hasNext()) { < SOAPElement element =(SOAPElement)iter.next(); < soapHeader.removeChild(element); < } < SOAPElement wsaMessageId = soapHeader.addChildElement(ADDR.getMessageIDQName()); --- > SOAPElement wsaMessageId = soapHeader.addChildElement(new NameImpl(ADDR.getMessageIDQName())); 310,343c281,290 < // relatesTo header may already be present -- if so only add relationships which are not already present < for (Relationship rel : getRelatesTo()) < { < boolean present = false; < String idString = rel.getID().toString(); < QName type = rel.getType(); < String typeName = (type == null ? "" : getQualifedName(type)); < < iter = soapHeader.getChildElements(ADDR.getRelatesToQName()); < while (!present && iter.hasNext()) { < SOAPElement wsaRelatesTo = (SOAPElement)iter.next(); < // are the relationship types are both the same < String typeName2 = wsaRelatesTo.getAttribute(ADDR.getRelationshipTypeName()); < if (typeName.equals(typeName2)) { < // are the relationsip text values the same < String idString2 = wsaRelatesTo.getTextContent(); < if (idString.equals(idString2)) { < present = true; < } else { < // duplicated type qwith different value! < throw new AddressingException("Invalid RelatesTo:" + typeName + " header in addressing properties : " + idString); < } < } < } < if (!present) { < SOAPElement wsaRelatesTo = soapHeader.addChildElement(ADDR.getRelatesToQName()); < if (type != null) < { < wsaRelatesTo.setAttribute(ADDR.getRelationshipTypeName(), getQualifedName(rel.getType())); < } < wsaRelatesTo.addTextNode(idString); < } < } < } --- > for (Relationship rel : getRelatesTo()) > { > SOAPElement wsaRelatesTo = soapHeader.addChildElement(new NameImpl(ADDR.getRelatesToQName())); > if (rel.getType() != null) > { > wsaRelatesTo.setAttribute(ADDR.getRelationshipTypeName(), getQualifiedName(rel.getType())); > } > wsaRelatesTo.addTextNode(rel.getID().toString()); > } > } 346,351c293,294 < < // hmm, we probably need to worry about duplicates here from client code but we are not using this < // for the XTS code so ignore it for now < < ReferenceParameters refParams = getReferenceParameters(); < if (refParams.getElements().size() > 0 || refParams.getAttributes().size() > 0) --- > ReferenceParameters refParams = getReferenceParameters(); > if (refParams.getElements().size() > 0) 353,355c296,301 < SOAPElement wsaRefParams = soapHeader.addChildElement(ADDR.getReferenceParametersQName()); < appendAttributes(wsaRefParams, refParams.getAttributes()); < appendElements(wsaRefParams, refParams.getElements()); --- > for (Object obj : refParams.getElements()) > { > SOAPElement refElement = appendElement(soapHeader, obj); > QName refQName = new QName(ADDR.getNamespaceURI(), "IsReferenceParameter", ADDR.getNamespacePrefix()); > refElement.addAttribute(refQName, "true"); > } 371c317 < SOAPElement element = soapHeader.addChildElement(name); --- > SOAPElement element = soapHeader.addChildElement(new NameImpl(name)); 392c338 < String qualname = getQualifedName(qname); --- > String qualname = getQualifiedName(qname); 402d347 < SOAPFactory factory = (SOAPFactory)SOAPFactory.newInstance(); 405,419c350 < if (obj instanceof Element) < { < SOAPElement child = factory.createElement((Element)obj); < soapElement.addChildElement(child); < } < else if (obj instanceof String) < { < Element el = DOMUtils.parse((String)obj); < SOAPElement child = factory.createElement(el); < soapElement.addChildElement(child); < } < else < { < throw new AddressingException("Unsupported element: " + obj.getClass().getName()); < } --- > appendElement(soapElement, obj); 432c363,396 < private String getQualifedName(QName qname) --- > private SOAPElement appendElement(SOAPElement soapElement, Object obj) > { > SOAPElement child = null; > try > { > SOAPFactoryImpl factory = (SOAPFactoryImpl)SOAPFactory.newInstance(); > if (obj instanceof Element) > { > child = factory.createElement((Element)obj); > soapElement.addChildElement(child); > } > else if (obj instanceof String) > { > Element el = DOMUtils.parse((String)obj); > child = factory.createElement(el); > soapElement.addChildElement(child); > } > else > { > throw new AddressingException("Unsupported element: " + obj.getClass().getName()); > } > return child; > } > catch (RuntimeException rte) > { > throw rte; > } > catch (Exception ex) > { > throw new AddressingException("Cannot append elements", ex); > } > } > > private String getQualifiedName(QName qname) Common subdirectories: org/jboss/ws/extensions/addressing/soap/.svn and /dati/jbossws/stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/.svn