From samanthafuller@example.net Thu Aug 01 10:03:27 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 10274 invoked by uid 500); 1 Aug 2002 10:03:25 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 10241 invoked by uid 500); 1 Aug 2002 10:03:23 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 10:03:21 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis-wsif/java/src/org/apache/wsif/base WSIFDefaultCorrelationService.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N antelder 2002/08/01 03:03:21 Modified: java/test/async CorrelationServiceTest.java java/src/org/apache/wsif/base WSIFDefaultCorrelationService.java Log: Fix the correlation service to work with primative classes Revision Changes Path 1.2 +21 -0 xml-axis-wsif/java/test/async/CorrelationServiceTest.java Index: CorrelationServiceTest.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/test/async/CorrelationServiceTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CorrelationServiceTest.java 6 Jun 2002 08:28:54 -0000 1.1 +++ CorrelationServiceTest.java 1 Aug 2002 10:03:20 -0000 1.2 @@ -148,6 +148,27 @@ s = (String) cs.get(cid); assertTrue(s == null); // due to remove + // test primative clasess + Class[] clss = + new Class[] { + int.class, + float.class, + long.class, + double.class, + short.class, + byte.class, + boolean.class, + void.class }; + Class[] clss2; + cid = new WSIFJMSCorrelationId("P1"); + cs.put(cid, clss, (long) 0); + clss2 = (Class[]) cs.get(cid); + for (int i = 0; i < clss.length; i++) { + assertTrue( + "class " + clss[i] + " failed!!", + clss[i] == clss2[i]); + } + System.out.println("WSIFCorrealtionService tests complete."); } catch (WSIFException ex) { ex.printStackTrace(); 1.5 +239 -187 xml-axis-wsif/java/src/org/apache/wsif/base/WSIFDefaultCorrelationService.java Index: WSIFDefaultCorrelationService.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/base/WSIFDefaultCorrelationService.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- WSIFDefaultCorrelationService.java 19 Jul 2002 15:46:29 -0000 1.4 +++ WSIFDefaultCorrelationService.java 1 Aug 2002 10:03:20 -0000 1.5 @@ -60,9 +60,12 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.io.ObjectStreamClass; import java.io.Serializable; +import java.io.StreamCorruptedException; import java.util.ArrayList; import java.util.ConcurrentModificationException; import java.util.HashMap; @@ -82,191 +85,240 @@ */ public class WSIFDefaultCorrelationService implements WSIFCorrelationService { - private HashMap correlatorStore; // associates IDs with WSIFOperators - private HashMap timeouts; // associates IDs with a timeout time - private Thread timeoutWatcher; // watches for timeout times expiring - private boolean shutdown; // has the correlation service been shutdown - - /** - * WSIFCorrelationServiceLocator should be used to - * create a correlation service. - */ - public WSIFDefaultCorrelationService() { - Trc.entry(this); - Trc.exit(); - } - - /** - * Adds an entry to the correlation service. - * @param correlator the key to associate with the state. This will be - * a JMS message correlation ID. - * @param state the state to be stored. This will be a WSIFOperation. - * @param timeout a timeout period after which the key and associated - * state will be deleted from the correlation service. A - * value of zero indicates there should be no timeout. - */ - public synchronized void put( - WSIFCorrelationId correlator, - Serializable state, - long timeout) - throws WSIFException { - Trc.entry(this, correlator, state, new Long(timeout)); - if (correlator != null && state != null) { - if (correlatorStore == null) { - initialise(); - } - try { - correlatorStore.put(correlator, serialize(state)); - if ( timeout > 0 ) { - if ( timeouts == null ) { - initTimeouts(); - } - timeouts.put( correlator, - new Long( System.currentTimeMillis()+timeout ) ); - } - } catch (IOException ex) { - throw new WSIFException(ex.toString()); - } - } else { - throw new IllegalArgumentException( - "cannot put null " + ((correlator == null) ? "correlator" : "state")); - } - Trc.exit(); - } - - /** - * Retrieves an entry (a WSIFOperation) from the correlation service. - * @param id the key of the state to retrieved - * @return the state associated with the id, or null if there is no - * match for the id. - */ - public synchronized Serializable get(WSIFCorrelationId id) - throws WSIFException { - Trc.entry(this, id); - if (correlatorStore == null) { - throw new WSIFException("get called on correlation service but put never done"); - } else if (id == null) { - throw new IllegalArgumentException("cannot get null"); - } else { - try { - Serializable s = (Serializable) unserialize((byte[]) correlatorStore.get(id)); - Trc.exit(s); - return s; - } catch (Exception ex) { - throw new WSIFException(ex.toString()); - } - } - } - - /** - * Removes an entry form the correlation service. - * @param id the key of entry to be removed - */ - public synchronized void remove(WSIFCorrelationId id) throws WSIFException { - Trc.entry(this, id); - if (correlatorStore == null) { - throw new WSIFException("corelation service has been shutdown"); - } else if (id == null) { - throw new IllegalArgumentException("cannot remove null"); - } else { - correlatorStore.remove(id); - if ( timeouts != null ) { - timeouts.remove(id); - } - Trc.exit(); - } - } - - private synchronized void remove(ArrayList expiredKeys) { - Trc.entry(this, expiredKeys); - if (expiredKeys != null && correlatorStore != null) { - Serializable id; - for (Iterator i = expiredKeys.iterator(); i.hasNext();) { - id = (Serializable) i.next(); - correlatorStore.remove(id); - timeouts.remove(id); - MessageLogger.log("WSIF.0008W",id); - } - } - Trc.exit(); - } - - /** - * Shutsdown the correlation service. - */ - public void shutdown() { - Trc.entry(this); - shutdown = true; - Trc.exit(); - } - - private void initialise() { - shutdown = false; - correlatorStore = new HashMap(); - } - - private void initTimeouts() { - timeouts = new HashMap(); - timeoutWatcher = new Thread() { - public void run() { - while ( !shutdown ) { - try { - sleep(WSIFConstants.CORRELATION_TIMEOUT_DELAY); - } catch (InterruptedException ex) {} - checkForTimeouts(); - } - if ( correlatorStore != null ) correlatorStore = null; - if ( timeouts != null ) timeouts = null; - } - }; - timeoutWatcher.setName( "WSIFDefaultCorrelationService timeout watcher" ); - timeoutWatcher.start(); - } - - private void checkForTimeouts() { - Long expireTime; - Serializable key; - ArrayList expiredKeys = new ArrayList(); - Long now = new Long(System.currentTimeMillis()); - // add to expiredKeys all the keys whose timouts have expired - try { - for (Iterator i = timeouts.keySet().iterator(); i.hasNext();) { - key = (Serializable) i.next(); - expireTime = (Long) timeouts.get(key); - if (now.compareTo(expireTime) > 0) { // now greater than expireTime - expiredKeys.add(key); - } - } - } catch (ConcurrentModificationException ex) { - } // ignore this, get the others next time - - if (expiredKeys.size() > 0) { - remove(expiredKeys); - } - - } - - private byte[] serialize(Object o) throws IOException { - if (o == null) { - return null; - } else { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream so = new ObjectOutputStream(baos); - so.writeObject(o); - so.flush(); - return baos.toByteArray(); - } - } - - private Object unserialize(byte[] bytes) - throws IOException, ClassNotFoundException { - if (bytes == null) { - return null; - } else { - ByteArrayInputStream bais = new ByteArrayInputStream(bytes); - ObjectInputStream si = new ObjectInputStream(bais); - return si.readObject(); - } - } + private HashMap correlatorStore; // associates IDs with WSIFOperators + private HashMap timeouts; // associates IDs with a timeout time + private Thread timeoutWatcher; // watches for timeout times expiring + private boolean shutdown; // has the correlation service been shutdown + + /** + * WSIFCorrelationServiceLocator should be used to + * create a correlation service. + */ + public WSIFDefaultCorrelationService() { + Trc.entry(this); + Trc.exit(); + } + + /** + * Adds an entry to the correlation service. + * @param correlator the key to associate with the state. This will be + * a JMS message correlation ID. + * @param state the state to be stored. This will be a WSIFOperation. + * @param timeout a timeout period after which the key and associated + * state will be deleted from the correlation service. A + * value of zero indicates there should be no timeout. + */ + public synchronized void put( + WSIFCorrelationId correlator, + Serializable state, + long timeout) + throws WSIFException { + Trc.entry(this, correlator, state, new Long(timeout)); + if (correlator != null && state != null) { + if (correlatorStore == null) { + initialise(); + } + try { + correlatorStore.put(correlator, serialize(state)); + if (timeout > 0) { + if (timeouts == null) { + initTimeouts(); + } + timeouts.put( + correlator, + new Long(System.currentTimeMillis() + timeout)); + } + } catch (IOException ex) { + throw new WSIFException(ex.toString()); + } + } else { + throw new IllegalArgumentException( + "cannot put null " + + ((correlator == null) ? "correlator" : "state")); + } + Trc.exit(); + } + + /** + * Retrieves an entry (a WSIFOperation) from the correlation service. + * @param id the key of the state to retrieved + * @return the state associated with the id, or null if there is no + * match for the id. + */ + public synchronized Serializable get(WSIFCorrelationId id) + throws WSIFException { + Trc.entry(this, id); + if (correlatorStore == null) { + throw new WSIFException("get called on correlation service but put never done"); + } else if (id == null) { + throw new IllegalArgumentException("cannot get null"); + } else { + try { + Serializable s = + (Serializable) unserialize((byte[]) correlatorStore + .get(id)); + Trc.exit(s); + return s; + } catch (Exception ex) { + throw new WSIFException(ex.toString()); + } + } + } + + /** + * Removes an entry form the correlation service. + * @param id the key of entry to be removed + */ + public synchronized void remove(WSIFCorrelationId id) + throws WSIFException { + Trc.entry(this, id); + if (correlatorStore == null) { + throw new WSIFException("corelation service has been shutdown"); + } else if (id == null) { + throw new IllegalArgumentException("cannot remove null"); + } else { + correlatorStore.remove(id); + if (timeouts != null) { + timeouts.remove(id); + } + Trc.exit(); + } + } + + private synchronized void remove(ArrayList expiredKeys) { + Trc.entry(this, expiredKeys); + if (expiredKeys != null && correlatorStore != null) { + Serializable id; + for (Iterator i = expiredKeys.iterator(); i.hasNext();) { + id = (Serializable) i.next(); + correlatorStore.remove(id); + timeouts.remove(id); + MessageLogger.log("WSIF.0008W", id); + } + } + Trc.exit(); + } + + /** + * Shutsdown the correlation service. + */ + public void shutdown() { + Trc.entry(this); + shutdown = true; + Trc.exit(); + } + + private void initialise() { + shutdown = false; + correlatorStore = new HashMap(); + } + + private void initTimeouts() { + timeouts = new HashMap(); + timeoutWatcher = new Thread() { + public void run() { + while (!shutdown) { + try { + sleep(WSIFConstants.CORRELATION_TIMEOUT_DELAY); + } catch (InterruptedException ex) { + } + checkForTimeouts(); + } + if (correlatorStore != null) + correlatorStore = null; + if (timeouts != null) + timeouts = null; + } + }; + timeoutWatcher.setName("WSIFDefaultCorrelationService timeout watcher"); + timeoutWatcher.start(); + } + + private void checkForTimeouts() { + Long expireTime; + Serializable key; + ArrayList expiredKeys = new ArrayList(); + Long now = new Long(System.currentTimeMillis()); + // add to expiredKeys all the keys whose timouts have expired + try { + for (Iterator i = timeouts.keySet().iterator(); i.hasNext();) { + key = (Serializable) i.next(); + expireTime = (Long) timeouts.get(key); + if (now.compareTo(expireTime) > 0) { + // now greater than expireTime + expiredKeys.add(key); + } + } + } catch (ConcurrentModificationException ex) { + } // ignore this, get the others next time + + if (expiredKeys.size() > 0) { + remove(expiredKeys); + } + + } + + private byte[] serialize(Object o) throws IOException { + if (o == null) { + return null; + } else { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream so = new ObjectOutputStream(baos); + so.writeObject(o); + so.flush(); + return baos.toByteArray(); + } + } + + private Object unserialize(byte[] bytes) + throws IOException, ClassNotFoundException { + if (bytes == null) { + return null; + } else { + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); + //ObjectInputStream si = new ObjectInputStream(bais); + FixedObjectInputStream si = new FixedObjectInputStream(bais); + return si.readObject(); + } + } -} \ No newline at end of file +} + +/** + * ObjectInputStream is broken, see Java Bug Id 4171142. + */ +class FixedObjectInputStream extends ObjectInputStream { + + public FixedObjectInputStream(InputStream is) + throws IOException, StreamCorruptedException { + super(is); + } + + public Class resolveClass(ObjectStreamClass desc) + throws ClassNotFoundException, IOException { + try { + return super.resolveClass( desc ); + } catch (ClassNotFoundException ex) { + if ( desc.getName().equals("int") ) { + return int.class; + } else if ( desc.getName().equals("float") ) { + return float.class; + } else if ( desc.getName().equals("double") ) { + return double.class; + } else if ( desc.getName().equals("boolean") ) { + return boolean.class; + } else if ( desc.getName().equals("long") ) { + return long.class; + } else if ( desc.getName().equals("short") ) { + return short.class; + } else if ( desc.getName().equals("byte") ) { + return byte.class; + } else if ( desc.getName().equals("void") ) { + return void.class; + } else { + throw ex; + } + } + } + +} From samanthafuller@example.net Thu Aug 01 11:24:08 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 42654 invoked by uid 500); 1 Aug 2002 11:24:07 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 42645 invoked by uid 500); 1 Aug 2002 11:24:07 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 11:24:07 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis-wsif/java/src/org/apache/wsif/format WSIFFormatHandler.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N antelder 2002/08/01 04:24:07 Modified: java/src/org/apache/wsif/providers/jms JMSMessage.java WSIFOperation_Jms.java PrimitiveTypeFormatHandler.java java/src/org/apache/wsif/format/jms JMSFormatHandler.java java/src/org/apache/wsif/format WSIFFormatHandler.java Log: Tidy up and fix various problems with the native JMS provider. Revision Changes Path 1.11 +60 -38 xml-axis-wsif/java/src/org/apache/wsif/providers/jms/JMSMessage.java Index: JMSMessage.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/jms/JMSMessage.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- JMSMessage.java 26 Jul 2002 10:52:03 -0000 1.10 +++ JMSMessage.java 1 Aug 2002 11:24:06 -0000 1.11 @@ -232,6 +232,7 @@ org.apache.wsif.format.jms.JMSFormatHandler fh = getFormatHandler(partName); if (fh != null) { + fh.setPartQName(partQName); fh.setObjectPart(parts.get(partName)); fh.write(message); } @@ -275,6 +276,7 @@ org.apache.wsif.format.jms.JMSFormatHandler fh = getFormatHandler(partName); if (fh != null) { + fh.setPartQName(partQName); fh.setObjectPart(parts.get(partName)); // Send the message since it is the native format @@ -361,6 +363,7 @@ org.apache.wsif.format.jms.JMSFormatHandler fh = getFormatHandler(partName); if (fh != null) { + fh.setPartQName(partQName); fh.setObjectPart(parts.get(partName)); fh.write(message); } @@ -392,6 +395,7 @@ org.apache.wsif.format.jms.JMSFormatHandler fh = getFormatHandler(partName); if (fh != null) { + fh.setPartQName(partQName); fh.setObjectPart(parts.get(partName)); fh.write(message); result.put(partName, message.getObject()); @@ -475,7 +479,7 @@ wsifFormat = true; // Need to make the message mutable - message.clearBody(); + //message.clearBody(); // Parse the document ignoring the document element which should be the message name // The contents should represent the parts as elements @@ -484,7 +488,7 @@ n = n.getNextSibling()) { if (n.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) { String partName = n.getLocalName(); - +/* java.io.ByteArrayOutputStream os = new java.io.ByteArrayOutputStream(); org.apache.xml.serialize.OutputFormat format = @@ -502,15 +506,18 @@ // Get the contents String partText = os.toString(); //String partContents = partText.substring(partText.indexOf(">") +1, partText.lastIndexOf("<")); - +*/ javax.wsdl.Part partModel = fieldMessageModel.getPart(partName); org.apache.wsif.format.jms.JMSFormatHandler fh = getFormatHandler(partName); if (fh != null) { - message.setText(partText); - fh.read(message); + //message.setText(partText); + //fh.read(message); + fh.setPartQName(new javax.xml.namespace.QName(fieldMessageModel.getQName().getNamespaceURI(), partModel.getName())); + fh.setObjectPart(n); + setObjectPart(partName, fh.getObjectPart()); // ?? Do I want to store the format handler instead??? @@ -518,13 +525,26 @@ } else { // No format handler - pass the part contents directly + java.io.ByteArrayOutputStream os = new java.io.ByteArrayOutputStream(); + + org.apache.xml.serialize.OutputFormat format = new org.apache.xml.serialize.OutputFormat(); + org.apache.xml.serialize.TextSerializer serializer = new org.apache.xml.serialize.TextSerializer(); + serializer.setOutputFormat(format); + serializer.setOutputByteStream(os); + + format.setOmitXMLDeclaration(true); + + serializer.serialize((org.w3c.dom.Element)n); + os.flush(); + // Get the contents + String partText = os.toString(); setObjectPart(partName, partText); } } } // Reset the message to original text - message.setText(text); + //message.setText(text); } } catch (JMSException e) { @@ -540,43 +560,44 @@ // For all other exceptions ignore since it is likely due to parsing of a non-XML document } - if (!wsifFormat) { - // Unknown format - either XML or Text - // Pass the contents of the message to each part of the message model - Object[] partNames = fieldMessageParts != null ? - fieldMessageParts.toArray() : - fieldMessageModel.getParts().keySet().toArray(); + try { + if (!wsifFormat) { + // Unknown format - either XML or Text + // Pass the contents of the message to each part of the message model + Object[] partNames = fieldMessageParts != null ? + fieldMessageParts.toArray() : + fieldMessageModel.getParts().keySet().toArray(); - // should only be one part - if (partNames.length != 1) - throw new WSIFException( - "There should only be one part defined in " + fieldMessageModel.getQName().getLocalPart()); + // should only be one part + if (partNames.length != 1) + throw new WSIFException( + "There should only be one part defined in " + fieldMessageModel.getQName().getLocalPart()); - String partName = partNames[0].toString(); + String partName = partNames[0].toString(); - javax.wsdl.Part partModel = fieldMessageModel.getPart(partName); - JMSFormatHandler fh = getFormatHandler(partName); + javax.wsdl.Part partModel = fieldMessageModel.getPart(partName); + JMSFormatHandler fh = getFormatHandler(partName); - if (fh != null) { - fh.read(message); + if (fh != null) { + fh.setPartQName(new javax.xml.namespace.QName(fieldMessageModel.getQName().getNamespaceURI(), partModel.getName())); + fh.read(message); - setObjectPart(partName, fh.getObjectPart()); + setObjectPart(partName, fh.getObjectPart()); - // ?? Do I want to store the format handler instead??? - //partToFHMap.put(partKey, formatHandler); + // ?? Do I want to store the format handler instead??? + //partToFHMap.put(partKey, formatHandler); - } - else { - try { + } + else { // No format handler - pass the part contents directly setObjectPart(partName, message.getText()); } - catch (JMSException e) { - Trc.exception(e); - throw new WSIFException("Error in read.", e); - } } - } + } + catch (JMSException e) { + Trc.exception(e); + throw new WSIFException("Error in read.", e); + } Trc.exit(); } @@ -607,7 +628,7 @@ if (object instanceof java.util.Map && ((java.util.Map) object).containsKey(partNames[0])) { // Need to make the message mutable - message.clearBody(); + //message.clearBody(); java.util.Map map = (java.util.Map) object; @@ -622,9 +643,10 @@ if (fh != null) { // Should be serializable since retrieved it over the wire - message.setObject((java.io.Serializable) map.get(partName)); - fh.read(message); - + //message.setObject((java.io.Serializable)map.get(partName)); + //fh.read(message); + fh.setPartQName(new javax.xml.namespace.QName(fieldMessageModel.getQName().getNamespaceURI(), partModel.getName())); + fh.setObjectPart(map.get(partName)); setObjectPart(partName, fh.getObjectPart()); // ?? Do I want to store the format handler instead??? @@ -638,7 +660,7 @@ } // Reset the message to original text - message.setObject((java.io.Serializable) object); + //message.setObject((java.io.Serializable) object); } else { // It is an unknown format // Pass the contents of the message to each part of the message model @@ -656,7 +678,7 @@ JMSFormatHandler fh = getFormatHandler(partName); if (fh != null) { - + fh.setPartQName(new javax.xml.namespace.QName(fieldMessageModel.getQName().getNamespaceURI(), partModel.getName())); fh.read(message); setObjectPart(partName, fh.getObjectPart()); 1.17 +84 -20 xml-axis-wsif/java/src/org/apache/wsif/providers/jms/WSIFOperation_Jms.java Index: WSIFOperation_Jms.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/jms/WSIFOperation_Jms.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- WSIFOperation_Jms.java 29 Jul 2002 15:05:+1-816-803-1074.16 +++ WSIFOperation_Jms.java 1 Aug 2002 11:24:06 -0000 1.17 @@ -57,21 +57,23 @@ package org.apache.wsif.providers.jms; -import java.util.List; +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.List; -import javax.jms.Message; import javax.wsdl.BindingOperation; -import javax.wsdl.BindingOutput; +import javax.wsdl.Input; +import javax.wsdl.Message; import javax.wsdl.Operation; -import javax.wsdl.Port; +import javax.wsdl.Output; import javax.wsdl.Service; import javax.wsdl.extensions.ExtensibilityElement; import javax.xml.namespace.QName; import org.apache.wsif.WSIFConstants; import org.apache.wsif.WSIFCorrelationId; +import org.apache.wsif.WSIFCorrelationService; import org.apache.wsif.WSIFException; import org.apache.wsif.WSIFMessage; import org.apache.wsif.WSIFOperation; @@ -81,19 +83,18 @@ import org.apache.wsif.base.WSIFDefaultOperation; import org.apache.wsif.logging.MessageLogger; import org.apache.wsif.logging.Trc; -import org.apache.wsif.WSIFCorrelationService; import org.apache.wsif.util.WSIFCorrelationServiceLocator; import org.apache.wsif.util.WSIFProperties; import org.apache.wsif.util.jms.WSIFJMSCorrelationId; import org.apache.wsif.util.jms.WSIFJMSDestination; import org.apache.wsif.util.jms.WSIFJMSFinder; +import org.apache.wsif.wsdl.extensions.jms.JMSAddress; import org.apache.wsif.wsdl.extensions.jms.JMSBinding; import org.apache.wsif.wsdl.extensions.jms.JMSConstants; import org.apache.wsif.wsdl.extensions.jms.JMSInput; import org.apache.wsif.wsdl.extensions.jms.JMSOutput; import org.apache.wsif.wsdl.extensions.jms.JMSProperty; import org.apache.wsif.wsdl.extensions.jms.JMSPropertyValue; -import org.apache.wsif.wsdl.extensions.jms.JMSAddress; /** * WSIFOperation_Jms @@ -403,10 +404,13 @@ * set the parts onto the message */ // The input message parts can either be a jms property - // or an input part. If an input part, that part will - // only be used if there is not a jms:input atribute, - // or the part name is in the jms:input list + // or an input part. Input parts not defined in the + // WSDL will be ignored. Input parts will only be used + // if there is not a jms:input atribute, or the part + // name is in the jms:input list. Parts defined in the + // WSDL but not in the input message defualt to null. String partName; + ArrayList wsdlInputParts = getWSDLInputPartNames(); HashMap propertyParts = getPropertyParts(); WSIFMessage message = createInputMessage(); for (Iterator i = input.getPartNames(); i.hasNext(); ) { @@ -415,12 +419,20 @@ jmsDest.setProperty( (String)propertyParts.get( partName ), input.getObjectPart(partName) ); - } else if ( fieldInput == null ) { - message.setObjectPart(partName, input.getObjectPart(partName)); - } else if ( fieldInput.getParts().contains( partName ) ) { - message.setObjectPart(partName, input.getObjectPart(partName)); + } else if ( wsdlInputParts.contains( partName ) ) { + wsdlInputParts.remove( partName ); + if ( fieldInput == null ) { + message.setObjectPart(partName, input.getObjectPart(partName)); + } else if ( fieldInput.getParts().contains( partName ) ) { + message.setObjectPart(partName, input.getObjectPart(partName)); + } } } + + // default missing parts to null + for (Iterator i=wsdlInputParts.iterator(); i.hasNext(); ) { + message.setObjectPart( (String) i.next(), null ); + } Service serviceModel = null; for (Iterator i = @@ -472,13 +484,29 @@ WSIFResponse resp = formatter.unformatResponse((javax.jms.Message) responseObject); - formatter.copyTo(resp.getOutgoingMessage(), output); formatter.copyTo(resp.getFaultMessage(), fault); + + // the output message contains all response parts + // even if not defined in the WSDL. Any parts + // defined in the WSDL but not in the response + // default to null + ArrayList wsdlOutputParts = getWSDLOutputPartNames(); + WSIFMessage m = resp.getOutgoingMessage(); + if ( m != null ) { + String partName; + for (Iterator i = m.getPartNames(); i.hasNext();) { + partName = (String) i.next(); + output.setObjectPart( partName, m.getObjectPart(partName) ); + wsdlOutputParts.remove( partName ); + } + } + for (Iterator i = wsdlOutputParts.iterator(); i.hasNext(); ) { + output.setObjectPart( (String) i.next(), null ); + } /** * Need to retrieve the header, property values from the JMS Message and assign them to WSIFMessage */ - //setOutProperties( jmsDest, output ); TODO output properties } @@ -492,11 +520,13 @@ HashMap propertyParts = new HashMap(); // the input message properties - for (Iterator i=fieldInputJmsProperties.keySet().iterator();i.hasNext(); ) { - String propertyName = (String)i.next(); - propertyParts.put( - propertyName, - fieldInputJmsProperties.get( propertyName ) ); + if ( fieldInputJmsProperties != null ) { + for (Iterator i=fieldInputJmsProperties.keySet().iterator();i.hasNext(); ) { + String propertyName = (String)i.next(); + propertyParts.put( + propertyName, + fieldInputJmsProperties.get( propertyName ) ); + } } return propertyParts; @@ -810,6 +840,40 @@ if (jmsProps.size() > 0) { dest.setProperties(jmsProps); } + } + + private ArrayList getWSDLInputPartNames() { + ArrayList wsdlInputParts = new ArrayList(); + Input wsdlInput = fieldOperation.getInput(); + if ( wsdlInput != null ) { + Message inputMessage = wsdlInput.getMessage(); + String partName; + for (Iterator i=inputMessage.getParts().keySet().iterator(); i.hasNext(); ) { + partName = (String) i.next(); + if ( fieldInputJmsProperties == null + || !fieldInputJmsProperties.containsKey( partName ) ) { + wsdlInputParts.add( partName ); + } + } + } + return wsdlInputParts; + } + + private ArrayList getWSDLOutputPartNames() { + ArrayList wsdlOutputParts = new ArrayList(); + Output wsdlOutput = fieldOperation.getOutput(); + if ( wsdlOutput != null ) { + Message outputMessage = wsdlOutput.getMessage(); + String partName; + for (Iterator i=outputMessage.getParts().keySet().iterator(); i.hasNext(); ) { + partName = (String) i.next(); + if ( fieldOutputProperties == null + || !fieldOutputProperties.containsKey( partName ) ) { + wsdlOutputParts.add( partName ); + } + } + } + return wsdlOutputParts; } public String deep() { 1.5 +11 -7 xml-axis-wsif/java/src/org/apache/wsif/providers/jms/PrimitiveTypeFormatHandler.java Index: PrimitiveTypeFormatHandler.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/jms/PrimitiveTypeFormatHandler.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- PrimitiveTypeFormatHandler.java 19 Jul 2002 15:46:29 -0000 1.4 +++ PrimitiveTypeFormatHandler.java 1 Aug 2002 11:24:06 -0000 1.5 @@ -57,18 +57,13 @@ package org.apache.wsif.providers.jms; -import java.io.Serializable; -import java.lang.reflect.Constructor; import java.text.DateFormat; -import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.GregorianCalendar; import javax.jms.JMSException; import javax.jms.Message; -import javax.jms.ObjectMessage; -import javax.jms.TextMessage; +import javax.xml.namespace.QName; + import org.apache.wsif.format.jms.JMSFormatHandler; import org.apache.wsif.logging.Trc; @@ -81,6 +76,7 @@ protected static DateFormat PRECISE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'"); + QName name; Object primitiveType; Class type; @@ -160,6 +156,10 @@ return 0; } + public QName getPartQName() { + return name; + } + public void setObjectPart(Object arg0) { primitiveType = arg0; } @@ -184,6 +184,10 @@ public void setDoublePart(double arg0) { } + + public void setPartQName(QName name) { + this.name = name; + } /** * @see JMSFormatHandler#write(Message) 1.2 +3 -3 xml-axis-wsif/java/src/org/apache/wsif/format/jms/JMSFormatHandler.java Index: JMSFormatHandler.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/format/jms/JMSFormatHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JMSFormatHandler.java 6 Jun 2002 08:28:50 -0000 1.1 +++ JMSFormatHandler.java 1 Aug 2002 11:24:07 -0000 1.2 @@ -63,8 +63,8 @@ public interface JMSFormatHandler extends org.apache.wsif.format.WSIFFormatHandler { - public void write(javax.jms.Message message); - - public void read(javax.jms.Message message); + public void write(javax.jms.Message message) throws javax.jms.JMSException; + + public void read(javax.jms.Message message) throws javax.jms.JMSException; } 1.3 +5 -1 xml-axis-wsif/java/src/org/apache/wsif/format/WSIFFormatHandler.java Index: WSIFFormatHandler.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/format/WSIFFormatHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- WSIFFormatHandler.java 14 Jun 2002 13:45:10 -0000 1.2 +++ WSIFFormatHandler.java 1 Aug 2002 11:24:07 -0000 1.3 @@ -57,7 +57,7 @@ package org.apache.wsif.format; -import java.beans.PropertyChangeEvent; +import javax.xml.namespace.QName; /** * @author Owen Burroughs <samanthafuller@example.net> @@ -75,4 +75,8 @@ public Object getObjectPart(); public Object getObjectPart(Class sourceClass); public void setObjectPart(Object objectPart); + + public QName getPartQName(); + public void setPartQName(QName name); + } From samanthafuller@example.net Thu Aug 01 12:32:39 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 78328 invoked by uid 500); 1 Aug 2002 12:32:38 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 78285 invoked from network); 1 Aug 2002 12:32:38 -0000 Date: 1 Aug 2002 12:32:57 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Cc: Subject: DO NOT REPLY [Bug 10646] - echoHexBinary described as base64 instead X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10646>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10646 echoHexBinary described as base64 instead samanthafuller@example.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED From samanthafuller@example.net Thu Aug 01 12:33:22 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 79054 invoked by uid 500); 1 Aug 2002 12:33:21 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 79045 invoked from network); 1 Aug 2002 12:33:20 -0000 Date: 1 Aug 2002 12:33:40 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Cc: Subject: DO NOT REPLY [Bug 10647] - base xsd:token and xsd:normalizedString are redeclared in WSDL X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10647>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10647 base xsd:token and xsd:normalizedString are redeclared in WSDL samanthafuller@example.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED From samanthafuller@example.net Thu Aug 01 13:08:37 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 4995 invoked by uid 500); 1 Aug 2002 13:08:35 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 4978 invoked by uid 500); 1 Aug 2002 13:08:34 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 13:08:34 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis-wsif/java/src/org/apache/wsif/compiler/schema/tools Schema2Java.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N owenb 2002/08/01 06:08:34 Modified: java/src/org/apache/wsif/base WSIFServiceImpl.java java/src/org/apache/wsif/providers WSIFDynamicTypeMap.java java/src/org/apache/wsif/compiler/schema/tools Schema2Java.java Log: - Added support for creating mappings for simpleTypes when using service stubs - Changed automatically generated mappings created when using stubs so that they don't override any user defined mappings Revision Changes Path 1.20 +23 -12 xml-axis-wsif/java/src/org/apache/wsif/base/WSIFServiceImpl.java Index: WSIFServiceImpl.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/base/WSIFServiceImpl.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- WSIFServiceImpl.java 30 Jul 2002 14:15:42 -0000 1.19 +++ WSIFServiceImpl.java 1 Aug 2002 13:08:33 -0000 1.20 @@ -130,7 +130,7 @@ private WSIFDynamicTypeMap typeMap = new WSIFDynamicTypeMap(); private boolean typeMapInitialised = false; private String preferredPort = null; - + private Map typeReg = null; private Port chosenPort = null; /** @@ -453,6 +453,20 @@ } /** + * Add an association between XML and Java type. + * @param xmlType The qualified xml name + * @param javaType The Java class + * @param force flag to indicate if mapping should override an existing one + * for the same xmlType + */ + private void mapType(QName xmlType, Class javaType, boolean force) + throws WSIFException { + Trc.entry(this, xmlType, javaType, new Boolean(force)); + typeMap.mapType(xmlType, javaType, force); + Trc.exit(); + } + + /** * Add an association between a namespace URI and and a Java package. * @param namespace The namespace URI * @param packageName The full package name @@ -781,7 +795,10 @@ * in the wsdl */ private Iterator getDefaultTypeMappings() { - HashMap typeReg = new HashMap(); + if (typeReg != null) { + return typeReg.values().iterator(); + } + typeReg = new HashMap(); List typesElList = Utils.getAllTypesElements(def); if (typesElList.size() > 0) { String schemaURI1999 = WSIFConstants.NS_URI_1999_SCHEMA_XSD; @@ -848,17 +865,11 @@ clazz = Class.forName(className, true, Thread.currentThread().getContextClassLoader()); } catch (ClassNotFoundException e) { - throw new WSIFException( - "WSIFService could not map QName " - + tm.elementType - + " to class " - + className - + " (JavaType " - + tm.javaType - + ")", - e); + // Ignore error - mapping will not be added + Trc.exception(e); } - mapType(tm.elementType, clazz); + // Create a new mapping but don't override one that already exists for this element type + mapType(tm.elementType, clazz, false); } } } // end while 1.5 +24 -2 xml-axis-wsif/java/src/org/apache/wsif/providers/WSIFDynamicTypeMap.java Index: WSIFDynamicTypeMap.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/WSIFDynamicTypeMap.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- WSIFDynamicTypeMap.java 19 Jul 2002 15:46:30 -0000 1.4 +++ WSIFDynamicTypeMap.java 1 Aug 2002 13:08:33 -0000 1.5 @@ -75,6 +75,8 @@ */ public class WSIFDynamicTypeMap implements Serializable { protected Vector typeMapList = new Vector(); + // Create a Vector of xmlTypes (QNames) for faster lookup of existing mappings + protected Vector xmlTypes = new Vector(); protected ArrayList allTypes; /** @@ -97,13 +99,32 @@ } /** - * Add new mapping between XML and Java type. + * Add new mapping between XML and Java type. This method is equivalent to + * calling mapType(xmlType, javaType, true) * @param xmlType The qualified xml name - * @param javaType The Java class + * @param javaType The Java class + * @see #mapType(QName, Class, boolean) */ public void mapType(QName xmlType, Class javaType) { Trc.entry(this, xmlType, javaType); typeMapList.add(new WSIFDynamicTypeMapping(xmlType, javaType)); + xmlTypes.add(xmlType); + Trc.exit(); + } + + /** + * Add new mapping between XML and Java type. + * @param xmlType The qualified xml name + * @param javaType The Java class + * @param force flag to indicate if mapping should override an existing one + * for the same xmlType + */ + public void mapType(QName xmlType, Class javaType, boolean force) { + Trc.entry(this, xmlType, javaType); + if (force || !xmlTypes.contains(xmlType)) { + typeMapList.add(new WSIFDynamicTypeMapping(xmlType, javaType)); + xmlTypes.add(xmlType); + } Trc.exit(); } @@ -137,6 +158,7 @@ mapType(qn, cl); } } catch (Exception e) { + Trc.exception(e); //ignore } Trc.exit(); 1.8 +18 -5 xml-axis-wsif/java/src/org/apache/wsif/compiler/schema/tools/Schema2Java.java Index: Schema2Java.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/compiler/schema/tools/Schema2Java.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Schema2Java.java 16 Jul 2002 09:57:21 -0000 1.7 +++ Schema2Java.java 1 Aug 2002 13:08:33 -0000 1.8 @@ -77,6 +77,7 @@ import org.apache.wsif.compiler.schema.SchemaException; import org.apache.wsif.compiler.util.StreamFactory; import org.apache.wsif.compiler.util.TypeMapping; +import org.apache.wsif.logging.Trc; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -555,11 +556,10 @@ undefinedRegistry.put(qName, javaName); - System.err.println( - "Schema name " + Trc.event(this, "Schema name " + qName + " is undefined, " - + "and generic Java name " + + "and so generic Java name " + javaName + " is used instead."); @@ -932,6 +932,15 @@ isFinal, children, targetURI)); + } else if (elementType.equals("simpleType")) { + QName base = null; + boolean isList = false; + elements.addElement( + new SchemaSimpleType( + name, + base, + isList, + targetURI)); } else if (elementType.equals("element")) { QName ref = null; elements.addElement( @@ -1227,8 +1236,12 @@ registry.put(qName, javaType); changed = true; simpleTypeTable.remove(qName); - } else - throw new SchemaException("'simpleType' must have 'base' attribute."); + } else { + String javaType = getGenericJavaName(qName, "simpleType"); + registry.put(qName, javaType); + // ignore it + //throw new SchemaException("'simpleType' must have 'base' attribute."); + } } } From samanthafuller@example.net Thu Aug 01 15:34:35 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 67308 invoked by uid 500); 1 Aug 2002 15:34:35 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Delivered-To: moderator for samanthafuller@example.net Received: (qmail 16357 invoked from network); 30 Jul 2002 19:37:39 -0000 X-Originating-IP: [83.161.120.155] From: "marco" <samanthafuller@example.net> To: <samanthafuller@example.net> Subject: Suggestion for more detailed information from InvocationTargetException Date: Tue, 30 Jul 2002 12:37:44 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0016_01C237C5.E73DB0A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <samanthafuller@example.net> X-OriginalArrivalTime: 30 Jul 2002 19:37:44.0709 (UTC) FILETIME=[9396E350:01C23800] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0016_01C237C5.E73DB0A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi All, When the method invocations on a bean causes an = InvocationTargetException the root cause of the exception=20 is lost. In my opinion it would be beneficial to the WebService user to = echo this root cause. Imagine that on an object the setFoo(String arg_string) throws a user = defined exception that the value is not within range. At the moment I = would only see an InvocationTargetException without further details. The = code change below would show this. I'm not too familiar with the process how to suggest a change / = enhancement. Do I first have to report a bug? Can some people first review the change = and confirm this is made on the proper location.=20 Here is my code (See the catch = (java.lang.reflect.InvocationTargetException ite){... Regards, Marco /** * Class which knows how to update a bean property */ public class BeanPropertyTarget implements Target { protected static Log log =3D LogFactory.getLog(BeanPropertyTarget.class.getName()); private Object object; private BeanPropertyDescriptor pd; private int index =3D -1; /** * This constructor is used for a normal property. * @param object is the bean class * @param pd is the property **/ public BeanPropertyTarget(Object object, BeanPropertyDescriptor pd) = { this.object =3D object; this.pd =3D pd; this.index =3D -1; // disable indexing } /** * This constructor is used for an indexed property. * @param object is the bean class * @param pd is the property * @param i is the index **/ public BeanPropertyTarget(Object object, BeanPropertyDescriptor pd, = int i) { this.object =3D object; this.pd =3D pd; this.index =3D i; } public void set(Object value) throws SAXException { try { if (index < 0) pd.set(object, value); else pd.set(object, index, value); } catch (Exception e) { Class type =3D pd.getType(); value =3D JavaUtils.convert(value, type); try { if (index < 0) pd.set(object, value); else pd.set(object, index, value); } catch (java.lang.reflect.InvocationTargetException ite){ if (log.isErrorEnabled()) { String field=3D pd.getName(); if (index >=3D0) { field +=3D "[" + index + "]"; } String valueType =3D "null"; if (value !=3D null) valueType =3D value.getClass().getName(); log.error(JavaUtils.getMessage("cantConvert02", new String[] { valueType, field, = pd.getType().getName()})); } //end log.isErrorEnabled //I assume we are more interested in the inner = exception throw new SAXException(new = Exception(ite.getTargetException())); } catch (Exception ex) { String field=3D pd.getName(); if (index >=3D0) { field +=3D "[" + index + "]"; } if (log.isErrorEnabled()) { String valueType =3D "null"; if (value !=3D null) valueType =3D value.getClass().getName(); log.error(JavaUtils.getMessage("cantConvert02", new String[] { valueType, field, = pd.getType().getName()})); } throw new SAXException(ex); } } } } ------=_NextPart_000_0016_01C237C5.E73DB0A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi All,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>When&nbsp;the&nbsp;method invocations = on=20 a&nbsp;bean causes an InvocationTargetException the root cause of the = exception=20 </FONT></DIV> <DIV><FONT face=3DArial size=3D2>is lost. </FONT><FONT face=3DArial = size=3D2>In my=20 opinion it would be beneficial to the WebService user to echo this root=20 cause.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Imagine that on an object the = setFoo(String=20 arg_string)&nbsp; throws a user defined exception that the value is not = within=20 range. At the moment I would only see an InvocationTargetException = without=20 further details. The code change below would show this.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>I'm not too familiar with the process = how to=20 suggest a change / enhancement.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Do I first have to report a bug? Can = some people=20 first review the change and confirm this is made on the proper location. = </FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Here is my code (See = the&nbsp;&nbsp;catch=20 (java.lang.reflect.InvocationTargetException ite){...</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Marco</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>/**<BR>&nbsp;* Class which knows how to = update a=20 bean property<BR>&nbsp;*/<BR>public class BeanPropertyTarget implements = Target=20 {<BR>&nbsp;&nbsp;&nbsp; protected static Log log=20 =3D<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 LogFactory.getLog(BeanPropertyTarget.class.getName());</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; private Object=20 object;<BR>&nbsp;&nbsp;&nbsp; private BeanPropertyDescriptor=20 pd;<BR>&nbsp;&nbsp;&nbsp; private int index =3D -1;</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; = /**<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20 * This constructor is used for a normal = property.<BR>&nbsp;&nbsp;&nbsp;&nbsp; *=20 @param object is the bean class<BR>&nbsp;&nbsp;&nbsp;&nbsp; * @param pd = is the=20 property<BR>&nbsp;&nbsp;&nbsp;&nbsp; **/<BR>&nbsp;&nbsp;&nbsp; public=20 BeanPropertyTarget(Object object, BeanPropertyDescriptor pd)=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.object =3D=20 object;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 this.pd&nbsp;&nbsp;&nbsp;&nbsp; =3D=20 pd;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.index&nbsp; =3D = -1;&nbsp;=20 // disable indexing<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; = /**<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20 * This constructor is used for an indexed = property.<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20 * @param object is the bean class<BR>&nbsp;&nbsp;&nbsp;&nbsp; * @param = pd is the=20 property<BR>&nbsp;&nbsp;&nbsp;&nbsp; * @param i is the=20 index<BR>&nbsp;&nbsp;&nbsp;&nbsp; **/<BR>&nbsp;&nbsp;&nbsp; public=20 BeanPropertyTarget(Object object, BeanPropertyDescriptor pd, int i)=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.object =3D=20 object;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 this.pd&nbsp;&nbsp;&nbsp;&nbsp; =3D=20 pd;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.index&nbsp; =3D=20 i;<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; public void = set(Object value)=20 throws SAXException {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = if=20 (index &lt;=20 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;&nbsp;&nbsp;&nbsp;=20 pd.set(object,=20 value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;=20 else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;=20 pd.set(object, index, = value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }=20 catch (Exception e) {</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial=20 size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p; Class=20 type =3D=20 pd.getType();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;=20 value =3D JavaUtils.convert(value,=20 type);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp; try=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;=20 if (index &lt;=20 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 pd.set(object,=20 value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 pd.set(object, index,=20 value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp; }=20 catch (java.lang.reflect.InvocationTargetException=20 ite){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 if (log.isErrorEnabled())=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 String field=3D=20 pd.getName();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 if (index &gt;=3D0)=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 field +=3D "[" + index +=20 "]";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 String valueType =3D=20 "null";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 if (value !=3D=20 null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;=20 valueType =3D=20 value.getClass().getName();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = log.error(JavaUtils.getMessage("cantConvert02",<BR>&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 new String[]=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 valueType,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 field,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 pd.getType().getName()}));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 } //end=20 log.isErrorEnabled<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 //I assume we are more interested in the inner=20 exception<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 throw new SAXException(new=20 Exception(ite.getTargetException()));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 } catch (Exception ex)=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;=20 String field=3D=20 pd.getName();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 if (index &gt;=3D0)=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 field +=3D "[" + index +=20 "]";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;=20 }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;=20 if (log.isErrorEnabled())=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 String valueType =3D=20 "null";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 if (value !=3D=20 null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;=20 valueType =3D=20 value.getClass().getName();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = log.error(JavaUtils.getMessage("cantConvert02",<BR>&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 new String[]=20 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 valueType,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 field,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp= ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 pd.getType().getName()}));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&= nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20 }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n= bsp;&nbsp;&nbsp;&nbsp;=20 throw new=20 SAXException(ex);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;=20 }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;=20 }<BR>}</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML> ------=_NextPart_000_0016_01C237C5.E73DB0A0-- From samanthafuller@example.net Thu Aug 01 15:35:57 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 72561 invoked by uid 500); 1 Aug 2002 15:35:57 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Delivered-To: moderator for samanthafuller@example.net Received: (qmail 26573 invoked from network); 31 Jul 2002 16:41:00 -0000 X-Originating-IP: [83.161.120.155] From: "Cun Yong Tan" <samanthafuller@example.net> To: samanthafuller@example.net, samanthafuller@example.net Bcc: Subject: What is the status of automatic soap:header support in Axis ? Date: Wed, 31 Jul 2002 16:41:03 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: <samanthafuller@example.net> X-OriginalArrivalTime: 31 Jul 2002 16:41:04.0095 (UTC) FILETIME=[0F8B4EF0:01C238B1] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N By soap:header support I mean wsdl2java being able to handle the soap:header entries in the wsdl on the client side. Last time I checked, Sylvain was working on a patch for this. When will this patch make it to the main branch ? Will this make it for release 1.0 at the latest ? Thanks for any status updates. _________________________________________________________________ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com From samanthafuller@example.net Thu Aug 01 16:02:51 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 4615 invoked by uid 500); 1 Aug 2002 16:02:51 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 4606 invoked by uid 500); 1 Aug 2002 16:02:51 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 16:02:50 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis/java/samples/jaxrpc buildComponent.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N seibert 2002/08/01 09:02:50 Added: java/samples/jaxrpc buildComponent.xml Log: New file for the jaxrpc sample(s) Revision Changes Path 1.1 xml-axis/java/samples/jaxrpc/buildComponent.xml Index: buildComponent.xml =================================================================== <?xml version="1.0" ?> <!DOCTYPE project [ <!ENTITY properties SYSTEM "file:../../xmls/properties.xml"> <!ENTITY paths SYSTEM "file:../../xmls/path_refs.xml"> <!ENTITY taskdefs SYSTEM "file:../../xmls/taskdefs.xml"> <!ENTITY taskdefs_post_compile SYSTEM "file:../../xmls/taskdefs_post_compile.xml"> ]> <!-- =================================================================== ==================================================================== --> <project default="compile"> &properties; &paths; &taskdefs; &taskdefs_post_compile; <target name="clean"/> <target name="copy"/> <target name="compile"> <!-- jaxrpc Dynamic proxy with bean - Bug 10824 --> <wsdl2java url="samples/jaxrpc/address/Address.wsdl" output="build/work" serverSide="yes" testcase="no"> </wsdl2java> <!-- Compile the echo sample generated java files --> <javac srcdir="${build.dir}/work" destdir="${build.dest}" debug="${debug}"> <classpath refid="classpath" /> <include name="samples/addr/**.java" /> <include name="samples/jaxrpc/address/**.java" /> </javac> </target> <target name="deploy"/> <target name="run"/> <target name="undeploy"/> </project> From samanthafuller@example.net Thu Aug 01 16:03:04 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 5157 invoked by uid 500); 1 Aug 2002 16:03:04 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 5148 invoked by uid 500); 1 Aug 2002 16:03:04 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 16:03:03 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis/java buildSamples.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N seibert 2002/08/01 09:03:03 Modified: java buildSamples.xml Log: Added jaxrpc target Revision Changes Path 1.5 +4 -0 xml-axis/java/buildSamples.xml Index: buildSamples.xml =================================================================== RCS file: /home/cvs/xml-axis/java/buildSamples.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- buildSamples.xml 30 Jul 2002 15:35:09 -0000 1.4 +++ buildSamples.xml 1 Aug 2002 16:03:03 -0000 1.5 @@ -103,6 +103,10 @@ <ant inheritAll="true" antfile="samples/security/buildComponent.xml"/> </target> + <target name="jaxrpc" depends="setenv"> + <ant inheritAll="true" antfile="samples/jaxrpc/buildComponent.xml"/> + </target> + <!-- =========================================================================== --> <target name="copy"/> From samanthafuller@example.net Thu Aug 01 16:06:14 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 9582 invoked by uid 500); 1 Aug 2002 16:06:14 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 9573 invoked by uid 500); 1 Aug 2002 16:06:14 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 16:06:13 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis/java buildTest.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N seibert 2002/08/01 09:06:13 Modified: java buildTest.xml Log: Changed dependancy on functional-tests to include test compilation Revision Changes Path 1.9 +1 -1 xml-axis/java/buildTest.xml Index: buildTest.xml =================================================================== RCS file: /home/cvs/xml-axis/java/buildTest.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- buildTest.xml 30 Jul 2002 15:35:09 -0000 1.8 +++ buildTest.xml 1 Aug 2002 16:06:13 -0000 1.9 @@ -367,7 +367,7 @@ <!-- =================================================================== --> <!-- Run functional tests --> <!-- =================================================================== --> - <target name="functional-tests" depends="printEnv,wsdl-setup" if="junit.present" > + <target name="functional-tests" depends="printEnv,compile,wsdl-setup" if="junit.present" > <!-- This uses a custom Ant task. See test/functional/ant/RunAxisFunctionalTests.java --> <!-- This pattern taken from Cactus, http://jakarta.apache.org/commons/cactus --> <runaxisfunctionaltests From samanthafuller@example.net Thu Aug 01 16:06:40 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 10416 invoked by uid 500); 1 Aug 2002 16:06:40 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 10407 invoked by uid 500); 1 Aug 2002 16:06:40 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 16:06:39 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis-wsif/java/src/org/apache/wsif/base WSIFServiceImpl.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N owenb 2002/08/01 09:06:39 Modified: java/src/org/apache/wsif/base WSIFServiceImpl.java Log: In initializeTypeMappings don't map class if it's null Revision Changes Path 1.21 +3 -1 xml-axis-wsif/java/src/org/apache/wsif/base/WSIFServiceImpl.java Index: WSIFServiceImpl.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/base/WSIFServiceImpl.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- WSIFServiceImpl.java 1 Aug 2002 13:08:33 -0000 1.20 +++ WSIFServiceImpl.java 1 Aug 2002 16:06:39 -0000 1.21 @@ -869,7 +869,9 @@ Trc.exception(e); } // Create a new mapping but don't override one that already exists for this element type - mapType(tm.elementType, clazz, false); + if (clazz != null) { + mapType(tm.elementType, clazz, false); + } } } } // end while From samanthafuller@example.net Thu Aug 01 16:16:54 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 21741 invoked by uid 500); 1 Aug 2002 16:16:53 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 21732 invoked by uid 500); 1 Aug 2002 16:16:53 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 16:16:52 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis/java/src/org/apache/axis/transport/http SimpleAxisServer.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N rubys 2002/08/01 09:16:52 Modified: java/src/org/apache/axis/transport/http SimpleAxisServer.java Log: Restore single threading to SimpleAxisServer. See first comment line in this source file. We can argue later over what the default should be, but for now, I'm trying to eliminate variables in tracking down the intermittent gump failures. Revision Changes Path 1.70 +19 -7 xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java Index: SimpleAxisServer.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- SimpleAxisServer.java 10 Jul 2002 19:32:14 -0000 1.69 +++ SimpleAxisServer.java 1 Aug 2002 16:16:51 -0000 1.70 @@ -94,6 +94,9 @@ // cleanup policy). private Hashtable sessions = new Hashtable(); + // Are we doing threads? + private static boolean doThreads = false; + // Are we doing sessions? // Set this to false if you don't want any session overhead. private static boolean doSessions = true; @@ -156,9 +159,13 @@ } if (socket != null) { SimpleAxisWorker worker = new SimpleAxisWorker(this, socket); - Thread thread = new Thread(worker); - thread.setDaemon(true); - thread.start(); + if (doThreads) { + Thread thread = new Thread(worker); + thread.setDaemon(true); + thread.start(); + } else { + worker.run(); + } } } log.info(JavaUtils.getMessage("quit00", "SimpleAxisServer")); @@ -166,7 +173,6 @@ // per thread socket information private ServerSocket serverSocket; - private volatile Thread worker = null; /** * Obtain the serverSocket that that SimpleAxisServer is listening on. @@ -192,9 +198,13 @@ * @param daemon a boolean indicating if the thread should be a daemon. */ public void start(boolean daemon) throws Exception { - worker = new Thread(this); - worker.setDaemon(daemon); - worker.start(); + if (doThreads) { + Thread thread = new Thread(this); + thread.setDaemon(daemon); + thread.start(); + } else { + run(); + } } /** @@ -243,6 +253,8 @@ } try { + doThreads = (opts.isFlagSet('t') > 0); + int port = opts.getPort(); ServerSocket ss = null; // Try five times From samanthafuller@example.net Thu Aug 01 17:39:35 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 80228 invoked by uid 500); 1 Aug 2002 17:39:33 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 80210 invoked by uid 500); 1 Aug 2002 17:39:33 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 17:39:32 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis/java/test/wsdl/addrNoImplSEI AddressBookTestCase.java DOMUtils.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N rubys 2002/08/01 10:39:32 Modified: java/test/wsdl/addrNoImplSEI AddressBookTestCase.java Removed: java/test/wsdl/addrNoImplSEI DOMUtils.java Log: More cleanup. I've examined both outputs from both failure and non-failure runs and don't see any unnecessary output. Revision Changes Path 1.8 +1 -12 xml-axis/java/test/wsdl/addrNoImplSEI/AddressBookTestCase.java Index: AddressBookTestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/addrNoImplSEI/AddressBookTestCase.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AddressBookTestCase.java 25 Jul 2002 16:14:12 -0000 1.7 +++ AddressBookTestCase.java 1 Aug 2002 17:39:32 -0000 1.8 @@ -58,9 +58,6 @@ import junit.framework.TestCase; import org.apache.axis.AxisFault; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; - /** Test the address book sample code. */ @@ -76,15 +73,7 @@ } public void testAddressBookService () throws Exception { - Logger root = Logger.getRootLogger(); - Level origLevel = root.getEffectiveLevel(); - root.setLevel(Level.FATAL); - try { - doTest(); - } - finally { - root.setLevel(origLevel); - } + doTest(); } } From samanthafuller@example.net Thu Aug 01 18:17:02 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 9530 invoked by uid 500); 1 Aug 2002 18:17:01 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 9505 invoked by uid 500); 1 Aug 2002 18:17:01 -0000 Delivered-To: samanthafuller@example.net Date: 1 Aug 2002 18:17:00 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Subject: cvs commit: xml-axis/java/samples/jaxrpc buildComponent.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N seibert 2002/08/01 11:17:00 Modified: java/samples/jaxrpc buildComponent.xml Log: Corrected handling of the samples/jaxrpc/hello gourp Now creates the Impl files, thanks to Glen Revision Changes Path 1.2 +22 -0 xml-axis/java/samples/jaxrpc/buildComponent.xml Index: buildComponent.xml =================================================================== RCS file: /home/cvs/xml-axis/java/samples/jaxrpc/buildComponent.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- buildComponent.xml 1 Aug 2002 16:02:50 -0000 1.1 +++ buildComponent.xml 1 Aug 2002 18:17:00 -0000 1.2 @@ -34,6 +34,28 @@ <include name="samples/addr/**.java" /> <include name="samples/jaxrpc/address/**.java" /> </javac> + + <!-- jaxrpc sample --> + <wsdl2java url="samples/jaxrpc/hello/HelloWorld.wsdl" + output="${build.dir}/work" + serverSide="yes" + testcase="no"> + </wsdl2java> + + <!-- jaxrpc sample --> + <wsdl2java url="samples/jaxrpc/hello/HelloWorld.wsdl" + output="${build.dir}/work" + serverSide="yes" + testcase="no"> + </wsdl2java> + + <!-- Compile the echo sample generated java files --> + <javac srcdir="${build.dir}/work" destdir="${build.dest}" debug="${debug}"> + <classpath refid="classpath" /> + <include name="samples/jaxrpc/**/*.java" /> + <include name="samples/jaxrpc/*.java" /> + </javac> + </target> <target name="deploy"/> From samanthafuller@example.net Thu Aug 01 18:23:12 2002 Return-Path: <samanthafuller@example.net> Delivered-To: samanthafuller@example.net Received: (qmail 15013 invoked by uid 500); 1 Aug 2002 18:23:11 -0000 Mailing-List: contact samanthafuller@example.net; run by ezmlm Precedence: bulk Reply-To: samanthafuller@example.net list-help: <mailto:samanthafuller@example.net> list-unsubscribe: <mailto:samanthafuller@example.net> list-post: <mailto:samanthafuller@example.net> Delivered-To: mailing list samanthafuller@example.net Received: (qmail 14996 invoked from network); 1 Aug 2002 18:23:11 -0000 Date: 1 Aug 2002 18:23:34 -0000 Message-ID: <samanthafuller@example.net> From: samanthafuller@example.net To: samanthafuller@example.net Cc: Subject: DO NOT REPLY [Bug 10864] - Docs/Deploy: Indicate EJBProvider needs parameter "className" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10864>. ANY REPLY
{'source': 'Apache Software Foundation Public Mail Archives'}