Author: thomas.diesler(a)jboss.com
Date: 2007-03-20 08:59:55 -0400 (Tue, 20 Mar 2007)
New Revision: 2647
Added:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDoc.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDocImpl.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpcImpl.java
Removed:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSource.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceImpl.java
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageContextImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyElementRpc.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentAccess.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentElement.java
trunk/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java
trunk/jbossws-tests/ant-import/build-samples-jaxws.xml
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-client-source-handlers.xml
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-server-source-handlers.xml
trunk/jbossws-tests/src/resources/jaxws/samples/logicalhandler/WEB-INF/web-source.xml
Log:
Add support for logical handlers on RPC endpoints
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -38,7 +38,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS;
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
import org.jboss.ws.core.utils.DOMWriter;
@@ -282,9 +281,6 @@
CommonMessageContext context = (CommonMessageContext)msgContext;
if (currHandler instanceof LogicalHandler)
{
- if (epMetaData.getStyle() == Style.RPC)
- throw new WebServiceException("Cannot use logical handler with
RPC");
-
if (msgContext instanceof SOAPMessageContextJAXWS)
msgContext = new
LogicalMessageContextImpl((SOAPMessageContextJAXWS)msgContext);
}
@@ -310,9 +306,6 @@
CommonMessageContext context = (CommonMessageContext)msgContext;
if (currHandler instanceof LogicalHandler)
{
- if (epMetaData.getStyle() == Style.RPC)
- throw new WebServiceException("Cannot use logical handler with
RPC");
-
if (msgContext instanceof SOAPMessageContextJAXWS)
msgContext = new
LogicalMessageContextImpl((SOAPMessageContextJAXWS)msgContext);
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageContextImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageContextImpl.java 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageContextImpl.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -32,6 +32,9 @@
import javax.xml.ws.handler.LogicalMessageContext;
import javax.xml.ws.handler.MessageContext;
+import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
+
/**
* The LogicalMessageContext interface extends MessageContext to provide access to a the
* contained message as a protocol neutral LogicalMessage.
@@ -48,8 +51,10 @@
public LogicalMessageContextImpl(SOAPMessageContextJAXWS soapContext)
{
this.delegate = soapContext;
+
+ Style style = soapContext.getEndpointMetaData().getStyle();
SOAPMessage soapMessage = soapContext.getMessage();
- logicalMessage = new LogicalMessageImpl(soapMessage);
+ logicalMessage = new LogicalMessageImpl(soapMessage, style);
}
/**
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -26,15 +26,20 @@
import java.util.Iterator;
import javax.xml.bind.JAXBContext;
+import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.LogicalMessage;
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.soap.EnvelopeBuilderDOM;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPContentElement;
+import org.w3c.dom.Element;
/**
* The LogicalMessageContext interface extends MessageContext to provide access to a the
@@ -47,12 +52,14 @@
{
// provide logging
private static final Logger log = Logger.getLogger(LogicalMessageImpl.class);
-
+
+ private Style style;
private SOAPBodyImpl soapBody;
private boolean setPayloadBodyChild;
- public LogicalMessageImpl(SOAPMessage soapMessage)
+ public LogicalMessageImpl(SOAPMessage soapMessage, Style style)
{
+ this.style = style;
try
{
soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
@@ -69,8 +76,16 @@
setPayloadBodyChild = false;
if (source == null)
{
- SOAPContentElement soapElement =
(SOAPContentElement)soapBody.getChildElements().next();
- source = soapElement.getPayload();
+ SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next();
+ if (style == Style.RPC)
+ {
+ source = new DOMSource(soapElement);
+ }
+ else
+ {
+ SOAPContentElement contentElement = (SOAPContentElement)soapElement;
+ source = contentElement.getPayload();
+ }
setPayloadBodyChild = true;
}
return source;
@@ -81,8 +96,25 @@
soapBody.setPayload(source);
if (setPayloadBodyChild)
{
- SOAPContentElement soapElement =
(SOAPContentElement)soapBody.getChildElements().next();
- soapElement.setPayload(source);
+ try
+ {
+ SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next();
+ if (style == Style.RPC)
+ {
+ EnvelopeBuilderDOM builder = new EnvelopeBuilderDOM(style);
+ Element domBodyElement = EnvelopeBuilderDOM.getElementFromSource(source);
+ builder.buildBodyElementRpc(soapBody, domBodyElement);
+ }
+ else
+ {
+ SOAPContentElement contentElement = (SOAPContentElement)soapElement;
+ contentElement.setPayload(source);
+ }
+ }
+ catch (SOAPException ex)
+ {
+ throw new WebServiceException("Cannot set xml payload", ex);
+ }
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-03-20
10:42:55 UTC (rev 2646)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -23,20 +23,38 @@
//$Id$
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-import javax.xml.transform.dom.DOMSource;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-
/**
* A SOAPEnvelope builder for JAXRPC based on DOM
*
@@ -147,38 +165,11 @@
if (style == Style.RPC)
{
- SOAPBodyElementRpc soapBodyElement = new SOAPBodyElementRpc(beName);
- soapBodyElement =
(SOAPBodyElementRpc)soapBody.addChildElement(soapBodyElement);
-
- DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
-
- Iterator itBodyElement = DOMUtils.getChildElements(domBodyElement);
- while (itBodyElement.hasNext())
- {
- Element srcElement = (Element)itBodyElement.next();
- registerNamespacesLocally(srcElement);
-
- Name name = new NameImpl(srcElement.getLocalName(),
srcElement.getPrefix(), srcElement.getNamespaceURI());
- SOAPContentElement destElement = new SOAPContentElement(name);
- destElement =
(SOAPContentElement)soapBodyElement.addChildElement(destElement);
-
- DOMUtils.copyAttributes(destElement, srcElement);
-
- XMLFragment xmlFragment = new XMLFragment(new DOMSource(srcElement));
- destElement.setXMLFragment(xmlFragment);
- }
+ buildBodyElementRpc(soapBody, domBodyElement);
}
else if (style == Style.DOCUMENT)
{
- Element srcElement = (Element)domBodyElement;
- registerNamespacesLocally(srcElement);
- SOAPContentElement destElement = new SOAPBodyElementDoc(beName);
- destElement = (SOAPContentElement)soapBody.addChildElement(destElement);
-
- DOMUtils.copyAttributes(destElement, srcElement);
-
- XMLFragment xmlFragment = new XMLFragment(new DOMSource(srcElement));
- destElement.setXMLFragment(xmlFragment);
+ buildBodyElementDoc(soapBody, domBodyElement);
}
else if (style == null)
{
@@ -223,6 +214,111 @@
return soapEnv;
}
+ public void buildBodyElementDoc(SOAPBody soapBody, Element domBodyElement) throws
SOAPException
+ {
+ Element srcElement = (Element)domBodyElement;
+ registerNamespacesLocally(srcElement);
+
+ QName beName = DOMUtils.getElementQName(domBodyElement);
+ SOAPContentElement destElement = new SOAPBodyElementDoc(beName);
+ destElement = (SOAPContentElement)soapBody.addChildElement(destElement);
+
+ DOMUtils.copyAttributes(destElement, srcElement);
+
+ XMLFragment xmlFragment = new XMLFragment(new DOMSource(srcElement));
+ destElement.setXMLFragment(xmlFragment);
+ }
+
+ public void buildBodyElementRpc(SOAPBody soapBody, Element domBodyElement) throws
SOAPException
+ {
+ QName beName = DOMUtils.getElementQName(domBodyElement);
+ SOAPBodyElementRpc soapBodyElement = new SOAPBodyElementRpc(beName);
+ soapBodyElement = (SOAPBodyElementRpc)soapBody.addChildElement(soapBodyElement);
+
+ DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
+
+ Iterator itBodyElement = DOMUtils.getChildElements(domBodyElement);
+ while (itBodyElement.hasNext())
+ {
+ Element srcElement = (Element)itBodyElement.next();
+ registerNamespacesLocally(srcElement);
+
+ Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(),
srcElement.getNamespaceURI());
+ SOAPContentElement destElement = new SOAPContentElement(name);
+ destElement = (SOAPContentElement)soapBodyElement.addChildElement(destElement);
+
+ DOMUtils.copyAttributes(destElement, srcElement);
+
+ XMLFragment xmlFragment = new XMLFragment(new DOMSource(srcElement));
+ destElement.setXMLFragment(xmlFragment);
+ }
+ }
+
+ public static Element getElementFromSource(Source payload)
+ {
+ Element child = null;
+ try
+ {
+ if (payload instanceof StreamSource)
+ {
+ StreamSource streamSource = (StreamSource)payload;
+
+ InputStream ins = streamSource.getInputStream();
+ if (ins != null)
+ {
+ child = DOMUtils.parse(ins);
+ }
+ else
+ {
+ Reader reader = streamSource.getReader();
+ child = DOMUtils.parse(new InputSource(reader));
+ }
+ }
+ else if (payload instanceof DOMSource)
+ {
+ DOMSource domSource = (DOMSource)payload;
+ Node node = domSource.getNode();
+ if (node instanceof Element)
+ {
+ child = (Element)node;
+ }
+ else if (node instanceof Document)
+ {
+ child = ((Document)node).getDocumentElement();
+ }
+ else
+ {
+ throw new WSException("Unsupported Node type: " +
node.getClass().getName());
+ }
+ }
+ else if (payload instanceof SAXSource)
+ {
+ // The fact that JAXBSource derives from SAXSource is an implementation
detail.
+ // Thus in general applications are strongly discouraged from accessing
methods defined on SAXSource.
+ // The XMLReader object obtained by the getXMLReader method shall be used
only for parsing the InputSource object returned by the getInputSource method.
+
+ TransformerFactory tf = TransformerFactory.newInstance();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+ tf.newTransformer().transform(payload, new StreamResult(baos));
+
+ child = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
+ }
+ else
+ {
+ throw new WSException("Source type not implemented: " +
payload.getClass().getName());
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WSException("Cannot get root element from Source" + ex);
+ }
+ return child;
+ }
+
/**
* Register globally available namespaces on element level.
* This is necessary to ensure that each xml fragment is valid.
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyElementRpc.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyElementRpc.java 2007-03-20
10:42:55 UTC (rev 2646)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyElementRpc.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.core.soap;
+import javax.xml.namespace.QName;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBodyElement;
@@ -39,6 +40,11 @@
super(name);
}
+ public SOAPBodyElementRpc(QName qname)
+ {
+ super(qname);
+ }
+
public SOAPBodyElementRpc(SOAPElementImpl element)
{
super(element);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2007-03-20
10:42:55 UTC (rev 2646)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -24,10 +24,7 @@
// $Id$
import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
import java.io.Writer;
import java.util.Iterator;
import java.util.Locale;
@@ -41,10 +38,6 @@
import javax.xml.soap.SOAPFault;
import javax.xml.soap.Text;
import javax.xml.transform.Source;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
@@ -59,7 +52,6 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
/**
* An object that represents the contents of the SOAP body element in a SOAP message.
@@ -102,7 +94,8 @@
public void setPayload(Source payload)
{
- if(log.isDebugEnabled()) log.debug("setPayload: " +
payload.getClass().getName());
+ if (log.isDebugEnabled())
+ log.debug("setPayload: " + payload.getClass().getName());
removeContents();
this.payload = payload;
this.isDOMValid = false;
@@ -306,13 +299,11 @@
expandToDOM(false);
return super.hasChildNodes();
}
-
- private static boolean needsConversionToBodyElement(Node node)
+
+ private static boolean needsConversionToBodyElement(Node node)
{
// JBCTS-440 #addTextNodeTest1 appends a Text node to a SOAPBody
- return !(node instanceof SOAPBodyElement
- || node instanceof DocumentFragment
- || node instanceof Text);
+ return !(node instanceof SOAPBodyElement || node instanceof DocumentFragment ||
node instanceof Text);
}
private static SOAPBodyElementDoc convertToBodyElement(Node node)
@@ -369,70 +360,13 @@
private Element getBodyElementFromSource()
{
- Element child = null;
- try
+ Element child = EnvelopeBuilderDOM.getElementFromSource(payload);
+ if (payload instanceof StreamSource)
{
- if (payload instanceof StreamSource)
- {
- StreamSource streamSource = (StreamSource)payload;
-
- InputStream ins = streamSource.getInputStream();
- if (ins != null)
- {
- child = DOMUtils.parse(ins);
- }
- else
- {
- Reader reader = streamSource.getReader();
- child = DOMUtils.parse(new InputSource(reader));
- }
-
- // reset the excausted input stream
- String xmlStr = DOMWriter.printNode(child, false);
- payload = new StreamSource(new ByteArrayInputStream(xmlStr.getBytes()));
- }
- else if (payload instanceof DOMSource)
- {
- DOMSource domSource = (DOMSource)payload;
- Node node = domSource.getNode();
- if (node instanceof Element)
- {
- child = (Element)node;
- }
- else if (node instanceof Document)
- {
- child = ((Document)node).getDocumentElement();
- }
- else
- {
- throw new WSException("Unsupported Node type: " +
node.getClass().getName());
- }
- }
- else if (payload instanceof SAXSource)
- {
- // The fact that JAXBSource derives from SAXSource is an implementation
detail.
- // Thus in general applications are strongly discouraged from accessing
methods defined on SAXSource.
- // The XMLReader object obtained by the getXMLReader method shall be used
only for parsing the InputSource object returned by the getInputSource method.
-
- TransformerFactory tf = TransformerFactory.newInstance();
- ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
- tf.newTransformer().transform(payload, new StreamResult(baos));
-
- child = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
- }
- else
- {
- throw new WSException("Source type not implemented: " +
payload.getClass().getName());
- }
+ // reset the excausted input stream
+ String xmlStr = DOMWriter.printNode(child, false);
+ payload = new StreamSource(new ByteArrayInputStream(xmlStr.getBytes()));
}
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot get root element from Source" + ex);
- }
return child;
}
@@ -443,7 +377,8 @@
{
Element child = getBodyElementFromSource();
String xmlPayload = DOMWriter.printNode(child, false);
- if(log.isDebugEnabled()) log.debug("writeElementContent from payload:
" + xmlPayload);
+ if (log.isDebugEnabled())
+ log.debug("writeElementContent from payload: " + xmlPayload);
writer.write(xmlPayload);
}
else
@@ -459,8 +394,8 @@
Iterator childElements = DOMUtils.getChildElements(this);
// zero child elements?
- if (!childElements.hasNext())
- throw new SOAPException("there is no child SOAPElement of this
SOAPBody");
+ if (!childElements.hasNext())
+ throw new SOAPException("there is no child SOAPElement of this
SOAPBody");
SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();
@@ -471,14 +406,14 @@
if (childElement instanceof SOAPContentElement)
{
// cause expansion to DOM
- SOAPContentElement contentElement = (SOAPContentElement) childElement;
+ SOAPContentElement contentElement = (SOAPContentElement)childElement;
// TODO change visibility of SOAPContentElement.expandToDOM() to package?
contentElement.getPayload();
}
// child SOAPElement is removed as part of this process
childElement.detachNode();
-
+
/* child element's owner document might be shared with other elements;
* we have to create a separate document for returning to our caller
*/
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentAccess.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentAccess.java 2007-03-20
10:42:55 UTC (rev 2646)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentAccess.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -7,8 +7,8 @@
* @version $Id$
* @since 05.02.2007
*/
-public interface SOAPContentAccess {
-
+public interface SOAPContentAccess
+{
Source getPayload();
void setPayload(Source source);
@@ -19,5 +19,5 @@
Object getObjectValue();
- void setObjectValue(Object objValue);
+ void setObjectValue(Object objValue);
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentElement.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentElement.java 2007-03-20
10:42:55 UTC (rev 2646)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentElement.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -69,8 +69,8 @@
* @since 13-Dec-2004
*
*/
-public class SOAPContentElement extends SOAPElementImpl implements SOAPContentAccess {
-
+public class SOAPContentElement extends SOAPElementImpl implements SOAPContentAccess
+{
// provide logging
private static Logger log = Logger.getLogger(SOAPContentElement.class);
@@ -128,7 +128,7 @@
private void transitionTo(SOAPContent.State nextState)
{
- if(nextState!=soapContent.getState())
+ if (nextState != soapContent.getState())
{
log.debug("-----------------------------------");
log.debug("Transitioning from " + soapContent.getState() + " to
" + nextState);
@@ -504,8 +504,9 @@
return super.replaceChild(newChild, oldChild);
}
- private void expandToDOM() {
- if(!lockDOMExpansion)
+ private void expandToDOM()
+ {
+ if (!lockDOMExpansion)
transitionTo(SOAPContent.State.DOM_VALID);
}
@@ -532,7 +533,7 @@
{
// JMS transport hot fix
// Can be removed once we got a immutabe object model
- if(MessageContextAssociation.peekMessageContext()!=null)
+ if (MessageContextAssociation.peekMessageContext() != null)
handleMTOMTransitions();
if (soapContent instanceof DOMContent)
@@ -562,11 +563,12 @@
public void handleMTOMTransitions()
{
// MTOM processing is only required on XOP parameters
- if(!isXOPParameter()) return;
+ if (!isXOPParameter())
+ return;
boolean domContentState = (soapContent instanceof DOMContent);
- if ( !XOPContext.isMTOMEnabled() )
+ if (!XOPContext.isMTOMEnabled())
{
// If MTOM is disabled, we force dom expansion on XOP parameters.
// This will inline any XOP include element and remove the attachment part.
@@ -579,10 +581,10 @@
msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
if (msgContext instanceof MessageContextJAXWS)
((MessageContextJAXWS)msgContext).setScope(CommonMessageContext.ALLOW_EXPAND_TO_DOM,
Scope.APPLICATION);
-
+
expandToDOM();
}
- else if ( domContentState && XOPContext.isMTOMEnabled() )
+ else if (domContentState && XOPContext.isMTOMEnabled())
{
// When the DOM representation is valid,
// but MTOM is enabled we need to convert the inlined
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java 2007-03-20 10:42:55
UTC (rev 2646)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java 2007-03-20 12:59:55
UTC (rev 2647)
@@ -237,6 +237,16 @@
if (namespaceURI.equals(""))
throw new IllegalArgumentException("Cannot find namespace uri for:
" + qualifiedName);
}
+ else
+ {
+ Element nsElement = el;
+ while (namespaceURI.equals("") && nsElement != null)
+ {
+ namespaceURI = nsElement.getAttribute("xmlns");
+ if (namespaceURI.equals(""))
+ nsElement = getParentElement(nsElement);
+ }
+ }
qname = new QName(namespaceURI, localPart, prefix);
return qname;
Modified: trunk/jbossws-tests/ant-import/build-samples-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-03-20 10:42:55 UTC (rev
2646)
+++ trunk/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-03-20 12:59:55 UTC (rev
2647)
@@ -124,8 +124,8 @@
<war
warfile="${tests.output.dir}/libs/jaxws-samples-logicalhandler-source.war"
webxml="${tests.output.dir}/resources/jaxws/samples/logicalhandler/WEB-INF/web-source.xml">
<classes dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceImpl.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSource.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDocImpl.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpcImpl.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/logicalhandler/Echo.class"/>
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -26,7 +26,6 @@
import java.net.URL;
import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import junit.framework.Test;
@@ -47,16 +46,40 @@
return JBossWSTestSetup.newTestSetup(LogicalHandlerSourceTestCase.class,
"jaxws-samples-logicalhandler-source.war");
}
- public void testClientAccess() throws Exception
+ public void testSourceDoc() throws Exception
{
- String endpointAddress = "http://" + getServerHost() +
":8080/jaxws-samples-logicalhandler-source";
- QName serviceName = new
QName("http://org.jboss.ws/jaxws/samples/logicalhandler",
"SOAPEndpointService");
+ String endpointAddress = "http://" + getServerHost() +
":8080/jaxws-samples-logicalhandler-source/doc";
+ QName serviceName = new
QName("http://org.jboss.ws/jaxws/samples/logicalhandler",
"SOAPEndpointDocService");
Service service = Service.create(new URL(endpointAddress + "?wsdl"),
serviceName);
- SOAPEndpointSource port =
(SOAPEndpointSource)service.getPort(SOAPEndpointSource.class);
+ SOAPEndpointSourceDoc port =
(SOAPEndpointSourceDoc)service.getPort(SOAPEndpointSourceDoc.class);
- BindingProvider bindingProvider = (BindingProvider)port;
- bindingProvider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
endpointAddress);
+ String retStr = port.echo("hello");
+
+ StringBuffer expStr = new StringBuffer("hello");
+ expStr.append(":LogicalClientHandler");
+ expStr.append(":SOAP11ClientHandler");
+ expStr.append(":PortClientHandler");
+ expStr.append(":PortServerHandler");
+ expStr.append(":SOAP11ServerHandler");
+ expStr.append(":LogicalServerHandler");
+ expStr.append(":endpoint");
+ expStr.append(":LogicalServerHandler");
+ expStr.append(":SOAP11ServerHandler");
+ expStr.append(":PortServerHandler");
+ expStr.append(":PortClientHandler");
+ expStr.append(":SOAP11ClientHandler");
+ expStr.append(":LogicalClientHandler");
+ assertEquals(expStr.toString(), retStr);
+ }
+
+ public void testSourceRpc() throws Exception
+ {
+ String endpointAddress = "http://" + getServerHost() +
":8080/jaxws-samples-logicalhandler-source/rpc";
+ QName serviceName = new
QName("http://org.jboss.ws/jaxws/samples/logicalhandler",
"SOAPEndpointRpcService");
+ Service service = Service.create(new URL(endpointAddress + "?wsdl"),
serviceName);
+ SOAPEndpointSourceRpc port =
(SOAPEndpointSourceRpc)service.getPort(SOAPEndpointSourceRpc.class);
+
String retStr = port.echo("hello");
StringBuffer expStr = new StringBuffer("hello");
Deleted:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSource.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSource.java 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSource.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -1,45 +0,0 @@
-/*
- * 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.
- *
- * 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.jaxws.samples.logicalhandler;
-
-// $Id$
-
-import javax.jws.HandlerChain;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-
-@WebService()
-@HandlerChain(file = "jaxws-client-source-handlers.xml")
-public interface SOAPEndpointSource
-{
-
- @WebMethod
- @WebResult(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler", name = "result")
- @RequestWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.Echo")
- @ResponseWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.EchoResponse")
- public String echo(@WebParam(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler", name = "String_1")
String string1);
-
-}
Copied:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDoc.java
(from rev 2645,
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSource.java)
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDoc.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDoc.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ *
+ * 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.jaxws.samples.logicalhandler;
+
+// $Id$
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService()
+@HandlerChain(file = "jaxws-client-source-handlers.xml")
+public interface SOAPEndpointSourceDoc
+{
+
+ @WebMethod
+ @WebResult(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler", name = "result")
+ @RequestWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.Echo")
+ @ResponseWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.EchoResponse")
+ public String echo(@WebParam(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler", name = "String_1")
String string1);
+
+}
Added:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDocImpl.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDocImpl.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDocImpl.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ *
+ * 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.jaxws.samples.logicalhandler;
+
+// $Id$
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+import org.jboss.logging.Logger;
+
+@WebService(name = "SOAPEndpointDoc", targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler")
+@HandlerChain(file = "jaxws-server-source-handlers.xml")
+public class SOAPEndpointSourceDocImpl
+{
+ private static Logger log = Logger.getLogger(SOAPEndpointSourceDocImpl.class);
+
+ @WebMethod
+ @WebResult(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler", name="result")
+ @RequestWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.Echo")
+ @ResponseWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.EchoResponse")
+ public String echo(@WebParam(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler",
name="String_1")String msg)
+ {
+ log.info("echo: " + msg);
+ return msg + ":endpoint";
+ }
+}
Property changes on:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDocImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceImpl.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceImpl.java 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceImpl.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -1,51 +0,0 @@
-/*
- * 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.
- *
- * 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.jaxws.samples.logicalhandler;
-
-// $Id$
-
-import javax.jws.HandlerChain;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-
-import org.jboss.logging.Logger;
-
-@WebService(name = "SOAPEndpoint", targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler")
-@HandlerChain(file = "jaxws-server-source-handlers.xml")
-public class SOAPEndpointSourceImpl
-{
- private static Logger log = Logger.getLogger(SOAPEndpointSourceImpl.class);
-
- @WebMethod
- @WebResult(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler", name="result")
- @RequestWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.Echo")
- @ResponseWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.EchoResponse")
- public String echo(@WebParam(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler",
name="String_1")String msg)
- {
- log.info("echo: " + msg);
- return msg + ":endpoint";
- }
-}
Added:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ *
+ * 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.jaxws.samples.logicalhandler;
+
+// $Id$
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+@WebService()
+@HandlerChain(file = "jaxws-client-source-handlers.xml")
+@SOAPBinding(style = Style.RPC)
+public interface SOAPEndpointSourceRpc
+{
+
+ @WebMethod
+ public String echo(String string1);
+
+}
Property changes on:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpcImpl.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpcImpl.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpcImpl.java 2007-03-20
12:59:55 UTC (rev 2647)
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ *
+ * 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.jaxws.samples.logicalhandler;
+
+// $Id$
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+import org.jboss.logging.Logger;
+
+@WebService(name = "SOAPEndpointRpc", targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler")
+@HandlerChain(file = "jaxws-server-source-handlers.xml")
+@SOAPBinding(style = Style.RPC)
+public class SOAPEndpointSourceRpcImpl
+{
+ private static Logger log = Logger.getLogger(SOAPEndpointSourceRpcImpl.class);
+
+ @WebMethod
+ public String echo(String msg)
+ {
+ log.info("echo: " + msg);
+ return msg + ":endpoint";
+ }
+}
Property changes on:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpcImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-client-source-handlers.xml
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-client-source-handlers.xml 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-client-source-handlers.xml 2007-03-20
12:59:55 UTC (rev 2647)
@@ -21,7 +21,7 @@
</handler-chain>
<handler-chain>
- <port-name-pattern>ns1:SOAPEndpointPort</port-name-pattern>
+ <port-name-pattern>ns1:SOAPEndpoint*</port-name-pattern>
<handler>
<handler-name> PortClientHandler </handler-name>
<handler-class> org.jboss.test.ws.jaxws.samples.logicalhandler.ProtocolHandler
</handler-class>
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-server-source-handlers.xml
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-server-source-handlers.xml 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-server-source-handlers.xml 2007-03-20
12:59:55 UTC (rev 2647)
@@ -21,7 +21,7 @@
</handler-chain>
<handler-chain>
- <port-name-pattern>ns1:SOAPEndpointPort</port-name-pattern>
+ <port-name-pattern>ns1:SOAPEndpoint*</port-name-pattern>
<handler>
<handler-name> PortServerHandler </handler-name>
<handler-class> org.jboss.test.ws.jaxws.samples.logicalhandler.ProtocolHandler
</handler-class>
Modified:
trunk/jbossws-tests/src/resources/jaxws/samples/logicalhandler/WEB-INF/web-source.xml
===================================================================
---
trunk/jbossws-tests/src/resources/jaxws/samples/logicalhandler/WEB-INF/web-source.xml 2007-03-20
10:42:55 UTC (rev 2646)
+++
trunk/jbossws-tests/src/resources/jaxws/samples/logicalhandler/WEB-INF/web-source.xml 2007-03-20
12:59:55 UTC (rev 2647)
@@ -6,14 +6,24 @@
version="2.4">
<servlet>
- <servlet-name>SOAPEndpoint</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.samples.logicalhandler.SOAPEndpointSourceImpl</servlet-class>
+ <servlet-name>SOAPEndpointDoc</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.logicalhandler.SOAPEndpointSourceDocImpl</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>SOAPEndpointRpc</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.logicalhandler.SOAPEndpointSourceRpcImpl</servlet-class>
+ </servlet>
+
<servlet-mapping>
- <servlet-name>SOAPEndpoint</servlet-name>
- <url-pattern>/*</url-pattern>
+ <servlet-name>SOAPEndpointDoc</servlet-name>
+ <url-pattern>/doc</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>SOAPEndpointRpc</servlet-name>
+ <url-pattern>/rpc</url-pattern>
+ </servlet-mapping>
+
</web-app>