This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EAR file

 
Gökhan Sakalli
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I have a web module which i have wsdl files in it.
When i create a wsdl file automatically from my java code; there is an element like this

<element name="myNumber" type="xsd:int" />

But i want this element not to be mandatory so i do this like this,

<element name="myNumber" minOccurs="0" type="xsd:int" />

When i export an EAR file from my project the type myNumber deletes the propert minOccurs and becomes

<element name="myNumber" type="xsd:int" />

How can i add minOccurs property when i am creating the WSDL file automatically?

 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
If you do not want a WSDL to be generated, you have to supply one and, in the @WebService annotation (assuming you use it), use the wsdlLocation element to specify the location of the WSDL.
Usually, WSDL documents included in WAR-files are lcoated in the WEB-INF/wsdl directory.
Best wishes!
 
Gökhan Sakalli
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't know what Webservice annotation is. it's wierd when i look at the WSDL file i see minoccurs property. But when i call the service as a client from internet explorer i can't see minoccurs property.

Can you please help me about this?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
What web service stack are you using developing your web service?
Best wishes!
 
Gökhan Sakalli
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache Axis?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, you hit my weak spot!
I mainly use JAX-WS and web service stacks like Metro or Apache CXF when I develop SOAP web services.
Sorry!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic