This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!