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:07:33 UTC
svn commit: r601454 - in /incubator/cxf/trunk:
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/
tools/javato/ws/src/test/java/org/apache/cxf/tools...
Author: dkulp
Date: Wed Dec 5 10:07:32 2007
New Revision: 601454
URL: http://svn.apache.org/viewvc?rev=601454&view=rev
Log:
[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/trunk/api/src/main/java/org/apache/cxf/endpoint/Client.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Client.java?rev=601454&r1=601453&r2=601454&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Client.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Client.java Wed Dec 5 10:07:32 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/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=601454&r1=601453&r2=601454&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Wed Dec 5 10:07:32 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/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=601454&r1=601453&r2=601454&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Wed Dec 5 10:07:32 2007
@@ -666,8 +666,6 @@
SchemaCollection.addGlobalElementToSchema(schema, el);
}
- el.setMinOccurs(0);
- el.setMaxOccurs(1);
el.setNillable(true);
XmlSchemaType tp = (XmlSchemaType)mpi.getXmlSchema();
@@ -763,8 +761,6 @@
XmlSchemaElement el = new XmlSchemaElement();
XmlSchemaTools.setElementQName(el, qname);
- el.setMinOccurs(0);
- el.setMaxOccurs(1);
el.setNillable(true);
if (!isExistSchemaElement(schema, qname)) {
Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=601454&r1=601453&r2=601454&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java Wed Dec 5 10:07:32 2007
@@ -308,7 +308,6 @@
}
- @org.junit.Ignore
@Test
public void testXMlBare() throws Exception {
env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/xml-bare.wsdl");
Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java?rev=601454&r1=601453&r2=601454&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java (original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java Wed Dec 5 10:07:32 2007
@@ -29,7 +29,6 @@
import org.junit.Before;
import org.junit.Test;
-@org.junit.Ignore
public class JaxwsServiceBuilderNoAnnoTest extends ProcessorTestBase {
JaxwsServiceBuilder builder = new JaxwsServiceBuilder();
WSDL11Generator generator = new WSDL11Generator();