You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by dm...@apache.org on 2007/03/08 17:57:27 UTC
svn commit: r516119 -
/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
Author: dmiddlem
Date: Thu Mar 8 09:57:25 2007
New Revision: 516119
URL: http://svn.apache.org/viewvc?view=rev&rev=516119
Log:
Fixing a warning message that can occur in the WS-Addressing support for WSDL to IDL (YOKO-298).
Modified:
incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java?view=diff&rev=516119&r1=516118&r2=516119
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java Thu Mar 8 09:57:25 2007
@@ -45,6 +45,9 @@
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.wsdl.JAXBExtensionHelper;
import org.apache.schemas.yoko.bindings.corba.AddressType;
@@ -58,6 +61,7 @@
import org.apache.ws.commons.schema.XmlSchema;
import org.apache.ws.commons.schema.XmlSchemaAnnotation;
+import org.apache.ws.commons.schema.XmlSchemaAppInfo;
import org.apache.ws.commons.schema.XmlSchemaComplexType;
import org.apache.ws.commons.schema.XmlSchemaElement;
import org.apache.ws.commons.schema.XmlSchemaExternal;
@@ -536,6 +540,35 @@
if (el.getAnnotation() != null) {
annotation = el.getAnnotation();
}
+
+ // Check to see if this element references the binding we are creating. For now,
+ // this situation won't be handled. REVISIT.
+ if (annotation != null) {
+ Iterator i = annotation.getItems().getIterator();
+ XmlSchemaAppInfo appInfo = null;
+ while (i.hasNext()) {
+ Object item = i.next();
+ if (item instanceof XmlSchemaAppInfo) {
+ appInfo = (XmlSchemaAppInfo)item;
+ break;
+ }
+ }
+
+ if (appInfo != null) {
+ NodeList nlist = appInfo.getMarkup();
+ Node node = nlist.item(0);
+ String info = node.getNodeValue();
+ info.trim();
+ String annotationBindingName = "";
+ if ("corba:binding=".equals(info.substring(0, 14))) {
+ annotationBindingName = info.substring(14);
+ }
+ if (bindingName.equals(annotationBindingName)) {
+ annotation = null;
+ }
+ }
+ }
+
corbaTypeImpl =
helper.convertSchemaToCorbaType(el.getSchemaType(),
el.getQName(), el.getSchemaType(),
@@ -547,6 +580,7 @@
helper.checkPrefix(el.getQName()),
helper.checkPrefix(corbaTypeImpl.getQName()));
}
+
if (corbaTypeImpl != null) {
if (corbaTypeImpl.getQName() != null) {
corbaTypeImpl.setQName(null);