You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Davanum Srinivas <di...@yahoo.com> on 2001/10/19 19:47:11 UTC
RE: cvs commit: xml-axis/java/test/inout InoutSOAPBindingImpl.jav a
Tom,
Please check now. Wsdl2javaTestSuite should behave better.
Thanks,
dims
--- Tom Jordahl <to...@macromedia.com> wrote:
>
> FYI
>
> This change (or perhaps Ravi change) seems to break Berin's Wsdl2java
> functional tests, which he is in the process of integrating in to the ant
> functional tests.
>
> I don't know if this is the fault of his test (see
> org.apache.axis.wsdl.test.Wsdl2javaTestSuite) or the changes to
> Emitter.java.
>
> --
> Tom Jordahl
>
>
> -----Original Message-----
> From: dims@apache.org [mailto:dims@apache.org]
> Sent: Friday, October 19, 2001 8:59 AM
> To: xml-axis-cvs@apache.org
> Subject: cvs commit: xml-axis/java/test/inout InoutSOAPBindingImpl.java
>
>
> dims 01/10/19 05:59:16
>
> Modified: java/samples/addr AddressBookSOAPBindingImpl.java Main.java
> java/src/org/apache/axis/wsdl Emitter.java TypeFactory.java
> java/test/inout InoutSOAPBindingImpl.java
> Log:
> Patch the Wsdl2Java for now till Ravi takes a look. The autogenerated
> namespaces are now under the main package specified on the command-line.
>
> Revision Changes Path
> 1.8 +3 -3
> xml-axis/java/samples/addr/AddressBookSOAPBindingImpl.java
>
> Index: AddressBookSOAPBindingImpl.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/samples/addr/AddressBookSOAPBindingImpl.java,v
> retrieving revision 1.7
> retrieving revision 1.8
> diff -u -r1.7 -r1.8
> --- AddressBookSOAPBindingImpl.java 2001/10/18 14:26:39 1.7
> +++ AddressBookSOAPBindingImpl.java 2001/10/19 12:59:15 1.8
> @@ -12,10 +12,10 @@
> public class AddressBookSOAPBindingImpl implements AddressBook {
> private Map addresses = new HashMap();
>
> - public void addEntry(java.lang.String name, Address address) throws
> java.rmi.RemoteException {
> + public void addEntry(java.lang.String name,
> samples.addr.xml_soap_address_demo.Address address) throws
> java.rmi.RemoteException {
> this.addresses.put(name, address);
> }
> - public Address getAddressFromName(java.lang.String name) throws
> java.rmi.RemoteException {
> - return (Address) this.addresses.get(name);
> + public samples.addr.xml_soap_address_demo.Address
> getAddressFromName(java.lang.String name) throws java.rmi.RemoteException {
> + return (samples.addr.xml_soap_address_demo.Address)
> this.addresses.get(name);
> }
> }
>
>
>
> 1.10 +2 -0 xml-axis/java/samples/addr/Main.java
>
> Index: Main.java
> ===================================================================
> RCS file: /home/cvs/xml-axis/java/samples/addr/Main.java,v
> retrieving revision 1.9
> retrieving revision 1.10
> diff -u -r1.9 -r1.10
> --- Main.java 2001/10/18 14:26:39 1.9
> +++ Main.java 2001/10/19 12:59:15 1.10
> @@ -61,6 +61,8 @@
>
> import java.net.URL;
>
> +import samples.addr.xml_soap_address_demo.*;
> +
>
> /**
> * This class shows how to use the Call object's ability to
>
>
>
> 1.69 +2 -6 xml-axis/java/src/org/apache/axis/wsdl/Emitter.java
>
> Index: Emitter.java
> ===================================================================
> RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Emitter.java,v
> retrieving revision 1.68
> retrieving revision 1.69
> diff -u -r1.68 -r1.69
> --- Emitter.java 2001/10/19 02:45:26 1.68
> +++ Emitter.java 2001/10/19 12:59:15 1.69
> @@ -197,6 +197,7 @@
>
> // Generate types from doc
> if (doc != null) {
> + emitFactory.setNamespacePrefix(packageName);
> emitFactory.map(def.getTargetNamespace(), packageName);
> emitFactory.buildTypes(doc);
> if (bVerbose) {
> @@ -2096,12 +2097,7 @@
> else
> dir = new File(outputDir, pkgDirName);
> if (!dir.exists()) {
> - StringTokenizer st = new StringTokenizer(pkgDirName, "/");
> - dir = new File(outputDir);
> - while (st.hasMoreTokens()) {
> - dir = new File(dir, st.nextToken());
> - dir.mkdir();
> - }
> + dir.mkdirs();
> }
> }
>
>
>
>
> 1.6 +14 -1
> xml-axis/java/src/org/apache/axis/wsdl/TypeFactory.java
>
> Index: TypeFactory.java
> ===================================================================
> RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/TypeFactory.java,v
> retrieving revision 1.5
> retrieving revision 1.6
> diff -u -r1.5 -r1.6
> --- TypeFactory.java 2001/10/19 02:45:26 1.5
> +++ TypeFactory.java 2001/10/19 12:59:15 1.6
> @@ -76,6 +76,7 @@
> private HashMap mapNamespaceToPackage; // Mapping from Namespace to
> Java Package
> private HashMap mapPackageToNamespace; // Mapping from Java Package
> to Namespace
> private static int nameSpaceSuffix = 1;
> + private String nameSpacePrefix = null;
>
> /**
> * Create an Emit Type Factory
> @@ -84,7 +85,19 @@
> types = new HashMap();
> mapNamespaceToPackage = new HashMap();
> }
> +
> + public void setNamespacePrefix(String prefix) {
> + nameSpacePrefix = prefix;
> + }
>
> + public String getNamespacePrefix() {
> + return nameSpacePrefix;
> + }
> +
> + public String[] getNamespaces() {
> + return (String []) mapNamespaceToPackage.keySet().toArray();
> + }
> +
> /**
> * Invoke this method to associate a namespace URI with a
> autogenerated Java Package
> * name, if an entry is not already present
> @@ -92,7 +105,7 @@
> */
> public void map (String namespace) {
> if (mapNamespaceToPackage.get(namespace) == null) {
> - mapNamespaceToPackage.put(namespace,
> Utils.makePackageName(namespace));
> + mapNamespaceToPackage.put(namespace, getNamespacePrefix() + "."
> + Utils.makePackageName(namespace));
> }
> }
>
>
>
>
> 1.5 +533 -530 xml-axis/java/test/inout/InoutSOAPBindingImpl.java
>
> Index: InoutSOAPBindingImpl.java
> ===================================================================
> RCS file: /home/cvs/xml-axis/java/test/inout/InoutSOAPBindingImpl.java,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- InoutSOAPBindingImpl.java 2001/10/18 18:02:15 1.4
> +++ InoutSOAPBindingImpl.java 2001/10/19 12:59:16 1.5
> @@ -1,531 +1,534 @@
> -package test.inout;
> +package test.inout;
>
> -import javax.xml.rpc.holders.StringHolder;
> -
> -public class InoutSOAPBindingImpl implements Inout
> -{
> - private String printAddress (Address ad) {
> - String out;
>
=== message truncated ===
=====
Davanum Srinivas - http://jguru.com/dims/
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com