You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/12/05 19:48:36 UTC
svn commit: r601464 - in /incubator/cxf/branches/2.0.x-fixes: ./
api/src/main/java/org/apache/cxf/endpoint/
rt/core/src/main/java/org/apache/cxf/endpoint/
rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/
Author: dkulp
Date: Wed Dec 5 10:48:35 2007
New Revision: 601464
URL: http://svn.apache.org/viewvc?rev=601464&view=rev
Log:
Merged revisions 601454 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r601454 | dkulp | 2007-12-05 13:07:32 -0500 (Wed, 05 Dec 2007) | 3 lines
[CXF-1263] Global elements shouldn't have minOccurs or maxOccurs set.
Change the added methods on Client to explicit invokeWrapped to avoid confusion if the first parameter is a boolean
........
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/endpoint/Client.java
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/endpoint/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/endpoint/Client.java?rev=601464&r1=601463&r2=601464&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/endpoint/Client.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/endpoint/Client.java Wed Dec 5 10:48:35 2007
@@ -36,44 +36,43 @@
* Invokes an operation syncronously
* @param operationName The name of the operation to be invoked. The service namespace will be used
* when looking up the BindingOperationInfo.
- * @param params The params that matches the parts of the input message of the operation
+ * @param params The params that matches the parts of the input message of the operation. If the
+ * BindingOperationInfo supports unwrapping, it assumes the params are in the "unwrapped" form. If
+ * params are in the wrapped form, use invokeWrapped
* @return The return values that matche the parts of the output message of the operation
*/
Object[] invoke(String operationName,
Object... params) throws Exception;
-
+
/**
* Invokes an operation syncronously
- * @param operationName The name of the operation to be invoked. The service namespace will be used
- * when looking up the BindingOperationInfo.
- * @param unwrapped If the operation supports unwrapping, this flag tells whether the params list
- * is in unwrapped form (true) or wrapped form.
- * @param params The params that matches the parts of the input message of the operation
+ * @param operationName The name of the operation to be invoked
+ * @param params The params that matches the parts of the input message of the operation. If the
+ * BindingOperationInfo supports unwrapping, it assumes the params are in the "unwrapped" form. If
+ * params are in the wrapped form, use invokeWrapped
* @return The return values that matche the parts of the output message of the operation
*/
- Object[] invoke(String operationName,
- boolean unwrapped,
+ Object[] invoke(QName operationName,
Object... params) throws Exception;
-
+
+
/**
* Invokes an operation syncronously
- * @param operationName The name of the operation to be invoked
+ * @param operationName The name of the operation to be invoked. The service namespace will be used
+ * when looking up the BindingOperationInfo.
* @param params The params that matches the parts of the input message of the operation
* @return The return values that matche the parts of the output message of the operation
*/
- Object[] invoke(QName operationName,
+ Object[] invokeWrapped(String operationName,
Object... params) throws Exception;
-
+
/**
* Invokes an operation syncronously
* @param operationName The name of the operation to be invoked
- * @param unwrapped If the operation supports unwrapping, this flag tells whether the params list
- * is in unwrapped form (true) or wrapped form.
* @param params The params that matches the parts of the input message of the operation
* @return The return values that matche the parts of the output message of the operation
*/
- Object[] invoke(QName operationName,
- boolean unwrapped,
+ Object[] invokeWrapped(QName operationName,
Object... params) throws Exception;
/**
Modified: incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=601464&r1=601463&r2=601464&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Wed Dec 5 10:48:35 2007
@@ -181,31 +181,42 @@
}
public Object[] invoke(String operationName, Object... params) throws Exception {
- return invoke(operationName, true, params);
- }
- public Object[] invoke(String operationName, boolean unwrapped, Object... params) throws Exception {
QName q = new QName(getEndpoint().getService().getName().getNamespaceURI(), operationName);
- return invoke(q, unwrapped, params);
+ return invoke(q, params);
}
public Object[] invoke(QName operationName, Object... params) throws Exception {
- return invoke(operationName, true, params);
- }
- public Object[] invoke(QName operationName, boolean unwrapped, Object... params) throws Exception {
BindingOperationInfo op = getEndpoint().getEndpointInfo().getBinding().getOperation(operationName);
if (op == null) {
throw new UncheckedException(
new org.apache.cxf.common.i18n.Message("NO_OPERATION", LOG, operationName));
}
- if (op.isUnwrappedCapable() && unwrapped) {
+ if (op.isUnwrappedCapable()) {
op = op.getUnwrappedOperation();
}
return invoke(op, params);
}
+ public Object[] invokeWrapped(String operationName, Object... params) throws Exception {
+ QName q = new QName(getEndpoint().getService().getName().getNamespaceURI(), operationName);
+
+ return invokeWrapped(q, params);
+ }
+
+ public Object[] invokeWrapped(QName operationName, Object... params) throws Exception {
+ BindingOperationInfo op = getEndpoint().getEndpointInfo().getBinding().getOperation(operationName);
+ if (op == null) {
+ throw new UncheckedException(
+ new org.apache.cxf.common.i18n.Message("NO_OPERATION", LOG, operationName));
+ }
+ return invoke(op, params);
+ }
+
+
+
public Object[] invoke(BindingOperationInfo oi, Object[] params,
Map<String, Object> context) throws Exception {
return invoke(oi, params, context, null);
Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=601464&r1=601463&r2=601464&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Wed Dec 5 10:48:35 2007
@@ -645,8 +645,6 @@
if (!isExistSchemaElement(schema, mpi.getElementQName())) {
SchemaCollection.addGlobalElementToSchema(schema, el);
}
- el.setMinOccurs(1);
- el.setMaxOccurs(0);
el.setNillable(true);
XmlSchemaType tp = (XmlSchemaType)mpi.getXmlSchema();
@@ -746,8 +744,6 @@
XmlSchemaElement el = new XmlSchemaElement();
XmlSchemaTools.setElementQName(el, qname);
- el.setMinOccurs(1);
- el.setMaxOccurs(0);
el.setNillable(true);
if (!isExistSchemaElement(schema, qname)) {