You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by am...@apache.org on 2007/02/26 14:39:43 UTC
svn commit: r511803 [2/2] - in /webservices/axis2/trunk/java/modules:
adb-codegen/ adb-codegen/src/org/apache/axis2/schema/
adb-codegen/src/org/apache/axis2/schema/template/
adb-codegen/src/org/apache/axis2/schema/writer/
adb-codegen/test-resources/tes...
Modified: webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java?view=diff&rev=511803&r1=511802&r2=511803
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java (original)
+++ webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java Mon Feb 26 05:39:42 2007
@@ -197,6 +197,7 @@
for (Iterator operations = axisService.getOperations();
operations.hasNext();) {
AxisOperation op = (AxisOperation) operations.next();
+
if (WSDLUtil.isInputPresentForMEP(op.getMessageExchangePattern())) {
AxisMessage message = op.getMessage(
WSDLConstants.MESSAGE_LABEL_IN_VALUE);
@@ -231,6 +232,43 @@
}
}
}
+
+ if (WSDLUtil.isOutputPresentForMEP(op.getMessageExchangePattern())) {
+ AxisMessage message = op.getMessage(
+ WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+ if (message != null && message.getParameter(Constants.UNWRAPPED_KEY) != null) {
+ SchemaGlobalElement xmlbeansElement = sts.findElement(message.getElementQName());
+ SchemaType sType = xmlbeansElement.getType();
+
+ SchemaProperty[] elementProperties = sType.getElementProperties();
+ for (int i = 0; i < elementProperties.length; i++) {
+ SchemaProperty elementProperty = elementProperties[i];
+
+ QName partQName = WSDLUtil.getPartQName(op.getName().getLocalPart(),
+ WSDLConstants.OUTPUT_PART_QNAME_SUFFIX,
+ elementProperty.getName().getLocalPart());
+
+ //this type is based on a primitive type- use the
+ //primitive type name in this case
+ String fullJaveName = elementProperty.getType().getFullJavaName();
+ if (elementProperty.extendsJavaArray()) {
+ fullJaveName = fullJaveName.concat("[]");
+ }
+ mapper.addTypeMappingName(partQName, fullJaveName);
+ SchemaType primitiveType = elementProperty.getType().getPrimitiveType();
+
+
+ if (primitiveType != null) {
+ mapper.addTypeMappingStatus(partQName, Boolean.TRUE);
+ }
+ if (elementProperty.extendsJavaArray()) {
+ mapper.addTypeMappingStatus(partQName, Constants.ARRAY_TYPE);
+ }
+ }
+ }
+ }
+
+
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org