You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by mm...@apache.org on 2007/12/25 11:04:48 UTC

svn commit: r606778 - /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java

Author: mmao
Date: Tue Dec 25 02:04:47 2007
New Revision: 606778

URL: http://svn.apache.org/viewvc?rev=606778&view=rev
Log:
* IllegalStateException should be railed if 
     Address in an EPR cannot be null, when serviceName or portName is null


Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java?rev=606778&r1=606777&r2=606778&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java Tue Dec 25 02:04:47 2007
@@ -93,7 +93,11 @@
         XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(cos);
 
         try {
-            //TODO: when serviceName/portName is null            
+            //TODO: when serviceName/portName is null      
+            if (serviceName == null && portName == null && address == null) {
+                throw new IllegalStateException("Address in an EPR cannot be null, " 
+                        + " when serviceName or portName is null");
+            }
             writer.setPrefix("wsa", W3C_NS);
 
             String portNamePrefix = null;