• 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

minoccurs="1" validation with JAX-RPC

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

we have defined XSD's which contains mandatory elements (Minoccurs="1") and these XSD's we have imported in our WSDL.

But when the client makes a call with out mandatory elements then my assumption is it has to give an error for missing mandatroy element.

Its not working and i dont see any error for missing mandatory elements.

Any idea how to handle mandatory elements in WEB SERVICES?
 
Vadiraja Dharmavaram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
does any one has answer?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
You say nothing about how your client creates and sends the request to the web service.
If you are using, for instance, JAXB, then you can supply the XML schema and tell JAXB to perform validation against the schema when marshalling and unmarshalling.
The following code snippet shows how to do this:

Best wishes!
 
Vadiraja Dharmavaram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

we are using JAX-RPC on server side and JAX-RPC generated stubs on client side.
We are not using JAXB. Please help me.
 
Water! People swim in water! Even tiny ads swim in water:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic