-
Notifications
You must be signed in to change notification settings - Fork 0
Validations Sample
Max Wendel F. F. Araújo edited this page May 1, 2019
·
2 revisions
- Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mov="http://www.abstract.com/movies-ws">
<soapenv:Header/>
<soapenv:Body>
<mov:addMovieRequest>
<mov:title>Test</mov:title>
</mov:addMovieRequest>
</soapenv:Body>
</soapenv:Envelope>- Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring xml:lang="en">Validation error</faultstring>
<detail>
<spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">cvc-complex-type.2.4.b: O conteúdo do elemento 'mov:addMovieRequest' não está completo. Era esperado um dos '{"http://www.abstract.com/movies-ws":category}'.</spring-ws:ValidationError>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>- Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mov="http://www.abstract.com/movies-ws">
<soapenv:Header/>
<soapenv:Body>
<mov:addMovieRequest>
<mov:category>Teste de Validação</mov:category>
<mov:title>Teste</mov:title>
</mov:addMovieRequest>
</soapenv:Body>
</soapenv:Envelope>- Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring xml:lang="en">Validation error</faultstring>
<detail>
<spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">cvc-complex-type.2.4.a: Foi detectado um conteúdo inválido começando com o elemento 'mov:category'. Era esperado um dos '{"http://www.abstract.com/movies-ws":title}'.</spring-ws:ValidationError>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>- Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mov="http://www.abstract.com/movies-ws">
<soapenv:Header/>
<soapenv:Body>
<mov:addMovieRequest>
<mov:title></mov:title>
<mov:category></mov:category>
</mov:addMovieRequest>
</soapenv:Body>
</soapenv:Envelope>- Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring xml:lang="en">Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>- See Messages Example and Install Application.