aspose file tools*
The moose likes Web Services and the fly likes EAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "EAR file" Watch "EAR file" New topic
Author

EAR file

Gökhan Sakalli
Greenhorn

Joined: Apr 04, 2009
Posts: 20
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!


My free books and tutorials: http://www.slideshare.net/krizsan
Gökhan Sakalli
Greenhorn

Joined: Apr 04, 2009
Posts: 20
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
What web service stack are you using developing your web service?
Best wishes!
Gökhan Sakalli
Greenhorn

Joined: Apr 04, 2009
Posts: 20
Apache Axis?
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EAR file