You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sc...@apache.org on 2007/02/02 18:43:37 UTC
svn commit: r502670 - in /webservices/axis2/trunk/java/modules/jaxws:
src/org/apache/axis2/jaxws/client/
src/org/apache/axis2/jaxws/marshaller/impl/alt/
src/org/apache/axis2/jaxws/message/
src/org/apache/axis2/jaxws/message/impl/ src/org/apache/axis2/j...
Author: scheu
Date: Fri Feb 2 09:43:34 2007
New Revision: 502670
URL: http://svn.apache.org/viewvc?view=rev&rev=502670
Log:
AXIS2-2089
Contributor: Rich Scheuerle
Fixed problem in JAXWS unmarshalling that occurs if there are multiple parameters.
Modified:
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/JAXBDispatch.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/XMLDispatch.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/XMLPart.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java
webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/RPCLit.wsdl
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageRPCTests.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SOAP12Tests.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/RPCProxyTests.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/META-INF/RPCLit.wsdl
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/RPCLitImpl.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/sei/RPCLit.java
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/JAXBDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/JAXBDispatch.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/JAXBDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/JAXBDispatch.java Fri Feb 2 09:43:34 2007
@@ -83,7 +83,7 @@
// on the binding information available.
Protocol proto = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());
message = mf.create(proto);
- message.setBodyBlock(0, block);
+ message.setBodyBlock(block);
} else {
// Message mode..rare case
@@ -116,7 +116,7 @@
// Normal Case
JAXBBlockFactory factory = (JAXBBlockFactory) FactoryRegistry.getFactory(JAXBBlockFactory.class);
JAXBBlockContext context = new JAXBBlockContext(jaxbContext);
- Block block = message.getBodyBlock(0, context, factory);
+ Block block = message.getBodyBlock(context, factory);
if (block != null) {
value = block.getBusinessObject(true);
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/XMLDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/XMLDispatch.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/XMLDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/XMLDispatch.java Fri Feb 2 09:43:34 2007
@@ -108,7 +108,7 @@
// on the binding information available.
Protocol proto = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());
message = mf.create(proto);
- message.setBodyBlock(0, block);
+ message.setBodyBlock(block);
} catch (Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
}
@@ -154,7 +154,7 @@
if (mode.equals(Mode.PAYLOAD)) {
BlockFactory factory = (BlockFactory) FactoryRegistry
.getFactory(blockFactoryType);
- block = message.getBodyBlock(0, null, factory);
+ block = message.getBodyBlock(null, factory);
if (block != null) {
value = block.getBusinessObject(true);
} else {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java Fri Feb 2 09:43:34 2007
@@ -98,7 +98,7 @@
// Get this block
JAXBBlockContext blockContext = new JAXBBlockContext(packages);
JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
- Block block = message.getBodyBlock(0, blockContext, factory);
+ Block block = message.getBodyBlock(blockContext, factory);
Object wrapperObject = block.getBusinessObject(true);
// The child elements are within the object that
@@ -199,7 +199,7 @@
// Get this block
JAXBBlockContext blockContext = new JAXBBlockContext(packages);
JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
- Block block = message.getBodyBlock(0, blockContext, factory);
+ Block block = message.getBodyBlock(blockContext, factory);
Object wrapperObject = block.getBusinessObject(true);
// The child elements are within the object that
@@ -347,7 +347,7 @@
Block block = factory.createFrom(object,
new JAXBBlockContext(endpointDesc.getPackages()),
null); // The factory will get the qname from the value
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
return m;
} catch(Exception e) {
@@ -433,7 +433,7 @@
Block block = factory.createFrom(object,
new JAXBBlockContext(endpointDesc.getPackages()),
null); // The factory will get the qname from the value
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
return m;
} catch(Exception e) {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java Fri Feb 2 09:43:34 2007
@@ -145,7 +145,7 @@
// Get this block
JAXBBlockContext blockContext = new JAXBBlockContext(packages);
JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
- Block block = message.getBodyBlock(0, blockContext, factory);
+ Block block = message.getBodyBlock(blockContext, factory);
Object wrapperObject = block.getBusinessObject(true);
// The child elements are within the object that
@@ -276,7 +276,7 @@
// Get this block
JAXBBlockContext blockContext = new JAXBBlockContext(packages);
JAXBBlockFactory factory = (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
- Block block = message.getBodyBlock(0, blockContext, factory);
+ Block block = message.getBodyBlock(blockContext, factory);
Object wrapperObject = block.getBusinessObject(true);
// The child elements are within the object that
@@ -469,7 +469,7 @@
Block block = factory.createFrom(object,
new JAXBBlockContext(packages),
null); // The factory will get the qname from the value
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// Now place the headers in the message
if (headerPDEList.size() > 0) {
@@ -573,7 +573,7 @@
Block block = factory.createFrom(object,
new JAXBBlockContext(packages),
null); // The factory will get the qname from the value
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// Now place the headers in the message
if (headerPDEList.size() > 0) {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java Fri Feb 2 09:43:34 2007
@@ -147,7 +147,21 @@
boolean isInput,
boolean usePartName) throws XMLStreamException {
- List<PDElement> pvList = new ArrayList<PDElement>();
+ List<PDElement> pdeList = new ArrayList<PDElement>();
+
+ // Count
+ int totalBodyBlocks = 0;
+ for (int i=0; i<params.length; i++) {
+ ParameterDescription pd = params[i];
+
+ if (pd.getMode() == Mode.IN && isInput ||
+ pd.getMode() == Mode.INOUT ||
+ pd.getMode() == Mode.OUT && !isInput) {
+ if (!pd.isHeader()) {
+ totalBodyBlocks++;
+ }
+ }
+ }
int index = 0;
for (int i=0; i<params.length; i++) {
@@ -180,17 +194,25 @@
String localName = (usePartName) ? pd.getPartName() : pd.getParameterName();
block = message.getHeaderBlock(pd.getTargetNamespace(), localName, context, factory);
} else {
- block = message.getBodyBlock(index, context, factory);
+ if (totalBodyBlocks > 1) {
+ // You must use this method if there are more than one body block
+ // This method may cause OM expansion
+ block = message.getBodyBlock(index, context, factory);
+ } else {
+ // Use this method if you know there is only one body block.
+ // This method prevents OM expansion.
+ block = message.getBodyBlock(context, factory);
+ }
index++;
}
// The object is now ready for marshalling
PDElement pv = new PDElement(pd, block.getBusinessObject(true));
- pvList.add(pv);
+ pdeList.add(pv);
}
}
- return pvList;
+ return pdeList;
}
/**
@@ -308,34 +330,42 @@
/**
* Marshal the element enabled objects (pvList) to the Message
- * @param pvList element enabled objects
+ * @param pdeList element enabled objects
* @param message Message
* @param packages Packages needed to do a JAXB Marshal
* @param isRPC
* @throws MessageException
*/
- static void toMessage(List<PDElement> pvList, Message message, Set<String> packages, boolean isRPC) throws WebServiceException {
+ static void toMessage(List<PDElement> pdeList, Message message, Set<String> packages, boolean isRPC) throws WebServiceException {
+
+ int totalBodyBlocks = 0;
+ for (int i=0; i<pdeList.size(); i++) {
+ PDElement pde = pdeList.get(i);
+ if (!pde.getParam().isHeader()) {
+ totalBodyBlocks++;
+ }
+ }
int index = message.getNumBodyBlocks();
- for (int i=0; i<pvList.size(); i++) {
- PDElement pv = pvList.get(i);
+ for (int i=0; i<pdeList.size(); i++) {
+ PDElement pde = pdeList.get(i);
// Create the JAXBBlockContext
// RPC uses type marshalling, so use the rpcType
JAXBBlockContext context = new JAXBBlockContext(packages);
if (isRPC) {
- context.setRPCType(pv.getParam().getParameterActualType());
+ context.setRPCType(pde.getParam().getParameterActualType());
}
// Create a JAXBBlock out of the value.
// (Note that the PDElement.getValue always returns an object
// that has an element rendering...ie. it is either a JAXBElement o
// has @XmlRootElement defined
- Block block = factory.createFrom(pv.getElementValue(),
+ Block block = factory.createFrom(pde.getElementValue(),
context,
null); // The factory will get the qname from the value
- if (pv.getParam().isHeader()) {
+ if (pde.getParam().isHeader()) {
// Header block
QName qname = block.getQName();
message.setHeaderBlock(qname.getNamespaceURI(),
@@ -343,7 +373,12 @@
block);
} else {
// Body block
- message.setBodyBlock(index, block);
+ if (totalBodyBlocks <= 1) {
+ // If there is only one block, use the following "more performant" method
+ message.setBodyBlock(block);
+ } else {
+ message.setBodyBlock(index, block);
+ }
index++;
}
}
@@ -392,7 +427,7 @@
if (isHeader) {
message.setHeaderBlock(returnNS, returnLocalPart, block);
} else {
- message.setBodyBlock(0, block);
+ message.setBodyBlock(block);
}
}
@@ -426,7 +461,7 @@
if (isHeader) {
block = message.getHeaderBlock(headerNS, headerLocalPart, context, factory);
} else {
- block = message.getBodyBlock(0, context, factory);
+ block = message.getBodyBlock(context, factory);
}
// Get the business object. We want to return the object that represents the type.
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/XMLPart.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/XMLPart.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/XMLPart.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/XMLPart.java Fri Feb 2 09:43:34 2007
@@ -84,6 +84,9 @@
/**
* Set the Style.
+ * If the style is DOCUMENT, the body blocks are loaced underneath the body element.
+ * If the style is set to RPC, then the body blocks are located underneath the
+ * rpc operation.
* @param style Style
*/
public void setStyle(Style style) throws WebServiceException;
@@ -177,6 +180,7 @@
/**
* getNumBodyBlocks
+ * Calling this method will cache the OM. Avoid it in performant situations.
* @return number of body blocks
* @throws WebServiceException
*/
@@ -184,18 +188,36 @@
/**
* getBodyBlock
- * Get the body block as the specificed index.
+ * Get the body block at the specificed index.
* The BlockFactory and object context are passed in to help create the
* proper kind of block.
+ * Calling this method will cache the OM. Avoid it in performant situations.
*
* @param index
* @param context
* @param blockFactory
* @return Block or null
* @throws WebServiceException
+ * @see getBodyBlock
*/
public Block getBodyBlock(int index, Object context, BlockFactory blockFactory)
throws WebServiceException;
+
+ /**
+ * getBodyBlock
+ * Get the single Body Block.
+ * The BlockFactory and object context are passed in to help create the
+ * proper kind of block.
+ * This method should only be invoked when it is known that there is zero or one block.
+ *
+ * @param index
+ * @param context
+ * @param blockFactory
+ * @return Block or null
+ * @throws WebServiceException
+ */
+ public Block getBodyBlock(Object context, BlockFactory blockFactory)
+ throws WebServiceException;
/**
* setBodyBlock
@@ -207,9 +229,19 @@
* @throws WebServiceException
*/
public void setBodyBlock(int index, Block block) throws WebServiceException;
+
+ /**
+ * setBodyBlock
+ * Set this as block as the single block for the message.
+ *
+ * @param index
+ * @param block
+ * @throws WebServiceException
+ */
+ public void setBodyBlock(Block block) throws WebServiceException;
/**
- * removePayload
+ * removeBodyBlock
* Removes the indicated BodyBlock
* @param index
* @throws WebServiceException
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/BlockFactoryImpl.java Fri Feb 2 09:43:34 2007
@@ -61,9 +61,9 @@
}
public Block createFrom(XMLStreamReader reader, Object context, QName qName) throws XMLStreamException, WebServiceException {
- StAXOMBuilder builder = new StAXOMBuilder(reader);
+ StAXOMBuilder builder = new StAXOMBuilder(reader);
OMElement omElement = builder.getDocumentElement();
- return createFrom(omElement, context, qName);
+ return createFrom(omElement, context, omElement.getQName());
}
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java Fri Feb 2 09:43:34 2007
@@ -420,4 +420,12 @@
}
}
+ public Block getBodyBlock(Object context, BlockFactory blockFactory) throws WebServiceException {
+ return xmlPart.getBodyBlock(context, blockFactory);
+ }
+
+ public void setBodyBlock(Block block) throws WebServiceException {
+ xmlPart.setBodyBlock(block);
+ }
+
}
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLPartBase.java Fri Feb 2 09:43:34 2007
@@ -478,6 +478,17 @@
}
return block;
}
+
+ /* (non-Javadoc)
+ * @see org.apache.axis2.jaxws.message.XMLPart#getBodyBlock(java.lang.Object, org.apache.axis2.jaxws.message.factory.BlockFactory)
+ */
+ public Block getBodyBlock(Object context, BlockFactory blockFactory) throws WebServiceException {
+ Block block = getContentAsXMLSpine().getBodyBlock(context, blockFactory);
+ if (block != null) {
+ block.setParent(getParent());
+ }
+ return block;
+ }
/* (non-Javadoc)
* @see org.apache.axis2.jaxws.message.XMLPart#getHeaderBlock(java.lang.String, java.lang.String, java.lang.Object, org.apache.axis2.jaxws.message.factory.BlockFactory)
@@ -523,6 +534,14 @@
block.setParent(getParent());
getContentAsXMLSpine().setBodyBlock(index, block);
}
+
+ /* (non-Javadoc)
+ * @see org.apache.axis2.jaxws.message.XMLPart#setBodyBlock(int, org.apache.axis2.jaxws.message.Block)
+ */
+ public void setBodyBlock(Block block) throws WebServiceException {
+ block.setParent(getParent());
+ getContentAsXMLSpine().setBodyBlock(block);
+ }
/* (non-Javadoc)
* @see org.apache.axis2.jaxws.message.XMLPart#setHeaderBlock(java.lang.String, java.lang.String, org.apache.axis2.jaxws.message.Block)
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpine.java Fri Feb 2 09:43:34 2007
@@ -126,20 +126,38 @@
/**
* getBodyBlock
- * Get the body block as the specificed index.
+ * Get the body block at the specificed index.
* The BlockFactory and object context are passed in to help create the
* proper kind of block.
+ * Calling this method will cache the OM. Avoid it in performant situations.
*
* @param index
* @param context
* @param blockFactory
- * @return Block
+ * @return Block or null
* @throws WebServiceException
+ * @see getBodyBlock
*/
public Block getBodyBlock(int index, Object context, BlockFactory blockFactory)
throws WebServiceException;
/**
+ * getBodyBlock
+ * Get the single Body Block.
+ * The BlockFactory and object context are passed in to help create the
+ * proper kind of block.
+ * This method should only be invoked when it is known that there is zero or one block.
+ *
+ * @param index
+ * @param context
+ * @param blockFactory
+ * @return Block or null
+ * @throws WebServiceException
+ */
+ public Block getBodyBlock(Object context, BlockFactory blockFactory)
+ throws WebServiceException;
+
+ /**
* setBodyBlock
* Set the block at the specified index
* Once set, the Message owns the block. You must
@@ -151,7 +169,17 @@
public void setBodyBlock(int index, Block block) throws WebServiceException;
/**
- * removePayload
+ * setBodyBlock
+ * Set this as block as the single block for the message.
+ *
+ * @param index
+ * @param block
+ * @throws WebServiceException
+ */
+ public void setBodyBlock(Block block) throws WebServiceException;
+
+ /**
+ * removeBodyBlock
* Removes the indicated BodyBlock
* @param index
* @throws WebServiceException
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java Fri Feb 2 09:43:34 2007
@@ -252,6 +252,11 @@
if (log.isDebugEnabled()) {
log.debug("getBodyBlock: Get the " + index + "block using the block factory, " + blockFactory);
}
+
+ // Forces the parser to read all of the blocks
+ getNumBodyBlocks();
+
+ // Get the indicated block
OMElement omElement = _getChildOMElement(_getBodyBlockParent(), index);
if (omElement == null) {
// Null indicates that no block is available
@@ -265,9 +270,39 @@
}
return this._getBlockFromOMElement(omElement, context, blockFactory);
}
+
+ /* (non-Javadoc)
+ * @see org.apache.axis2.jaxws.message.impl.XMLSpine#getBodyBlock(int, java.lang.Object, org.apache.axis2.jaxws.message.factory.BlockFactory)
+ */
+ public Block getBodyBlock(Object context, BlockFactory blockFactory) throws WebServiceException {
+
+ if (log.isDebugEnabled()) {
+ log.debug("getBodyBlock PERFORMANT: Get the block using the block factory, " + blockFactory);
+ }
+
+ // Calling getBodyBlock assumes that there is only one or zero body blocks in the message. Subsequent
+ // Blocks are lost. If the caller needs access to multiple body blocks, then getBodyBlocks(index,...) should be used
+
+ // Get the indicated block
+ OMElement omElement = _getChildOMElement(_getBodyBlockParent(), 0);
+ if (omElement == null) {
+ // Null indicates that no block is available
+ if (log.isDebugEnabled()) {
+ log.debug("getBodyBlock: The block was not found " );
+ }
+ return null;
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("getBodyBlock: Found omElement " + omElement.getQName() );
+ }
+ return this._getBlockFromOMElement(omElement, context, blockFactory);
+ }
public void setBodyBlock(int index, Block block) throws WebServiceException {
+ // Forces the parser to read all of the blocks
+ getNumBodyBlocks();
+
block.setParent(getParent());
OMElement bElement = _getBodyBlockParent();
OMElement om = this._getChildOMElement(bElement, index);
@@ -284,8 +319,34 @@
om.detach();
}
}
+
+ public void setBodyBlock(Block block) throws WebServiceException {
+
+ // Forces the parser to read all of the blocks
+ getNumBodyBlocks();
+
+ block.setParent(getParent());
+
+ // Remove all of the children
+ OMElement bElement = _getBodyBlockParent();
+ Iterator it = bElement.getChildren();
+ while (it.hasNext()) {
+ it.next();
+ it.remove();
+ }
+
+ // The block is supposed to represent a single element.
+ // But if it does not represent an element , the following will fail.
+ QName qName = block.getQName();
+
+ OMElement newOM = _createOMElementFromBlock(qName, block, soapFactory);
+ bElement.addChild(newOM);
+ }
public void removeBodyBlock(int index) throws WebServiceException {
+ // Forces the parser to read all of the blocks
+ getNumBodyBlocks();
+
OMElement om = this._getChildOMElement(_getBodyBlockParent(), index);
if (om != null) {
om.detach();
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java Fri Feb 2 09:43:34 2007
@@ -144,7 +144,7 @@
}
else {
// If it is not MESSAGE, then it is PAYLOAD (which is the default); only work with the body
- Block block = message.getBodyBlock(0, null, factory);
+ Block block = message.getBodyBlock(null, factory);
if(block != null){
requestParamValue = block.getBusinessObject(true);
} else {
@@ -294,7 +294,7 @@
// PAYLOAD mode deals only with the body of the message.
Block block = factory.createFrom(value, null, null);
message = msgFactory.create(messageProtocol);
- message.setBodyBlock(0, block);
+ message.setBodyBlock(block);
}
}
Modified: webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/RPCLit.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/RPCLit.wsdl?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/RPCLit.wsdl (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/RPCLit.wsdl Fri Feb 2 09:43:34 2007
@@ -210,6 +210,19 @@
<wsdl:part name="simpleOut" type="xsd:string"/>
</wsdl:message>
+
+ <wsdl:message name="testSimple2Request">
+
+ <wsdl:part name="simple2In1" type="xsd:string"/>
+ <wsdl:part name="simple2In1" type="xsd:string"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="testSimple2Response">
+
+ <wsdl:part name="simple2Out" type="xsd:string"/>
+
+ </wsdl:message>
@@ -223,6 +236,14 @@
<wsdl:output message="impl:testSimpleResponse" name="testSimpleResponse"/>
</wsdl:operation>
+
+ <wsdl:operation name="testSimple2" parameterOrder="simple2In1 simple2In2">
+
+ <wsdl:input message="impl:testSimple2Request" name="testSimple2Request"/>
+
+ <wsdl:output message="impl:testSimple2Response" name="testSimple2Response"/>
+
+ </wsdl:operation>
<wsdl:operation name="testLists" parameterOrder="arg_0_0 arg_1_0 arg_2_0 arg_3_0 arg_4_0 arg_5_0 arg_7_0 arg_6_0">
@@ -301,6 +322,18 @@
</wsdl:input>
<wsdl:output name="testSimpleResponse">
+ <wsdlsoap:body namespace="http://org/apache/axis2/jaxws/proxy/rpclit" use="literal"/>
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="testSimple2">
+
+ <wsdl:input name="testSimple2Request">
+ <wsdlsoap:body namespace="http://org/apache/axis2/jaxws/proxy/rpclit" use="literal"/>
+ </wsdl:input>
+
+ <wsdl:output name="testSimple2Response">
<wsdlsoap:body namespace="http://org/apache/axis2/jaxws/proxy/rpclit" use="literal"/>
</wsdl:output>
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/attachments/MTOMSerializationTests.java Fri Feb 2 09:43:34 2007
@@ -129,7 +129,7 @@
MessageFactory msgFactory = (MessageFactory) FactoryRegistry.getFactory(MessageFactory.class);
Message msg = msgFactory.create(Protocol.soap11);
- msg.setBodyBlock(0, block);
+ msg.setBodyBlock(block);
msg.setMTOMEnabled(true);
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/BlockTests.java Fri Feb 2 09:43:34 2007
@@ -174,9 +174,6 @@
// In this case, we know the QName prior to creating the Block...so let's pass it in.
Block block = f.createFrom(sampleText, null, sampleQName);
- // We passed in a qname, so it should be immediately available
- assertTrue(block.isQNameAvailable());
-
// Make sure the QName is correct.
QName qName = block.getQName();
assertTrue(sampleQName.equals(qName));
@@ -214,9 +211,6 @@
// Create a Block from the inflow.
Block block = f.createFrom(inflow, null, null);
- // We didn't pass in a qname, so the following should return false
- assertTrue(!block.isQNameAvailable());
-
// Assuming no handlers are installed, the next thing that will happen
// is the proxy code will ask for the business object (String).
Object bo = block.getBusinessObject(true);
@@ -248,9 +242,6 @@
// Create a Block from the inflow.
Block block = f.createFrom(inflow, null, null);
- // We didn't pass in a qname, so the following should return false
- assertTrue(!block.isQNameAvailable());
-
// Let's assume we need to get the QName to find the operation name.
// This will cause an underlying parse
QName qName = block.getQName();
@@ -287,9 +278,6 @@
// Create a Block from the inflow. Assume that we know the QName already
Block block = f.createFrom(inflow, null, sampleQName);
- // We passed in a qname, so the following should return false
- assertTrue(block.isQNameAvailable());
-
// Let's assume we need to get the QName to find the operation name.
QName qName = block.getQName();
assertTrue(sampleQName.equals(qName));
@@ -436,9 +424,6 @@
// Create a Block from the inflow.
Block block = f.createFrom(inflow, context, null);
- // We didn't pass in a qname, so the following should return false
- assertTrue(!block.isQNameAvailable());
-
// Assuming no handlers are installed, the next thing that will happen
// is the proxy code will ask for the business object.
Object bo = block.getBusinessObject(true);
@@ -485,10 +470,7 @@
// Create a Block from the inflow.
Block block = f.createFrom(inflow, context, null);
-
- // We didn't pass in a qname, so the following should return false
- assertTrue(!block.isQNameAvailable());
-
+
// Assume that we need to find the QName (perhaps to identify the operation and
// determine if handlers are installed). This is not very perfomant since
// it causes an underlying parse of the String...but we need to support this.
@@ -809,9 +791,6 @@
// Create a Block from the inflow.
Block block = f.createFrom(inflow, null, null);
- // We didn't pass in a qname, so the following should return false
- assertTrue(!block.isQNameAvailable());
-
// Assuming no handlers are installed, the next thing that will happen
// is the proxy code will ask for the business object (String).
Object bo = block.getBusinessObject(true);
@@ -847,9 +826,6 @@
// Create a Block from the inflow.
Block block = f.createFrom(inflow, null, null);
- // We didn't pass in a qname, so the following should return false
- assertTrue(!block.isQNameAvailable());
-
// Let's assume we need to get the QName to find the operation name.
// This will cause an underlying parse
QName qName = block.getQName();
@@ -932,7 +908,7 @@
MessageFactory mf = (MessageFactory) FactoryRegistry.getFactory(MessageFactory.class);
Message msg = mf.create(Protocol.soap11);
- msg.setBodyBlock(0,block);
+ msg.setBodyBlock(block);
org.apache.axiom.soap.SOAPEnvelope env = (org.apache.axiom.soap.SOAPEnvelope)msg.getAsOMElement();
// Serialize the Envelope using the same mechanism as the
// HTTP client.
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageRPCTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageRPCTests.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageRPCTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageRPCTests.java Fri Feb 2 09:43:34 2007
@@ -126,7 +126,7 @@
Block block = bf.createFrom(e, context, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// Check to see if the message is a fault. The client/server will always call this method.
// The Message must respond appropriately without doing a conversion.
@@ -201,7 +201,7 @@
Block block = bf.createFrom(e, context, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// Check to see if the message is a fault. The client/server will always call this method.
// The Message must respond appropriately without doing a conversion.
@@ -284,7 +284,7 @@
JAXBBlockContext context = new JAXBBlockContext(StockPrice.class.getPackage().getName());
// Get the JAXBBlock that wraps the content
- Block b = m.getBodyBlock(0, context, bf);
+ Block b = m.getBodyBlock(context, bf);
// Check to see if the message is a fault. The client/server will always call this method.
// The Message must respond appropriately without doing a conversion.
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/MessageTests.java Fri Feb 2 09:43:34 2007
@@ -152,7 +152,7 @@
Block block = f.createFrom(sampleText, null, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// Check to see if the message is a fault. The client/server will always call this method.
// The Message must respond appropriately without doing a conversion.
@@ -217,7 +217,7 @@
Block block = f.createFrom(sampleText, null, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// If there is a JAX-WS handler, the Message is converted into a SOAPEnvelope
SOAPEnvelope soapEnvelope = m.getAsSOAPEnvelope();
@@ -282,7 +282,7 @@
Block block = f.createFrom(whiteSpaceText, null, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// If there is a JAX-WS handler, the Message is converted into a SOAPEnvelope
SOAPEnvelope soapEnvelope = m.getAsSOAPEnvelope();
@@ -344,7 +344,7 @@
Block block = f.createFrom(this.sampleDouble, null, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// If there is a JAX-WS handler, the Message is converted into a SOAPEnvelope
SOAPEnvelope soapEnvelope = m.getAsSOAPEnvelope();
@@ -421,7 +421,7 @@
// is the proxy code will ask for the business object (String).
XMLStringBlockFactory blockFactory =
(XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
- Block block = m.getBodyBlock(0, null, blockFactory);
+ Block block = m.getBodyBlock(null, blockFactory);
Object bo = block.getBusinessObject(true);
assertTrue(bo instanceof String);
@@ -491,7 +491,7 @@
// is the proxy code will ask for the business object (String).
XMLStringBlockFactory blockFactory =
(XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
- Block block = m.getBodyBlock(0, null, blockFactory);
+ Block block = m.getBodyBlock(null, blockFactory);
Object bo = block.getBusinessObject(true);
assertTrue(bo instanceof String);
@@ -561,7 +561,7 @@
// is the proxy code will ask for the business object (String).
XMLStringBlockFactory blockFactory =
(XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
- Block block = m.getBodyBlock(0, null, blockFactory);
+ Block block = m.getBodyBlock(null, blockFactory);
Object bo = block.getBusinessObject(true);
assertTrue(bo instanceof String);
@@ -609,7 +609,7 @@
// is the proxy code will ask for the business object (String).
XMLStringBlockFactory blockFactory =
(XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
- Block block = m.getBodyBlock(0, null, blockFactory);
+ Block block = m.getBodyBlock(null, blockFactory);
Object bo = block.getBusinessObject(true);
assertTrue(bo instanceof String);
@@ -649,7 +649,7 @@
Block block = bf.createFrom(obj, context, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// Check to see if the message is a fault. The client/server will always call this method.
// The Message must respond appropriately without doing a conversion.
@@ -715,7 +715,7 @@
Block block = bf.createFrom(obj, context, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// Check to see if the message is a fault. The client/server will always call this method.
// The Message must respond appropriately without doing a conversion.
@@ -793,7 +793,7 @@
JAXBBlockContext context = new JAXBBlockContext(EchoStringResponse.class.getPackage().getName());
// Get the JAXBBlock that wraps the content
- Block b = m.getBodyBlock(0, context, bf);
+ Block b = m.getBodyBlock(context, bf);
// Check to see if the message is a fault. The client/server will always call this method.
// The Message must respond appropriately without doing a conversion.
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SOAP12Tests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SOAP12Tests.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SOAP12Tests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/message/SOAP12Tests.java Fri Feb 2 09:43:34 2007
@@ -81,7 +81,7 @@
Block block = f.createFrom(sampleText, null, null);
// Add the block to the message as normal body content.
- m.setBodyBlock(0, block);
+ m.setBodyBlock(block);
// Assuming no handlers are installed, the next thing that will happen
// is a XMLStreamReader will be requested...to go to OM. At this point the
@@ -183,7 +183,7 @@
// is the proxy code will ask for the business object (String).
XMLStringBlockFactory blockFactory =
(XMLStringBlockFactory) FactoryRegistry.getFactory(XMLStringBlockFactory.class);
- Block block = m.getBodyBlock(0, null, blockFactory);
+ Block block = m.getBodyBlock(null, blockFactory);
Object bo = block.getBusinessObject(true);
assertTrue(bo instanceof String);
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/RPCProxyTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/RPCProxyTests.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/RPCProxyTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/RPCProxyTests.java Fri Feb 2 09:43:34 2007
@@ -88,7 +88,25 @@
String response = proxy.testSimple(request);
assertTrue(response != null);
- assert(response.equals(request));
+ assertTrue(response.equals(request));
+ }catch(Exception e){
+ e.printStackTrace();
+ fail("Exception received" + e);
+ }
+ }
+
+ /**
+ * Simple test that ensures that we can echo a string to an rpc/lit web service
+ */
+ public void testSimple2() throws Exception {
+ try{
+ RPCLit proxy = getProxy();
+ String request1 = "hello";
+ String request2 = "world";
+
+ String response = proxy.testSimple2(request1, request2);
+ assertTrue(response != null);
+ assertTrue(response.equals("helloworld"));
}catch(Exception e){
e.printStackTrace();
fail("Exception received" + e);
@@ -134,6 +152,33 @@
assertTrue(response.contains("PAYLOAD WITH XSI:TYPE"));
}
+ public void testSimple2_DispatchWithoutXSIType() throws Exception {
+ // Send a payload that simulates
+ // the rpc message
+ String request = "<tns:testSimple2 xmlns:tns='http://org/apache/axis2/jaxws/proxy/rpclit'>" +
+ "<tns:simple2In1>" +
+ "HELLO" +
+ "</tns:simple2In1>" +
+ "<tns:simple2In2>" +
+ "WORLD" +
+ "</tns:simple2In2></tns:testSimple2>";
+ Dispatch<String> dispatch = getDispatch();
+ String response = dispatch.invoke(request);
+
+
+ assertNotNull("dispatch invoke returned null", response);
+ System.out.println(response);
+
+ // Check to make sure the content is correct
+ assertTrue(!response.contains("soap"));
+ assertTrue(!response.contains("Envelope"));
+ assertTrue(!response.contains("Body"));
+ assertTrue(!response.contains("Fault"));
+ assertTrue(response.contains("simple2Out"));
+ assertTrue(response.contains("testSimple2Response"));
+ assertTrue(response.contains("HELLOWORLD"));
+ }
+
public void testSimple_DispatchWithoutXSIType() throws Exception {
// Send a payload that simulates
// the rpc message
@@ -171,7 +216,6 @@
assertTrue(response.length==2);
assertTrue(response[0].equals("Hello"));
assertTrue(response[1].equals("World"));
- assert(response.equals(request));
}catch(Exception e){
e.printStackTrace();
fail("Exception received" + e);
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/META-INF/RPCLit.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/META-INF/RPCLit.wsdl?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/META-INF/RPCLit.wsdl (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/META-INF/RPCLit.wsdl Fri Feb 2 09:43:34 2007
@@ -210,6 +210,19 @@
<wsdl:part name="simpleOut" type="xsd:string"/>
</wsdl:message>
+
+ <wsdl:message name="testSimple2Request">
+
+ <wsdl:part name="simple2In1" type="xsd:string"/>
+ <wsdl:part name="simple2In1" type="xsd:string"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="testSimple2Response">
+
+ <wsdl:part name="simple2Out" type="xsd:string"/>
+
+ </wsdl:message>
@@ -223,6 +236,14 @@
<wsdl:output message="impl:testSimpleResponse" name="testSimpleResponse"/>
</wsdl:operation>
+
+ <wsdl:operation name="testSimple2" parameterOrder="simple2In1 simple2In2">
+
+ <wsdl:input message="impl:testSimple2Request" name="testSimple2Request"/>
+
+ <wsdl:output message="impl:testSimple2Response" name="testSimple2Response"/>
+
+ </wsdl:operation>
<wsdl:operation name="testLists" parameterOrder="arg_0_0 arg_1_0 arg_2_0 arg_3_0 arg_4_0 arg_5_0 arg_7_0 arg_6_0">
@@ -301,6 +322,18 @@
</wsdl:input>
<wsdl:output name="testSimpleResponse">
+ <wsdlsoap:body namespace="http://org/apache/axis2/jaxws/proxy/rpclit" use="literal"/>
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="testSimple2">
+
+ <wsdl:input name="testSimple2Request">
+ <wsdlsoap:body namespace="http://org/apache/axis2/jaxws/proxy/rpclit" use="literal"/>
+ </wsdl:input>
+
+ <wsdl:output name="testSimple2Response">
<wsdlsoap:body namespace="http://org/apache/axis2/jaxws/proxy/rpclit" use="literal"/>
</wsdl:output>
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/RPCLitImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/RPCLitImpl.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/RPCLitImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/RPCLitImpl.java Fri Feb 2 09:43:34 2007
@@ -62,6 +62,13 @@
return simpleIn;
}
+ /**
+ * Echo the input
+ */
+ public String testSimple2(String simple2In1, String simple2In2) {
+ return simple2In1 + simple2In2;
+ }
+
public QName[] testLists(
QName[] qNames,
XMLGregorianCalendar[] calendars,
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/sei/RPCLit.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/sei/RPCLit.java?view=diff&rev=502670&r1=502669&r2=502670
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/sei/RPCLit.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/rpclit/sei/RPCLit.java Fri Feb 2 09:43:34 2007
@@ -38,6 +38,20 @@
public String testSimple(
@WebParam(name = "simpleIn", partName = "simpleIn")
String simpleIn);
+
+ /**
+ *
+ * @param simpleIn
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod
+ @WebResult(name = "simple2Out", partName = "simple2Out")
+ public String testSimple2(
+ @WebParam(name = "simple2In1", partName = "simpleIn1")
+ String simple2In1,
+ @WebParam(name = "simple2In2", partName = "simple2In2")
+ String simple2In2);
/**
*
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org