axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-3048) wsdl2java exception with xmlbeans bindings - Imported schema has a target namespace that does not match the specified
Date Thu, 02 Aug 2007 09:02:53 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517187
] 

Amila Chinthaka Suriarachchi commented on AXIS2-3048:
-----------------------------------------------------

Here is the option I can suggest. 
Keep only the top level elements which are refered by the wsdl messages. just keep the element
name and delete the sequence parts.
Then try to generate code. So you may not need to import lot of schemas.
then try to codegen and replace xmlbeans files with the generated files directly with scomp.

> wsdl2java exception with xmlbeans bindings - Imported schema has a target namespace that
does not match the specified
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3048
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3048
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Michael Mattox
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> When using the ANT task & Eclipse plugin for wsdl2java, I get this exception:
> Caused by: org.apache.xmlbeans.XmlException: D:\projects\MediaMetrie\projects\pam\workspace\MEDIAMAT2-ADM-SERVICE-WEBSERVICE\AdminProduction.xsd:2:1:
error: Imported schema has a target namespace "http://www.mediametrie.fr/mediamat2/operation/production/definitions/v1"
that does not match the specified "http://www.mediametrie.fr/mediamat2/gisement/production/v1"
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:174)
> 	... 23 more
> I have verified my xsd with XML spy & Eclipse WTP and they are valid:
> The xsd that includes the other one:
> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.mediametrie.fr/mediamat2/operation/production/definitions/v1"
xmlns:pref="http://www.mediametrie.fr/mediamat2/gisement/production/v1" xmlns:adm="http://www.mediametrie.fr/mediamat2/gisement/commons/v1"
targetNamespace="http://www.mediametrie.fr/mediamat2/operation/production/definitions/v1"
elementFormDefault="qualified">
> 	<import namespace="http://www.mediametrie.fr/mediamat2/gisement/production/v1" schemaLocation="Production.xsd"/>
> The xsd being included:
> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.mediametrie.fr/mediamat2/gisement/production/v1"
xmlns:Q1="http://www.mediametrie.fr/mediamat2/gisement/commons/v1" targetNamespace="http://www.mediametrie.fr/mediamat2/gisement/production/v1"
elementFormDefault="qualified">
> If I change the namespace in the including xsd to anything else, my xsd doesn't validate.
> Now here is where it gets interesting, I can generate the xmlbeans classes using the
xmlbeans ANT task without any errors.  So I think this has something to do with axis2.  When
I search for the message on google, I find the source code for xmlbeans:
> http://jsourcery.com/output/apache/xml/xmlbeans/1.0.3/org/apache/xmlbeans/impl/schema/StscImporter.source.html
> look in the method public SchemaToProcess[] resolveImportsAndIncludes() 
> I put this as critical because we can't generate any server files.  If there is a way
to not generate the xmlbeans classes, this would be a suitable workaround for me and we can
lower the priority.  I have a jar of my xmlbeans classes but I don't know how to tell wsdl2java
to not generate them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message