Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

minoccurs="1" validation with JAX-RPC

 
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?
 
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.
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic