• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Metro JAX-WS @schemaValidation How to specify schemas instead of annotaion generated

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I 've been using the @schemavalidation tag successfully with Metro 2.0 with simpler schemas, but a recent update to our schemas has cause the attached error to occur IFF schemavalidation is on. The service functions correctly if it is not. I have been able to validate messages against the schemas used to generate the services using tools like Oxygen. The error occurs at server startup not in response to a particular in or out bound message. Looking at the error messages it looks like the metro framework builds the schemas from the annotations in the generate code and is failing at doing that. I make that assumption since the schema names in the errors do not match the schemas used to generate the code. I had hoped that the wsdlLocation attribute on the @webservice annotation or the sun-jax-ws definitions would solve that issue ( wsdl and all schemas are deployed to WEB-INF/wsdl directory). I understand the cause to be an abstract base class but don't want to constrain the interface developers from using valid schema constructs. In a nutshell is there any way to force the metro framework to take the top down approach and validate against the schemas used to generate the code instead of a bottom up approach of reading the annotations and regenerating the schemas from the generated code?

Dec 3, 2010 8:16:50 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
SEVERE: WSSERVLET11: failed to parse runtime descriptor: javax.xml.ws.WebServiceException: org.xml.sax.SAXParseException: src-resolve.4.2: Error resolving component 'ns1:MessageType'. It was detected that 'ns1:MessageType' is in namespace 'http://schemas.ticomgeo.com/2010/geonet/common/ServiceMessageTypes/v0', but components from this namespace are not referenceable from schema document 'file:/AudioStreamServicesPortImplService_schema1.xsd'. If this is the incorrect namespace, perhaps the prefix of 'ns1:MessageType' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/AudioStreamServicesPortImplService_schema1.xsd'.
javax.xml.ws.WebServiceException: org.xml.sax.SAXParseException: src-resolve.4.2: Error resolving component 'ns1:MessageType'. It was detected that 'ns1:MessageType' is in namespace 'http://schemas.ticomgeo.com/2010/geonet/common/ServiceMessageTypes/v0', but components from this namespace are not referenceable from schema document 'file:/AudioStreamServicesPortImplService_schema1.xsd'. If this is the incorrect namespace, perhaps the prefix of 'ns1:MessageType' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/AudioStreamServicesPortImplService_schema1.xsd'.
 
reply
    Bookmark Topic Watch Topic
  • New Topic