0
votes

I am using manual deploy of webservice with JavaSE 6. I want to use @SchemaValidation to validate SOAP traffic. During publishing endpoint i am getting error:

Caused by: org.xml.sax.SAXParseException: s4s-att-invalid-value: Invalid attribute value for 'base' in element 'restriction'. Recorded reason: UndeclaredPrefix: Cannot resolve 'xsd:string' as a QName: the prefix 'xsd' is not declared.

Why namespace prefix do not resolved in attribute values ?

This is my WSDL part:

< wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="CorporateFinances.CFIntegration" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="CorporateFinances.CFIntegration">

< wsdl:types>

< xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="CorporateFinances.CFIntegration" targetNamespace="CorporateFinances.CFIntegration" elementFormDefault="qualified" attributeFormDefault="unqualified" version="20180920">

...

< xsd:restriction base="xsd:string"> ...

1
Does it deploy fine without the "@SchemaValidation" annotation?JGlass
Yes, it is. And successfully processed call from SOAP UI.Игорь Дмитриев
What JDK/JRE version are you using and what is your application container, e.g. Tomcat, JBoss/Wildfly, WebSphere?JGlass
JDK1.6. update 45, i do not use container, i am using javase facilities only.Игорь Дмитриев
I'm thinking it may be a bug based on this validation failure in jdk 1-6 success in jdk 1-7 as well as this bug_id 6529766 and this might help a bit webservices validating input - let me know if any of it helps! If you get it figured out, you might answer and accept as the answer your own question to build reputation! If you cant get it working I can try.JGlass

1 Answers

0
votes

Problem was induced by xalan.jar of old version in classpath. Error do not more appears after i had updated xalan.jar to new version.