Is there any API to generate XSD programmatically? - xsd

Is there any APIs which I can use to create XSD programmatically? I have seen Membrane SOA API which looks pretty good, but they have not provided documentation for the API.
Is there any other API I can use to generate XSD?

XSD is just XML with its own namespace. Any XML generation API (DOM or StAX) is fine. You could also use JAXB or XmlBeans to generate the code for xsd schema (Click to download) itself and create schema in a type-safe manner.
If you are looking for XSD specific library then I suggest Eclipse XSD library

Related

Is it possible to generate ServiceStack DTOs from an OpenApi specification?

I have a 3rd party API I need to use and it provides an Open API specification. Is it possible to generate ServiceStack DTOs from the specification for use with the standard JsonServiceClient or JsonHttpClient?
No ServiceStack’s Add Reference feature is generated from ServiceStack’s richer internal metadata, it’s not possible to generate the same Request/Response and DTO types from an Open API spec directly.

What is the difference between JAX-WS and JAXB: JAX-WS: Java API for XML Web Service JAXB: Java Architecture for XML Binding

Both of them can be used to implement a soap-client. What're the differences?
JAXB is an API used by JAX-WS, but it is independent of web services - it can be used in other contexts just as well.

Generate static API documentation from schema?

I've got Koa/Express apps and would like to generate a static documentation based on annotations to the different API routes.
Swagger seems to be good but all packages I found don't generate the documentation but host it with the API itself.
I want the API documentation to be seperated from my API.
Are there modules other OS projects offering this?
Given that you've the OpenAPI/Swagger spec, you can try Swagger Codegen by going to https://editor.swagger.io. Under "Generate Client" select "HTML" or "Dynamic HTML"
Or you can use https://restunited.com to generate both SDKs and documentation with code sample. Here is an example: http://restunited.com/docs/6y2jvtvkgvst
Disclosure: I'm a top contributor to Swagger Codegen and founder of RESTUnited.com

BreezeJS with ServiceStack?

I was wondering whether or not BreezeJS is compatible when using other technologies other than Web API and/or Entity Framework? As I'm currently in development of a SPA using Service Stack to retrieve data and ORMLite?
So I am curious how BreezeJS handle's this as I know it uses it's own API Controller usually with an extension of the DbContext class which Entity Framework uses. Thanks.
There is currently a sample called NoDb in the samples zip available on the breeze website. This sample does not use EF, but it does use WebApi. So I'd start by looking there. ( additional documentation on this sample should be added within a day or two as well).
In terms of using ServiceStack instead of WebApi, breeze supports the concept of a "dataServiceAdapter" and currently ships with two, an OData adapter and a WebApi adapter. It is certainly possible to write a ServiceStack adapter that breeze could use but this is not trivial. Please add this as a feature request ( and vote for it) on the breeze User Voice. We take these requests seriously.

how to customize the xsd that axis2 generates

I am following the "web service from pojo"[1] bottom-up guide in axis2 documentations, but the wsdl that is generated is not good.
Specifically, the xsd schema that is embedded in the wsdl is not good and I want to customize it. I want to allow cyclic references, in a similar fashion to what jaxb lets you do with XMLID and XMLREFID.
Any ideas?
Thanks
[1] -> http://ws.apache.org/axis2/1_5_1/pojoguide.html
If you use the Netbeans plugin for AXIS2 (tutorial here) you can specify to edit the WSDL, otherwise I can't help, sorry. Maybe you could look at the options available for the ant task?
I do find AXIS2 overly painful compared to other web service frameworks, and the documentation leaves a lot to be desired.

Resources