Author: darran.lofthouse(a)jboss.com
Date: 2007-05-15 08:42:40 -0400 (Tue, 15 May 2007)
New Revision: 3098
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestCaseBase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml
Modified:
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
branches/dlofthouse/JBWS-1647/jbossws-tests/ant-import/build-jars-jaxrpc.xml
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPHeaderElementTestCase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPHeaderTestCase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws707/JBWS707TestCase.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/provider/ProviderJAXBTestCase.java
Log:
Comment preservation for message marshalling.
Modified:
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -67,6 +67,7 @@
import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.core.soap.SOAPHeaderElementImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.soap.TextImpl;
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.soap.attachment.AttachmentPartImpl;
import org.jboss.ws.core.soap.attachment.CIDGenerator;
@@ -229,10 +230,10 @@
log.debug("Add unboundHeader element: " + soapName);
SOAPContentElement contentElement = new
SOAPHeaderElementImpl(soapName);
contentElement.setParamMetaData(unboundHeader.toParameterMetaData(opMetaData));
-
+
if (soapHeader == null)
soapHeader = soapEnvelope.addHeader();
-
+
soapHeader.addChildElement(contentElement);
contentElement.setObjectValue(value);
}
@@ -291,7 +292,18 @@
SOAPElement soapBodyElement = soapBody;
if (style == Style.RPC)
{
- soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+ soapBodyElement = null;
+
+ Iterator it = soapBody.getChildElements();
+ while (soapBodyElement == null && it.hasNext())
+ {
+ Object current = it.next();
+ if (current instanceof SOAPElement)
+ {
+ soapBodyElement = (SOAPElement)current;
+ }
+ }
+
Name elName = soapBodyElement.getElementName();
QName elQName = new QName(elName.getURI(), elName.getLocalName(),
elName.getPrefix());
@@ -537,8 +549,14 @@
Iterator bodyChildren = soapBody.getChildElements();
SOAPBodyElement soapBodyElement = null;
- if (bodyChildren.hasNext() != false)
- soapBodyElement = (SOAPBodyElement)bodyChildren.next();
+ while (bodyChildren.hasNext() && soapBodyElement == null)
+ {
+ Object next = bodyChildren.next();
+ if (next instanceof SOAPBodyElement)
+ {
+ soapBodyElement = (SOAPBodyElement)next;
+ }
+ }
// Translate the SOAPFault to an exception and throw it
if (soapBodyElement instanceof SOAPFaultImpl)
@@ -804,8 +822,14 @@
Iterator childElements = soapElement.getChildElements();
while (childElements.hasNext())
{
- SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();
+ Object child = childElements.next();
+ if (child instanceof TextImpl)
+ {
+ continue;
+ }
+ SOAPElementImpl childElement = (SOAPElementImpl)child;
+
// If this message was manipulated by a handler the child may not be a content
element
if (!(childElement instanceof SOAPContentElement))
childElement = (SOAPContentElement)soapElement.replaceChild(new
SOAPContentElement(childElement), childElement);
Modified:
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -23,10 +23,12 @@
// $Id$
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.Source;
import javax.xml.ws.handler.Handler;
@@ -93,7 +95,18 @@
SOAPMessage reqMessage = (SOAPMessage)payload;
SOAPBodyImpl body = (SOAPBodyImpl)reqMessage.getSOAPBody();
- SOAPContentElement bodyElement = (SOAPContentElement)body.getFirstChild();
+
+ SOAPContentElement bodyElement = null;
+ Iterator bodyChildren = body.getChildElements();
+ while (bodyChildren.hasNext() && bodyElement == null)
+ {
+ Object next = bodyChildren.next();
+ if (next instanceof SOAPContentElement)
+ {
+ bodyElement = (SOAPContentElement)next;
+ }
+ }
+
Source source = bodyElement.getXMLFragment().getSource();
if (source == null)
Modified:
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -27,6 +27,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.HashMap;
+import java.util.Iterator;
import javax.activation.DataHandler;
import javax.management.MBeanException;
@@ -344,9 +345,21 @@
{
String faultString;
SOAPBody soapBody = soapMessage.getSOAPBody();
- if (soapBody.getChildElements().hasNext())
+
+ Iterator bodyChildren = soapBody.getChildElements();
+ SOAPBodyElement soapBodyElement = null;
+
+ while (bodyChildren.hasNext() && soapBodyElement == null)
{
- SOAPBodyElement soapBodyElement =
(SOAPBodyElement)soapBody.getChildElements().next();
+ Object next = bodyChildren.next();
+ if (next instanceof SOAPBodyElement)
+ {
+ soapBodyElement = (SOAPBodyElement)next;
+ }
+ }
+
+ if (soapBodyElement != null)
+ {
Name soapName = soapBodyElement.getElementName();
faultString = "Endpoint " + epMetaData.getPortName() + "
does not contain operation meta data for: " + soapName;
}
Modified:
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -63,14 +63,28 @@
String bodyStr = DOMWriter.printNode(soapBody, true);
log.debug("Begin processHRefs:\n" + bodyStr);
- SOAPBodyElement bodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+ SOAPBodyElement bodyElement = null;
+ Iterator children = soapBody.getChildElements();
+ while (bodyElement == null && children.hasNext())
+ {
+ Object currentChild = children.next();
+ if (currentChild instanceof SOAPBodyElement)
+ {
+ bodyElement = (SOAPBodyElement)currentChild;
+ }
+ }
+
processElement(bodyElement);
-
+
Iterator it = soapBody.getChildElements();
while (it.hasNext())
{
+ Object currentChild = it.next();
+ if (currentChild instanceof TextImpl)
+ continue;
+
// Remove id elements
- SOAPElement soapElement = (SOAPElement)it.next();
+ SOAPElement soapElement = (SOAPElement)currentChild;
if ((soapElement instanceof SOAPBodyElement) == false)
soapBody.removeChild(soapElement);
}
Modified:
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -143,7 +143,7 @@
}
public SOAPElement setElementQNameInternal(QName qname) throws SOAPException
- {
+ {
elementName = new NameImpl(qname);
Document owner = domNode.getOwnerDocument();
@@ -153,7 +153,6 @@
return this.completeNamespaceDeclaration();
}
-
/**
* Adds an attribute with the specified name and value to this SOAPElement object.
*
@@ -465,9 +464,7 @@
}
else if (node instanceof Text)
{
- String value = node.getNodeValue();
- if (value.trim().length() > 0)
- list.add(node);
+ list.add(node);
}
}
return list.iterator();
@@ -835,7 +832,14 @@
}
else if (node instanceof TextImpl)
{
+ boolean comment = node.getNodeType() == Node.COMMENT_NODE;
+ if (comment)
+ out.write("<!--");
+
out.write(node.getValue());
+
+ if (comment)
+ out.write("-->");
}
else
{
Modified:
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -58,7 +58,7 @@
/** Add a SOAPHeaderElement as a child of this SOAPHeader instance.
*/
public SOAPElement addChildElement(SOAPElement child) throws SOAPException
- {
+ {
QName qname = child.getElementQName();
if (qname == null || qname.getNamespaceURI().length() == 0)
throw new SOAPException("Invalid SOAPHeaderElement name: " + qname);
@@ -111,8 +111,12 @@
Iterator it = getChildElements();
while (it.hasNext())
{
- SOAPHeaderElement shElement = (SOAPHeaderElement)it.next();
- list.add(shElement);
+ Object currentChild = it.next();
+ if (currentChild instanceof SOAPHeaderElement)
+ {
+ SOAPHeaderElement shElement = (SOAPHeaderElement)currentChild;
+ list.add(shElement);
+ }
}
return list.iterator();
}
@@ -129,9 +133,13 @@
Iterator it = getChildElements();
while (it.hasNext())
{
- SOAPHeaderElement shElement = (SOAPHeaderElement)it.next();
- if (actor.equals(shElement.getActor()))
- list.add(shElement);
+ Object currentChild = it.next();
+ if (currentChild instanceof SOAPHeaderElement)
+ {
+ SOAPHeaderElement shElement = (SOAPHeaderElement)currentChild;
+ if (actor.equals(shElement.getActor()))
+ list.add(shElement);
+ }
}
return list.iterator();
}
@@ -149,9 +157,13 @@
Iterator it = getChildElements();
while (it.hasNext())
{
- SOAPHeaderElement shElement = (SOAPHeaderElement)it.next();
- if (actor.equals(shElement.getActor()) &&
shElement.getMustUnderstand())
- list.add(shElement);
+ Object currentChild = it.next();
+ if (currentChild instanceof SOAPHeaderElement)
+ {
+ SOAPHeaderElement shElement = (SOAPHeaderElement)currentChild;
+ if (actor.equals(shElement.getActor()) &&
shElement.getMustUnderstand())
+ list.add(shElement);
+ }
}
return list.iterator();
}
@@ -163,9 +175,13 @@
Iterator it = getChildElements();
while (it.hasNext())
{
- SOAPHeaderElement shElement = (SOAPHeaderElement)it.next();
- removeChild(shElement);
- list.add(shElement);
+ Object currentChild = it.next();
+ if (currentChild instanceof SOAPHeaderElement)
+ {
+ SOAPHeaderElement shElement = (SOAPHeaderElement)currentChild;
+ removeChild(shElement);
+ list.add(shElement);
+ }
}
return list.iterator();
}
@@ -180,11 +196,15 @@
Iterator it = getChildElements();
while (it.hasNext())
{
- SOAPHeaderElement shElement = (SOAPHeaderElement)it.next();
- if (actor.equals(shElement.getActor()))
+ Object currentChild = it.next();
+ if (currentChild instanceof SOAPHeaderElement)
{
- removeChild(shElement);
- list.add(shElement);
+ SOAPHeaderElement shElement = (SOAPHeaderElement)currentChild;
+ if (actor.equals(shElement.getActor()))
+ {
+ removeChild(shElement);
+ list.add(shElement);
+ }
}
}
return list.iterator();
Modified:
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -68,7 +68,8 @@
if (wsaAction.equals(opAux.getSOAPAction()))
{
opMetaData = opAux;
- if(log.isDebugEnabled()) log.debug("Use wsa:Action dispatch: " +
wsaAction);
+ if (log.isDebugEnabled())
+ log.debug("Use wsa:Action dispatch: " + wsaAction);
break;
}
}
@@ -87,8 +88,19 @@
SOAPBody soapBody = soapMessage.getSOAPBody();
Iterator bodyChildren = soapBody.getChildElements();
- if (bodyChildren.hasNext() == false)
+ SOAPBodyElement soapBodyElement = null;
+
+ while (bodyChildren.hasNext() && soapBodyElement == null)
{
+ Object next = bodyChildren.next();
+ if (next instanceof SOAPBodyElement)
+ {
+ soapBodyElement = (SOAPBodyElement)next;
+ }
+ }
+
+ if (soapBodyElement == null)
+ {
if (epMetaData.getStyle() == Style.RPC)
throw new SOAPException("Empty SOAP body with no child element not
supported for RPC");
@@ -97,7 +109,8 @@
{
if (opAux.getParameters().size() == 0)
{
- if(log.isDebugEnabled()) log.debug ("Dispatching empty SOAP
body");
+ if (log.isDebugEnabled())
+ log.debug("Dispatching empty SOAP body");
opMetaData = opAux;
break;
}
@@ -105,7 +118,6 @@
}
else
{
- SOAPBodyElement soapBodyElement = (SOAPBodyElement)bodyChildren.next();
Name soapName = soapBodyElement.getElementName();
QName xmlElementName = new QName(soapName.getURI(),
soapName.getLocalName());
opMetaData = epMetaData.getOperation(xmlElementName);
@@ -119,14 +131,16 @@
{
if (opAux.isMessageEndpoint())
{
- if(log.isDebugEnabled()) log.debug("Use generic message style
dispatch");
+ if (log.isDebugEnabled())
+ log.debug("Use generic message style dispatch");
opMetaData = opAux;
break;
}
}
}
- if(log.isDebugEnabled()) log.debug("getDispatchDestination: " +
(opMetaData != null ? opMetaData.getQName() : null));
+ if (log.isDebugEnabled())
+ log.debug("getDispatchDestination: " + (opMetaData != null ?
opMetaData.getQName() : null));
return opMetaData;
}
}
\ No newline at end of file
Modified: branches/dlofthouse/JBWS-1647/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -2571,7 +2571,41 @@
<include name="wsdl/**"/>
</metainf>
</jar>
+
+ <!-- jbossws-jbws1647 RPC/Literal -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1647-rpclit.war"
+
webxml="${tests.output.dir}/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/resources/jaxrpc/jbws1647/rpclit/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <!-- jbossws-jbws1647 Document/Literal -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1647-doclit.war"
+
webxml="${tests.output.dir}/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/resources/jaxrpc/jbws1647/doclit/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+
<!-- jaxrpc-marshall-doclit.war -->
<war warfile="${tests.output.dir}/libs/jaxrpc-marshall-doclit.war"
webxml="${tests.output.dir}/resources/jaxrpc/marshall-doclit/WEB-INF/web.xml">
Modified:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -28,18 +28,19 @@
import java.io.IOException;
import javax.xml.soap.MessageFactory;
+import javax.xml.soap.Name;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
@@ -82,7 +83,9 @@
assertEquals("env:Envelope", env.getNodeName());
assertEquals(Constants.NS_SOAP11_ENV, env.getNamespaceURI());
- SOAPBodyElement soapBodyElement =
(SOAPBodyElement)env.getBody().getChildElements().next();
+ Name name = new NameImpl("businessList", null,
"urn:uddi-org:api_v2");
+ SOAPBodyElement soapBodyElement =
(SOAPBodyElement)env.getBody().getChildElements(name).next();
+
assertEquals("urn:uddi-org:api_v2", soapBodyElement.getNamespaceURI());
}
@@ -225,4 +228,38 @@
//System.out.println(wasXML);
assertEquals(expXML, wasXML);
}
-}
\ No newline at end of file
+
+ public void testWriteToPreserveFormatting() throws Exception
+ {
+ String expMessage =
+ "<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:typ='http://www.jboss.org/support/phonebook/types'>" +
+ " <soapenv:Header></soapenv:Header>" +
+ " <soapenv:Body>" +
+ " <!-- Comment One -->" +
+ " <typ:lookup
xmlns:typ='http://www.jboss.org/support/phonebook/types'>" +
+ " <!-- Comment Two -->" +
+ " <firstName>Joe</firstName>" +
+ " <surname>Bloggs</surname>" +
+ " <!-- Comment Three -->" +
+ " </typ:lookup>" +
+ " <!-- Comment Four -->" +
+ " </soapenv:Body>" +
+ "</soapenv:Envelope>";
+
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+ ByteArrayInputStream inputStream = new
ByteArrayInputStream(expMessage.getBytes());
+ SOAPMessage soapMsg = factory.createMessage(null, inputStream);
+
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ soapMsg.writeTo(outputStream);
+
+ String actualMessage = new String(outputStream.toByteArray(), "UTF-8");
+
+ //System.out.println("A - " + expMessage);
+ //System.out.println("B - " +
DOMWriter.printNode(soapMsg.getSOAPPart().getEnvelope(), false));
+ //System.out.println("C - " + actualMessage);
+
+ assertEquals(expMessage, actualMessage);
+ }
+
+}
Modified:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -33,6 +33,7 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
+import org.jboss.ws.core.soap.NameImpl;
/**
* Test the SOAPElement
@@ -114,8 +115,10 @@
SOAPMessage soapMessage = MessageFactory.newInstance().createMessage(null, new
ByteArrayInputStream(xml.getBytes()));
SOAPFactory soapFactory = SOAPFactory.newInstance();
- SOAPElement bearElement =
(SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
+ Name name = new NameImpl("bear", "np",
"http://northpole.net");
+ SOAPElement bearElement =
(SOAPElement)soapMessage.getSOAPBody().getChildElements(name).next();
+
assertEquals(2, getIteratorCount(bearElement.getAllAttributes()));
Iterator it = bearElement.getAllAttributes();
Modified:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -38,6 +38,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.utils.DOMUtils;
/**
@@ -76,7 +77,10 @@
MessageFactory factory = MessageFactory.newInstance();
SOAPMessage soapMessage = factory.createMessage(null, new
ByteArrayInputStream(envStr.getBytes()));
SOAPBody soapBody = soapMessage.getSOAPBody();
- SOAPFault soapFault = (SOAPFault)soapBody.getChildElements().next();
+
+ Name name = new NameImpl("Fault", "env",
"http://schemas.xmlsoap.org/soap/envelope/");
+ SOAPFault soapFault = (SOAPFault)soapBody.getChildElements(name).next();
+
assertEquals("env:Client", soapFault.getFaultCode());
assertEquals("Some fault message", soapFault.getFaultString());
assertEquals("Some fault actor", soapFault.getFaultActor());
Modified:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPHeaderElementTestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPHeaderElementTestCase.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPHeaderElementTestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -61,9 +61,10 @@
SOAPMessage soapMessage = factory.createMessage(null, new
ByteArrayInputStream(envStr.getBytes()));
SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
SOAPHeader soapHeader = soapEnv.getHeader();
- SOAPHeaderElement shElement =
(SOAPHeaderElement)soapHeader.getChildElements().next();
-
+
Name name = new NameImpl("Bar", "ns2",
"http://org.jboss.ws/header2");
+ SOAPHeaderElement shElement =
(SOAPHeaderElement)soapHeader.getChildElements(name).next();
+
assertEquals(name, shElement.getElementName());
assertEquals("BradPitt", shElement.getActor());
@@ -86,9 +87,10 @@
SOAPMessage soapMessage = factory.createMessage(null, new
ByteArrayInputStream(envStr.getBytes()));
SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
SOAPHeader soapHeader = soapEnv.getHeader();
- SOAPHeaderElement shElement =
(SOAPHeaderElement)soapHeader.getChildElements().next();
-
+
Name name = new NameImpl("Bar", "ns2",
"http://org.jboss.ws/header2");
+ SOAPHeaderElement shElement =
(SOAPHeaderElement)soapHeader.getChildElements(name).next();
+
assertEquals(name, shElement.getElementName());
assertTrue(shElement.getMustUnderstand());
Modified:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPHeaderTestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPHeaderTestCase.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPHeaderTestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -206,7 +206,7 @@
assertEquals("SomeHeaderValue", foo.getValue());
assertEquals("SomeOtherValue", bar.getValue());
- assertFalse(soapHeader.getChildElements().hasNext());
+ assertFalse(soapHeader.examineAllHeaderElements().hasNext());
}
public void testExtractHeaderElements() throws Exception
@@ -234,7 +234,7 @@
assertEquals("SomeOtherValue", bar.getValue());
- Iterator childElements = soapHeader.getChildElements();
+ Iterator childElements = soapHeader.examineAllHeaderElements();
SOAPHeaderElement foo = (SOAPHeaderElement)childElements.next();
Name fooName = new NameImpl("Foo", "ns1",
"http://org.jboss.ws/header");
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.
+ *
+ * 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.test.ws.jaxrpc.jbws1647;
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public abstract class AbstractHandler extends GenericHandler
+{
+
+ private static final Logger log = Logger.getLogger(AbstractHandler.class);
+
+ public abstract String getExpectedMessage();
+
+ public boolean handleRequest(MessageContext msgContext)
+ {
+ log.info("handleRequest");
+
+ boolean valid = false;
+
+ SOAPMessageContext messageContext = (SOAPMessageContext)msgContext;
+
+ SOAPMessage soapMessage = messageContext.getMessage();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ String receivedMessage = "";
+ try
+ {
+ soapMessage.writeTo(baos);
+ receivedMessage = baos.toString();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Unable to process SOAPMessage", e);
+ }
+
+ valid = getExpectedMessage().equals(receivedMessage);
+ if (valid == false)
+ {
+ log.error("Received message does not equal expected message.");
+ log.info("EXP - " + getExpectedMessage());
+ log.info("ACT - " + receivedMessage);
+
+ throw new RuntimeException("Received message does not equal expected
message.");
+ }
+
+ return valid;
+ }
+
+ public QName[] getHeaders()
+ {
+ return null;
+ }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.
+ *
+ * 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.test.ws.jaxrpc.jbws1647;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public class DocumentHandler extends AbstractHandler
+{
+
+ public static final String MESSAGE =
+ "<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:typ='http://org.jboss.test.ws/jbws1647/types'>" +
+ " <!-- Comment Before Header -->" +
+ " <soapenv:Header></soapenv:Header>" +
+ " <!-- Comment After Header, Before Body -->" +
+ " <soapenv:Body>" +
+ " <!-- Comment After Body -->" +
+ " <typ:echoMessage
xmlns:typ='http://org.jboss.test.ws/jbws1647/types'>" +
+ " <!-- Comment After Wrapper -->" +
+ " <String_1>My Message</String_1>" +
+ " <!-- Comment After Parameter -->" +
+ " </typ:echoMessage>" +
+ " <!-- Comment Before Close Body -->" +
+ " </soapenv:Body>" +
+ " <!-- Comment Before Close Envelope -->" +
+ "</soapenv:Envelope>";
+
+ public String getExpectedMessage()
+ {
+ return MESSAGE;
+ }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.
+ *
+ * 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.test.ws.jaxrpc.jbws1647;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public class JBWS1647DocumentTestCase extends TestCaseBase
+{
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1647DocumentTestCase.class,
"jaxrpc-jbws1647-doclit.war");
+ }
+
+ public String getMessage()
+ {
+ return DocumentHandler.MESSAGE;
+ }
+
+ public String getToUrl()
+ {
+ return "http://" + getServerHost() +
":8080/jaxrpc-jbws1647-doclit/TestEndpoint";
+ }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.
+ *
+ * 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.test.ws.jaxrpc.jbws1647;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 May 2007
+ */
+public class JBWS1647RPCTestCase extends TestCaseBase
+{
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1647RPCTestCase.class,
"jaxrpc-jbws1647-rpclit.war");
+ }
+
+ public String getMessage()
+ {
+ return RpcHandler.MESSAGE;
+ }
+
+ public String getToUrl()
+ {
+ return "http://" + getServerHost() +
":8080/jaxrpc-jbws1647-rpclit/TestEndpoint";
+ }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.
+ *
+ * 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.test.ws.jaxrpc.jbws1647;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public class RpcHandler extends AbstractHandler
+{
+
+ public static final String MESSAGE =
+ "<soapenv:Envelope xmlns:jbw='http://org.jboss.test.ws/jbws1647'
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <!-- Comment Before Header -->" +
+ " <soapenv:Header></soapenv:Header>" +
+ " <!-- Comment After Header, Before Body -->" +
+ " <soapenv:Body>" +
+ " <!-- Comment After Body -->" +
+ " <jbw:echoMessage
xmlns:jbw='http://org.jboss.test.ws/jbws1647'>" +
+ " <!-- Comment After Operation -->" +
+ " <String_1>My Message</String_1>" +
+ " <!-- Comment After Parameter -->" +
+ " </jbw:echoMessage>" +
+ " <!-- Comment Before Close Body -->" +
+ " </soapenv:Body>" +
+ " <!-- Comment Before Close Envelope -->" +
+ "</soapenv:Envelope>";
+
+ public String getExpectedMessage()
+ {
+ return MESSAGE;
+ }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestCaseBase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestCaseBase.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestCaseBase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.
+ *
+ * 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.test.ws.jaxrpc.jbws1647;
+
+import java.io.ByteArrayInputStream;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.test.ws.JBossWSTest;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public abstract class TestCaseBase extends JBossWSTest
+{
+
+ public abstract String getMessage();
+
+ public abstract String getToUrl();
+
+ public void testCall() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPMessage soapMessage = msgFactory.createMessage(null, new
ByteArrayInputStream(getMessage().getBytes()));
+
+ SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance();
+ SOAPConnection con = conFactory.createConnection();
+ SOAPMessage resMessage = con.call(soapMessage, getToUrl());
+
+ SOAPElement soapElement =
(SOAPElement)resMessage.getSOAPBody().getChildElements().next();
+ assertEquals("echoMessageResponse",
soapElement.getElementName().getLocalName());
+ }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestCaseBase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.
+ *
+ * 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.test.ws.jaxrpc.jbws1647;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 May 2007
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoMessage(final String message) throws RemoteException;
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.
+ *
+ * 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.test.ws.jaxrpc.jbws1647;
+
+import org.jboss.logging.Logger;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 May 2007
+ */
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ private static final Logger log = Logger.getLogger(TestEndpointImpl.class);
+
+ public String echoMessage(final String message)
+ {
+ return message;
+ }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue May 15 11:14:30 CEST 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jaxrpc.jbws1647;
+
+
+public class TestEndpoint_echoMessage_RequestStruct
+{
+
+protected java.lang.String string_1;
+public TestEndpoint_echoMessage_RequestStruct(){}
+
+public TestEndpoint_echoMessage_RequestStruct(java.lang.String string_1){
+this.string_1=string_1;
+}
+public java.lang.String getString_1() { return string_1 ;}
+
+public void setString_1(java.lang.String string_1){ this.string_1=string_1; }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue May 15 11:14:30 CEST 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jaxrpc.jbws1647;
+
+
+public class TestEndpoint_echoMessage_ResponseStruct
+{
+
+protected java.lang.String result;
+public TestEndpoint_echoMessage_ResponseStruct(){}
+
+public TestEndpoint_echoMessage_ResponseStruct(java.lang.String result){
+this.result=result;
+}
+public java.lang.String getResult() { return result ;}
+
+public void setResult(java.lang.String result){ this.result=result; }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws707/JBWS707TestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws707/JBWS707TestCase.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws707/JBWS707TestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -28,6 +28,7 @@
import javax.xml.rpc.Service;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.Name;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
@@ -37,6 +38,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.soap.NameImpl;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -115,7 +117,7 @@
String xmlStr = "<?xml version='1.0' encoding='UTF-8'
?>" +
"<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:tns='http://uri.jboss.org'>" +
" <env:Body>" +
- " <tns:testMessage><![CDATA[ Hello
]]></tns:testMessage>" +
+ " <tns:myMessage><![CDATA[ Hello
]]></tns:myMessage>" +
" </env:Body>" +
"</env:Envelope>";
@@ -185,8 +187,10 @@
SOAPMessage soapMessage = mf.createMessage(mimeHeaders, new
ByteArrayInputStream(xmlStr.getBytes()));
SOAPBody soapBody = soapMessage.getSOAPBody();
- SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next();
+ Name name = new NameImpl("myMessage", "tns",
"http://uri.jboss.org");
+ SOAPElement soapElement = (SOAPElement)soapBody.getChildElements(name).next();
+
StringBuffer builder = new StringBuffer();
NodeList nlist = soapElement.getChildNodes();
for (int i = 0; i < nlist.getLength(); i++)
Modified:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -22,12 +22,14 @@
package org.jboss.test.ws.jaxws.handlerlifecycle;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
@@ -186,8 +188,32 @@
String testMethod;
try
{
- SOAPElement soapElement =
(SOAPElement)((SOAPMessageContext)msgContext).getMessage().getSOAPBody().getChildElements().next();
- soapElement = (SOAPElement)soapElement.getChildElements().next();
+
+ SOAPMessage message = ((SOAPMessageContext)msgContext).getMessage();
+ SOAPElement soapElement = null;
+ Iterator it = message.getSOAPBody().getChildElements();
+
+ while (soapElement == null && it.hasNext())
+ {
+ Object current = it.next();
+ if (current instanceof SOAPElement)
+ {
+ soapElement = (SOAPElement)current;
+ }
+ }
+
+ it = soapElement.getChildElements();
+ soapElement = null;
+
+ while (soapElement == null && it.hasNext())
+ {
+ Object current = it.next();
+ if (current instanceof SOAPElement)
+ {
+ soapElement = (SOAPElement)current;
+ }
+ }
+
testMethod = soapElement.getValue();
}
catch (SOAPException e)
Modified:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/provider/ProviderJAXBTestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/provider/ProviderJAXBTestCase.java 2007-05-15
10:46:22 UTC (rev 3097)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/provider/ProviderJAXBTestCase.java 2007-05-15
12:42:40 UTC (rev 3098)
@@ -31,6 +31,7 @@
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
+import javax.xml.soap.Name;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPEnvelope;
@@ -45,6 +46,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.w3c.dom.Element;
@@ -131,7 +133,9 @@
SOAPMessage resMsg = con.call(reqMsg, epURL);
SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();
- Element child = (Element)resEnv.getBody().getChildElements().next();
+ Name name = new NameImpl("user", "ns1",
"http://org.jboss.ws/provider");
+ Element child = (Element)resEnv.getBody().getChildElements(name).next();
+
JAXBContext jc = JAXBContext.newInstance(new Class[]{UserType.class});
UserType user = (UserType)jc.createUnmarshaller().unmarshal(new DOMSource(child));
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping
version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1647</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1647/types</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint_echoMessage_RequestStruct</java-type>
+ <root-type-qname
xmlns:typeNS='http://org.jboss.test.ws/jbws1647/types'>typeNS:echoMessage</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>string_1</java-variable-name>
+ <xml-element-name>String_1</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint_echoMessage_ResponseStruct</java-type>
+ <root-type-qname
xmlns:typeNS='http://org.jboss.test.ws/jbws1647/types'>typeNS:echoMessageResponse</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>result</java-variable-name>
+ <xml-element-name>result</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://org.jboss.test.ws/jbws1647'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://org.jboss.test.ws/jbws1647'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding
xmlns:bindingNS='http://org.jboss.test.ws/jbws1647'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoMessage</java-method-name>
+ <wsdl-operation>echoMessage</wsdl-operation>
+ <wrapped-element/>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1647'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1647'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,21 @@
+<webservices version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port
xmlns:portNS='http://org.jboss.test.ws/jbws1647'>portNS:TestEndpointPort</wsdl-port>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+
+ <handler>
+ <handler-name>TestHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxrpc.jbws1647.DocumentHandler</handler-class>
+ </handler>
+
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService'
targetNamespace='http://org.jboss.test.ws/jbws1647'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:ns1='http://org.jboss.test.ws/jbws1647/types'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.test.ws/jbws1647'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://org.jboss.test.ws/jbws1647/types'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://org.jboss.test.ws/jbws1647/types'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+ <complexType name='echoMessage'>
+ <sequence>
+ <element name='String_1' nillable='true'
type='string'/>
+ </sequence>
+ </complexType>
+ <complexType name='echoMessageResponse'>
+ <sequence>
+ <element name='result' nillable='true'
type='string'/>
+ </sequence>
+ </complexType>
+ <element name='echoMessage' type='tns:echoMessage'/>
+ <element name='echoMessageResponse'
type='tns:echoMessageResponse'/>
+ </schema>
+ </types>
+ <message name='TestEndpoint_echoMessage'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
+ <part element='ns1:echoMessage' name='echoMessage'/>
+ </message>
+ <message name='TestEndpoint_echoMessageResponse'>
+ <part element='ns1:echoMessageResponse'
name='echoMessageResponse'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoMessage' parameterOrder='echoMessage'>
+ <input message='tns:TestEndpoint_echoMessage'/>
+ <output message='tns:TestEndpoint_echoMessageResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools.sh -cp ../../../../../output/classes -config wstools-config.xml
+-->
+
+<!-- Add the following handler to the generated webservices.xml
+
+ <handler>
+ <handler-name>TestHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxrpc.jbws1647.DocumentHandler</handler-class>
+ </handler>
+
+-->
+
+<configuration
xmlns="http://www.jboss.org/jbossws-tools"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+ <java-wsdl>
+ <service name="TestService"
endpoint="org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint"
style="document">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1647"
type-namespace="http://org.jboss.test.ws/jbws1647/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+
+</configuration>
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping
version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1647</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1647/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://org.jboss.test.ws/jbws1647'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://org.jboss.test.ws/jbws1647'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding
xmlns:bindingNS='http://org.jboss.test.ws/jbws1647'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoMessage</java-method-name>
+ <wsdl-operation>echoMessage</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1647'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1647'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,21 @@
+<webservices version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port
xmlns:portNS='http://org.jboss.test.ws/jbws1647'>portNS:TestEndpointPort</wsdl-port>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+
+ <handler>
+ <handler-name>TestHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxrpc.jbws1647.RpcHandler</handler-class>
+ </handler>
+
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService'
targetNamespace='http://org.jboss.test.ws/jbws1647'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.test.ws/jbws1647'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoMessage'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoMessageResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoMessage' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoMessage'/>
+ <output message='tns:TestEndpoint_echoMessageResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1647'
use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1647'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml
===================================================================
---
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml
(rev 0)
+++
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml 2007-05-15
12:42:40 UTC (rev 3098)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools.sh -cp ../../../../../output/classes -config wstools-config.xml
+-->
+
+<!-- Add the following handler to the generated webservices.xml
+
+ <handler>
+ <handler-name>TestHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxrpc.jbws1647.RpcHandler</handler-class>
+ </handler>
+
+-->
+
+<configuration
xmlns="http://www.jboss.org/jbossws-tools"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+ <java-wsdl>
+ <service name="TestService"
endpoint="org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint"
style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1647"
type-namespace="http://org.jboss.test.ws/jbws1647/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+
+</configuration>
Property changes on:
branches/dlofthouse/JBWS-1647/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF