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 Andreas Veithen <an...@gmail.com> on 2011/08/17 21:11:12 UTC

Re: svn commit: r1158146 - in /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema: ExtensionUtility.java SchemaCompiler.java

This change causes a build failure. I'm going to revert it.

Amila, do you actually run the tests before you commit your changes??

Andreas

On Tue, Aug 16, 2011 at 10:21,  <am...@apache.org> wrote:
> Author: amilas
> Date: Tue Aug 16 08:21:32 2011
> New Revision: 1158146
>
> URL: http://svn.apache.org/viewvc?rev=1158146&view=rev
> Log:
> replace the existing schemas with the processed ones. for -uw option to work some metadata is required
>
> Modified:
>    axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
>    axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
>
> Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
> URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?rev=1158146&r1=1158145&r2=1158146&view=diff
> ==============================================================================
> --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java (original)
> +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java Tue Aug 16 08:21:32 2011
> @@ -71,6 +71,7 @@ public class ExtensionUtility {
>         // add all the schemas to the list
>         for (AxisService service : configuration.getAxisServices()) {
>             schemaList.addAll(service.getSchema());
> +
>         }
>
>         //hashmap that keeps the targetnamespace and the xmlSchema object
> @@ -146,6 +147,28 @@ public class ExtensionUtility {
>
>         }
>
> +
> +        //replace the Axis2 schemas with the processed ones.
> +        //otherwise it gives some problems if we try to code generate with multiple
> +        //services with the -uw option.
> +        //inorder to work for -uw option there must be some metadata with the schema list
> +
> +        Map<String, XmlSchema> loadedSchemaMap = schemaCompiler.getLoadedSchemaMap();
> +        for (AxisService service : configuration.getAxisServices()) {
> +            List<XmlSchema> serviceSchemaList = service.getSchema();
> +            List<XmlSchema> schemaListToAdd = new ArrayList<XmlSchema>();
> +            for (XmlSchema xmlSchema : serviceSchemaList){
> +                if (loadedSchemaMap.containsKey(xmlSchema.getTargetNamespace())){
> +                    schemaListToAdd.add(loadedSchemaMap.get(xmlSchema.getTargetNamespace()));
> +                } else {
> +                    schemaListToAdd.add(xmlSchema);
> +                }
> +            }
> +            service.releaseSchemaList();
> +            service.addSchema(schemaListToAdd);
> +        }
> +
> +
>         //process the unwrapped parameters
>         if (!configuration.isParametersWrapped()) {
>             //figure out the unwrapped operations
>
> Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
> URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1158146&r1=1158145&r2=1158146&view=diff
> ==============================================================================
> --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original)
> +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Tue Aug 16 08:21:32 2011
> @@ -2809,4 +2809,8 @@ public class SchemaCompiler {
>         }
>        return isExists;
>     }
> +
> +    public Map<String, XmlSchema> getLoadedSchemaMap(){
> +        return this.loadedSchemaMap;
> +    }
>  }
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: svn commit: r1158146 - in /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema: ExtensionUtility.java SchemaCompiler.java

Posted by Amila Suriarachchi <am...@gmail.com>.
On Thu, Aug 18, 2011 at 12:41 AM, Andreas Veithen <andreas.veithen@gmail.com
> wrote:

> This change causes a build failure. I'm going to revert it.
>
> Amila, do you actually run the tests before you commit your changes??
>

I ran the integration and adb-codegen test. But did not thought
jaxws-integration uses adb-codegen.

thanks,
Amila.

>
> Andreas
>
> On Tue, Aug 16, 2011 at 10:21,  <am...@apache.org> wrote:
> > Author: amilas
> > Date: Tue Aug 16 08:21:32 2011
> > New Revision: 1158146
> >
> > URL: http://svn.apache.org/viewvc?rev=1158146&view=rev
> > Log:
> > replace the existing schemas with the processed ones. for -uw option to
> work some metadata is required
> >
> > Modified:
> >
>  axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
> >
>  axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
> >
> > Modified:
> axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
> > URL:
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?rev=1158146&r1=1158145&r2=1158146&view=diff
> >
> ==============================================================================
> > ---
> axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
> (original)
> > +++
> axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
> Tue Aug 16 08:21:32 2011
> > @@ -71,6 +71,7 @@ public class ExtensionUtility {
> >         // add all the schemas to the list
> >         for (AxisService service : configuration.getAxisServices()) {
> >             schemaList.addAll(service.getSchema());
> > +
> >         }
> >
> >         //hashmap that keeps the targetnamespace and the xmlSchema object
> > @@ -146,6 +147,28 @@ public class ExtensionUtility {
> >
> >         }
> >
> > +
> > +        //replace the Axis2 schemas with the processed ones.
> > +        //otherwise it gives some problems if we try to code generate
> with multiple
> > +        //services with the -uw option.
> > +        //inorder to work for -uw option there must be some metadata
> with the schema list
> > +
> > +        Map<String, XmlSchema> loadedSchemaMap =
> schemaCompiler.getLoadedSchemaMap();
> > +        for (AxisService service : configuration.getAxisServices()) {
> > +            List<XmlSchema> serviceSchemaList = service.getSchema();
> > +            List<XmlSchema> schemaListToAdd = new
> ArrayList<XmlSchema>();
> > +            for (XmlSchema xmlSchema : serviceSchemaList){
> > +                if
> (loadedSchemaMap.containsKey(xmlSchema.getTargetNamespace())){
> > +
>  schemaListToAdd.add(loadedSchemaMap.get(xmlSchema.getTargetNamespace()));
> > +                } else {
> > +                    schemaListToAdd.add(xmlSchema);
> > +                }
> > +            }
> > +            service.releaseSchemaList();
> > +            service.addSchema(schemaListToAdd);
> > +        }
> > +
> > +
> >         //process the unwrapped parameters
> >         if (!configuration.isParametersWrapped()) {
> >             //figure out the unwrapped operations
> >
> > Modified:
> axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
> > URL:
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1158146&r1=1158145&r2=1158146&view=diff
> >
> ==============================================================================
> > ---
> axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
> (original)
> > +++
> axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
> Tue Aug 16 08:21:32 2011
> > @@ -2809,4 +2809,8 @@ public class SchemaCompiler {
> >         }
> >        return isExists;
> >     }
> > +
> > +    public Map<String, XmlSchema> getLoadedSchemaMap(){
> > +        return this.loadedSchemaMap;
> > +    }
> >  }
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/