This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

EAR file  RSS feed

 
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?

 
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!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!