Author: jkaputin
Date: Thu Nov  9 16:16:09 2006
New Revision: 473144

URL: http://svn.apache.org/viewvc?view=rev&rev=473144
Log:
WODEN-59 fix NPE on missing message label in
InterfaceFaultReference by implementing a derived
default. Testcase Storage-4G no longer fails with
an NPE.

Modified:
    incubator/woden/trunk/java/ant-test/build.xml
    incubator/woden/trunk/java/src/org/apache/woden/internal/BaseWSDLReader.java

Modified: incubator/woden/trunk/java/ant-test/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/woden/trunk/java/ant-test/build.xml?view=diff&rev=473144&r1=473143&r2=473144
==============================================================================
--- incubator/woden/trunk/java/ant-test/build.xml (original)
+++ incubator/woden/trunk/java/ant-test/build.xml Thu Nov  9 16:16:09 2006
@@ -34,7 +34,7 @@
 
        <target name="documents-good" description="---> Validates W3C WSDL 2.0 
good document test suite and outputs component model">
                <mkdir dir="results" />
-               <validatewsdl20 dir="${test-suite.dir}/documents/good" 
includes="**/*.wsdl" excludes="SchemaId-1G/schemaIds.wsdl 
Storage-4G/storage.wsdl" cm="yes" cmdir="results" 
report="documents-good-report.xml" />
+               <validatewsdl20 dir="${test-suite.dir}/documents/good" 
includes="**/*.wsdl" excludes="SchemaId-1G/schemaIds.wsdl" cm="yes" 
cmdir="results" report="documents-good-report.xml" />
                <zip destfile="test-suite-results.zip" basedir="results" />
        </target>
 

Modified: 
incubator/woden/trunk/java/src/org/apache/woden/internal/BaseWSDLReader.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/BaseWSDLReader.java?view=diff&rev=473144&r1=473143&r2=473144
==============================================================================
--- 
incubator/woden/trunk/java/src/org/apache/woden/internal/BaseWSDLReader.java 
(original)
+++ 
incubator/woden/trunk/java/src/org/apache/woden/internal/BaseWSDLReader.java 
Thu Nov  9 16:16:09 2006
@@ -884,6 +884,18 @@
         {
             faultRef.setMessageLabel(new NCName(msgLabel));
         }
+        else
+        {
+            //TODO this is a temp fix, correct action to use MEP to determine 
default
+            if(faultRef.getDirection().equals(Direction.IN))
+            {
+                faultRef.setMessageLabel(MessageLabel.IN);
+            }
+            else
+            {
+                faultRef.setMessageLabel(MessageLabel.OUT);
+            }
+        }
 
         parseExtensionAttributes(faultRefEl, 
InterfaceFaultReferenceElement.class, faultRef, desc);
 
@@ -1273,6 +1285,8 @@
         if(msgLabel != null)
         {
             faultRef.setMessageLabel(new NCName(msgLabel));
+            //Note, the BindFaultRef component does not expose msg label so no 
derived default is needed.
+            //The msgLabel attr is only used for validating against a 
placeholder message from a MEP.
         }
 
         parseExtensionAttributes(faultRefEl, 
BindingFaultReferenceElement.class, faultRef, desc);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to