• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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!
 
On top of spaghetti all covered in cheese, there was this tiny ad:
ScroogeXHTML 8.2 - easy to use RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!