wood burning stoves 2.0*
The moose likes Web Services and the fly likes Making Webmethod parameters mandatory? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Making Webmethod parameters mandatory?" Watch "Making Webmethod parameters mandatory?" New topic
Author

Making Webmethod parameters mandatory?

Sree SaiRam
Greenhorn

Joined: Jan 18, 2013
Posts: 1
Hi

I am working on webservice bottom up approach on IRAD 7 with jaxws 2.1.and jaxb

I want to make webmethod parameters mandatory,I tried using @Xmlelement(required=true)
but it is not updating my XSd.

Can you suggest a suitable approach to make my webmethod parameters mandatory


Thanks in Advance.
rama.
joy lobo
Greenhorn

Joined: Jan 19, 2013
Posts: 1
Hi,

I have WebService (C#) with one WebMethod that takes 4 parameters, as below:

<s:element minOccurs="0" maxOccurs="1" name="requestedBy" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="submissionDateTime" type="s:dateTime" />
<s:element minOccurs="0" maxOccurs="1" name="orderReference" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="currentState" type="s:string" />

My problem is that I would like every one of these arguments to be mandatory when being call by the client i.e.

<s:element minOccurs="1" maxOccurs="1" name="requestedBy" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="submissionDateTime" type="s:dateTime" />
<s:element minOccurs="1" maxOccurs="1" name="orderReference" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="currentState" type="s:string" />

If it is not clear what my problem is from this then please let me know and I will try to clarify.


Internet Marketing Auckland | Web Design Auckland
 
Consider Paul's rocket mass heater.
 
subject: Making Webmethod parameters mandatory?