In Spring-WS, while using WS-SecurityPolicy, how do I specify strict layout? - spring-ws

I am trying to consume a web-service exposed by Websphere with WS-SecurityPolicy and strict layout. SOAP generated by Spring-WS client fails against due to layout ordering.
The exact error is this (I am using time-stamp, with encryption and signing) :
Signature for timestamp found ahead of timestamp. Strict Layout not followed in incoming message.
I am using Wss4jSecurityInterceptor. But I could not find a WSS4J property to enforce a strict layout.
Update : I found a similar query raised in Spring forum here. There is no response to that query.

You may need to upgrade to a more recent version of WSS4J. See:
https://issues.apache.org/jira/browse/WSS-424
Colm.

Spring Web-service (latest release uses WSS4J 1.6.5) doesn't expose any property for changing the layout. I had to add an interceptor to programmatically move around time-stamp node in the soap message after the WSS4J call in Wss4jSecurityInterceptor.

Related

Springcloud data flow 2.9.3 delete the TriggerProperties

REcently upgraded my springcloud data flow version and I cant configure the trigger sources.
2.1.0 version
I cant configure it now... any help please ?
Thanks!!
The application properties were removed in favor of common spring integration properties. We will look into adding these to the property dialog. Meanwhile, you should be able to manually type them into the stream definition or set as deployment properties. https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java#L325 e.g., --spring.integration.poller.fixedDelay=2000

Orocommerce - generate API client libraries

I am quite new in the orocommerce ecosystem, and I would like to generate API client librairies automatically for orocommerce API (frontend and backend). The objective is to build my own UI.
I found some dependencies on NelmioApiDocBundle than could potentially generate swagger file, but I hit multiple problems:
this is a quite old version, that only support swagger 1.2
the generated file (using symfony run php bin/console api:swagger:dump /tmp/api/) seems not working with swagger codegen "as is"
all the part of the API seems not written using NelmioApiDocBundle annotation
I am wondering if there is an other mechanism to generate API client librairies for orocommerce. I would like a SDK for typescript.
Thanks in advance for your answer.
Right now, the only supported swagger version is 1.2, as you stated.
By default, the api:swagger:dump command works with an outdated API, to generate data for the current API, run it with --view=rest_json_api option:
api:swagger:dump --view=rest_json_api
As an alternative to the API client generation, as Oro API strictly follows JSON.API standard, you can use many existing client libraries, compatible with the JSON.API specification. The list of Typescript implementations can be found at the official website: https://jsonapi.org/implementations/#client-libraries-typescript

swagger swagger-codegen-maven-plugin generate Default Api interface

i'm trying to use swagger-codegen-maven-plugin to generate my interface .
after compiling with the plugin - it generates all the files correctly but for some reason
the interface name is DefaultApi.
i looked for some configuration that i can change the name of the interface that been generated but didnt find the solution for that.
any idea on that??
"DefaultApi" is used when there's no tags specified for the endpoint.
For example, this endpoint will be put in a class named "UserApi" since the tags is set to User.
You will need to update the spec to include proper tags for endpoints to avoid using "DefaultApi"
UPDATE: On May 2018, about 50 top contributors and template creators of Swagger Codegen decided to fork Swagger Codegen to maintain a community-driven version called OpenAPI Generator. Please refer to the Q&A for more information.

How to define in an API, since which version a path/parameter is supported

We have an growing swagger API/openAPI and for documenting changes we like to document on a path or parameter (and perhaps definition) since which version of the API it is available.
The swagger specification knows the info.version field, but on paths or parameters I could not find something refering to this version.
Perhaps vendor extensions beginning with a x-... like x-since might be helpful. At least validation does not fail using them.
But is there perhaps any existing implementation for this use case?
I'm not aware of any existing attribute in OpenAPI/Swagger 2.0 spec to meet your need so you should go with vendor extensions (x-since, x-created-on, x-created-by, etc)

Orbeon versioning via CRUD

After reading the documentation about the new 4.6 versioning feature and this post In Orbeon Forms, is form version information available in the REST API? I was wondering how the form builder receives the published version number?
In this screenshot from the builder
you see the latest published version has the value 5.
How does the builder receive this value and is it possible to accomplish this via our own CRUD interface?
The publishing part we got covered by handling the HTTP_ORBEON_FORM_DEFINITION_VERSION header field and its' value.
Looks like the python script I used returned the wrong header field.
Anyway the right headerfield both ways is ORBEON-FORM-DEFINITION-VERSION.
So sending this field with the version number results in the right value in the form builder

Resources