• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic