Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7911803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:22:54+00:00 2026-06-03T13:22:54+00:00

I have a jaxws webservice with @SchemaValidation on it. @SchemaValidation(handler = MySchemaValidationHandler.class) @WebService(portName =

  • 0

I have a jaxws webservice with @SchemaValidation on it.

@SchemaValidation(handler = MySchemaValidationHandler.class)
@WebService(portName = "MyService", serviceName = "MyService", targetNamespace = "urn:com.my.urn", wsdlLocation = "/wsdls/mywsdl.wsdl", endpointInterface = "com.my.MyService")
@BindingType("http://schemas.xmlsoap.org/wsdl/soap/http")
public class MyServiceImpl
        implements MyService {
    @Resource
    WebServiceContext wsContext;
    public void myOperation(Holder<XMLGregorianCalendar> tag1, Holder<XMLGregorianCalendar> tag2, Holder<String> message) {
    ...
    }
}

in xsd I have the following example:

<xsd:choice>
    <xsd:element name="tag1" type="xsd:dateTime" minOccurs="0"/>
    <xsd:element name="tag2" type="xsd:dateTime" minOccurs="0"/>
</xsd:choice>

When I send the request with empty tags, I get an error concerning the field format (doesn’t fit the restrictions of a date format).

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:com.my.urn">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:myOperation>
         <Tag1>value1</Tag1>
         <Tag2></Tag2>
      </urn:myOperation> 
   </soapenv:Body>
</soapenv:Envelope>

In request description I have mandatory tags and choice tags and have to return the correct error message in the response, so I can’t just skip such errors in the handler.
Also I can’t modify nor xsd nor wsdl

Logically empty tags mean the same as missing tags. How can I make the validation treat empty tags as missing or how can I delete empty tags before the validation?
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:22:56+00:00Added an answer on June 3, 2026 at 1:22 pm

    Edit: Don’t send invalid XML. In the example you give, you should remove <Tag2></Tag2> in whatever your client code is. Don’t try to abuse the server’s validation to handle invalid XML.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In web.xml I have the following: <servlet> <description>JAX-WS endpoint - EARM</description> <display-name>jaxws-servlet</display-name> <servlet-name>jaxws-servlet</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSSpringServlet</servlet-class>
I have a JAX-WS WebService like this: public class ParentClass{ public String str1; }
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
I am a webservice beginner. Is it required to have two different projects having
although in my @Webservice class I extend SpringBeanAutowiringSupport, autowiring simply does not work for
I've got a JAX-WS WebService that is using Spring 3 IOC. I have coded
I have a web service (built using jaxb/jaxws) that invokes a stateless EJB to
I have deployed some jax-ws webservices in a tomcat: web.xml: ... <servlet> <servlet-name>WebServiceJaxWs</servlet-name> <servlet-class>...a
i have problem with build my own webservice based on cxf/camel. My webservice should
I am trying to invoke method via webservice (SOAP) I have generated Web service

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.