• Post Reply Bookmark Topic Watch Topic
  • New Topic

minoccurs="1" validation with JAX-RPC  RSS feed

 
Vadiraja Dharmavaram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
does any one has answer?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!