[jboss-user] [JBossWS] - JBossWS-1.2.0.GA invalid wsdl generated when using @jXmlSche
centecbertl
do-not-reply at jboss.com
Tue Mar 6 09:14:45 EST 2007
Hi,
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:
| 14:35:02,173 ERROR [ServiceEndpointPublisher] Cannot obtain waURL for: webservice-test.ear/webservice-test.jar
| 14:35:02,283 ERROR [JBossXSErrorHandler] [domain:http://www.w3.org/TR/xml-schema-1]::[key=src-resolve.4.2]::Message=src-resolve.4.2: Error resolving component 'ns1:aClass'. It was detected that 'ns1:aClass' is in namespace 'http://test.org/wsclient/a', but components from this namespace are not referenceable from schema document 'null'. If this is the incorrect namespace, perhaps the prefix of 'ns1:aClass' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'null'.
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:
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.
My Test Envrionment is
JBossAS 4.0.5, JBossWS-1.2.0.GA (compiled according to the Howto in the Wiki after checking out the sources from svn , installed using the projects deploy-jboss40 ant-target)
(PS: if this a a new issue I could provide you with the complete example code/maven project to reproduce the problem)
Best Regards,
Bertl
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025392#4025392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025392
More information about the jboss-user
mailing list