[jbossws-issues] [JBoss JIRA] Updated: (JBWS-1566) Invalid wsdl using @XmlSchema annotations on Types

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Mon Aug 13 10:39:00 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBWS-1566?page=all ]

Thomas Diesler updated JBWS-1566:
---------------------------------

    Summary: Invalid wsdl using @XmlSchema annotations on Types  (was: JBossWS-1.2.0.GA invalid wsdl generated when using @XmlSchema annotations on Types inheriting from >1 java package)

> Invalid wsdl using @XmlSchema annotations on Types
> --------------------------------------------------
>
>                 Key: JBWS-1566
>                 URL: http://jira.jboss.com/jira/browse/JBWS-1566
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-jaxws
>    Affects Versions: jbossws-1.2.0
>         Environment: JBossAS-4.0.5, jdk 5, jbossws 1.2.0.GA
>            Reporter: Robert Mlekus
>         Assigned To: Heiko Braun
>             Fix For: jbossws-2.0.0
>
>         Attachments: JBWS-1566-JbossWS-Samples-001.patch
>
>
> While the @javax.xml.bind.annotation.XmlSchema annotation within the package-info.java of an class not inheriting from other packages works perfectly, JBossWS generates the following error for derived datatypes: 
> <code>
> 14:35:02,173 ERROR [ServiceEndpointPublisher] Cannot obtain waURL for: webservice-test.ear/webservic
> e-test.jar
> 14:35:02,283 ERROR [JBossXSErrorHandler] [domain:http://www.w3.org/TR/xml-schema-1]::[key=src-resolv
> e.4.2]::Message=src-resolve.4.2: Error resolving component 'ns1:aClass'. It was detected that 'ns1:a
> Class' is in namespace 'http://test.org/wsclient/a', but components from this namespace are not refe
> renceable from schema document 'null'. If this is the incorrect namespace, perhaps the prefix of 'ns
> 1:aClass' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag sh
> ould be added to 'null'.
> <code>
> The Parameter classes causing this problem are a.AClass, b.Bclass defined in the packages a, and b with the following package-info.java @XmlSchema annotations: 
> The following examples will be attached as a patch for the jbossws-samples, too but are given here for a short summary on the problem.
> file a/package-info.java:
> ------
> @javax.xml.bind.annotation.XmlSchema(namespace =  http://test.org/wsclient/a" )
> package a;
> ------
> 	
> file a/AClass.java:
> ------
> package a;
> public class AClass {
> 	int a;
> 	
> 	public int getA() {
> 		return a;
> 	}
> 	public void setA(int testInt) {
> 		this.a = testInt;
> 	}
> }
> ------
> file b/package-info.java:
> ------
> @javax.xml.bind.annotation.XmlSchema(namespace =  http://test.org/wsclient/b" )
> package b;
> ------
> 	
> file b/BClass.java
> ------
> package b;
> public class BClass extends a.AClass  {
> 	String b;
> 	
> 	public String getB() {
> 		return b;
> 	}
> 	public void setB(String testString) {
> 		this.b = testString;
> 	}
> }
> ------
> 	
> The relevant part of the generated WSDL (which is visible under jbossws/service is:
> <xs:schema targetNamespace="http://test.org/wsclient/b" version="1.0">
>   <xs:complexType name="bClass">
>     <xs:complexContent>
>       <xs:extension base="ns1:aClass">
> 	<xs:sequence>
>           <xs:element minOccurs="0" name="b" type="xs:string"/>
>         </xs:sequence>
>       </xs:extension>
>     </xs:complexContent>
>   </xs:complexType>
> </xs:schema>
> <xs:schema targetNamespace="http://test.org/wsclient/a" version="1.0">
>   <xs:complexType name="aClass">
>     <xs:sequence>
>       <xs:element name="a" type="xs:int"/>
>     </xs:sequence>
>     </xs:complexType>
> </xs:schema>
> 	
> where the declaration of bClass references the ns1 namespace without declaring it.
> The same thing happens when aClass is aggreagated by bClass.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossws-issues mailing list