NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Problem generating Java classes from WSDL

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
cholou



Joined: 19 Feb 2009
Posts: 7

PostPosted: Thu Feb 19, 2009 8:43 am    Post subject: Problem generating Java classes from WSDL Reply with quote

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 Smile
Back to top
smoczyna



Joined: 08 Jan 2009
Posts: 34

PostPosted: Tue Feb 24, 2009 9:16 am    Post subject: Reply with quote

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

PostPosted: Tue Feb 24, 2009 4:14 pm    Post subject: Reply with quote

I tried it. also changing the type of "partido" to "xsd:partido" but it doesn't work :S
thanks Wink
Back to top
alex.brooker



Joined: 18 Feb 2009
Posts: 13
Location: Dorset, UK

PostPosted: Sat Feb 28, 2009 5:48 pm    Post subject: reference the type from the target namespace Reply with quote

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 Smile ,

Alex
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo