Author: thomas.diesler(a)jboss.com
Date: 2008-02-27 15:00:50 -0500 (Wed, 27 Feb 2008)
New Revision: 5827
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/epr/EndpointReferenceTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/epr/TestEndpointImpl.java
Log:
[JBWS-1844] Implement Provider.createW3CEndpointReference
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2008-02-27
17:06:32 UTC (rev 5826)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2008-02-27
20:00:50 UTC (rev 5827)
@@ -285,7 +285,7 @@
SOAPElement wsaRelatesTo = soapHeader.addChildElement(new
NameImpl(ADDR.getRelatesToQName()));
if (rel.getType() != null)
{
- wsaRelatesTo.setAttribute(ADDR.getRelationshipTypeName(),
getPrefixedName(rel.getType()));
+ wsaRelatesTo.setAttribute(ADDR.getRelationshipTypeName(),
getQualifiedName(rel.getType()));
}
wsaRelatesTo.addTextNode(rel.getID().toString());
}
@@ -298,7 +298,7 @@
for (Object obj : refParams.getElements())
{
SOAPElement refElement = appendElement(soapHeader, obj);
- QName refQName = new QName(getNamespaceURI(),
"IsReferenceParameter");
+ QName refQName = new QName(ADDR.getNamespaceURI(),
"IsReferenceParameter", ADDR.getNamespacePrefix());
refElement.addAttribute(refQName, "true");
}
}
@@ -337,7 +337,7 @@
{
for (QName qname : attributes.keySet())
{
- String qualname = getPrefixedName(qname);
+ String qualname = getQualifiedName(qname);
String value = attributes.get(qname);
soapElement.setAttribute(qualname, value);
}
@@ -395,7 +395,7 @@
}
}
- private String getPrefixedName(QName qname)
+ private String getQualifiedName(QName qname)
{
String prefix = qname.getPrefix();
String localPart = qname.getLocalPart();
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/epr/EndpointReferenceTestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/epr/EndpointReferenceTestCase.java 2008-02-27
17:06:32 UTC (rev 5826)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/epr/EndpointReferenceTestCase.java 2008-02-27
20:00:50 UTC (rev 5827)
@@ -79,6 +79,6 @@
TestEndpoint port = service.getPort(epr, TestEndpoint.class);
((StubExt)port).setConfigName("Standard WSAddressing Client");
String retStr = port.echo("hello");
- assertEquals("hello", retStr);
+ assertEquals("hello|123456789|ABCDEFG", retStr);
}
}
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/epr/TestEndpointImpl.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/epr/TestEndpointImpl.java 2008-02-27
17:06:32 UTC (rev 5826)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/epr/TestEndpointImpl.java 2008-02-27
20:00:50 UTC (rev 5827)
@@ -30,6 +30,7 @@
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.addressing.JAXWSAConstants;
@@ -70,7 +71,7 @@
ReferenceParameters refParams = addrProps.getReferenceParameters();
for (Object refParam : refParams.getElements())
{
- input += "|" + ((Element)refParam).getNodeValue();
+ input += "|" + ((SOAPElement)refParam).getValue();
}
}
catch (Exception ex)
Show replies by date