You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/03/21 19:25:48 UTC

svn commit: r387598 - /incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/wsif/WSIFMarshaler.java

Author: gnodet
Date: Tue Mar 21 10:25:46 2006
New Revision: 387598

URL: http://svn.apache.org/viewcvs?rev=387598&view=rev
Log:
SM-358: NullPointerException in WSIFMarshaller.isSimpleType()
Patch provided by Ken Berthelot

Modified:
    incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/wsif/WSIFMarshaler.java

Modified: incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/wsif/WSIFMarshaler.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/wsif/WSIFMarshaler.java?rev=387598&r1=387597&r2=387598&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/wsif/WSIFMarshaler.java (original)
+++ incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/wsif/WSIFMarshaler.java Tue Mar 21 10:25:46 2006
@@ -148,8 +148,11 @@
      * Returns true if the given part is a string type
      */
     protected boolean isSimpleType(Part part) {
-        QName typeName = part.getTypeName();
-        return "http://www.w3.org/2001/XMLSchema".equals(typeName.getNamespaceURI());
+       QName typeName = part.getTypeName();
+       if (typeName != null) {
+          return "http://www.w3.org/2001/XMLSchema".equals(typeName.getNamespaceURI());
+       }
+       return false;
     }
 
     protected Node createResultDocument(MessageExchange exchange, NormalizedMessage normalizedMessage, WSIFOperationInfo operationInfo, WSIFMessage wsifMessage) {