Author: aslom
Date: Sat Dec 17 13:53:19 2005
New Revision: 357390
URL: http://svn.apache.org/viewcvs?rev=357390&view=rev
Log:
applied patch sent by Andrzej Jan Taramina
(...) I found an interesting small bug in the current WSIF. I left out typemap
entry in my WSDL, but when WSIF came across it, the exception message was
truncated to show only the part name, which made it tough to find my error in
the WSDL.
The issue was that a string was being concatenated to a binary selector like
this:
String mystring = "some message string" + value == null ? "null" : value
The problem is that the Java compiler will only take the final value and
assign it to the string. You lose the static message string! (...)
this actually can be done in Java with
String mystring = "some message string" + value
nonethless it is an interesting flaw in Java language design ...
Modified:
webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
webservices/wsif/trunk/java/src/org/apache/wsif/wsdl/extensions/jms/JMSAddress.java
Modified:
webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java?rev=357390&r1=357389&r2=357390&view=diff
==============================================================================
---
webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
(original)
+++
webservices/wsif/trunk/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
Sat Dec 17 13:53:19 2005
@@ -669,13 +669,15 @@
QName partType = part.getTypeName();
if (partType == null) partType = part.getElementName();
Object obj = this.fieldTypeMaps.get(partType);
- if (obj == null)
- throw new WSIFException(
- "Could not map type "
- + partType
- + " to a java type. Part name was "
- + part.getName() == null ? "<null>" :
part.getName());
-
+ if (obj == null) {
+ throw new WSIFException(
+ "Could not map type "
+ + partType
+ + " to a java type.
Part name was "
+ + ( part.getName() ==
null ? "<null>" : part.getName() ) );
+ }
+
+
if (obj instanceof Vector) {
Vector v = (Vector) obj;
Vector argv = new Vector();
Modified:
webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java?rev=357390&r1=357389&r2=357390&view=diff
==============================================================================
---
webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
(original)
+++
webservices/wsif/trunk/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
Sat Dec 17 13:53:19 2005
@@ -587,14 +587,14 @@
QName partType = returnPart.getTypeName();
if (partType == null) partType =
returnPart.getElementName();
Object obj = this.fieldTypeMaps.get(partType);
- if (obj == null)
- throw new WSIFException(
- "Could not map type "
- + partType
- + " to a java type. Part name was "
- + returnPart.getName() == null
- ? "<null>" : returnPart.getName());
-
+ if (obj == null)
+ {
+ throw new WSIFException(
+ "Could not map type "
+ + partType
+ + " to a java
type. Part name was "
+ + (
returnPart.getName() == null ? "<null>" : returnPart.getName() ));
+ }
if (obj instanceof Vector) {
Vector v = (Vector) obj;
Vector argv = new Vector();
@@ -716,7 +716,7 @@
"Could not map type "
+ partType
+ " to a java type. Part name was "
- + part.getName() == null ? "<null>" :
part.getName());
+ + ( part.getName() == null ? "<null>" :
part.getName() ));
if (obj instanceof Vector) {
Vector v = (Vector) obj;
Modified:
webservices/wsif/trunk/java/src/org/apache/wsif/wsdl/extensions/jms/JMSAddress.java
URL:
http://svn.apache.org/viewcvs/webservices/wsif/trunk/java/src/org/apache/wsif/wsdl/extensions/jms/JMSAddress.java?rev=357390&r1=357389&r2=357390&view=diff
==============================================================================
---
webservices/wsif/trunk/java/src/org/apache/wsif/wsdl/extensions/jms/JMSAddress.java
(original)
+++
webservices/wsif/trunk/java/src/org/apache/wsif/wsdl/extensions/jms/JMSAddress.java
Sat Dec 17 13:53:19 2005
@@ -1,12 +1,12 @@
/*
* Copyright 2002-2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
/**
* WSDL Jms service-port extension
- *
+ *
* @author <a href="mailto:[EMAIL PROTECTED]">Hermann Akermann</a>
* @author Ant Elder <[EMAIL PROTECTED]>
* @author Mark Whitlock <[EMAIL PROTECTED]>
@@ -159,17 +159,15 @@
strBuf.append("\nJmsAddress (" + fieldElementType + "):");
strBuf.append("\nrequired=" + fieldRequired);
- strBuf.append("\njmsVendorURI=" + jmsVendorURI == null ? "null" :
jmsVendorURI);
- strBuf.append("\ninitCxtFact=" + initCxtFact == null ? "null" :
initCxtFact);
- strBuf.append("\njndiProvURL=" + jndiProvURL == null ? "null" :
jndiProvURL);
- strBuf.append("\ndestStyle=" + destStyle == null ? "null" : destStyle);
- strBuf.append(
- "\njndiConnFactName=" + jndiConnFactName == null ? "null" :
jndiConnFactName);
- strBuf.append("\njndiDestName=" + jndiDestName == null ? "null" :
jndiDestName);
- strBuf.append(
- "\njmsProvDestName=" + jmsProvDestName == null ? "null" :
jmsProvDestName);
+ strBuf.append("\njmsVendorURI=" + jmsVendorURI );
+ strBuf.append("\ninitCxtFact=" + initCxtFact );
+ strBuf.append("\njndiProvURL=" + jndiProvURL );
+ strBuf.append("\ndestStyle=" + destStyle );
strBuf.append(
- "\njmsImplSpecURI=" + jmsImplSpecURI == null ? "null" :
jmsImplSpecURI);
+ "\njndiConnFactName=" + jndiConnFactName );
+ strBuf.append("\njndiDestName=" + jndiDestName );
+ strBuf.append("\njmsProvDestName=" + jmsProvDestName );
+ strBuf.append("\njmsImplSpecURI=" + jmsImplSpecURI );
return strBuf.toString();
}
@@ -183,4 +181,4 @@
propertyValues = new java.util.ArrayList();
return propertyValues;
}
-}
\ No newline at end of file
+}