My job is build a Loopback app and call SOAP to a Server ( IBM Integration Bus).
I’m facing an issue about validate request message from loopback send to a Server.
The issue is: My request message have an invalid element at SOAP Context is _XmlDeclaration. So that Server denied my message.
SOAP
Context
operation:CHARACTER:InquiryOffers
operationType:CHARACTER:REQUEST_RESPONSE
portType:CHARACTER:SFCustomerService
portTypeNamespace:CHARACTER:http://www.msb.com.vn/service/vn/SFCustomerService/1
port:CHARACTER:SFCustomerServiceSOAP
service:CHARACTER:SFCustomerService
fileName:CHARACTER:wsdls/SFCustomerService.wsdl
SOAP_Version:CHARACTER:1.1
Namespace
soap:CHARACTER:http://schemas.xmlsoap.org/soap/envelope/
_XmlDeclaration
Version:CHARACTER:1.0
Encoding:CHARACTER:UTF-8
StandAlone:CHARACTER:yes
Header
Body
InquiryOffersReq
ns1:CHARACTER:http://www.msb.com.vn/entity/vn/SFCustomerService/1
Header
ns2:CHARACTER:http://www.msb.com.vn/common/envelope/commonheader/1
Common
ServiceVersion:CHARACTER:1
MessageId:CHARACTER:f036f6c1-8dd5-4bcf-bef9-9be9084e7b65
MessageTimestamp:CHARACTER:2007-12-30T09:00:00
Client
SourceAppID:CHARACTER:SF
TargetAppIDs
TargetAppID:CHARACTER:EX
UserDetail
UserId:CHARACTER:MSB
UserPassword:CHARACTER:TVNC
InquiryOffersReqBody
CIF:CHARACTER:11111
ExceptionList
RecoverableException
File:CHARACTER:F:buildS1000_slot1S1000_PsrcDataFlowEngineMessageServicesImbDataFlowNode.cpp
Line:INTEGER:1251
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmSOAPInputNode
Name:CHARACTER:myTestFlow#FCMComposite_1_10
Label:CHARACTER:myTestFlow.SOAP HTTP
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
Insert
Type:INTEGER:14
Text:CHARACTER:myTestFlow.SOAP HTTP
RecoverableException
File:CHARACTER:F:buildS1000_slot1S1000_PsrcDataFlowEngineBasicNodesImbCheckNode.cpp
Line:INTEGER:424
Function:CHARACTER:ImbValidateNode::evaluate
Type:CHARACTER:ComIbmValidateNode
Name:CHARACTER:myTestFlow#FCMComposite_1_4
Label:CHARACTER:myTestFlow.Validate
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
Insert
Type:INTEGER:14
Text:CHARACTER:myTestFlow.Validate
ParserException
File:CHARACTER:F:buildS1000_slot1S1000_PsrcWebServicesWSLibraryImbSOAPParser.cpp
Line:INTEGER:1424
Function:CHARACTER:ImbSOAPParser::refreshBitStreamFromElementsInner
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3605
Text:CHARACTER:SOAP tree cannot be serialized
ParserException
File:CHARACTER:F:buildS1000_slot1S1000_PsrcMTIMTIforBrokerGenXmlParser4ImbXMLNSCParser.cpp
Line:INTEGER:929
Function:CHARACTER:ImbXMLNSCParser::refreshBitStreamFromElementsCommon
Type:CHARACTER:ComIbmSOAPInputNode
Name:CHARACTER:myTestFlow#FCMComposite_1_10
Label:CHARACTER:myTestFlow.SOAP HTTP
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:5010
Text:CHARACTER:XML Writing Errors have occurred
ParserException
File:CHARACTER:F:buildS1000_slot1S1000_PsrcMTIMTIforBrokerGenXmlParser4ImbXMLNSCDocHandler.cpp
Line:INTEGER:767
Function:CHARACTER:ImbXMLNSCDocHandler::handleParseErrors
Type:CHARACTER:ComIbmSOAPInputNode
Name:CHARACTER:myTestFlow#FCMComposite_1_10
Label:CHARACTER:myTestFlow.SOAP HTTP
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:5026
Text:CHARACTER:A schema validation error has occurred while validating the message tree
Insert
Type:INTEGER:2
Text:CHARACTER:5012
Insert
Type:INTEGER:2
Text:CHARACTER:1
Insert
Type:INTEGER:2
Text:CHARACTER:1
Insert
Type:INTEGER:2
Text:CHARACTER:505
Insert
Type:INTEGER:5
Text:CHARACTER:cvc-complex-type.3.2: Attribute "StandAlone" is not allowed to appear in element "_XmlDeclaration".
Insert
Type:INTEGER:5
Text:CHARACTER:/XMLNSC/SOAP_Domain_Msg/Context
var soap = require('strong-soap').soap;
// wsdl of the web service this client is going to invoke. For local wsdl you can use, url = './wsdls/stockquote.wsdl'
var url = 'http://localhost:7800/SFCustomerService/1?WSDL';
var requestArgs = {
InquiryOffersReq: {
Header:{
Common:{
ServiceVersion:'1',
MessageId:'f036f6c1-8dd5-4bcf-bef9-9be9084e7b65',
MessageTimestamp:'2007-12-30T09:00:00'
},
Client:{
SourceAppID:'SF',
TargetAppIDs:{
TargetAppID:'EX'
},
UserDetail:{
UserId:'MSB',
UserPassword:'TVNC'
}
}
},
InquiryOffersReqBody:{
CIF:'11111'
}
}
};
var options = {};
soap.createClient(url, function (err, client) {
//var method = client['testService']['testOperation']['GetQuote'];
client.InquiryOffers(requestArgs, function (err, result, envelope, soapHeader) {
//response envelope
console.log('Response Envelope: n' + envelope);
//'result' is the response body
console.log('Result: n' + JSON.stringify(result));
});
});
The way for this is remove _XmlDeclaration element but I dont know how to remove it.
Or can someone explain me why this_XmlDeclaration element be created, and how to modify it.
Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (D:repobeauty-velvettes-webnode_modules@angularclinode_modules@angular-devkitcoresrcworkspaceworkspace.js:210:42)
at MergeMapSubscriber._tryNext (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternaloperatorsmergeMap.js:65:27)
at MergeMapSubscriber._next (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternaloperatorsmergeMap.js:55:18)
at MergeMapSubscriber.Subscriber.next (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternalSubscriber.js:64:18)
at MergeMapSubscriber.notifyNext (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternaloperatorsmergeMap.js:84:26)
at InnerSubscriber._next (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternalInnerSubscriber.js:25:21)
at InnerSubscriber.Subscriber.next (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternalSubscriber.js:64:18)
at MapSubscriber._next (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternaloperatorsmap.js:52:26)
at MapSubscriber.Subscriber.next (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternalSubscriber.js:64:18)
at SwitchMapSubscriber.notifyNext (D:repobeauty-velvettes-webnode_modules@angularclinode_modulesrxjsinternaloperatorsswitchMap.js:77:26)
asked Jun 11, 2019 at 11:16
1
Try to update the package.json
file so that "@angular-devkit/build-angular": "^0.800.1"
reads "@angular-devkit/build-angular": "^0.12.4"
Then run npm install
in the command line.
Reference: https://stackoverflow.com/a/56537342
answered Jun 17, 2019 at 2:48
Renato PradebonRenato Pradebon
2,0632 gold badges8 silver badges7 bronze badges
0
This worked for me.
npm uninstall @angular-devkit/build-angular
npm install @angular-devkit/build-angular@0.13.0
answered Nov 7, 2019 at 10:53
2
Most of the answers are correct in stating that this occurs either because of a mismatch between:
- Nodejs version and Angular version
OR
@angular-devkit/build-angular
version and angular version
Also, this issue is most likely to occur if you either:
-
upgraded/downgraded Nodejs version (which is no longer compatible with the angular version)
-
Upgraded Angular version
-
Run
npm audit fix
For 1, check the Nodejs version support needed here: https://angular.io/guide/setup-local and check the installed version. If you are using the latest version of angular, you should be able to make it work with the latest version of Nodejs.
For 2, did you follow instructions here: https://update.angular.io/ ? If yes, and still have issues, look for any issues already created or create an issue here: https://github.com/angular/angular/issues
For 3, npm audit fix
updates the @angular-devkit/build-angular
version to a higher version because @angular-devkit/build-angular
does not follow proper versioning (major releases still update only the minor version). Check the link below to check the compatible version for your Angular version: https://www.npmjs.com/package/@angular-devkit/build-angular?activeTab=versions Use the correct version and the issue will be fixed.
P.S: This is a good read about angular versioning: https://angular.io/guide/releases
xmlParser
1,8734 gold badges17 silver badges47 bronze badges
answered Apr 7, 2020 at 12:46
SterexSterex
1,0161 gold badge15 silver badges28 bronze badges
2
Try to update @angular/core
using ng update @angular/cli @angular/core
answered Jun 20, 2019 at 22:54
Angular Cli 8 support Node Js 10.9+. After update Node.js to 10.16 works fine.
answered Jul 5, 2019 at 12:13
1
Just found this answer from another link,
npm uninstall @angular-devkit/build-angular
npm install @angular-devkit/build-angular@0.13.0
answered Oct 31, 2019 at 13:41
Tadele AyelegnTadele Ayelegn
4,0261 gold badge34 silver badges29 bronze badges
Below worked for me.
> 1. npm uninstall @angular-devkit/build-angular
> 2. npm install @angular-devkit/build-angular@0.13.0
if we use
AVOID: npm audit fix -f
it may create problem, so dont use it.
answered Jun 20, 2020 at 4:40
Ankur GargAnkur Garg
1412 silver badges2 bronze badges
2
Update @angular-devkit/build-angular to «^0.13.9» . Then run npm install
and after that, run npm serve
.
Specs:
Angular: 7.2.15
Angular CLI: 7.3.9
Node: 11.2.0
OS: darwin x64
answered Feb 18, 2020 at 12:34
2
What i did was to uninstall and install the «^0.13.0».
I confirm/ support this last answer. It worked for me as well.
I had uninstall version «^0.800.0» and installed the «^0.13.0».
rebuild your project it will work fine.
answered Nov 1, 2019 at 16:21
I got the same error when upgraded angular from 6 to 8.
Simple update angular cli to latest version & node version to 10+.
1) Visit this link to get the latest node version. Angular 8 requires 10+.
2) Execute npm i @angular/cli@latest to update cli.
This is what I have currently
answered Dec 24, 2019 at 7:31
This is worked for me
- npm uninstall @angular-devkit/build-angular
- npm install @angular-devkit/build-angular@0.13.0
answered Apr 5, 2020 at 5:08
I have to say, if you don’t want to change anything in package.json
file, try to update your Node.js version to latest. (currently 12.13.1 LTS)
answered Dec 12, 2019 at 2:55
Ted CorleoneTed Corleone
8031 gold badge8 silver badges16 bronze badges
0
I got this issue when installing Bootstrap.
The following commands are what worked for me:
npm uninstall @angular-devkit/build-angular
npm install @angular-devkit/build-angular@0.13.0
Jeremy Caney
6,82354 gold badges48 silver badges74 bronze badges
answered May 15, 2020 at 17:40
This will do the trick for you:
- Update your angular cli by running the command
ng update @angular/cli @angular/core
- Run or build your project by running the commands
ng s
orng build
respectively.
Mickael B.
4,5774 gold badges23 silver badges46 bronze badges
answered Jan 30, 2020 at 13:07
- Opened package.json
- Changed «@angular-devkit/build-angular»: «^0.800.0» to «@angular-devkit/build-angular»: «^0.10.0» or changed Changing from
«@angular-devkit/build-angular»: «^0.802.1» to
«@angular-devkit/build-angular»: «^0.13.9» - Run npm install
- Run ng serve
The original version can be diferent, but is necessary change it at 0.10.0 or 0.13.9 version that fix the problem
answered Oct 23, 2019 at 14:15
- open cmd from current project
- npm uninstall @angular-devkit/build-angular
- npm install —save-dev @angular-devkit/build-angular
answered Jan 19, 2020 at 9:24
RamuRamu
112 bronze badges
This worked for me:
In package.json
Changed «@angular-devkit/build-angular»: «^0.800.0» —>
«@angular-devkit/build-angular»: «^0.10.0»
Then:
npm install
ng serve
Specs:
Angular CLI: 6.1.5
Node: 10.15.3
OS: win32 x64
Angular: 6.1.9
answered Nov 19, 2020 at 12:11
Ошибка: проверка схемы завершилась неудачно из-за следующих ошибок: Путь к данным «» НЕ должен иметь дополнительных свойств (проект)
После миграции приложения с angular 5 на 6 при запуске ng serve появляются следующие ошибки.
Schema validation failed with the following errors:
Data path «» should NOT have additional properties(project).
Error: Schema validation failed with the following errors:
Data path «» should NOT have additional properties(project).
at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (…/TemplateApp/me-cmf-web-template-angular/node_modules/@angular-devkit/core/src/workspace/workspace.js:210:42)
at MergeMapSubscriber._tryNext (/…/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/mergeMap.js:65:27)
at MergeMapSubscriber._next (…/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/mergeMap.js:55:18)
at MergeMapSubscriber.Subscriber.next (/home/training/Attinad_Projects/TemplateApp/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:64:18)
at MergeMapSubscriber.notifyNext (…/TemplateApp/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/mergeMap.js:84:26)
at InnerSubscriber._next (…/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/InnerSubscriber.js:25:21)
at InnerSubscriber.Subscriber.next (/…/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:64:18)
at MapSubscriber._next (…/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/map.js:52:26)
at MapSubscriber.Subscriber.next (/…/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:64:18)
at SwitchMapSubscriber.notifyNext (…/me-cmf-web-template-angular/node_modules/@angular-devkit/core/node_modules/rxjs/internal/operators/switchMap.js:77:26)
Я предполагаю, что ошибка связана с файлом .angular.json, который я переименовал из .angular-cli.json.
Мой файл .angular.json выглядит следующим образом:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "mediaweb"
},
"apps": [{
"root": "src",
"outDir": "dist/browser",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.scss",
"../node_modules/owl.carousel/dist/assets/owl.carousel.css",
"../node_modules/owl.carousel/dist/assets/owl.theme.default.css",
"../node_modules/video.js/dist/video-js.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/owl.carousel/dist/owl.carousel.js",
"../node_modules/video.js/dist/ie8/videojs-ie8.js",
"../node_modules/video.js/dist/video.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.dev.ts",
"prod": "environments/environment.prod.ts"
}
},
{
"platform": "server",
"root": "src",
"outDir": "dist/server",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.server.ts",
"test": "test.ts",
"tsconfig": "tsconfig.server.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.scss"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.dev.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [{
"project": "src/tsconfig.app.json",
"exclude": ["**/node_modules/**", "**/UI/**"]
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {}
}
}
Следует ли мне реструктурировать файл json, если да, то как ?.
Любая помощь была бы замечательной.
Перейти к ответу
Данный вопрос помечен как решенный
Ответы
16
Думаю дело в несовместимости RxJS. Вы должны установить rxjs-compat, чтобы исправить это.
npm install rxjs-compat
Кроме того, имя файла — angular.json, а не .angular.json.
Формат angular.json должен соответствовать Angular6 … Вы можете проверить мой angular.json ниже или создать новый проект в Angular6, а затем проверить формат заголовка проекта
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"homePage6": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/homePage6",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.json"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "homePage6:build"
},
"configurations": {
"production": {
"browserTarget": "homePage6:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "homePage6:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"styles.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.json"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"homePage6-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "homePage6:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "homePage6"
}
Я столкнулся с аналогичной (не идентичной, но также в angular.json) проблемой:
Schema validation failed with the following errors: Data path
«[‘server’]» should NOT have additional properties(scripts). Error:
Schema validation failed with the following errors: Data path
«[‘server’]» should NOT have additional properties(scripts).
at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult
[as project]
(D:Angular7uHomenode_modules@angular-devkitcoresrcworkspaceworkspace.js:215:42)
at MergeMapSubscriber._tryNext (D:Angular7uHomenode_modulesrxjsinternaloperatorsmergeMap.js:69:27)
at MergeMapSubscriber._next (D:Angular7uHomenode_modulesrxjsinternaloperatorsmergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (D:Angular7uHomenode_modulesrxjsinternalSubscriber.js:67:18)
at MergeMapSubscriber.notifyNext (D:Angular7uHomenode_modulesrxjsinternaloperatorsmergeMap.js:92:26)
at InnerSubscriber._next (D:Angular7uHomenode_modulesrxjsinternalInnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (D:Angular7uHomenode_modulesrxjsinternalSubscriber.js:67:18)
at MapSubscriber._next (D:Angular7uHomenode_modulesrxjsinternaloperatorsmap.js:55:26)
at MapSubscriber.Subscriber.next (D:Angular7uHomenode_modulesrxjsinternalSubscriber.js:67:18)
at SwitchMapSubscriber.notifyNext (D:Angular7uHomenode_modulesrxjsinternaloperatorsswitchMap.js:86:26)
Пришлось удалить скрипты свойств из моего angular.json … поделиться этой информацией, чтобы помочь кому-то в будущем.
Поскольку я исправил проблему, я подумал, что было бы неплохо опубликовать ее здесь.
Я изменил свое имя файла .angular.json на angular.json и заменил некоторые свойства из вопроса в нем.
{
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"template-appv6": {
"root": "",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/browser",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
},
{
"glob": "favicon.ico",
"input": "src",
"output": "/"
}
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "template-appv6:build"
},
"configurations": {
"production": {
"browserTarget": "template-appv6:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "template-appv6:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"src/styles.css"
],
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
},
{
"glob": "favicon.ico",
"input": "src",
"output": "/"
}
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/server",
"main": "src/main.server.ts",
"tsConfig": "src/tsconfig.server.json"
}
}
}
},
"template-appv6-e2e": {
"root": "",
"projectType": "application",
"cli": {},
"schematics": {},
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "template-appv6:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"cli": {},
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
Я изменил файл, заменив файл angular.json на свойства в официальных документах angular.
Официальный Руководство по обновлению Angular предоставляет пошаговое руководство по обновлению версий.
Заменить package.json с:
"@angular-devkit/build-angular": "^0.13.5",
К:
"@angular-devkit/build-angular": "^0.12.1",
Обновление npm и angular исправили мою:
Предполагая, что вы используете npm
npm update
Затем запустите:
ng update
NB: вам может быть предложено обновить отдельные зависимости. В моем случае мне было предложено запустить:
Ng update @angular/cli и ng update @angular/core.
Проблема обычно возникает из-за несоответствия версии в вашем файле package.json.
В моем приложении Angular 7 я изменил «@angular-devkit/build-angular»: «^0.800.2» на «@angular-devkit/build-angular»: «~0.7.0».
Затем я выполнил команду npm install после удаления node_modules.
В сторону: используйте ^ осторожно. Ваш рабочий код может не работать в будущем, если произойдет серьезное изменение используемого пакета.
Мое приложение находится на угловом 7.2.3
Удалить «es5BrowserSupport»: true из angular.json.
и npm start теперь работает.
Первый:
npm uninstall @angular-devkit/build-angular
Следующий:
npm install @angular-devkit/build-angular@0.12.4
Перейдите на package.json и измените версию @ angular-devkit / сборка-угловой следующим образом:
@angular-devkit/build-angular»: «^0.12.4»
Когда я получал проблемы с ошибкой версии, у меня работала следующая команда:
Первый забег:
npm update
Второй прогон:
ng update
Третий прогон:
(Он обновит все несовпадающие пакеты)
ng update --all --force
Я просто удалил папку node_module и запустил
NPM Install
И у меня это сработало.
Это решение Угловой 9.
Обновление Angular с 9 до 10 очень просто (вся дополнительная информация находится здесь: https://update.angular.io/?v=9.0-10.0):
Make sure your package file is in version control and all changes have been committed. This will overwrite your package file. Better you try it in a new experimental branch.
npm install -g npm-check-updates
ncu -u
ng update --all --force
В новой схеме больше не разрешено использовать ключ es5BrowserSupport, удалите следующую строку в вашем angular.json:
"es5BrowserSupport": true
Затем просто запустите приложение заново:
npm start
При обновлении Angular с версии 8 до 10 я получил очень похожую ошибку, а именно Schema validation failed with the following errors: Data path «» should NOT have additional properties(serverTarget)..
Решением было удалить все ссылки «serverTarget» снизу «serve». Ниже был неправильный:
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "my_app:build"
"serverTarget": "my_app:server"
},
"configurations": {
"production": {
"browserTarget": "my_app:build:production",
"serverTarget": "my_app:server:production"
}
}
},
Ниже представлены верный и скомпилировано успешно:
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "my_app:build"
},
"configurations": {
"production": {
"browserTarget": "my_app:build:production"
}
}
},
Бонус для тех, кто работает с Angular Universal. Если вы хотите запустить SSR на localhost, то вам действительно нужен serverTarget. Однако для этого вам нужно создать новый раздел в angular.json, например:
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",
"options": {
"browserTarget": "my_app:build",
"serverTarget": "my_app:server"
},
"configurations": {
"production": {
"browserTarget": "my_app:build:production",
"serverTarget": "my_app:server:production"
}
}
},
Потом ng run my_app:serve-ssr.
На самом деле я получил эту ошибку при обновлении Angular с версии 10 до 8 и хотел улучшить некоторые вещи. Затем я испортил serverTarget из-за этого неправильного мышления, надеюсь, это поможет кому-то с Angular Universal в проекте.
Удалите эти две строки из файла angular.json:
"vendorSourceMap":"true",
"evalSourceMap":"true".
удаление флага es5BrowserSupport: true
из angular.json
устранило проблему.
Поскольку я обновлялся с Angular7 до Angular11, я пропустил пункт из руководства по обновлению https://update.angular.io/.
Удалите все es5BrowserSupport flags in your angular.json
и установите target to es2015 in your tsconfig.json
. Angular теперь использует ваш список браузеров, чтобы определить, нужна ли сборка ES5. ng update перенесет вас автоматически.
Попробовав все, что написано выше, все равно не сработало.
Пока я не перезагрузил свою систему.
Добавьте это в последнюю очередь.
- Перезагрузить систему
Другие вопросы по теме
Hi,
I am hoping someone may be able to help?
I am trying to create various buckets in planner, I will be focusing on just one for this discussion. I would like to take three data points from forms to point towards the PlanId where I would like the bucket created (Will have to manually create these plans as far as I can tell for now ). In this instance for testing the flow, the data from those form fields is A, B & C which gives ABC. In future planning to be customer details.
As below I have previously created a plan called ABC in planner.
However when I test run the flow I get the following error. As you can see the data from the forms comes through as ABC in the PlanId field. But it appears to be failing to from my limited knowledge see the plan?
I have also go the following information expanded out from the above.
Headers
request-id
98c8d5f8-24fb-49fc-8ef6-513d15e13b68
client-request-id
98c8d5f8-24fb-49fc-8ef6-513d15e13b68
x-ms-ags-diagnostic
{«ServerInfo»:{«DataCenter»:»West US»,»Slice»:»SliceC»,»Ring»:»5″,»ScaleUnit»:»003″,»Host»:»AGSFE_IN_58″,»ADSiteName»:»WUS»}}
Duration
64.4676
Strict-Transport-Security
max-age=31536000
Timing-Allow-Origin
*
x-ms-apihub-cached-response
true
Cache-Control
private
Date
Wed, 21 Nov 2018 11:25:38 GMT
Content-Length
314
Content-Type
application/json
Body
{
«error»: {
«code»: «»,
«message»: «Schema validation has failed. Validation for field ‘PlanId’, on entity ‘Bucket’ has failed: The specified identifier is invalid.»,
«innerError»: {
«request-id»: «98c8d5f8-24fb-49fc-8ef6-513d15e13b68»,
«date»: «2018-11-21T11:25:38»
}
}
}
Anyone know where I am falling downand can advise how to correct?
Hi,
Have a scenerio in which consecutive mapping needs to be done.The first mapping is a Java Mapping in which XML schema validation needs to be done.
If XML Schema validation is sucessful(Mapping 1),then graphical message mapping(MM_Entry) needs to be performed.
I have uploded a jar file in imported Archives which contains
1)Schema file(inputSchema.xsd): This is an XSD file which is generated in XI….XSD fomat of Source message type
2) The java Class file
Following are few lines of code for better idea:
public class SAXParser implements StreamTransformation {
public void execute(InputStream input, OutputStream output) throws StreamTransformationException {
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
InputStream mySchema = this.getClass().getClassLoader().getResourceAsStream(«inputSchema.xsd»);
SAXParser saxParser = saxParserFactory.newSAXParser();
saxParser.setProperty(«http://java.sun.com/xml/jaxp/properties/schemaLanguage», «http://www.w3.org/2001/XMLSchema»);
saxParser.setProperty(«http://java.sun.com/xml/jaxp/properties/schemaSource»,mySchema);
saxParser.parse(input, new HandlerBase());
After above step(parsing),input is copied to output and streams are closed as follows:
byte[] buf = new byte[4096];
for(int len=-1;(len=input.read(buf))!=-1;)
output.write(buf,0,len);
input.close();
output.close();
After sending correct source message from input ,i am getting following error:
Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_Entry_: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Parsing an empty source. Root element expected!
Daniel,
As I’ve said, I’ve used it successfully in PI 7.0 SP10.
You’re right about documentation, it says that by default, Java 1.4.2 mark() and reset() methods of InputStream class are not fully implemented (mark() would do nothing and reset() would always throw an IOException). And that would be the expected behavior…
…unless the SAP developers have extended the InputStream class to include actual implementatios to the mark() and reset() methods.
I’m not saying that they have, but it would be possible, wouldn’t it?
It does work, after all…
Regards,
Henrique.
Similar Messages
-
XML Schema validation error in network configuration. Missing DnsRef
When ever we try to make changes to a Virtual network we receive
XML Schema validation
error in network configuration. Missing DnsRef
We can’t make any changes to the Virtual network.
The DNS ref exists as well.
Considering exporting network config and re-importing however we have a lot of networks configured and want to be sure this is the correct way to proceed.
Any feedback much appreciated.
ThanksHi,
We are having the same problem, so you are not alone.
I had an extensive call with Azure premium support and we where able to determine that:
— Nothing is missing or in the wrong place in my exported .xml file.
— Any changes to the VNET’s using the web gui interface of https://manage.windowsazure.com is not possible when you have dns servers and use an gateway
— You can download the .xml configuration file of the network and make manual changes to it, then import it again , to add/remove dns servers and or subnet’s.
I am currently waiting for an solution, i have let them lower the urgency from A to B (because i can make changes trough xml) and responded to the next support contact (saying he will continue with the issue) that the problems seems to be with azure and
he should speak with the previous person helping me. I have not heard from Azure support since.
SR Number:115021812414226
Open on:02/18/2015 09:28
> There are networks with and without gateways created and the issue is happening on all the networks.
> We are unable to add or remove the DNS servers. (by web gui)
> Also not able to add or remove any subnets. (by web gui)
> Every time the error message is same but the DNS server name is different. (from another subnet then the one we are changing)
> Created CRI- 3405931, but they said it will need WATS team.
> Confirmed with WATS engineer as well and moving case to WATS.
> Cx agreed to lower the severity of the case as they are able to make changes through the network configuration file.
> But they still want to get this resolved soon.
> Agreed and dropped off, reducing severity to B 24/7.
I hope microsoft is going to resolve this soon, as i do not want to edit my xml for little things like adding a subnet all the time. I have requested an status update in the issue.
Should anyone have more information on this, please share it here. -
Adapter Engine XML Schema Validation Error Surpression
We recently developed a number of web services that are called by 3rd parties outside our network. The web service request once made is picked up by a Web Dispatcher which then forwards the request to the de-central adapter. Both of these components reside within within a DMZ.
We have, as an additional security measure made use of the new Adapter Engine XML Schema validation available with PI 7.1, to ensure that the payload of incomming messages is checked to ensure that it is a known structure.
Now here is my problem, we recently had these services penetration tested by a 3rd party to ensure that they were secure and whilst the report was very good showing no major weaknesses they did pickup on a couple of items including that the fact that if the XSD to be used during payload message validation cannot be found an ‘ADAPTER.JAVA_EXCEPTION’ is returned to the web service consumer that highlights the path details of where the XSD should be (but could not be found).
This was viewed as useful to an attacker for a number of reasons:
1. Feedback in SQL injection attempts via verbatim DB error messages greatly improves attacker efficiency
2. Path information is useful to the attacker for OS fingerprinting, directory traversal attempts
3. Other miscellaneous stack trace information is useful to an attacker to understand how the application works
Is there anyway this can be surpressed so that the adapter does not show this information in the returned error message — see example message below ?
com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: Schema MaintenanceOrderByIDQuery_sync.xsd not found in E:usrsapDPIDVEBMGS40j2eeclusterserver0validationschemaf7cd3b50a87411e08830ed9d0af006a5urnstw.contractor.wfm.workorderretrievalMaintenanceOrderByIDQueryRequest_Outhttpsap.comxiSAPGlobal20~GlobalMaintenanceOrderByIDQuery_sync.xsd (validationschema)
at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:1041)
at sun.reflect.GeneratedMethodAccessor497.invoke(Unknown Source)
com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: Schema Schema1.xsd not found in E:usrsapDPIDVEBMGS40j2eeclusterserver0validationschemaf7cd3b50a87411e08830ed9d0af006a5urnstw.contractor.wfm.workorderretrievalMaintenanceOrderByIDQueryRequest_Outhttpsap.comxiEA-APPLSEGlobalSchema1.xsd (validationschema)
at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:1041)Hi,
We are having the same problem, so you are not alone.
I had an extensive call with Azure premium support and we where able to determine that:
— Nothing is missing or in the wrong place in my exported .xml file.
— Any changes to the VNET’s using the web gui interface of https://manage.windowsazure.com is not possible when you have dns servers and use an gateway
— You can download the .xml configuration file of the network and make manual changes to it, then import it again , to add/remove dns servers and or subnet’s.
I am currently waiting for an solution, i have let them lower the urgency from A to B (because i can make changes trough xml) and responded to the next support contact (saying he will continue with the issue) that the problems seems to be with azure and
he should speak with the previous person helping me. I have not heard from Azure support since.
SR Number:115021812414226
Open on:02/18/2015 09:28
> There are networks with and without gateways created and the issue is happening on all the networks.
> We are unable to add or remove the DNS servers. (by web gui)
> Also not able to add or remove any subnets. (by web gui)
> Every time the error message is same but the DNS server name is different. (from another subnet then the one we are changing)
> Created CRI- 3405931, but they said it will need WATS team.
> Confirmed with WATS engineer as well and moving case to WATS.
> Cx agreed to lower the severity of the case as they are able to make changes through the network configuration file.
> But they still want to get this resolved soon.
> Agreed and dropped off, reducing severity to B 24/7.
I hope microsoft is going to resolve this soon, as i do not want to edit my xml for little things like adding a subnet all the time. I have requested an status update in the issue.
Should anyone have more information on this, please share it here. -
Java Stored Procedure SAXParser XML Schema Validation
Using Oracle XML Developers Kit 10.2.0.2.0 — Production.
Attempting to validate using XML Schema in a Java stored procedure with the code:
if ( schemaDoc == null )
// Obtain default connection
Connection conn = new OracleDriver().defaultConnection();
OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement(«SELECT XmlDocObj FROM XmlDoc WHERE XmlDocNbr = 2»);
OracleResultSet rset = (OracleResultSet)stmt.executeQuery();
if ( rset.next() )
// get the XMLType
XMLType schemaXml = (XMLType)rset.getObject(1);
XSDBuilder builder = new XSDBuilder();
XMLSchema schemaDoc = (XMLSchema)builder.build(new InputSource(schemaXml.getInputStream()));
if ( inst == null )
inst = new ValidateCoreRequest();
ErrorHandlerImpl handler = inst.getNewErrorHandler();
SAXParser saxParser = new SAXParser();
saxParser.setXMLSchema(schemaDoc);
saxParser.setValidationMode(XMLParser.SCHEMA_VALIDATION);
saxParser.setErrorHandler(handler);
saxParser.parse(new InputSource(new StringReader(docStr)));
if( handler.validationError )
errorMsg[0] = handler.saxParseException.getMessage().substring(0, Math.min(199, handler.saxParseException.getMessage().length()));
Never reports validation errors in the XML. Although the XDK Programmers Guide states «…you can use
the oracle.xml.parser.schema.XSDBuilder class to build an XML schema and
then configure the parser to use it by invoking the XMLParser.setXMLSchema()
method. In this case, the XML parser automatically sets the validation mode to
SCHEMA_STRICT_VALIDATION and ignores the schemaLocation and
noNamespaceSchemaLocation attributes.» No validation seems to occur. I have tried to set an xsi:noNamespaceSchemaLocation attribute on the root XML node, but this results in URL errors if the URL is not valid or schema build errors if the URL is valid, but does not point to a real location.
It appears that without a schema location attribute, no schema validation occurs. Using setXMLSchema() with a database source does not seem to cause the schema location attributes to be ignored. At least for Java stored procedures.
Does XML Schema validation work in the database for externally referenced schemas?
Thank You,
Art<BLOCKQUOTE><font size=»1″ face=»Verdana, Arial»>quote:</font><HR>Originally posted by Jan Vissers ([email protected]):
I have two schemas A and B. A contains a java stored procedure which calls a java stored procedure stored in B. Upon resolving the «A» Java Stored Procedures I get the following error:
ORA-29545: badly formed class: at offset 3093 of Adapter.TFADPBeschikbaarheid.sendAanvraag expecting a class-oracle.xml.parser.v2.XMLDocument but encountered a class-oracle.xml.parser.v2.XMLDocument.
… Question:
it is expecting something which it has in fact encountered… SO!!!! What is the error.
Thx,
Jan<HR></BLOCKQUOTE>
Try this:
Edit your XSU installation script located on lib directory of Oracle XSU’s distribution:
Find the line:
loadjava -r -v -u $USER_PASSWORD xmlparserv2.jar
Replace by:
loadjava -r -v -g public -u $USER_PASSWORD xmlparserv2.jar
And installs your Oracle XSU again.
Best regards, Marcelo. -
JAXP API provides no way to enable XML Schema validation mode
I am evaluating XDK 9.2.0.5.0 for Java and have encountered another
problem with XML Schema support when using the JAXP API.
Using the classes in oracle.xml.jaxp.*, it appears to be impossible to
enable XML Schema validation mode. I can set the schema object, but
the parser does not use it for validation.
If I use DOMParser directly, I can call the setValidationMode(int)
method to turn on schema validation mode. There is no equivalient
means to enable XML Schema validation when using the JAXP API.
Test case for JAXP API:
=== begin OracleJAXPSchemaTest.java ======
package dfranklin;
import java.io.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;
import oracle.xml.parser.schema.XMLSchema;
import oracle.xml.parser.schema.XSDBuilder;
import org.w3c.dom.*;
import org.xml.sax.*;
public class OracleJAXPSchemaTest
private final static String xsd = «»
+»<xsd:schema xmlns:xsd=»http://www.w3.org/2001/XMLSchema» targetNamespace=»urn:dfranklin:test»>»
+» <xsd:element name=»amount» type=»xsd:integer»/>»
+»</xsd:schema>»;
private final static String xml =
«<amount xmlns=»urn:dfranklin:test»>1</amount>»;
public static void main(String[] args)
throws Exception
System.setProperty(«javax.xml.parsers.DocumentBuilderFactory»,
«oracle.xml.jaxp.JXDocumentBuilderFactory»);
new OracleJAXPSchemaTest().run();
public void run()
throws Exception
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(true);
dbf.setNamespaceAware(true);
XMLSchema xmlSchema = buildXMLSchema(new StringReader(xsd));
dbf.setAttribute(«oracle.xml.parser.XMLParser.SchemaObject»,
xmlSchema);
DocumentBuilder docbldr = dbf.newDocumentBuilder();
Document doc = docbldr.parse(new InputSource(new StringReader(xml)));
print(doc);
private XMLSchema buildXMLSchema(Reader xsdin)
throws Exception
XSDBuilder xsdBuilder = new XSDBuilder();
XMLSchema xmlSchema = (XMLSchema)xsdBuilder.build(xsdin, null);
return xmlSchema;
private void print(Document doc)
throws
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(new DOMSource(doc), new StreamResult(System.out));
System.out.println();
=== end OracleJAXPSchemaTest.java ======
Running that program:
java dfranklin.OracleJAXPSchemaTest
produces this output
Exception in thread «main» oracle.xml.parser.v2.XMLParseException: Element ‘amount’ used but not declared.
at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:148)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:269)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:96)
at dfranklin.OracleJAXPSchemaTest.run(OracleJAXPSchemaTest.java:40)
at dfranklin.OracleJAXPSchemaTest.main(OracleJAXPSchemaTest.java:27)
This shows that the parser is not using the XML Schema to validate the
document. I think it’s expecting to find a DTD.
Here is the equivalent program using DOMParser directly, and setting
validation mode to SCHEMA_VALIDATION.
=== begin OracleParserTest.java ====
package dfranklin;
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;
import oracle.xml.parser.schema.XMLSchema;
import oracle.xml.parser.schema.XSDBuilder;
import oracle.xml.parser.v2.DOMParser;
import oracle.xml.parser.v2.XMLParser;
import org.w3c.dom.*;
import org.xml.sax.*;
public class OracleParserTest
private final static String xsd = «»
+»<xsd:schema xmlns:xsd=»http://www.w3.org/2001/XMLSchema» targetNamespace=»urn:dfranklin:test»>»
+» <xsd:element name=»amount» type=»xsd:integer»/>»
+»</xsd:schema>»;
private final static String xml =
«<amount xmlns=»urn:dfranklin:test»>1</amount>»;
public static void main(String[] args)
throws Exception
new OracleParserTest().run();
public void run()
throws Exception
DOMParser dp = new DOMParser();
XMLSchema xmlSchema = buildXMLSchema(new StringReader(xsd));
dp.setXMLSchema(xmlSchema);
dp.setValidationMode(XMLParser.SCHEMA_VALIDATION);
dp.parse(new InputSource(new StringReader(xml)));
Document doc = dp.getDocument();
print(doc);
private XMLSchema buildXMLSchema(Reader xsdin)
throws Exception
XSDBuilder xsdBuilder = new XSDBuilder();
XMLSchema xmlSchema = (XMLSchema)xsdBuilder.build(xsdin, null);
return xmlSchema;
private void print(Document doc)
throws
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(new DOMSource(doc), new StreamResult(System.out));
System.out.println();
=== end OracleParserTest.java ====
Running that program
java dfranklin.OracleParserTest
produces this output
<?xml version = ‘1.0’?>
<amount xmlns=»urn:dfranklin:test»>1</amount>
In this case, the parser has validated the document.
I also tried this with version 10.1.0.0.0 beta, and got the same
error.
Darin FranklinThanks for posting that. I tried that code and still got my problem. The big difference is that I’m reading a group of XML files each of which uses a large number of schema files. There are over 50 schema files organized so they can be included as needed. Each of the XML files has a noNamespaceSchemaLocation attribute specifying one of the ten top schma files, that includes many others.
However, I did solve the problem. I added one line —
saxb.setFeature( «http://apache.org/xml/features/validation/schema»,
true);
// next line is new
saxb.setProperty( JAXPConstants.JAXP_SCHEMA_LANGUAGE,
JAXPConstants.W3C_XML_SCHEMA );after the setFeature to turn on schema validation.
(It needs an import org.apache.xerces.jaxp.JAXPConstants; statement.)
Note:With the feature set to true and the setProperty commented out, the EntityResolver is called at construction tiem, and for each schema file, but each element is flagged as needing to be declared.
With the feature commented out, and the setProperty in place, the EntityResolver is not called, and there is no validation performed. (I added invalid content to one of the files and there were no errors listed.)
With both the setFeature and the setProperty in place, however, I get the calls from the EntityResolver indicating that it is processing the schema files, and for the good files, I get no errror, but for the bad file, I get an error indicating a bad validation.
Now I can make the EntityResolver quiet and get what I wanted. Maybe there are other ways to do this, but I’ve got one that works.
Thanks to all who have helped.
Dave Patterson -
Xml schema validation problem
Hi All
How to tackle this xml schema validation problem
i am using the sample code provided by ORacle technet for xml
schema validation in the Oracle database(817).
The sample code works perfectly fine.
Sample as provided by http://otn.oracle.com/tech/xml/xdk_sample/archive/xdksample_093001.zip.
It works fine for normal xml files validated against
xml schema (xsd)
but in this case my validation is failing . Can you let me know why
I have this main schema
Comany.xsd
===========
<?xml version=»1.0″?>
<xsd:schema xmlns:xsd=»http://www.w3.org/2001/XMLSchema»
targetNamespace=»http://www.company.org»
xmlns=»http://www.company.org»
elementFormDefault=»qualified»>
<xsd:include schemaLocation=»Person.xsd»/>
<xsd:include schemaLocation=»Product.xsd»/>
<xsd:element name=»Company»>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=»Person» type=»PersonType» maxOccurs=»unbounded»/>
<xsd:element name=»Product» type=»ProductType» maxOccurs=»unbounded»/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
================
which includes the following 2 schemas
Product.xsd
============
<?xml version=»1.0″?>
<xsd:schema xmlns:xsd=»http://www.w3.org/2001/XMLSchema»
elementFormDefault=»qualified»>
<xsd:complexType name=»ProductType»>
<xsd:sequence>
<xsd:element name=»Type» type=»xsd:string»/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
==============
Person.xsd
===========
<?xml version=»1.0″?>
<xsd:schema xmlns:xsd=»http://www.w3.org/2001/XMLSchema»
elementFormDefault=»qualified»>
<xsd:complexType name=»PersonType»>
<xsd:sequence>
<xsd:element name=»Name» type=»xsd:string»/>
<xsd:element name=»SSN» type=»xsd:string»/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
=================
now when i try to validate a xml file against Company.xsd
it throws an error saying unable to find Person.xsd.
no protocol error
Now where do i place these 2 schemas(.xsd files) Person & product
so that the java schemavalidation program running inside Oracle
database can locate these files
Rgrds
SushantHi Jinyu
This is the java code loaded in the database using loadjava called by a wrapper oracle stored procedure
import oracle.xml.parser.schema.*;
import oracle.xml.parser.v2.*;
import java.net.*;
import java.io.*;
import org.w3c.dom.*;
import java.util.*;
import oracle.sql.CHAR;
import java.sql.SQLException;
public class SchemaUtil
public static String validation(CHAR xml, CHAR xsd)
throws Exception
//Build Schema Object
XSDBuilder builder = new XSDBuilder();
byte [] docbytes = xsd.getBytes();
ByteArrayInputStream in = new ByteArrayInputStream(docbytes);
XMLSchema schemadoc = (XMLSchema)builder.build(in,null);
//Parse the input XML document with Schema Validation
docbytes = xml.getBytes();
in = new ByteArrayInputStream(docbytes);
DOMParser dp = new DOMParser();
// Set Schema Object for Validation
dp.setXMLSchema(schemadoc);
dp.setValidationMode(XMLParser.SCHEMA_VALIDATION);
dp.setPreserveWhitespace (true);
StringWriter sw = new StringWriter();
dp.setErrorStream (new PrintWriter(sw));
try
dp.parse (in);
sw.write(«The input XML parsed without errors.n»);
catch (XMLParseException pe)
sw.write(«Parser Exception: » + pe.getMessage());
catch (Exception e)
sw.write(«NonParserException: » + e.getMessage());
return sw.toString();
This is the code i used initially for validating a xml file against single xml schema (.xsd) file
In the above code could u tell how to specify the second schema validation code for the incoming xml.
say i create another Schemadoc for the 2nd xml schema.
something like this with another parameter(CHAR xsd1) passing to the method
byte [] docbytes1 = xsd1.getBytes();
ByteArrayInputStream in1 = new ByteArrayInputStream(docbytes1);
XMLSchema schemadoc1 = (XMLSchema)builder.build(in1,null);
DOMParser dp = new DOMParser();
How to set for the 2nd xml schema validation in the above code or can i combine 2 xml schemas.
How to go about it
Rgrds
Sushant -
Schema validation errors in Portal 10.3
I downloaded, installed and configured a domain with an AdminServer and a ManagedServer for WebLogic Portal 10.3. When I start the AdminServer from NodeManager the following errors are reported:
<Sep 24, 2008 12:50:41 PM CDT> <Error> <Management> <BEA-141244> <Schema validation errors while parsing /opt/Oracle/WL10gR3/user_projects/domains/web/config/config.xml — Invalid xsi:type qname: ‘wsrp:wsrp-identity-asserterType’ in element [email protected]://www.bea.com/ns/weblogic/920/domain>
<Sep 24, 2008 12:50:41 PM CDT> <Error> <Management> <BEA-141244> <Schema validation errors while parsing /opt/Oracle/WL10gR3/user_projects/domains/web/config/config.xml — /opt/Oracle/WL10gR3/user_projects/domains/web/<unknown>:13:9: error: failed to load java type corresponding to [email protected]://www.bea.com/ns/wlp/90/security/wsrp>
When I start the AdminServer using startWebLogic.sh there are no errors. Please advise.I have been at this for less than a month, so I may need a little more help. So are you saying that the product as installed has been reorganized and that all of the installed pieces may not reflect all of the changes?
I have continued cutting down my scripts and NodeManager does not seem to be a factor. Starting from WLST does not work.
This works:
/opt/Oracle/WL10gR3/user_projects/domains/web/bin/startWebLogic.sh.
JAVA Memory arguments: -Xms256m -Xmx768m
WLS Start Mode=Production
CLASSPATH=:/opt/Oracle/WL10gR3/patch_wlw1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/WL10gR3/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/WL10gR3/patch_wlp1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/WL10gR3/patch_cie670/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/WL10gR3/jrockit_160_05/lib/tools.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/weblogic.jar:/opt/Oracle/WL10gR3/modules/features/weblogic.server.modules_10.3.0.0.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/webservices.jar:/opt/Oracle/WL10gR3/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/opt/Oracle/WL10gR3/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/opt/Oracle/WL10gR3/wlserver_10.3/common/eval/pointbase/lib/pbclient57.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/xqrl.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/xquery.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/binxml.jar:
PATH=/opt/Oracle/WL10gR3/wlserver_10.3/server/bin:/opt/Oracle/WL10gR3/modules/org.apache.ant_1.6.5/bin:/opt/Oracle/WL10gR3/jrockit_160_05/jre/bin:/opt/Oracle/WL10gR3/jrockit_160_05/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http://hostname:port/console *
starting weblogic with Java version:
x86_64 is not a supported Linux hardware platform for Autonomy.
java version «1.6.0_05»
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
BEA JRockit(R) (build R27.6.0-50_o-100423-1.6.0_05-20080626-2104-linux-ia32, compiled mode)
Starting WLS with line:
/opt/Oracle/WL10gR3/jrockit_160_05/bin/java -jrockit -Xms256m -Xmx768m -da -Dplatform.home=/opt/Oracle/WL10gR3/wlserver_10.3 -Dwls.home=/opt/Oracle/WL10gR3/wlserver_10.3/server -Dweblogic.home=/opt/Oracle/WL10gR3/wlserver_10.3/server -Dweblogic.wsee.bind.suppressDeployErrorMessage=true -Dweblogic.wsee.skip.async.response=true -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=true -Dweblogic.ext.dirs=/opt/Oracle/WL10gR3/patch_wlw1030/profiles/default/sysext_manifest_classpath:/opt/Oracle/WL10gR3/patch_wls1030/profiles/default/sysext_manifest_classpath:/opt/Oracle/WL10gR3/patch_wlp1030/profiles/default/sysext_manifest_classpath:/opt/Oracle/WL10gR3/patch_cie670/profiles/default/sysext_manifest_classpath:/opt/Oracle/WL10gR3/wlportal_10.3/p13n/lib/system:/opt/Oracle/WL10gR3/wlportal_10.3/light-portal/lib/system:/opt/Oracle/WL10gR3/wlportal_10.3/portal/lib/system:/opt/Oracle/WL10gR3/wlportal_10.3/info-mgmt/lib/system:/opt/Oracle/WL10gR3/wlportal_10.3/analytics/lib/system:/opt/Oracle/WL10gR3/wlportal_10.3/apps/lib/system:/opt/Oracle/WL10gR3/wlportal_10.3/info-mgmt/deprecated/lib/system:/opt/Oracle/WL10gR3/wlportal_10.3/content-mgmt/lib/system -Dweblogic.alternateTypesDirectory=/opt/Oracle/WL10gR3/wlportal_10.3/portal/lib/security -Dweblogic.Name=AdminServer -Djava.security.policy=/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/weblogic.policy weblogic.Server
<Sep 25, 2008 11:34:35 AM CDT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
/opt/Oracle/WL10gR3/wlportal_10.3/analytics/lib/system/analytics_sys.jar:/opt/Oracle/WL10gR3/wlportal_10.3/apps/lib/system/groupspace_system.jar:/opt/Oracle/WL10gR3/wlportal_10.3/content-mgmt/lib/system/content_system.jar:/opt/Oracle/WL10gR3/wlportal_10.3/info-mgmt/deprecated/lib/system/commerce_system.jar:/opt/Oracle/WL10gR3/wlportal_10.3/info-mgmt/lib/system/wlp-schemas.jar:/opt/Oracle/WL10gR3/wlportal_10.3/info-mgmt/lib/system/wlp_content_system.jar:/opt/Oracle/WL10gR3/wlportal_10.3/info-mgmt/lib/system/wps_system.jar:/opt/Oracle/WL10gR3/wlportal_10.3/light-portal/lib/system/netuix_common.jar:/opt/Oracle/WL10gR3/wlportal_10.3/light-portal/lib/system/netuix_schemas.jar:/opt/Oracle/WL10gR3/wlportal_10.3/light-portal/lib/system/netuix_system.jar:/opt/Oracle/WL10gR3/wlportal_10.3/light-portal/lib/system/wsrp-client.jar:/opt/Oracle/WL10gR3/wlportal_10.3/light-portal/lib/system/wsrp-common.jar:/opt/Oracle/WL10gR3/wlportal_10.3/p13n/lib/system/p13n-schemas.jar:/opt/Oracle/WL10gR3/wlportal_10.3/p13n/lib/system/p13n_common.jar:/opt/Oracle/WL10gR3/wlportal_10.3/p13n/lib/system/p13n_system.jar:/opt/Oracle/WL10gR3/wlportal_10.3/p13n/lib/system/wlp_services.jar:/opt/Oracle/WL10gR3/wlportal_10.3/portal/lib/system/netuix_system-full.jar>
<Sep 25, 2008 11:34:36 AM CDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.6.0-50_o-100423-1.6.0_05-20080626-2104-linux-ia32 from BEA Systems, Inc.>
<Sep 25, 2008 11:34:36 AM CDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for CR376251 Wed Aug 06 09:19:34 PDT 2008
WebLogic Server Temporary Patch for CR371247 Sat Aug 09 20:10:38 PDT 2008
WebLogic Server Temporary Patch for CR377673 Tue Aug 12 20:39:50 EDT 2008
WebLogic Server Temporary Patch for CR377673 Tue Aug 12 20:39:50 EDT 2008
WebLogic Server Temporary Patch for CR376759 Thu Aug 14 14:53:02 PDT 2008
WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967 >
<Sep 25, 2008 11:34:38 AM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
This does not work:
. /opt/Oracle/WL10gR3/user_projects/domains/web/bin/setDomainEnv.sh
java weblogic.WLSTInitializing WebLogic Scripting Tool (WLST) …
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> startServer()
Starting weblogic server …
WLST-WLS-1222359153099: <Sep 25, 2008 11:12:34 AM CDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.6.0-50_o-100423-1.6.0_05-20080626-2104-linux-ia32 from BEA Systems, Inc.>
WLST-WLS-1222359153099: <Sep 25, 2008 11:12:34 AM CDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for CR376251 Wed Aug 06 09:19:34 PDT 2008
WLST-WLS-1222359153099: WebLogic Server Temporary Patch for CR371247 Sat Aug 09 20:10:38 PDT 2008
WLST-WLS-1222359153099: WebLogic Server Temporary Patch for CR377673 Tue Aug 12 20:39:50 EDT 2008
WLST-WLS-1222359153099: WebLogic Server Temporary Patch for CR377673 Tue Aug 12 20:39:50 EDT 2008
WLST-WLS-1222359153099: WebLogic Server Temporary Patch for CR376759 Thu Aug 14 14:53:02 PDT 2008
WLST-WLS-1222359153099: WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967 >
WLST-WLS-1222359153099: <Sep 25, 2008 11:12:36 AM CDT> <Error> <Management> <BEA-141244> <Schema validation errors while parsing /opt/Oracle/WL10gR3/user_projects/domains/web/config/config.xml — Invalid xsi:type qname: ‘wsrp:wsrp-identity-asserterType’ in element [email protected]://www.bea.com/ns/weblogic/920/domain>
AdminServer.out:
<Sep 25, 2008 10:56:16 AM> <Info> <NodeManager> <Starting WebLogic server with command line: /opt/Oracle/WL10gR3/jrockit_160_05/jre/bin/java -Dweblogic.Name=AdminServer -Djava.security.policy=/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/weblogic.policy -Djava.library.path=/opt/Oracle/WL10gR3/jrockit_160_05/jre/lib/i386/jrockit:/opt/Oracle/WL10gR3/jrockit_160_05/jre/lib/i386:/opt/Oracle/WL10gR3/jrockit_160_05/jre/../lib/i386::/opt/Oracle/WL10gR3/wlserver_10.3/server/native/linux/i686:/opt/Oracle/WL10gR3/wlserver_10.3/server/native/linux/i686/oci920_8 -Djava.class.path=/opt/Oracle/WL10gR3/patch_wlw1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/WL10gR3/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/WL10gR3/patch_wlp1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/WL10gR3/patch_cie670/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/Oracle/WL10gR3/jrockit_160_05/lib/tools.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/weblogic.jar:/opt/Oracle/WL10gR3/modules/features/weblogic.server.modules_10.3.0.0.jar:/opt/Oracle/WL10gR3/wlserver_10.3/server/lib/webservices.jar:/opt/Oracle/WL10gR3/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/opt/Oracle/WL10gR3/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/opt/Oracle/WL10gR3 -Dweblogic.system.BootIdentityFile=/opt/Oracle/WL10gR3/user_projects/domains/web/servers/AdminServer/security/boot.properties -Dweblogic.nodemanager.ServiceEnabled=true weblogic.Server >
<Sep 25, 2008 10:56:16 AM> <Info> <NodeManager> <Working directory is «/opt/Oracle/WL10gR3/user_projects/domains/web»>
<Sep 25, 2008 10:56:16 AM> <Info> <NodeManager> <Server output log file is «/opt/Oracle/WL10gR3/user_projects/domains/web/servers/AdminServer/logs/AdminServer.out»>
<Sep 25, 2008 10:56:17 AM CDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.6.0-50_o-100423-1.6.0_05-20080626-2104-linux-ia32 from BEA Systems, Inc.>
<Sep 25, 2008 10:56:17 AM CDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for CR376251 Wed Aug 06 09:19:34 PDT 2008
WebLogic Server Temporary Patch for CR371247 Sat Aug 09 20:10:38 PDT 2008
WebLogic Server Temporary Patch for CR377673 Tue Aug 12 20:39:50 EDT 2008
WebLogic Server Temporary Patch for CR377673 Tue Aug 12 20:39:50 EDT 2008
WebLogic Server Temporary Patch for CR376759 Thu Aug 14 14:53:02 PDT 2008
WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967 >
<Sep 25, 2008 10:56:19 AM CDT> <Error> <Management> <BEA-141244> <Schema validation errors while parsing /opt/Oracle/WL10gR3/user_projects/domains/web/config/config.xml — /opt/Oracle/WL10gR3/user_projects/domains/web/<unknown>:13:9: error: failed to load java type corresponding to [email protected]://www.bea.com/ns/wlp/90/security/wsrp> -
Schema validation error at startup
Configuration:
WL Portal 9.2
Linux Fedora Core 6
I just created a new portal domain and it just does not startup.
The reported exception is:
Schema validation errors while parsing /domains/portal/./config/config.xml — Invalid xsi:type qname: ‘ext:wsrp-identity-asserterType’ in element [email protected]://www.bea.com/ns/weblogic/920/domain>
Schema validation errors while parsing /domains/portal/./config/config.xml — /domains/portal/<unknown>:13:9: error: failed to load java type corresponding to [email protected]://www.bea.com/ns/wlp/90/security/wsrp
I can’t find the schema ‘http://www.bea.com/ns/wlp/90/security/wsrp.xsd’ neither on the web nor the jars supplied with the product.
Any help would be appreciated.Hi, I think you may be missing the binding-file.xml that should be in your mbean jar which should be in your WL_HOME/server/lib/mbeantypes/…
I am having similar problem and I get this error if I replace the 9.2 MBean jar (generated with MakeMBean) with 8.1 version. The 9.2 MakeMBean utility seems to bundle a bunch of additional jaxb binding files into the jar (xsb, binding-file.xml, *BeanImpl etc). Optionally you can run an 8.1 MBean through the ‘weblogic.Upgrade -type securityprovider’, this will convert your authentication mbean jar to 9.2 which also includes above mentioned files.
Once you have an MBean jar, generated with the 9.2 MakeMBean you will probably get a similar error in that the startup will fail with error below: If you know how to fix this please let me know as I have spent a day on this with no luck.
…config.xml — C:…mydomain<unknown>:16:9: error: fail
ed to load java type corresponding to [email protected]://www.bea.com/ns/weblogic/90/security/extension>
<Feb 15, 2007 9:26:29 AM NZDT> <Critical> WebLogicServer> <BEA-000362> <Server failed. Reason: [Management:141245]Schema Validation Error in :…servermydomainconfigconfig.xml see log for details. Schema validation can be disabled by starting the server with the command line option: -Dweblog
ic.configuration.schemaValidationEnabled=false>
PS: setting the -Dweblogic.configuration.schemaValidationEnabled=false option only causes the startup to fail as it cannot load the security provider (if this is your default provider I guess?)
Hope this helps. -
BPM Problem: Schema validation error notification
Hello all,
When a schema validation error takes place upon receiving XML messages via HTTP, is there something that can be set up in BPM to notify data owners? (either alert or email)
Regards,
SteveBhavesh,
<i>When you mean source schema validation, does it imply that you want to validate your Source XML before graphical mapping to make sure it meets the Source XML Schema?</i>
validate my Source XML
<i>As you pointed out you are usinga BPM, you can wrap the Transfromation step with a Exception handling block, so when there is a mismatch of Source schema and ite actual message the exception handler will be invoked and in the exception handler you can trigger alerts using the control step.</i>
I’m using an outbound interface (outside BPM) to call the abstract interface (very first step in BPM), and there’s a tranformation step after that.
-If the Source schema is wrong, will the error take place at the outbound interface or at the transformation step? If outside at the outbound interface, i wouldn’t be able to wrap anything around it.
-Exception handling block means the BLOCK step?
Regards,
Steve -
XML Schema Validations in JDK1.4?
Hi,
The below code errors out when run on JDK1.4-
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schemaXSD = schemaFactory.newSchema(new File(«C:\TestSchema.xsd»));
Validator validator = schemaXSD.newValidator();
SAXSource source = new SAXSource(new InputSource(«D:\test.xml»));
validator.validate(source);
The exception is-
Exception Message=http://www.w3.org/2001/XMLSchema
java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
I also tried by adding the JAR file xml-apis.jar. But, it gives the same Exception.
The above code runs fine on JDK1.5 but the requirement of my project is to use only JDK1.4 and run it on UNIX platform.
Is there any way that this can work with JDK1.4?
Otherwise are there any other JAVA API in JDK1.4 for performing XML Schema Validations?
Thanks,
TanuThanks DrClap.
Does that mean JDK1.4 does not have any inbuilt classes for Schema Validations?
Which parser should I use?
Thanks,
Tanu -
Schema validation errors with Portal 10.3
I downloaded, installed and configured a domain with an AdminServer and a ManagedServer for WebLogic Portal 10.3. When I start the AdminServer from NodeManager the following errors are reported:
<Sep 24, 2008 12:50:41 PM CDT> <Error> <Management> <BEA-141244> <Schema validation errors while parsing /opt/Oracle/WL10gR3/user_projects/domains/web/config/config.xml — Invalid xsi:type qname: ‘wsrp:wsrp-identity-asserterType’ in element [email protected][http://www.bea.com/ns/weblogic/920/domain]>
<Sep 24, 2008 12:50:41 PM CDT> <Error> <Management> <BEA-141244> <Schema validation errors while parsing /opt/Oracle/WL10gR3/user_projects/domains/web/config/config.xml — /opt/Oracle/WL10gR3/user_projects/domains/web/<unknown>:13:9: error: failed to load java type corresponding to [email protected][http://www.bea.com/ns/wlp/90/security/wsrp]>
When I start the AdminServer using startWebLogic.sh there are no errors. Please advise.There is a special forum for WLP users:
WebLogic Portal -
XDK 9.2.0.2.0 XML Schema Validation within Oracle 8i database
I am little confused on this forum regarding my problem to find out the possibility of XML Schema Validation using SAX Parser within Oracle 8.1.7 database java stored procedures.
Right know I am trying to find out if it is possible to make XML Schema Validation using SAX parser within Oracle 8.1.7 java stored procedures using (loading) new Oracle 9i Rel 2 XDK jar files into database.
ThanksI am little confused on this forum regarding my problem to find out the possibility of XML Schema Validation using SAX Parser within Oracle 8.1.7 database java stored procedures.
Right know I am trying to find out if it is possible to make XML Schema Validation using SAX parser within Oracle 8.1.7 java stored procedures using (loading) new Oracle 9i Rel 2 XDK jar files into database.
Thanks -
Unable to open SharePoint 2010 task from any Microsoft Office application — cannot open a new form (schema validation errors)
I can’t get the Microsoft Office SharePoint Task integration to work with any SharePoint 2010 Workflows. When any end user clicks the “Open this task…”
button from outlook (or any other office application) a warning dialog appears stating that:
“Outlook cannot open a new.
The form contains schema validation errors.”
The error details are:
Element ‘{http://www.w3.org/1999/xhtml}div’ is unexpected according to content model of parent element ‘{http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}Body’.
Some points to note:
I can replicate this using on several computers running as different users.
I have full control over the site and the task I am trying to open.
When I navigate via the SharePoint site I can open the task.
The Info Path form that cannot be opened was automatically created by automatically SharePoint designer / InfoPath. I have subsequently deleted the form and published
the workflow (which created the InfoPath form again).
I am running Mircosoft Office Professional Plus 2010 version 14.0.5128.5000 (32-bit)
One workaround is to remove the “Open this task…” button as per
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/eb273ee9-6a4b-409c-8eb0-5351bb113386/. This is not ideal and will be my last resort.
Any suggestions and or thoughts appreciated.
Thanks!Yes, I tried that. It did not work for me.
I have 4 site collections. The main site collection is the only one that I receive the error.
When the user clicks on the email link and opens the document for approval, they receive the following error when they click on «Open This Task».
Element ‘{http://www.w3.org/1999/xhtml}a is unexpected according to content model of
parent element ‘{http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}Body’.
There is nothing wrong with the task list itself, just the link from the Office 2010 client.
I am wondering if there is a web config or other file on the server that is specific to the site collection??
Tracey -
Excel cannot open the new form. The Form contains schema validation errors.
i am running the approval workflow on a document library, while trying to open Excel
file i get the error.
Excel cannot open the new form. The Form contains schema validation errors.
Detailed error:
Element ‘{http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}Body’ is
unexpected according to content model of parent element ‘{http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}SharePointListItem_RW’.<o:p></o:p>
Expecting: {http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}WorkflowLink,
{http://schemas.microsoft.com/office/inf….
neerajHi,
According to your description, my understanding is that when you are running approval workflow and opening the Excel file, then it will occur the error above.
For a better troubleshooting, I suggest you can try to create a new normal excel file and then run the workflow and open the file to test if it works. It will help to figure out if this is the file itself issue or the SharePoint issue.
Also, please provide some more detailed information such as screen capture, it will easier to find the root cause of the issue.
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Processing Schema Validation error in BPM?
Hi all,
We have a file to IDOC scenario where if the schema validation fails on the file adapter sender agreement, we want to pull the filename and send it in an error email. So, we are talking about the adapter specific message attribute «Filename».
unfortunately, this does not seem to be available as a container element for alert catagories in ALRTCATDEF. So, we are starting to look into using BPM to send a email via the email adapter. However, since the validation happens prior to BPM being called I am at a bit of a loss. Any ideas on how to get the email with the filename out to the suport group would be appreciated.
Thanks,
Chrispackage com.validate;
import com.sap.aii.mapping.api.*;
import com.sap.aii.mappingtool.tf7.rt.Container;
import java.io.*;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.*;
public class ValidateXML extends AbstractTransformation {
public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException {
OutputStream outputstream = null;
try {
InputStream inputstream = transformationInput.getInputPayload().getInputStream();
outputstream = transformationOutput.getOutputPayload().getOutputStream();
byte[] b = new byte[inputstream.available()];
inputstream.read(b);
String XMLinputFileContent = new String(b);
// define the type of schema — we use W3C:
String schemaLang = «http://www.w3.org/2001/XMLSchema»;
// get validation driver:
SchemaFactory factory = SchemaFactory.newInstance(schemaLang);
//Place XSD file in PI server same as http://help.sap.com/saphelp_nwpi711/helpdata/en/44/0bf1b3ec732d2fe10000000a11466f/frameset.htm
//OR I think you can place any where on server.
File XSDfile = new File(«C:/xi/runtime_server/validation/schema/SchemaFile.xsd»);
// create schema by reading it from an XSD file:
Schema schema = factory.newSchema(new StreamSource(XSDfile));
Validator validator = schema.newValidator();
// at last perform validation:
validator.validate(new StreamSource(XMLinputFileContent));
//If XML it not valid, exception will be thrown, if it is valid sent this PassOutputXML to output
String PassOutputXML = «<?xml version=»1.0″ encoding=»UTF-8″?><ns:MT_OutputXML xmlns:ns=»http://sap.com/xi»> <Name>FileName.txt</Name><Validation>Pass</Validation> </ns:MT_OutputXML>»;
outputstream.write(PassOutputXML.getBytes());
} catch (Exception exception) {
//Get File name using http://help.sap.com/saphelp_nwpi711/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
Container container = null;
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(«http://sap.com/xi/XI/System/File», «FileName»);
String inputFileName = conf.get(key);
String FailOutputXML = «<?xml version=»1.0″ encoding=»UTF-8″?><ns:MT_OutputXML xmlns:ns=»http://sap.com/xi»> <Name>» + inputFileName + «</Name><Validation>Fail</Validation> </ns:MT_OutputXML>»;
try {
outputstream.write(FailOutputXML.getBytes());
} catch (IOException ex) {
exception.printStackTrace();
ex.printStackTrace();
Maybe you are looking for
-
Total in alv report
hi everyone! there is an alv report that runs correctly in dev system and shows the totals in the alv report. when the request is being transport to qa system, the alv report doesn’t shows the totals line at all. i tried to transport the report seve
-
Please incorporate the Crop & Erase facilities on Bitmap Images in the upcoming version of ai CS7
Please incorporate the Crop & Erase facilities on Bitmap Images in the upcoming version of Illustrator CS7.
-
Adobe Display issue
My Citibank Staement which I always display each month using Adobe will not display..Please help
-
Transferring images from Sharp VL-PD3H to iMovies
Help, I am trying to transfer images from my «old» Sharp VL-PDH3 camera to my iMac via a FireWire 800/400 9 pin to 4 pin cable. I can stop and start and fast forward and rewind etc, BUT I cannot capture the image, can you help please. Thanks
-
Just Starting to get serious about PhotoShop
Quickly, I have been a film and darkroom photographer since 1969. I kept my darkroom up and running until 2005 when I closed it and started sending my commercial work out for processing. It wasn’t until 2007 that I purchased a DSLR and that was only
Recently we came across with the issue while importing a solution from our dev environment to another test environment. So we thought of sharing this with everyone so that others do not face the same problem.
Issue:
While importing a solution we received “Schema Validation Failed” and it said “The ‘label’ attribute is not declared”.
According to the error the “label” attribute which is been found in the solution i.e. in the customization.xml file is not valid.
Cause of the issue:
This issue occurs when you save a copy of system view of an entity which you cannot edit.
For example: Quote Product Inline Edit View from quote product entity, Order Product Inline Edit View from order entity or All Sales Team Members view from connection entity etc.
When you select option “Save As” view CRM will create copy of this view but the schema format of this view is not in a required format. When you will open this view in solution xml you will notice that columns which has been copied from the existing view has invalid format as show below i.e. label = “Role” is not supported.
<cell name=”record2roleid” width=”136″ LabelId=”query.4E3600FA-B9C8-49F4-B69A-51EBA06D9BDF.cell.role.label” label=”Role” />
Resolution:
There are two solutions to resolve this issue:
In our case we have copied a connection view “All Stakeholders” so we are providing steps considering connection entity.
1. Modify the view from entity customizations
a) Go to Settings –> Customizations –> Customize the System –> Expand the entities tab and open a connection entity views
b) Open the view and remove the existing columns which have been copied from previous view and add them back in a view
c) Save the view and publish the customization.
d) After that re-export the solution and import in your target environment.
e) The solution will import successfully.
2. Modify the customization.xml file manually
a) Extract your solution (.zip) file that you are importing
b) You will find the customizations.xml file in the extracted folder
c) Open this customizations.xml file
d) Find for a keyword ‘ label=”’ find the keyword label followed by space so you can easily find the exact location.
e) You will find the error location as highlighted in the below screenshot:
f) Remove the label=”ColumnName” from the entire xml.
g) Then save the xml file and zip all the components from the extracted solution and import it.
h) This will import your solution successfully.
If you know which view you have saved from existing managed view then the first option will be the easiest way to resolve the issue. If you do not have idea from which view this would be causing, then you can go with the second solution.