axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/test/functional TestEchoSample.java TestStockSample.java TestTransportSample.java
Date Sun, 02 Sep 2001 04:04:22 GMT
gdaniels    01/09/01 21:04:22

  Modified:    java/samples/proxy ProxyService.java
               java/samples/transport/tcp AdminClient.java
               java/src/org/apache/axis/client ServiceClient.java
               java/src/org/apache/axis/utils WSDLUtils.java
               java/test/functional TestEchoSample.java
                        TestStockSample.java TestTransportSample.java
  Log:
  * Change the protocol -> transport mapping in ServiceClient to hold
    Transport classes, instead of actual objects.  getTransportForProtocol()
    now constructs a new instance of the appropriate Transport.
  
  * Change samples to match above
  
  * Call addTransportPackage() instead of manually setting the system
    property in samples.transport.tcp.AdminClient
  
  * Add main() to a couple of the functional tests, for easy command-line
    testing
  
  * Remove testing of IBM from the transport sample functional test.  See
    comment - if anyone puts this back in, please make sure timeouts
    work somehow if the xmltoday site is down or not responding.
  
  Revision  Changes    Path
  1.3       +1 -1      xml-axis/java/samples/proxy/ProxyService.java
  
  Index: ProxyService.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/proxy/ProxyService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProxyService.java	2001/07/10 23:14:41	1.2
  +++ ProxyService.java	2001/09/02 04:04:22	1.3
  @@ -90,7 +90,7 @@
           
           // add TCP for proxy testing
           client.addTransportPackage("samples.transport");
  -        client.setTransportForProtocol("tcp", new TCPTransport());
  +        client.setTransportForProtocol("tcp", TCPTransport.class);
           
           // NOW set the client's URL (since now the tcp handler exists)
           client.setURL(dest);
  
  
  
  1.5       +2 -2      xml-axis/java/samples/transport/tcp/AdminClient.java
  
  Index: AdminClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/AdminClient.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AdminClient.java	2001/06/29 18:43:16	1.4
  +++ AdminClient.java	2001/09/02 04:04:22	1.5
  @@ -72,8 +72,8 @@
   
       public static void main(String args[]) {
         
  -        System.setProperty("java.protocol.handler.pkgs", "samples.transport");
  -        ServiceClient.setTransportForProtocol("tcp", new TCPTransport());
  +        ServiceClient.addTransportPackage("samples.transport");
  +        ServiceClient.setTransportForProtocol("tcp", TCPTransport.class);
           
           try {
               org.apache.axis.client.AdminClient.main(args);
  
  
  
  1.48      +177 -160  xml-axis/java/src/org/apache/axis/client/ServiceClient.java
  
  Index: ServiceClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/ServiceClient.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ServiceClient.java	2001/08/31 18:40:14	1.47
  +++ ServiceClient.java	2001/09/02 04:04:22	1.48
  @@ -1,57 +1,57 @@
   /*
  - * The Apache Software License, Version 1.1
  - *
  - *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  - * reserved.
  - *
  - * Redistribution and use in source and binary forms, with or without
  - * modification, are permitted provided that the following conditions
  - * are met:
  - *
  - * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  - *
  - * 2. Redistributions in binary form must reproduce the above copyright
  - *    notice, this list of conditions and the following disclaimer in
  - *    the documentation and/or other materials provided with the
  - *    distribution.
  - *
  - * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  - *       "This product includes software developed by the
  - *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software itself,
  - *    if and wherever such third-party acknowledgments normally appear.
  - *
  - * 4. The names "Axis" and "Apache Software Foundation" must
  - *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written
  - *    permission, please contact apache@apache.org.
  - *
  - * 5. Products derived from this software may not be called "Apache",
  - *    nor may "Apache" appear in their name, without prior written
  - *    permission of the Apache Software Foundation.
  - *
  - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - * SUCH DAMAGE.
  - * ====================================================================
  - *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  - */
  +* The Apache Software License, Version 1.1
  +*
  +*
  +* Copyright (c) 2001 The Apache Software Foundation.  All rights
  +* reserved.
  +*
  +* Redistribution and use in source and binary forms, with or without
  +* modification, are permitted provided that the following conditions
  +* are met:
  +*
  +* 1. Redistributions of source code must retain the above copyright
  +*    notice, this list of conditions and the following disclaimer.
  +*
  +* 2. Redistributions in binary form must reproduce the above copyright
  +*    notice, this list of conditions and the following disclaimer in
  +*    the documentation and/or other materials provided with the
  +*    distribution.
  +*
  +* 3. The end-user documentation included with the redistribution,
  +*    if any, must include the following acknowledgment:
  +*       "This product includes software developed by the
  +*        Apache Software Foundation (http://www.apache.org/)."
  +*    Alternately, this acknowledgment may appear in the software itself,
  +*    if and wherever such third-party acknowledgments normally appear.
  +*
  +* 4. The names "Axis" and "Apache Software Foundation" must
  +*    not be used to endorse or promote products derived from this
  +*    software without prior written permission. For written
  +*    permission, please contact apache@apache.org.
  +*
  +* 5. Products derived from this software may not be called "Apache",
  +*    nor may "Apache" appear in their name, without prior written
  +*    permission of the Apache Software Foundation.
  +*
  +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  +* DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  +* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  +* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  +* SUCH DAMAGE.
  +* ====================================================================
  +*
  +* This software consists of voluntary contributions made by many
  +* individuals on behalf of the Apache Software Foundation.  For more
  +* information on the Apache Software Foundation, please see
  +* <http://www.apache.org/>.
  +*/
   
   package org.apache.axis.client ;
   
  @@ -96,10 +96,13 @@
       /***************************************************************
        * Static stuff
        */
  -    
  +
       public static final String TRANSPORT_PROPERTY =
  -                                              "java.protocol.handler.pkgs";
  +            "java.protocol.handler.pkgs";
   
  +    /**
  +     * A Hashtable mapping protocols (Strings) to Transports (classes)
  +     */
       private static Hashtable transports = new Hashtable();
       private static boolean initialized = false;
   
  @@ -107,75 +110,77 @@
   
       /** Register a Transport that should be used for URLs of the specified
        * protocol.
  -     * 
  +     *
        * @param protocol the URL protocol (i.e. "tcp" for "tcp://" urls)
  -     * @param transport a Transport object which will be used for matching
  -     *        URLs.
  +     * @param transportClass the class of a Transport type which will be used
  +     *                       for matching URLs.
        */
       public static void setTransportForProtocol(String protocol,
  -                                               Transport transport)
  +                                               Class transportClass)
       {
  -        transports.put(protocol, transport);
  +        if (Transport.class.isAssignableFrom(transportClass))
  +            transports.put(protocol, transportClass);
  +        else
  +            throw new NullPointerException();
       }
  -    
  +
       /**
        * Set up the default transport URL mappings.
  -     * 
  +     *
        * This must be called BEFORE doing non-standard URL parsing (i.e. if you
        * want the system to accept a "local:" URL).  This is why the Options class
        * calls it before parsing the command-line URL argument.
        */
       public static synchronized void initialize()
       {
  -      if (!initialized) {
  -        addTransportPackage("org.apache.axis.transport");
  -        
  -        setTransportForProtocol("local", new org.apache.axis.transport.local.LocalTransport());
  -        HTTPTransport httpTransport = new HTTPTransport();
  -        setTransportForProtocol("http", httpTransport);
  -        setTransportForProtocol("https", httpTransport);
  -        
  -        initialized = true;
  -      }
  +        if (!initialized) {
  +            addTransportPackage("org.apache.axis.transport");
  +
  +            setTransportForProtocol("local", org.apache.axis.transport.local.LocalTransport.class);
  +            setTransportForProtocol("http", HTTPTransport.class);
  +            setTransportForProtocol("https", HTTPTransport.class);
  +
  +            initialized = true;
  +        }
       }
   
       /** Add a package to the system protocol handler search path.  This
        * enables users to create their own URLStreamHandler classes, and thus
        * allow custom protocols to be used in Axis (typically on the client
        * command line).
  -     * 
  +     *
        * For instance, if you add "samples.transport" to the packages property,
        * and have a class samples.transport.tcp.Handler, the system will be able
        * to parse URLs of the form "tcp://host:port..."
  -     * 
  +     *
        * @param packageName the package in which to search for protocol names.
        */
       public static synchronized void addTransportPackage(String packageName)
       {
           String currentPackages = System.getProperty(TRANSPORT_PROPERTY);
           if (currentPackages == null) {
  -          currentPackages = "";
  +            currentPackages = "";
           } else {
  -          currentPackages += "|";
  +            currentPackages += "|";
           }
           currentPackages += packageName;
  -        
  +
           System.setProperty(TRANSPORT_PROPERTY, currentPackages);
       }
  -    
  +
       /*****************************************************************************
        * END STATICS
        */
  -    
  +
       // Our AxisClient
       private AxisEngine engine;
  -    
  +
       // The description of our service
       private ServiceDescription serviceDesc;
  -    
  +
       // The message context we use across invocations
       private MessageContext msgContext;
  -    
  +
       // Our Transport, if any
       private Transport transport;
       private String    transportName;
  @@ -189,7 +194,7 @@
       public ServiceClient () {
           this(new AxisClient(configProvider));
       }
  -    
  +
       /**
        * Construct a ServiceClient with just an AxisEngine.
        */
  @@ -197,35 +202,35 @@
           this.engine = engine;
           msgContext = new MessageContext(engine);
           if (!initialized)
  -          initialize();
  +            initialize();
       }
  -        
  -    
  +
  +
       /**
        * Construct a ServiceClient with a given endpoint URL
  -     * 
  +     *
        * @param endpointURL a string containing the transport endpoint for this
        *                    service.
        */
       public ServiceClient(String endpointURL)
  -        throws AxisFault
  +            throws AxisFault
       {
           this(endpointURL, new AxisClient(configProvider));
       }
  -    
  +
       /**
        * Construct a ServiceClient with a given endpoint URL & engine
        */
       public ServiceClient(String endpointURL, AxisEngine engine)
  -        throws AxisFault
  +            throws AxisFault
       {
           this(engine);
           this.setURL(endpointURL);
       }
  -    
  +
       /**
        * Construct a ServiceClient with the given Transport.
  -     * 
  +     *
        * @param transport a pre-constructed Transport object which will be used
        *                  to set up the MessageContext appropriately for each
        *                  request
  @@ -233,7 +238,7 @@
       public ServiceClient (Transport transport) {
           this(transport, new AxisClient(configProvider));
       }
  -    
  +
       /**
        * Construct a ServiceClient with the given Transport & engine.
        */
  @@ -241,10 +246,10 @@
           this(engine);
           setTransport(transport);
       }
  -    
  +
       /**
        * Set the Transport for this ServiceClient.
  -     * 
  +     *
        * @param transport the Transport object we'll use to set up
        *                  MessageContext properties.
        */
  @@ -252,23 +257,26 @@
           this.transport = transport;
           Debug.Print(1, "Transport is " + transport);
       }
  -    
  +
       /**
        * Set the URL (and the transport state).
        */
       public void setURL (String endpointURL)
  -        throws AxisFault
  +            throws AxisFault
       {
           try {
               URL url = new URL(endpointURL);
               String protocol = url.getProtocol();
               Transport transport = getTransportForProtocol(protocol);
               if (transport == null)
  -                throw new AxisFault("ServiceClient.setURL", "No transport mapping for protocol:
" + protocol, null, null);
  +                throw new AxisFault("ServiceClient.setURL",
  +                        "No transport mapping for protocol: " + protocol,
  +                        null, null);
               transport.setUrl(endpointURL);
               setTransport(transport);
           } catch (MalformedURLException e) {
  -            throw new AxisFault("ServiceClient.setURL", "Malformed URL Exception: " + e.getMessage(),
null, null);
  +            throw new AxisFault("ServiceClient.setURL",
  +                    "Malformed URL Exception: " + e.getMessage(), null, null);
           }
       }
   
  @@ -276,35 +284,44 @@
        * Set the name of the transport chain to use.
        */
       public void setTransportName(String name) {
  -      transportName = name ;
  -      if ( transport != null )
  -        transport.setTransportName( name );
  -    }
  -    
  - /** Get the Transport registered for the given protocol.
  -     * 
  +        transportName = name ;
  +        if ( transport != null )
  +            transport.setTransportName( name );
  +    }
  +
  +    /** Get the Transport registered for the given protocol.
  +     *
        * @param protocol a protocol such as "http" or "local" which may
        *                 have a Transport object associated with it.
        * @return the Transport registered for this protocol, or null if none.
        */
       public Transport getTransportForProtocol(String protocol)
       {
  -      return (Transport)transports.get(protocol);
  +        Class transportClass = (Class)transports.get(protocol);
  +        Transport ret = null;
  +        if (transportClass != null) {
  +            try {
  +                ret = (Transport)transportClass.newInstance();
  +            } catch (InstantiationException e) {
  +            } catch (IllegalAccessException e) {
  +            }
  +        }
  +        return ret;
       }
  -    
  +
       /**
        * Set property in our MessageContext.
  -     * 
  +     *
        * @param name the property name to set.
        * @param value the value of the property.
        */
       public void set (String name, Object value) {
           msgContext.setProperty(name, value);
       }
  -    
  +
       /**
        * Get a property from our MessageContext.
  -     * 
  +     *
        * @param name the property name to retrieve.
        * @return the property's value.
        */
  @@ -314,36 +331,36 @@
   
       /**
        * Set timeout in our MessageContext.
  -     * 
  +     *
        * @param value the maximum amount of time, in milliseconds
        */
       public void setTimeout (int value) {
           msgContext.setTimeout(value);
       }
  -    
  +
       /**
        * Get timeout from our MessageContext.
  -     * 
  +     *
        * @return value the maximum amount of time, in milliseconds
        */
       public int getTimeout () {
           return msgContext.getTimeout();
       }
  -    
  +
       /**
        * Directly set the request message in our MessageContext.
  -     * 
  +     *
        * This allows custom message creation.
  -     * 
  +     *
        * @param msg the new request message.
        */
       public void setRequestMessage(Message msg) {
           msgContext.setRequestMessage(msg);
       }
  -    
  +
       /**
        * Directly get the response message in our MessageContext.
  -     * 
  +     *
        * Shortcut for having to go thru the msgContext
        *
        * @return the response Message object in the msgContext
  @@ -351,30 +368,30 @@
       public Message getResponseMessage() {
           return msgContext.getResponseMessage();
       }
  -    
  +
       /**
        * Determine whether we'd like to track sessions or not.
  -     * 
  +     *
        * This just passes through the value into the MessageContext.
  -     * 
  +     *
        * @param yesno true if session state is desired, false if not.
        */
       public void setMaintainSession (boolean yesno) {
           msgContext.setMaintainSession(yesno);
       }
  -    
  +
       /**
        * Obtain a reference to our MessageContext.
  -     * 
  +     *
        * @return the ServiceClient's MessageContext.
        */
       public MessageContext getMessageContext () {
           return msgContext;
       }
  -    
  +
       /**
        * Set the ServiceDescription associated with this ServiceClient.
  -     * 
  +     *
        * @param serviceDesc a ServiceDescription.
        */
       public void setServiceDescription(ServiceDescription serviceDesc)
  @@ -398,7 +415,7 @@
   
       /**
        * Map a type for serialization.
  -     * 
  +     *
        * @param _class the Java class of the data type.
        * @param qName the xsi:type QName of the associated XML type.
        * @param serializer a Serializer which will be used to write the XML.
  @@ -407,10 +424,10 @@
           TypeMappingRegistry typeMap = msgContext.getTypeMappingRegistry();
           typeMap.addSerializer(_class, qName, serializer);
       }
  -    
  +
       /**
        * Map a type for deserialization.
  -     * 
  +     *
        * @param qName the xsi:type QName of an XML Schema type.
        * @param _class the class of the associated Java data type.
        * @param deserializerFactory a factory which can create deserializer
  @@ -425,9 +442,9 @@
       /************************************************
        * Invocation
        */
  -    
  +
       /** Invoke the service with a custom SOAPEnvelope.
  -     * 
  +     *
        * @param env a SOAPEnvelope to send.
        * @exception AxisFault
        */
  @@ -438,12 +455,12 @@
           invoke();
           return msgContext.getResponseMessage().getAsSOAPEnvelope();
       }
  -    
  +
       /** Invoke an RPC service with a method name and arguments.
  -     * 
  +     *
        * This will call the service, serializing all the arguments, and
        * then deserialize the return value.
  -     * 
  +     *
        * @param namespace the desired namespace URI of the method element
        * @param method the method name
        * @param args an array of Objects representing the arguments to the
  @@ -461,10 +478,10 @@
           Debug.Print( 1, "Exit: ServiceClient::invoke(ns, meth, args)" );
           return ret;
       }
  -    
  +
       /** Convenience method to invoke a method with a default (empty)
        * namespace.  Calls invoke() above.
  -     * 
  +     *
        * @param method the method name
        * @param args an array of Objects representing the arguments to the
        *             invoked method.  If any of these objects are RPCParams,
  @@ -478,9 +495,9 @@
       {
           return invoke("", method, args);
       }
  -    
  +
       /** Invoke an RPC service with a pre-constructed RPCElement.
  -     * 
  +     *
        * @param body an RPCElement containing all the information about
        *             this call.
        * @return a deserialized Java Object containing the return value
  @@ -501,23 +518,23 @@
           String uri = null;
           if (serviceDesc != null) uri = serviceDesc.getEncodingStyleURI();
           if (uri != null) reqEnv.setEncodingStyleURI(uri);
  -        
  +
           msgContext.setRequestMessage(reqMsg);
           msgContext.setResponseMessage(resMsg);
           msgContext.setServiceDescription(this.serviceDesc);
  -        
  +
           reqEnv.addBodyElement(body);
           reqEnv.setMessageType(ServiceDescription.REQUEST);
  -        
  +
           if ( body.getPrefix() == null )       body.setPrefix( "m" );
           if ( body.getNamespaceURI() == null ) {
               throw new AxisFault("ServiceClient.invoke", "Cannot invoke ServiceClient with
null namespace URI for method "+body.getMethodName(),
  -                                null, null);
  +                    null, null);
           } else if (msgContext.getServiceHandler() == null) {
               msgContext.setTargetService(body.getNamespaceURI());
           }
  -       
  -        
  +
  +
           if (DEBUG_LOG) {
               try {
                   SerializationContext ctx = new SerializationContext(new PrintWriter(System.out),
msgContext);
  @@ -533,7 +550,7 @@
                   System.out.println("");
               }
           }
  -        
  +
           try {
               invoke();
           }
  @@ -542,26 +559,26 @@
               if ( !(e instanceof AxisFault ) ) e = new AxisFault( e );
               throw (AxisFault) e ;
           }
  -        
  +
           resMsg = msgContext.getResponseMessage();
  -        
  +
           if (resMsg == null)
               throw new AxisFault(new Exception("Null response message!"));
  -        
  +
           /** This must happen before deserialization...
            */
           resMsg.setMessageType(ServiceDescription.RESPONSE);
  -        
  +
           resEnv = (SOAPEnvelope)resMsg.getAsSOAPEnvelope();
   
           SOAPBodyElement respBody = resEnv.getFirstBody();
           if (respBody instanceof SOAPFaultElement) {
               throw ((SOAPFaultElement)respBody).getAxisFault();
           }
  -        
  +
           body = (RPCElement)resEnv.getFirstBody();
           resArgs = body.getParams();
  -        
  +
           if (resArgs != null && resArgs.size() > 0) {
               RPCParam param = (RPCParam)resArgs.get(0);
               result = param.getValue();
  @@ -576,7 +593,7 @@
                   }
               }
           }
  -        
  +
           Debug.Print( 1, "Exit: ServiceClient::invoke(RPCElement)" );
           return( result );
       }
  @@ -585,18 +602,18 @@
        * Set engine option.
        */
       public void addOption(String name, Object value) {
  -         engine.addOption(name, value);
  +        engine.addOption(name, value);
       }
  -    
  +
       /**
        * Invoke this ServiceClient with its established MessageContext
        * (perhaps because you called this.setRequestMessage())
  -     * 
  +     *
        * @exception AxisFault
        */
       public void invoke() throws AxisFault {
           Debug.Print( 1, "Enter: Service::invoke()" );
  -        
  +
           msgContext.setServiceDescription(serviceDesc);
   
           // set up message context if there is a transport
  @@ -604,8 +621,8 @@
               transport.setupMessageContext(msgContext, this, this.engine);
           }
           else
  -          msgContext.setTransportName( transportName );
  -        
  +            msgContext.setTransportName( transportName );
  +
           try {
               engine.invoke( msgContext );
           }
  @@ -613,9 +630,9 @@
               Debug.Print( 1,  fault );
               throw fault ;
           }
  -        
  +
           Debug.Print( 1, "Exit: Service::invoke()" );
       }
  -    
  +
   }
   
  
  
  
  1.11      +4 -0      xml-axis/java/src/org/apache/axis/utils/WSDLUtils.java
  
  Index: WSDLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/WSDLUtils.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WSDLUtils.java	2001/09/01 15:23:05	1.10
  +++ WSDLUtils.java	2001/09/02 04:04:22	1.11
  @@ -84,6 +84,9 @@
       {
           TypeMappingRegistry reg = msgContext.getTypeMappingRegistry();
           String name = cls.getName();
  +        String serviceName = msgContext.getTargetService();
  +        if ((serviceName == null) || ("JWSProcessor".equals(serviceName)))
  +            serviceName = "";
   
           DefinitionFactory factory = DefinitionFactory.
                   newInstance("com.ibm.wsdl.factory.DefinitionFactoryImpl");
  @@ -146,6 +149,7 @@
   
               SOAPBody soapBody = new SOAPBody();
               soapBody.setUse("encoded");
  +            soapBody.setNamespaceURI(serviceName);
               soapBody.setEncodingStyles(encodingList);
   
               bindingInput.addExtensibilityElement(soapBody);
  
  
  
  1.3       +6 -1      xml-axis/java/test/functional/TestEchoSample.java
  
  Index: TestEchoSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestEchoSample.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestEchoSample.java	2001/08/07 18:58:48	1.2
  +++ TestEchoSample.java	2001/09/02 04:04:22	1.3
  @@ -67,7 +67,12 @@
       public TestEchoSample(String name) {
           super(name);
       }
  -    
  +
  +    public static void main(String args[]) throws Exception {
  +        TestEchoSample tester = new TestEchoSample("tester");
  +        tester.testEchoService();
  +    }
  +
       public void testEchoService () throws Exception {
           System.out.println("Testing echo interop sample.");
   
  
  
  
  1.7       +6 -2      xml-axis/java/test/functional/TestStockSample.java
  
  Index: TestStockSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestStockSample.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestStockSample.java	2001/07/10 22:53:19	1.6
  +++ TestStockSample.java	2001/09/02 04:04:22	1.7
  @@ -117,8 +117,12 @@
           String[] args = { "samples/stock/undeploy.xml" };
           AdminClient.main(args);
       }
  -    
  -    
  +
  +    public static void main(String args[]) throws Exception {
  +        TestStockSample tester = new TestStockSample("tester");
  +        tester.testStockService();
  +    }
  +
       public void testStockService () throws Exception {
           try {
               System.out.println("Testing stock sample.");
  
  
  
  1.9       +7 -0      xml-axis/java/test/functional/TestTransportSample.java
  
  Index: TestTransportSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestTransportSample.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestTransportSample.java	2001/08/11 01:44:39	1.8
  +++ TestTransportSample.java	2001/09/02 04:04:22	1.9
  @@ -124,8 +124,15 @@
               doTestClientDeploy();
               System.out.println("Testing deployment...");
               doTestDeploy();
  +/* Removing this for now.  xmltoday is down at present, and my build was
  +   therefore hanging.  If you add it back in, PLEASE make sure that timeouts
  +   on the Document.parse() from the xmltoday URL in StockQuoteSample are
  +   handled somehow, and that a timeout does not indicate a failed test
  +   with this example.  --Glen
  +
               System.out.println("Testing service with symbol IBM...");
               doTestIBM();
  +*/
               System.out.println("Testing service with symbol XXX...");
               doTestXXX();
               System.out.println("Test complete.");
  
  
  

Mime
View raw message