• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Making Webmethod parameters mandatory?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic