Is ther any equivalent to wsdl2java that will take a WSDL file and generate scala stubs for the server and/or client?
I googled, but either there isn't or my google-fu is weak.
scalaxb has some support for this, but it's still very much experimental and it's still client-side only. The only reliable techniques I've seen for handling the server side is either to generate the Java code via
wsdl2java or other tools and then wrap that in Scala or, possibly, to use annotations to generate the WSDL from the Scala code. The later option is likely to lead to some pain, though, as you learn where Scala does and does not map readily to Java conventions.
Not sure if it is what you want, but have you looked at http://scalaxb.org/wsdl-support?
Looking at this old thread it seems possible to create custom mapping templates:
http://www.mail-archive.com/axis-user#ws.apache.org/msg35857.html
Maybe you could use wsdl2java tool with custom templates creating Scala code?
Thinking one can try to combine wsdl2avro and avro4s
Related
I have used pegjs to create a parser, quite similar actually to the example shown here for a custom string-formatting function.
I would like to port this to C++. What might be the best way to do this? Are there are existing parsers in C/C++ that are compliant with the pegjs grammar? Or, would I want to transpile the generated JS with something like V8, or what might be a possible route to do this conversion, aside from manually rewriting everything from scratch?
It looks like exposing clojure library api to Java code requires the use of AOT compilation (at least when the exposed api is OO). If I'm wrong about that, I am happy to be revised. In the past, there have been multiple issues with AOT, thusly relying on it may have seemed a bit reckless or unstable.
What is the current state in that?
Is it a safe practice?
Would you use that as a means to expose an OO api to java applications?
You can use AOT to produce bytecode that will pass muster as a Java library. But it's not terribly pleasant, for you or for the Java programmers, who will rightfully ask: Where is the JavaDoc? Why are you using Object instead of generics? And other similarly awkward questions.
Instead, my preferred approach is to not make the Clojure code Java-friendly at all. Expose it as ordinary Clojure vars, and that's it. Then, write some Java code yourself, in the same library, that consumes the Clojure-based API and repackages it in terms of whatever Java constructs you want.
For one example, see my thrift-gen library. Using it from Clojure, you get a function that takes a map as input and produces a sequence; using it from Java, you get a builder pattern for configuration instead of the map, and you get a List<? extends T> as output. No JavaDoc, because I felt the usage documentation in the readme was sufficient, but if I were serious about using this there is a real .java source file to easily add JavaDoc to.
I'm currently trying to learn ZeroMQ and wanted to implement a handler for ZAP so that I can authenticate clients. I looked at the test file test_security_curve.cpp in the libzmq repository and noticed that it uses many helper functions. I don't know if I need those or not.
How would I go about implementing ZAP authentication with modern C++? Should I even use libzmq or switch to cppzmq or zmqpp? I'm really confused about this..
Any help is much appreciated
Maybe you should consider using czmq, which is the so-called high-level API, instead of libzmq. It also has a C++ binding, czmqpp.
czmq contains a ZAP handler implementation, which is described at http://czmq.zeromq.org/manual:zauth.
I'm trying to create an app to search my company's ColdFusion codebase. I'd like to be able to do intelligent searches, for example: find where a function is defined (and not hit everywhere the function is called). In order to do this, I'd need to parse the ColdFusion code to identify things like function declarations, function calls, database queries, etc.
I've looked into using lex and yacc, but I've never used them before and the learning curve seems very steep. I'm hoping there is something already out there that I could use. My other option is a mess of difficult-to-maintain regex-spaghetti code, which I want to avoid.
I used the source to CFEclipse, since it is open source and has a parser. Not sure about the legality of this if we were selling/redistributing it, but we're only using it for an internal tool.
Writing parsers for real langauges is usually difficult because they contain constructs that Lex and Yacc often don't handle well, e.g., the langauge isn't LALR(1). ColdFusion might be easier than some because of its XML-like style.
If you want to build a sophisticated parser quickly, you might consider using our
DMS Software Reengineering Toolkit which has GLR parsing support.
If you want to avoid writing your own or hacking all those Regexps, you could consider our Source Code Search Engine. It has language-sensitive parsers and can search across very large source code bases very quickly. One of its "language sensitive" parsers is AdhocText, which is designed to handle "generic" programming languages such as those you might find in a random programming book; it even understands XML-like tags such as ColdFusion has. You can download a evaluation version from the link provided to try it.
EDIT 4/3/2010: A recent feature added to the SCSE is the ability to tag definitions and uses separately. That would address the OP's desire to find the function definition rather than all the calls.
None existed. Since ColdFusion is more like scripts than code, I'd imagine it'll be hard to write a parser for it.
ColdFusion Builder can parse CFM/CFC to an outline in Eclipse. Maybe you can do some research on whether a CF Builder plugin can do what you want to do.
What's the best way to embed Ruby as a scripting language in C++? Using ruby.h? SWIG? Something else? What I need is to expose some C++ objects to Ruby and have the Ruby interpreter evaluate scripts that access these objects. I don't care about extending Ruby or accessing it in C++.
I've found this article on embedding Ruby in C++, and while it's very useful, it's kinda old and I was wondering if there are any other resources on the subject (or open source implementations of similar engines).
Rice is looking very promising.
Ruby provides a very helpful README.EXT file. It has lots of information about how to extend Ruby, and convert between C & Ruby types.
There is also this excerpt from the pick axe book which pretty much covers the same thing.
In my case, when I added Ruby scripting to my application I decided against using swig, because my needs were very simple, and I didn't want to add yet another build dependency.
swig is probablly the way to go..... but ruby doesnt embed too well......
if you want a language that embeds nicely into C++, try lua
You might wish to check out tinyrb.
I've been working on Rarity (https://github.com/Plaristote/Rarity), which does two things:
Generates Ruby bindings from a YML description of your C++ API
Allows interaction with Ruby script in the most C++ fashion there is
I've solved a good deal of question (exception handling, garbage collection)...
I haven't seen anywhere else the code generation that Rarity uses to make your bindings come to life. I also haven't seen any other lib that allows such an easy conversion between C++ and Ruby types.
I think Rarity's worth the shot ! And I'd be glad to have some feedback as well :) !