Cannot generate classes from SAML2.0 XSD schemas - xsd

I try to generate classes from the following SAML2.0 XSD schemas:
http://docs.oasis-open.org/wsfed/authorization/v1.2/authorization.xsd - fail
http://docs.oasis-open.org/wsfed/federation/v1.2/federation.xsd - fail
http://docs.oasis-open.org/wsfed/privacy/v1.2/privacy.xsd - success
I tried to use xsd.exe and xsd2code tools, but each time I try to generate #1 and #2 I get following errors for the respective schemas:
Both tools throw this error: Schema validation warning: The 'http://www.w3.org/2001/04/xmlenc#:EncryptedData' element is not declared.
Error: Error generating classes for schema '%MYPATH%\authorization'. The element 'http://www.w3.org/2001/04/xmlenc#:EncryptedData' is missing.
Two different errors:
xsd.exe:
Error: Error generating classes for schema '%MYPATH%\federation'. The element 'http://docs.oasis-open.org/wsfed/authorization/200706:ClaimType' is missing.
xsd2code: Error Type 'http://www.w3.org/2001/04/xmlenc#:EncryptionMethodType' is not declared.
To solve problems related to xmlenc namespace I saved remote xenc-schema.xsd to my local path, but I still get the same error, so it's not timeout problem.
I don't understand what could be the problem with the provided schemas. How to solve all of the mentioned problems?

There seems to be an issue with DOCTYPE being declared in the XSD for xmlenc (http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd). See; You'll need to download and edit the included XSD file(s), or perhaps apply a fix as described in https://xsd2code.codeplex.com/workitem/6972 (XmlReaderSettings.ProhibitDtd = false) would work. See here as well: Xsd2Code and xmldsig

I just had a same error when I tried to validate the XML schema of a SAML response. I managed to solve it by saving all .xsd files locally, then manually removing the DTD and the import elements from them, and loading all of them manually.

Related

IBM ODM cannot generate a valid WADL

I've been plagued for months with an error in ODM.
It doesn't prevent my services from working, it only prevents ODM from automatically generating the JSON input payload when I test a service through the Rule Execution Server (the Retrieve HTDS Description File).
I attached a screenshot of the error.
What is puzzling is that:
if I move my variable from Input to Output, then the JSON gets generated in the Server Response section
if I manually enter my own JSON, the service executes correctly and I get back a decision
Does anyone have any idea what could possibly be wrong here?
Very likely your variable is not being deserialized properly. This would explain both the error you are getting and why you get it only as an input variable.
We get a similar error using a java.tim.ZonedDateTime with ODM 8.9.1, which does not support the java.time package. We just ignore the error -- and are hoping we can avoid it when we move to ODM 8.10.2.
hard to help as some of the context is missing. However the symptoms you describe tells there is a serialization issue one of the class of the HTDS interface.
It could be :
a getter/setter missing
a dependency missing in the XOM (classloader)
or a #jsonIgnore missing on a non getter/setter method whose name starts by get or set.
Best
Emmanuel

DSLContext.ddl() doesn't seem to support types

I'm having a set of jOOQ classes generated with the jooq-codegen-maven plugin, that's cool! But when I want to use DSLContext to populate schema models by those classes by:
dslContext.ddl(Public.PUBLIC, new DDLExportConfiguration()
.createSchemaIfNotExists(true)
.createTableIfNotExists(true))
.executeBatch();
It got an error:
Caused by: org.postgresql.util.PSQLException: ERROR: type "my_type" does not exist
Debugging generated queries, I only see queries that creating schema and tables
JOOQ version: 3.12.4
As per jOOQ 3.13, we don't support types (enums and others) in the jOOQ runtime meta model yet, so there's no way to re-create them from generated code or from other means. The relevant feature request is https://github.com/jOOQ/jOOQ/issues/9509
The workaround is for you to implement your own mechanism to create these types at the appropriate moment.

Promotion Not Opening from HMC: de.hybris.platform.jalo.JaloSystemException: Cannot create Jalo instance for item

When I try to open promotions on HMC it throw this error,
first Couldn't understand problem and cause of problem?
Try to clear cookies, login/logout, restart browser as well -looks nothing works. (check this link for more detail, can't find anything
https://answers.sap.com/questions/12761785/promotion-not-opening-from-hmc.html )
Try to check this: ( https://answers.sap.com/questions/12750795/cannot-create-jalo-instance-for-item-due-to-null-d.html?childToView=12798465#answer-12798465 ) clearing orphan type helps sometime.
If any one can guide how to solve this issue and explain cause of this issue.
Promotion Not Opening from HMC: Unhandled Exception:
de.hybris.platform.jalo.JaloSystemException: Cannot create Jalo
instance for item 000000 due to null
JaloSystemException is the mother of all Runtime exceptions in Hybris. So, the exception alone is not very informative.
The following comment i.e.
Cannot create Jalo instance for item
suggests that Hybris is trying to create an instance of a custom type, the definition of which (in items.xml) does not exist anymore. Either the definitions were removed manually or they were lost during system migration.
Ideally, deleting orphans should resolve this.
If you are still getting the error after removing the orphan types then -
Either there is some legacy code that is trying to create an instance of the custom types, most probably through a factory, otherwise, it would have given a compilation error during build itself.
The deleted custom type had a relation with the existing types, probably with the Promotion.
The ultimate solution is to run initialize on your local.
**Be very careful while running initialize as it will remove all the data from your system.

Hybris: Error on initiating the workflow on removing print extension - unexpected validator error: cannot find spring bean

Not sure where to check it. No dependencies are found in xml files. I don't find constraints related to this.
INFO | jvm 1 | main | 2017/03/14 11:10:30.867 | ESC[mESC[0;33m2017-03-14 11:10:30 WARN [Thread-17] [10.0.12.6] [EditorArea] Cound not update item, reason: [com.sbs.ecomm.hybris.sbproductcockpit.workflow.SBProductWor‌​kflowCreationInterce‌​ptor#5d47afd3]: unexpected validator error: cannot find spring bean [workflowAssignedJobAttributeHandler] configured for dynamic attribute [Workflow.assignedJob] from extension [print]
The dynamic attribute handler was initially defined in the print extension.
When the system was initialized the type system therefore got the attribute assignedJob stored in the database.
Now you removed the extension and the code for this dynamic attribute. That's why you get the error at runtime, because the type system in the database still has this attribute registered and tries to load the value using the dynamic attribute handler (for which the code is no longer present).
You can manually remove the assignedJob attribute through the hmc/backoffice in the type management section as far as I know (for sure thats possible in the hmc).
If an extension has been removed (that has previously been present) the typesystem in the database is not automatically removed.
You might also take a look at the orphaned types in the hac. All types of the print extension should show up there now as they are in the database but no longer present in the code/platform.
(Just remembered that I answered a similar problem for missing attributes here: https://stackoverflow.com/a/32824789/932201 .. that contains the steps how to remove an attribute)
Hope this helps!
In your class SBProductWor‌​kflowCreationInterce‌​ptor you probably save a Workflow model. This model has an handler and both are defined in the print extension.
You can't remove the print extension without removing the dependancies in your custom classes.

CMIS 1.1 creating new type by using Workbench

I've tried to create new cmis type from the xml file that I had created by using export cmis:document.
Now when try to create new type, comes the error that the "parentTypeId" is not defined. I have added the "parentTypeId", but the same error message still comes :-(
here is my XML
<cmis:type ...
<cmis:id>cmis:testDocumentId</cmis:id>
<cmis:parentTypeId>cmis:item</cmis:parentTypeId>
<cmis:localName>TestLocalDocName</cmis:localName>
<cmis:localNamespace>http://test.local/jcr</cmis:localNamespace>
<cmis:displayName>TestDocument</cmis:displayName>
<cmis:queryName>cmis:document</cmis:queryName>
<cmis:description>This is TEST Document</cmis:description>
<cmis:baseId>cmis:document</cmis:baseId>
<cmis:creatable>true</cmis:creatable>
<cmis:fileable>true</cmis:fileable>
<cmis:queryable>true</cmis:queryable>
<cmis:fulltextIndexed>false</cmis:fulltextIndexed>
<cmis:includedInSupertypeQuery>true</cmis:includedInSupertypeQuery>
<cmis:controllablePolicy>false</cmis:controllablePolicy>
<cmis:controllableACL>false</cmis:controllableACL>
<cmis:propertyIdDefinition>
The error message is misleading (and has already been fixed).
The missing tag is <cmis:parentId>.
The cmis:document type does not have this tag because cmis:document is a base type and has no parent.

Resources