I am looking out for developing a C# application which posts message to a ebMS3 platform using AS4. I am new to this area. Could anyone please help? Is there any third party libraries to do this easily? If not, how we post messages using AS4 from a c# solution.
I have just implemented our own AS4 solution, and it is hard task to accomplish. Especially because .NET does not support SOAP with attachments out of the box. And there is a lot background knowledge you need to know about - all the different specifications AS4 is based on. I have not been able to find an AS4 API written in .NET without it being a standalone solution as well...
First thing is to understand AS4, and a good place to start is this blog:
https://www.codit.eu/blog/2016/02/03/as4-for-dummies-part-ii-messaging-overview/
And then you will have to understand most of the EBMS3 specification:
http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/core/ebms_core-3.0-spec.html
That being said - it is not impossible.
I have been looking at the AS4.NET framework as Sander talks about, and it is well-written and a very good starting point for exchanging AS4 messages. I have used it as a test-endpoint.
So unless you need to incorporate AS4 directly into an existing product (which we needed to), I can only recommend using AS4.NET.
AS4.NET is also open source (and e-SENS profile conformant), so you can have a look at their code-base and let you inspire by the hard parts in AS4.
For the MIME parts I can recommend Mimekit: https://github.com/jstedfast/MimeKit
And for some of the encryption/signing stuff Bouncycastle is great: http://www.bouncycastle.org/csharp/
Not sure whether it can be used as a library, but for a project within the European Commission an open source .NET based AS4 implementation was developed. You can find it here in the EC's code repository. I don't know if there is any support on this, so if that is important you should probably consider another implementation. A list of solutions tested by the EC for conformance with their own profile of AS4 is available here (or if that link doesn't work by searching for "as4 conformance tested implementations")
Note that most are standalone applications which you connect to for executing the AS4 message exchange. Most offer different integration options, so you should be able to integrate it into your solution.
Related
I am doing a project and have a C# library but I need to call it in C code on Linux. What's the most efficient way to do this? Performance is the first consideration.
Of course, I can make a C# service and use TCP to talk. But I wonder if it's the best way...
Thank you!
You can also use CoreRT to create native libraries from C# code and call them from C. You can find an example here
Edit: CoreRT has moved to runtimelab feature NativeAOT. Updated link.
I think the most standard solution is to have your C# service export a "web services" remote API, which the C code can then access via the standard Linux web services packages. In effect these support a form of RPC, but with web pages encoding the request and also the reply. The advantage of using web services is generality; your solution will port to any platform and will work from any language, not just C.
Another way to go is to use one of the new open-source packages from Google, Facebook, Twitter, etc. A bunch of the cloud vendors are open-sourcing their RPC infrastructures because many customers pose your exact question and need these solutions. Those will definitely be faster and more powerful in other ways too: they include powerful performance visualization tools and debuggers of various kinds. Microsoft has a remote method invocation technology too. So these are an option, perhaps less general but definitely faster. So you then have to ask how important speed is, for this particular path...
The bottom line then is that there are maybe five packages you could use. No idea which is winning or best!
I am looking to store information on my VPS that will be used by my application to present data to a user. I've looked around thoroughly and still can't manage to find a solid tutorial on how to do this in a real-world application.
I'm new to C# and programming in general, so naturally I looked around a lot before posting. I found that the DataContext and LINQ classes are very helpful for obtaining data. I also researched and found out that I could use attribute-based programming and create properties that are mapped to certain tables or columns in the database.
This would also be very helpful when trying to populate my UITableView with things because I would already have a class full of properties and data that is already hooked up to my database.
However, I just don't know how to apply this. All the remote data tutorials I see for MonoTouch and iOS in general are heavily reliant on JSON, REST, and SOAP, which I am not that familiar with.
In conclusion, all I want to do is connect to my VPS, query some data, and populate a UITableView. I know how to do the last one, but the first two are still really vague to me. Any assistance would be of great help!
.NET offers a lot of ways to communicate data and MonoTouch supports most of them. It's worth noting that WCF (Windows Communication Framework) is not fully supported (only the Silverlight subset is available in MonoTouch).
It's hard to recommend a specific technology without more details. If you're new to C# (and .NET) then you should look for something that offers you (lot of) samples - both for learning and that look similar to the application(s) you want to develop. You should also look (e.g. here on stackoverflow) if people are using it and supporting it (i.e. answering questions about it).
I've been reading (not using yet) about ServiceStack which supports a lot of options, has great performance, many samples and supports MonoTouch. Another popular one is Protobuf.net.
You might also want to ask for other people experiences on the MonoTouch mailing-list (stackoverflow is not the best place to ask for different opinions - at least without a very specific question).
I'll explain breifly my situation and hopefully you will be able to advise if what im wanting to do is possible.
I have an existing java application that I am wanting to split into modules. To handle and control these modules Im going to write a module manager in C#.net. Due to the size of the existing program the bulk of the existing modules are not going to be rewritten in .net yet and remain as java modules.
Is it possible to call a java "module", pass it parameters and have the java module return a value ( other than an int )?
I apologise for not knowing much about this area.
Kind Regards
Ash
Hmm... maybe some kind of MessageQueues like MSMQ, Apache ActiveMQ or IBM WebsphereMQ can solve your problem.
On the queues you can store and receive XML-Messages with all the Information you need.
Some information about this can be found here:
http://msdn.microsoft.com/en-us/library/ms973816.aspx
Another approch can be to work with console output .. but IMHO this is not a good solution.
I would instantiate the Java as a separate service and call it using (say) web services, Hessian etc.
Alternatively, have you looked at jni4net ?
If everything's in Java, then why the effort in moving everything to C#? From what you've said it'd make much more sense to write the module manager in Java and just keep the codebase all in one language (unless of course I'm missing something, in which case ignore!)
If you really need to do this then I'd say a web service is the nicest way to go, there's other hacks and various tools around that you could use, but a web service would completely abstract the language away and makes things much easier to consume.
I haven't tried this either but hopefully reading this thread helps you... :)
Java - C# interop
You can expose your Java module as a soap web-service and consume it from C#.
Here you can read about Axis one of the Java Soap engines and quick tutorial how to create and call it from C#.
I'm starting a new project which would greatly benefit from program add-ons. The program in its most basic form reads data from a serial port and parses it into database records. Examples of add-ons that could be written would be an auto-archive add-on, an add-on to filter records, etc. I'm writing both the program and the add-ons, but some customers need custom solutions, so instead of branching off and making a completely separate program, add-ons would be great. The simplest add-on would probably be a form who's constructor takes an object reference, manipulates the object in some way, then closes.
Unfortunately, I have absolutely no idea where to start coding, and almost as little idea where to search. Everything I search for turns up browser add-ons. From what I have gathered, I need to look into dynamic loading DLLs. Besides that, I'm clueless. Does anyone have any good resources or examples I that they know of?
I'm happy to provide more details, but this project is in its inception, so I don't have a ton of specific details (specifics kind of defeats the point of add-ons, too.)
You should seriously consider using the Managed Extensibility Framework (MEF) to handle your plugin architecture. It requires thinking about things a little differently, but it is well worth the mind-stretch.
This is a simple example to illustrate the basic technique.
codeproject.com - Plugin Architecture using C#
This article demonstrates to you how
to incorporate ... as a
plugin for another application or use
it as a standalone application.
in .NET 4 you now have the Managed Extensibility Framework (MEF) to do much of the plumbing.
In .NET 3.5 you had the System.AddIn but it was deemed by many to be far too complex.
codeproject.com - AddIn Enabled Applications with System.AddIn
AddIns (sometimes called Plugins) are
seperately compiled components that an
application can locate, load and make
use of at runtime (dynamically). An
application that has been designed to
use AddIns can be enhanced (by
developing more AddIns) without the
need for the orginal application to be
modified or recompiled and tested
You really need to look at Managed Extensibility Framework (MEF). This is specifically designed to help support add-ons and other extensibility.
A very basic description (basically, your plugins must implement a special interface):
http://martinfowler.com/eaaCatalog/plugin.html
Much better article, in C#:
http://www.drdobbs.com/184403942;jsessionid=TVLM2PGYFZZB1QE1GHPCKHWATMY32JVN
I think Reflection will play a major role.
I expirimented with an app that had a plugin folder. A filesystem watcher would watch the folder, and when a new DLL was placed in it, it would use reflection to determine which types of plugins it included, loaded them, and added them to the list of available classes, etc.
Try using the term 'add-in' or 'plug-in' for your research instead of 'add-on'. That should help some.
If you're using .Net 4, there's an add-in namespace in the framework that will get you partway there.
Writing plug-in support for an app is no simple task. You'll have to maintain pretty strict separation-of-concerns across your interfaces, you'll need to provide an interop library that defines ALL of the supported plug-in types, and you'll want to do some research into dependency injection & inversion of control, in addition to the previously-suggested reflection research.
It sounds like you might have a busy weekend doing research.
I'm trying to come up with a proposal for a client for an interface with a European Automotive manufacturer. The standard interface to transfer data files(EDIFAC) is ODETTE-FTP (OFTP).
I'm trying to find a native component solution, much like what's available for other FTP formats. After much Google searching I haven't been able to find that solution. IP*Works has a BizTalk add in, and there is an open source Java project is all I've turned up.
Anyone have any good leads on this? Having to roll my own OFTP solution from scratch is going to put us outside the time/cost constraints of our client.
I'm the one that developed the open source Java project for Odette FTP. ACCORD is a project actually being developed by Neociclo under the OW2 Consortium, focused to bring a set of tools around the OFTP connectivity, but so far we've a stable OFTP2 component library that is being used around.
I would propose you to consider the tools from www.iKVM.net and try creating a prototype for such interoperability between Java and .Net. If you find it's feasible or succeed in the prototype we can help you in setting up the component library to fit in your needs.
Get involved subscribing to accord-users#ow2.org mailing list.
Best regards,
Rafael Marins