You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2006/07/18 20:35:23 UTC

svn commit: r423176 - /incubator/ode/scratch/pxe-iapi/bpel-dd/src/main/java/com/fs/pxe/bpel/dd/EndpointEnhancer.java

Author: boisvert
Date: Tue Jul 18 11:35:22 2006
New Revision: 423176

URL: http://svn.apache.org/viewvc?rev=423176&view=rev
Log:
Don't fail if WSDL binding was not provided;  issue warning instead.

Modified:
    incubator/ode/scratch/pxe-iapi/bpel-dd/src/main/java/com/fs/pxe/bpel/dd/EndpointEnhancer.java

Modified: incubator/ode/scratch/pxe-iapi/bpel-dd/src/main/java/com/fs/pxe/bpel/dd/EndpointEnhancer.java
URL: http://svn.apache.org/viewvc/incubator/ode/scratch/pxe-iapi/bpel-dd/src/main/java/com/fs/pxe/bpel/dd/EndpointEnhancer.java?rev=423176&r1=423175&r2=423176&view=diff
==============================================================================
--- incubator/ode/scratch/pxe-iapi/bpel-dd/src/main/java/com/fs/pxe/bpel/dd/EndpointEnhancer.java (original)
+++ incubator/ode/scratch/pxe-iapi/bpel-dd/src/main/java/com/fs/pxe/bpel/dd/EndpointEnhancer.java Tue Jul 18 11:35:22 2006
@@ -66,9 +66,9 @@
       }
     }
     if (wsdlBinding == null) {
-      throw new DDException(
-              "Couldn't find binding for portType with namespace " + portTypeQName.getNamespaceURI() +
-              " and name " + portTypeQName.getLocalPart() + " in WSDL definition.");
+      __log.warn("No binding for portType with namespace " + portTypeQName.getNamespaceURI() +
+                 " and name " + portTypeQName.getLocalPart() + " in WSDL definition.");
+      return null;
     }
     Port wsdlPort = null;
     for (Definition def : wsdlDefs) {
@@ -83,9 +83,9 @@
       }
     }
     if (wsdlPort == null) {
-      throw new DDException(
-              "Couldn't find port for binding with namespace " + wsdlBinding.getQName().getNamespaceURI() +
-              " and name " + wsdlBinding.getQName().getLocalPart() + " in WSDL definition.");
+      __log.warn("No port for binding with namespace " + wsdlBinding.getQName().getNamespaceURI() +
+                " and name " + wsdlBinding.getQName().getLocalPart() + " in WSDL definition.");
+      return null;
     }
     String soapURIStr = null;
     SOAPAddress wsdlSoapAddress = null;
@@ -97,22 +97,23 @@
       if (extElmt instanceof SOAPAddress) wsdlSoapAddress = (SOAPAddress)extElmt;
     }
     if (wsdlSoapAddress == null && soapURIStr == null) {
-      throw new DDException(
-              "Couldn't find port for binding with namespace " + wsdlBinding.getQName().getNamespaceURI() +
+      __log.warn("No port for binding with namespace " + wsdlBinding.getQName().getNamespaceURI() +
               " and name " + wsdlBinding.getQName().getLocalPart() + " in WSDL definition.");
+      return null;
     }
 
     if (soapURIStr == null) soapURIStr = wsdlSoapAddress.getLocationURI();
     if (soapURIStr == null || "".equals(soapURIStr)) {
-      throw new DDException(
-              "Couldn't find SOAP address for port " + wsdlPort.getName() + "  in WSDL definition.");
+      __log.warn("No SOAP address for port " + wsdlPort.getName() + "  in WSDL definition.");
+      return null;
     }
 
     URL portURL;
     try {
       portURL = new URL(soapURIStr);
     } catch (MalformedURLException e) {
-      throw new DDException("SOAP address URL " + soapURIStr + " is invalid (not a valid URL).");
+      __log.warn("SOAP address URL " + soapURIStr + " is invalid (not a valid URL).");
+      return null;
     }
     return portURL;
   }