[jbossws-issues] [JBoss JIRA] Commented: (JBWS-1566) Invalid wsdl using @XmlSchema annotations on Types
Lucas Toledo (JIRA)
jira-events at lists.jboss.org
Tue Jan 19 10:03:48 EST 2010
[ https://jira.jboss.org/jira/browse/JBWS-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12506951#action_12506951 ]
Lucas Toledo commented on JBWS-1566:
------------------------------------
Hi there, I'm using jboss-4.2.1.GA and I'm having the same problem when running jboss and trying to create a service client to send a rpc/encoded request: javax.xml.rpc.Service service = servicefactory.createService(new URL(wsdlURL), serviceQN);
How do I install the patch posted above?
many thanks,
Lucas
> Invalid wsdl using @XmlSchema annotations on Types
> --------------------------------------------------
>
> Key: JBWS-1566
> URL: https://jira.jboss.org/jira/browse/JBWS-1566
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-native
> Affects Versions: jbossws-1.2.0
> Environment: JBossAS-4.0.5, jdk 5, jbossws 1.2.0.GA
> Reporter: Robert Mlekus
> Assignee: 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossws-issues
mailing list