Wso2 esb is not support for some xpath functions like name() which required to use in default name spaces. Which version of Xpath expressions supported by the wso2 esb.
I found this Blog Entry:[WSO2 ESB] Enable XPath 2.0, Think this will be helpful to you.
ESB supports XPath 1.0 out-of-the-box. In order to enable XPath 2.0 support you have to modify the ${ESB_HOME}/repository/conf/synapse.properties file as described in the following link:
https://docs.wso2.com/display/ESB481/Configuring+synapse.properties
You´ll create/edit the "synapse.xpath.dom.failover.enabled" and set its value to "true".
Related
How to install XACML and XACML mediation in wso2am-2.5.0
I am following this link
XACML is displaying with three times with different version but XACML Mediator is not displaying.
This looks like a problem with the repo URL added in feature installation. Using this URL 'http://product-dist.wso2.com/p2/carbon/releases/wilkes/' instead of 'http://product-dist.wso2.com/p2/carbon/releases/turing/' might help.
I've got installed the manager, and put it on some APIs, the problem comes when I try to make a call to the API and the result is always the same. It shows:
https://localhost:9443/carbon/admin/login.jsp
I really don't know why is that.
Version: WSO2 API Manager 2.2.0
Try following the Invoking the API section of the below document. If you are going to try with CURL, this will show the CURL request format too.
https://docs.wso2.com/display/AM220/Quick+Start+Guide#QuickStartGuide-InvokingtheAPI
I am a student in Uni-Siegen.
For two weeks I am trying to define the communication between PDP and the PAP, but I do not know how to do it.
I would like to do it in java. What APIs can help me? Forget someone has a sample code and how to configure exclipse.
You can use SunXACML api to build PDP and PEP. Create a blank java project in eclipse and add SunXACML jar in your project's build path. Then follow the following guide to implement a simple PDP and PEP in JAVA. Then test them using some XACML policies.
http://sunxacml.sourceforge.net/guide.html
Is there any spec or convention on URL where one should place swagger.json (or whatever name it is agreed) so that public API of my site can be automatically discovered?
Updated 19 April 2017: The OpenAPI Wiki answer I gave previously is "for a very very very old version of the spec". The same source states that for 2.0 the standard is swagger.json, for 3.0 it changes to openapi.json.
Original answer:
The OpenAPI Wiki recommends using an /api-docs endpoint, at
least for server APIs. I've seen several sites in the wild that use
that, and it's our shop standard.
Hope that helps.
How about serving the Swagger JSON in an HTTP response body, in response to an OPTIONS request for the URL / ?
This is specifically permitted by the relevant RFC.
Further, consider implementing HATEOAS, as strongly advocated by Roy Fielding.
Okay. OpenAPI 3.0 still lacking auto-discovery mechanism, I try to propose a scheme based on some things that were already working:
https://example.com/.well-known/schema-discovery is a JSON document pointing to array of available schemas:
[
{
"schema_url": "/openapi.json",
"schema_type": "openapi-3.0"
},
{
"schema_url": "/v2/openapi.json",
"schema_type": "openapi-3.0"
}
]
If there is only one version of API, then https://example.com/openapi.json should be enough.
HTTP Headers. I remember somebody from Google proposed HTTP header for pointing to API. If you can find or remember it, please tell me.
I've just installed WSO2 2.0.0 (as far as I know, this is the version following v1.9.0, not a breaking compatibility version). I'm using it via Firefox 40.0.2 on Windows.
When I try to add a new API via "I have an existing API" menu, whatever I do, it always open an empty design API screen : https://localhost:9443/publisher/design
In this screen, when I try to import an API (swagger file or swagger URL), it just does nothing without prompting any error. My swagger file respects Swagger API 2.0 spec and corresponds to an API already used in production.
What should I do to get at least a useful error message regarding this API import ? (if it's installing an other version of WSO2, it's a valid answer for me.).
Here is the Swagger file I try to import :
{
"apiVersion":"2.0",
"swaggerVersion":"1.2",
"basePath":"/ValoConso/rest",
"resourcePath":"/valoConsoWebService",
"apis":[
{
"path":"/valoConsoElec",
"operations":[
{
"method":"POST",
(...)
}
]
}
],
"models":{
(...)
}
}
It seems the swagger document you are trying to import is of swagger version 1.2 ("swaggerVersion":"1.2"). From API Manager 1.9 onwards we should use swagger 2.0 compatible definitions.
You can use http://editor.swagger.io/#/ to validate your swagger definition according to 2.0 specification. Please try converting it according to 2.0 specification and then import to API Manager 2.0.
See some useful resources:
[1] Swagger 2.0 samples : https://github.com/OAI/OpenAPI-Specification/tree/master/examples/v2.0/json
[2] Swagger 1.2 -> 2.0 migration guide: https://github.com/OAI/OpenAPI-Specification/wiki/swagger-1.2-to-2.0-migration-guide