Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 75607 invoked by uid 500); 30 Mar 2001 19:26:17 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 75578 invoked by uid 500); 30 Mar 2001 19:26:16 -0000 Delivered-To: apmail-xml-axis-cvs@apache.org Received: (qmail 75564 invoked by uid 1136); 30 Mar 2001 19:26:15 -0000 Date: 30 Mar 2001 19:26:15 -0000 Message-ID: <20010330192615.75563.qmail@apache.org> From: dug@apache.org To: xml-axis-cvs@apache.org Subject: cvs commit: xml-axis/java/src/org/apache/axis/utils Admin.java dug 01/03/30 11:26:15 Modified: java/src/org/apache/axis AxisFault.java java/src/org/apache/axis/client AdminClient.java HTTPCall.java HTTPMessage.java java/src/org/apache/axis/transport/http AxisServlet.java java/src/org/apache/axis/utils Admin.java Log: Fixed debug processing - missing namespace in xml dropped some AxisFault code by mistake - added it back "chain"->"service" in Admin list Revision Changes Path 1.15 +18 -6 xml-axis/java/src/org/apache/axis/AxisFault.java Index: AxisFault.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisFault.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- AxisFault.java 2001/03/30 17:48:34 1.14 +++ AxisFault.java 2001/03/30 19:26:13 1.15 @@ -65,16 +65,24 @@ /** * - * @author Doug Davis (dug@us.ibm.com.com) + * @author Doug Davis (dug@us.ibm.com) + * @author James Snell (jasnell@us.ibm.com) */ public class AxisFault extends Exception { - protected String faultCode ; + protected QFault faultCode ; protected String faultString ; protected String faultActor ; protected Vector faultDetails ; // vector of Element's public AxisFault(String code, String str, String actor, Element[] details) { + setFaultCode( new QFault(Constants.AXIS_NS, code)); + setFaultString( str ); + setFaultActor( actor ); + setFaultDetails( details ); + } + + public AxisFault(QFault code, String str, String actor, Element[] details) { setFaultCode( code ); setFaultString( str ); setFaultActor( actor ); @@ -84,7 +92,7 @@ public AxisFault(Exception e) { String str ; - setFaultCode( "Server.generalException" ); + setFaultCode( Constants.FAULT_SERVER_GENERAL ); // setFaultString( e.toString() ); // need to set details if we were in the body at the time!! ByteArrayOutputStream stream = new ByteArrayOutputStream(); @@ -102,11 +110,15 @@ " faultDetails: " + faultDetails + "\n" ); } - public void setFaultCode(String code) { + public void setFaultCode(QFault code) { faultCode = code ; } + + public void setFaultCode(String code) { + faultCode = new QFault(Constants.AXIS_NS, code); + } - public String getFaultCode() { + public QFault getFaultCode() { return( faultCode ); } @@ -156,7 +168,7 @@ Constants.ELEM_FAULT ); root.appendChild( elem = doc.createElement( Constants.ELEM_FAULT_CODE ) ); - elem.appendChild( doc.createTextNode( faultCode ) ); + elem.appendChild( doc.createTextNode( faultCode.getLocalPart() ) ); root.appendChild( elem = doc.createElement( Constants.ELEM_FAULT_STRING ) ); elem.appendChild( doc.createTextNode( faultString ) ); 1.14 +1 -1 xml-axis/java/src/org/apache/axis/client/AdminClient.java Index: AdminClient.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AdminClient.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- AdminClient.java 2001/03/30 17:48:38 1.13 +++ AdminClient.java 2001/03/30 19:26:14 1.14 @@ -112,7 +112,7 @@ outMsg = msgContext.getResponseMessage(); input.close(); - System.err.println( outMsg.getAs( "String" ) ); + System.out.println( outMsg.getAs( "String" ) ); } } catch( Exception e ) { 1.18 +0 -20 xml-axis/java/src/org/apache/axis/client/HTTPCall.java Index: HTTPCall.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/HTTPCall.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- HTTPCall.java 2001/03/30 17:48:39 1.17 +++ HTTPCall.java 2001/03/30 19:26:14 1.18 @@ -69,11 +69,6 @@ import org.w3c.dom.* ; -import java.io.* ; -import javax.xml.parsers.* ; -import org.apache.xml.serialize.XMLSerializer ; -import org.apache.xml.serialize.OutputFormat ; - /** * This class is meant to be the interface that client/requestor code * uses to access the SOAP server. In this class, we'll use HTTP to @@ -191,21 +186,6 @@ resMsg = msgContext.getResponseMessage(); Document doc = (Document) resMsg.getAs("Document"); -{ -try { -ByteArrayOutputStream baos = new ByteArrayOutputStream(); -XMLSerializer xs = new XMLSerializer( baos, new OutputFormat() ); -xs.serialize( (Document) doc ); -baos.close(); -Debug.Print( 1, "AGAIN" ); -Debug.Print( 1, baos.toString() ); -} catch( Exception e ) {} - - Element elem = doc.getDocumentElement(); - System.err.println("doc: " + doc ); - System.err.println("elem: " + elem ); - System.err.println("elem: " + elem.getNodeName() ); -} body = new RPCBody( doc.getDocumentElement() ); resArgs = body.getArgs(); 1.24 +1 -0 xml-axis/java/src/org/apache/axis/client/HTTPMessage.java Index: HTTPMessage.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/HTTPMessage.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- HTTPMessage.java 2001/03/30 17:48:39 1.23 +++ HTTPMessage.java 2001/03/30 19:26:14 1.24 @@ -218,6 +218,7 @@ if ( Debug.getDebugLevel() > 0 ) { Element elem = doc.createElementNS( Constants.URI_DEBUG, "d:Debug" ); + elem.setAttribute( "xmlns:d", Constants.URI_DEBUG ); elem.appendChild( doc.createTextNode( ""+Debug.getDebugLevel() ) ); SOAPHeader header = new SOAPHeader(elem); header.setActor( Constants.URI_NEXT_ACTOR ); 1.10 +2 -0 xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java Index: AxisServlet.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- AxisServlet.java 2001/03/22 14:49:06 1.9 +++ AxisServlet.java 2001/03/30 19:26:15 1.10 @@ -88,6 +88,8 @@ Handler engine = null ; + // Debug.setDebugLevel( 2 ); + /* Get or 'new' the Axis engine object */ /***************************************/ synchronized(context) { 1.23 +13 -7 xml-axis/java/src/org/apache/axis/utils/Admin.java Index: Admin.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- Admin.java 2001/03/30 17:48:51 1.22 +++ Admin.java 2001/03/30 19:26:15 1.23 @@ -163,13 +163,11 @@ if ( elem == null ) continue ; if ( loop == 1 ) { - elem.setNodeValue( "service" ); - - // Element tmpElem = doc.createElement( "service" ); - // tmpElem.setChildren( elem.getChildren() ); - // tmpElem.setAttributes( elem.getAttributes() ); - // elem.removeChildren(); - // elem = tmpElem ; + Element tmpElem = doc.createElement( "service" ); + NodeList list = elem.getChildNodes(); + for ( int ii = 0 ; ii < list.getLength() ; ii++ ) + tmpElem.appendChild( doc.importNode(list.item(ii),true) ); + elem = tmpElem ; } if ( elem.getTagName().equals("chain") ) @@ -191,6 +189,8 @@ Element elem = (Element) node ; String type = elem.getLocalName(); String name = elem.getAttribute( "name" ); + + if ( name != null && name.equals("") ) name = null ; if ( action.equals( "undeploy" ) ) { if ( type.equals("service") ) { @@ -215,10 +215,16 @@ String input = elem.getAttribute( "input" ); String pivot = elem.getAttribute( "pivot" ); String output = elem.getAttribute( "output" ); + + if ( flow != null && flow.equals("") ) flow = null ; + if ( input != null && input.equals("") ) input = null ; + if ( output != null && output.equals("") ) output = null ; + if ( pivot != null && pivot.equals("") ) pivot = null ; if ( type.equals( "handler" ) ) { String cls = elem.getAttribute( "class" ); + if ( cls != null && cls.equals("") ) cls = null ; Debug.Print( 2, "Deploying handler: " + name ); if (hr instanceof SupplierRegistry) {