NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
cholou
Joined: 19 Feb 2009 Posts: 7
|
Posted: Thu Feb 19, 2009 8:43 am Post subject: Problem generating Java classes from WSDL |
|
|
Hello,
I'm trying to convert from wsdl2java, but at the generation I found this error:
"src-resolve.4.1: Error resolving component 'jornada'. It was detected that 'jornada' has no namespace, but components with no target namespace are not referenceable from schema document. If 'jornada' is intended to have a namespace, perhaps a prefix needs to be provided. If it is intended that 'jornada' has no namespace, then an 'import' without a "namespace" attribute should be added"
I dont found the error, this is the XSD:
| Quote: |
<xsd:schema xmlns="urn:prueba1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:prueba1" elementFormDefault="qualified">
<xsd:element name="jornada" type="jornada"/>
<xsd:complexType name="jornada">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="partido" type="partido"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:token"/>
<xsd:attribute name="liga" type="xsd:token"/>
<xsd:attribute name="num" type="xsd:int"/>
</xsd:complexType>
<xsd:complexType name="partido">
<xsd:sequence>
<xsd:element name="equipoLocal" type="xsd:token"/>
<xsd:element name="equipoVisitante" type="xsd:token"/>
<xsd:element name="marcador" type="xsd:token"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
|
I've searching and i didnt find any solution that could help me. does anybody know where the problem is?
thanks a lot  |
|
| Back to top |
|
 |
smoczyna
Joined: 08 Jan 2009 Posts: 34
|
Posted: Tue Feb 24, 2009 9:16 am Post subject: |
|
|
this part of the xsd
| Quote: | | <xsd:element name="jornada" type="jornada"/> |
seems to be like this:
| Quote: | | <xsd:element name="jornada" type="xsd:jornada"/> |
|
|
| Back to top |
|
 |
cholou
Joined: 19 Feb 2009 Posts: 7
|
Posted: Tue Feb 24, 2009 4:14 pm Post subject: |
|
|
I tried it. also changing the type of "partido" to "xsd:partido" but it doesn't work :S
thanks  |
|
| Back to top |
|
 |
alex.brooker
Joined: 18 Feb 2009 Posts: 13 Location: Dorset, UK
|
Posted: Sat Feb 28, 2009 5:48 pm Post subject: reference the type from the target namespace |
|
|
Hi,
try this one:
<xsd:schema xmlns="urn:prueba1"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:prueba1"
elementFormDefault="qualified"
xmlns:ns="urn:prueba1">
<xsd:element name="jornada" type="ns:jornada"/>
<xsd:complexType name="jornada">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="partido" type="ns:partido"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:token"/>
<xsd:attribute name="liga" type="xsd:token"/>
<xsd:attribute name="num" type="xsd:int"/>
</xsd:complexType>
<xsd:complexType name="partido">
<xsd:sequence>
<xsd:element name="equipoLocal" type="xsd:token"/>
<xsd:element name="equipoVisitante" type="xsd:token"/>
<xsd:element name="marcador" type="xsd:token"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
hope that helps ,
Alex |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|