Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial cxf_x509_profile: WS-I Compliance Error (Assertion: BP2703) #3

Open
HimalayFei opened this issue Oct 13, 2014 · 4 comments
Open

Comments

@HimalayFei
Copy link

I added a wsp:Policy element in WSDL and since then I am getting WS-I compliance error. I went thru the following blog, and the error goes away when I declare wsp:Policy before wsdl:types, wsdl:service, wsdl:message, wsdl:binding

http://frommyworkshop.blogspot.com/2011/03/quick-fix-of-ws-i-bp2703-assertion.html

However, if its a Java First WSDL, the generated WSDL always has the wsp:Policy element at the end.

Exception:
org.xml.sax.SAXException: Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'wsp:Policy'. One of '{"http://schemas.xmlsoap.org/wsdl/":import, "http://schemas.xmlsoap.org/wsdl/":types, "http://schemas.xmlsoap.org/wsdl/":message, "http://schemas.xmlsoap.org/wsdl/":portType, "http://schemas.xmlsoap.org/wsdl/":binding, "http://schemas.xmlsoap.org/wsdl/":service}' is expected.
at org.wsi.xml.XMLUtils$ErrHandler.error(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.wsi.xml.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.wsi.xml.XMLUtils.parseXML(Unknown Source)
at org.wsi.xml.XMLUtils.parseXMLDocument(Unknown Source)
at org.wsi.test.profile.validator.impl.wsdl.BP2703.validate(Unknown Source)
at org.wsi.test.profile.validator.impl.BaseValidatorImpl.processAssertions(Unknown Source)
at org.wsi.test.profile.validator.impl.wsdl.WSDLValidatorImpl.processDefinitionAssertions(Unknown Source)
at org.wsi.test.profile.validator.impl.wsdl.WSDLValidatorImpl.validate(Unknown Source)
at org.wsi.test.analyzer.BasicProfileAnalyzer.validateWSDL(Unknown Source)
at org.wsi.test.analyzer.BasicProfileAnalyzer.validateConformance(Unknown Source)
at org.wsi.test.analyzer.BasicProfileAnalyzer.main(Unknown Source)

@gmazza
Copy link
Owner

gmazza commented Oct 13, 2014

This has nothing to do with me. If you have CXF questions, ask on the CXF User's Mailing List or Stack Overflow.

@gmazza gmazza closed this as completed Oct 13, 2014
@HimalayFei
Copy link
Author

Its not a CXF question. I was pointing the way you ordered wsp:Policy element in your WSDL here.. https://github.com/gmazza/blog-samples/blob/master/cxf_x509_profile/service/src/main/resources/DoubleIt.wsdl

It does NOT comply to WS-I, changing the order fixes the issue.

@gmazza
Copy link
Owner

gmazza commented Oct 13, 2014

OK, Thanks, I'll look at it. AFAICT your original posting made no reference to my cxf_x509_profile tutorial so I had no idea what you were talking about. In the future please clearly state the tutorial when letting me know of a problem.

@gmazza gmazza reopened this Oct 13, 2014
@HimalayFei
Copy link
Author

yeah, it was my bad not pointing to exact location. I have updated the subject. Thank you.

@HimalayFei HimalayFei changed the title WS-I Compliance Error (Assertion: BP2703) Tutorial cxf_x509_profile: WS-I Compliance Error (Assertion: BP2703) Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants