-
1. Re: Error when use classes generated from a xsd file Jboss As7
jaikiran Aug 9, 2011 8:36 AM (in response to quynhbt)What does the final deployment packaging look like?
-
2. Re: Error when use classes generated from a xsd file Jboss As7
quynhbt Aug 9, 2011 8:56 AM (in response to jaikiran)The deployment packaging is a EAR :
hello.ear
+ META-INF
+ application.xml
+ jboss-deployment-structure.xml
+ lib
+ hello.jar
+ META-INF
+ ejb-jar.xml
+ standard-jaxws-endpoint-config.xml
+ fr.datasystem.atlas.example.hello
+ helloService.class
+ helloServiceRemote.class
+ xml
+ Chgfmlreq.class
+ Ttls.class
+ QuotationItem.class
.......
+ seam.properties
+ hello.war
+ jboss-seam.jar
-
3. Re: Error when use classes generated from a xsd file Jboss As7
sfcoy Aug 9, 2011 9:16 AM (in response to quynhbt)The package name you have here does not match that in your src directory above...
-
4. Re: Error when use classes generated from a xsd file Jboss As7
quynhbt Aug 9, 2011 9:27 AM (in response to sfcoy)Sorry, I don't tape the package name in the src but it match that in the deployment packaging. That mean :
src
+ fr.datasystem.atlas.example.hello
+ helloService.java
+ helloServiceRemote.java
+ xml
+ Chgfmlreq.java
+ Tlts.java
+ QuotationItem.java
....
TBQ
-
5. Re: Error when use classes generated from a xsd file Jboss As7
quynhbt Aug 9, 2011 9:34 AM (in response to quynhbt)I deployed this example in Jboss 4 and it runs well
In Jboss 7, it has these errors, and I found that the WSDL files gererated by Jboss 4 and Jboss 7 are different
I attach here these 2 wsdl files
-
helloServiceJboss7.wsdl.zip 12.4 KB
-
helloServiceJboss4.wsdl.zip 6.5 KB
-
-
6. Re: Error when use classes generated from a xsd file Jboss As7
quynhbt Aug 9, 2011 12:02 PM (in response to quynhbt)I'd like to attach the application here but it is larger than 15 Mo (18 Mo),
-
7. Re: Error when use classes generated from a xsd file Jboss As7
quynhbt Aug 10, 2011 5:25 AM (in response to quynhbt)I found where is the problem.
In the file xsd, when I define a complex element directly by naming the element like this:
<xsd:element name="personne">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="nom" type="xsd:string" />
<xsd:element name="prenom" type="xsd:string" />
<xsd:element name="date_naissance" type="xsd:date" />
<xsd:element name="etablissement" type="xsd:string" />
<xsd:element name="num_tel" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>It works very well
But when I define the "personne" element which have a type attribute that refers to the name of the complex type, like this :
<xsd:element name="personne" type="Personne"/>
<xsd:complexType name="Personne">
<xsd:sequence>
<xsd:element name="nom" type="xsd:string" />
<xsd:element name="prenom" type="xsd:string" />
<xsd:element name="date_naissance" type="xsd:date" />
<xsd:element name="etablissement" type="xsd:string" />
<xsd:element name="num_tel" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>I get the error in the beginning of this thread:
10:48:46,352 GRAVE [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-14) Schema element {http://hello.example.atlas.datasystem.fr/}personne references undefined type Personne for service {http://hello.example.atlas.datasystem.fr/}helloService.
Jboss as7 does not support the second definition of complexType ?
What can I do to resolve it ?
Thanks
Best regards
TQB
-
8. Re: Error when use classes generated from a xsd file Jboss As7
sfcoy Aug 10, 2011 8:21 AM (in response to quynhbt)I think you need to do:
<xsd:complexType name="Personne"> <xsd:sequence> <xsd:element name="nom" type="xsd:string" /> <xsd:element name="prenom" type="xsd:string" /> <xsd:element name="date_naissance" type="xsd:date" /> <xsd:element name="etablissement" type="xsd:string" /> <xsd:element name="num_tel" type="xsd:string" /> </xsd:sequence>
</xsd:complexType> -
9. Re: Error when use classes generated from a xsd file Jboss As7
quynhbt Aug 11, 2011 10:37 AM (in response to sfcoy)Thanks Stephen Coy, but it does not work at all.
I have to use the second definition.
Best regards
TQB
-
10. Re: Error when use classes generated from a xsd file Jboss As7
vatsanm Mar 14, 2012 8:04 PM (in response to quynhbt)TQB,
How did you resolve the issue. I am hvig the same issue and tryign to track down the attributes like you have. The WSDL is generated bu JB and it works perfectly in Jboss 4.2.2 but not in 7.x
-
11. Re: Error when use classes generated from a xsd file Jboss As7
quynhbt Mar 16, 2012 5:54 AM (in response to vatsanm)Hi Vatsan,
I resolved by using the definition like this :
<xsd:complexType name="Personne">
<xsd:sequence>
<xsd:element name="nom" type="xsd:string" />
<xsd:element name="prenom" type="xsd:string" />
<xsd:element name="date_naissance" type="xsd:date" />
<xsd:element name="etablissement" type="xsd:string" />
<xsd:element name="num_tel" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
don't use this définition :
<xsd:element name="personne" type="Personne"/>
<xsd:complexType name="Personne">
<xsd:sequence>
<xsd:element name="nom" type="xsd:string" />
<xsd:element name="prenom" type="xsd:string" />
<xsd:element name="date_naissance" type="xsd:date" />
<xsd:element name="etablissement" type="xsd:string" />
<xsd:element name="num_tel" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
-
12. Re: Error when use classes generated from a xsd file Jboss As7
vatsanm Mar 16, 2012 10:40 AM (in response to quynhbt)Thx TQB. I did it simialr to above andit worked.