How to generate the Java classes for WSDL file in Hybris? - ant

As a part of a requirement, I am supposed to consume a Soap web service, the WSDL of the web service is available to me.
I implemented it by generating the classes using auto generating tools like wsimport.But I was curious whether there are better ways of doing this in Hybris, for instance by including the task in ant to generate these classes automatically. How to achieve this?

Hybris working on spring framework, so I prefer using spring related libraries for SOAP client.
On the other hand hybris wake up time very long for developing/debugging web services. I prefer again creating independent jar library with same hybris spring version for service with shared interface with hybris. Generally integrations needs change by time. It is easy to only update this jar file. Also you can create mock jar for test environment with same interface.

Related

Using grails-mail-plugin outside Grails app

Is it possible to use a grails plugin outside a grails application?
I would like to use the functionality of grails-mail-plugin in a simple groovy/gradle app.
I found some information about binary plugins but I'm not sure how to define the dependency to an official grails plugin.
Thanks!
I don't think you could use any Grails plugin itself outside the Grails environment, usually there is a ton of Grails-specific assumptions built into the plugins' code.
If your Groovy application uses Spring, you could migrate the most important functionality out of it.
For this, you will have to get into the innards of the source code of the plugin (e.g. how it uses the Spring Mail package for example) which not may be very quick or easy work.
If your requirements are simple, you may be better of with building a standalone solution, possibly, directly on top of JavaMail.
If you already have a heterogeneous architecture, you may build a separate Grails application/module which only does mailing functionality (possibly through the Async Mail plugins database tables) in integration with the module you build in pure Groovy.

is it possible to use dart with jsp?

I am using spring framework for my java enterprise application .
I felt javascript / jquery is hard to maintain for larger enterprise application.
Classes and Objects makes code maintenance easier.
how can i use dart with spring framework / JSP?.
The HTML code can be generate with JSP. However, we cannot debug with Dart Editor anymore.
It would be nice and more encourage people to start to use Dart by just by support debugging a HTML with dart from non-standard dart editor debug server.
For example: The HTML part is served by a Jetty server which contains links to dart
and we should be able to debug in Dart Editor.
Personally, This is the most needed feature otherwise, it's difficult to ask people to migrate old sytem with JSP, PHP to start to use Dart
We are listening to Dartian reponse.
I found one issue in Dart issue list: https://code.google.com/p/dart/issues/detail?id=3748
The best way to use dart with springframework and JSP is to create rich client app (RCP) in dart and use springframework and JSP for implementing a service layer that should be used by the RCP.
There are various disadvantages if you chose to mix the application state between the client (browser) and the server. Much more scalable model is to build on service oriented architecture (SOA) and keep the UI logic solely on the client side.
Hope it helps ;-)

Is wsdl used at runtime for actually making a connection

After i have used wsdl to generate web service client classes, do i still need to use the wsdl at runtime?
It seems like i dont have to, but in the generated classes , I see a url link to the wsdl file. So is the wsdl needed at runtime for the client to consume the web services?
It depends on the language. You didn't specify what you're using, but - for example...
In c#, if you generate a proxy via Visual Studio, the WSDL is not
used at runtime; it generates a class for you that is used instead.
I have seen other clients that require a local copy of the WSDL;
older versions of the MS Soap Toolkit required one. We ran into this
when using that toolkit with VB6.
According to this question, java requires a wsdl at runtime
because some dependencies are generated at runtime.

Delphi thick client to web application

I am currently using Delphi 5 and planning to migrate application to latest version(XE3) or to other technology. Main purpose of migration is dont want thick client. In currrent scenario application(exe) gets downloaded to the users local folder and then it runs rom local. Main purpose is dont want to download the application to users machine. .
Wanted to stick with Delphi if that downloading limitation resolved. Is there web solution? or way to access the application from common point without downloading to users machine.
Thanks for the help and suggestions.
Note: There are lots of users who uses these application.
Depending on the type of application you could add web layer around the core functionality of your application.
If you create something like a SOAP or REST interface, you can write a web client in any language that suits. Could be Delphi, or some more web-oriented language like PHP or ASP.Net.
By having a web interface your users can access from any platform.
On the other hand, if your current application is not layered properly, and you've got a lot of code mixed between the GUI and your model, this could be difficult. It would mean rewriting a lot of code, or just accept the fact that your users need Windows, and an .exe file.
At least by using Delphi, your users don't need to download a huge framework that requires administrator privileges to install.
Anyway, you should provide some more information about what you already have, and what type of application it is, how complicated it is, etc.
If you are planning a move to Java Enterprise Edition (Java EE), accessing existing Delphi logic can be achieved using two communication models, using existing commercial and open source solutions:
for synchronous (request/response) style communication between Delphi and Java, there are lightweight web frameworks for Delphi (I wrote this one recently) and open source JSON/XML libraries which can be used for data exchange. This allows the Java application server to access Delphi logic over HTTP
for asynchronous communication, I wrote (commercial) message broker client libraries for Delphi and Free Pascal, they can be used with the Java Message Service (JMS) servers in the JBoss and the GlassFish application server - JBoss and GlassFish already include a messaging solution (HornetQ and Open MQ), as a mandatory part of the full Java EE profile
I also have written some step by step tutorials for JBoss and GlassFish Delphi integration:
Delphi Integration with JBoss Application Server 5
Delphi Integration with the GlassFish v3 Application Server Part 1 - Sending Messages
Delphi Integration with the GlassFish v3 Application Server Part 2 - Receiving Messages

Groovy + OSGi or Grails?

I have been learning OSGi and also a little about Groovy recently but am very new to both. I know Groovy is part of the Grails framework and that Grails is good for rapid development. One of the most desirable features in OSGi is class loader management and I believe this is probably still an issue with Grails (correct me if wrong). So, I'm curious is it possible, or even desirable to run Groovy and/or Grails in an OSGI environment?
There's a Grails plugin available, that turns a Grails application into an OSGi bundle that can be deployed on SpringSource's dm server. The plugin author has also posted some blog posts about the integration of Grails with OSGi. However, as far as I understand, the OSGi support of the Grails framework is still rather limited and will be "natively" supported with Grails 2.0.
In my opinion, there is no real benefit in packaging your entire application as an OSGi bundle, except that you can run it in a OSGi container. It will not make your application more modular, because it is still one big bundle. Note that using OSGi will not simplify anything with regard to class loading. It can introduce problems when you are using libraries which have not been designed to run in an OSGi environment. Don't use it unless you have a good reason to do so. It is a great technology, but it will not make anything simpler or better by just dropping it in.
I tend to think, that the other way around is more preferable: let Grails modules, like GORM or GSP run in an OSGi container.
All Groovy or Grails jars (which are modules rather than plugins now) are already OSGi-compatible, so it shouldn't be a problem to install them into a running container. Thus you can combine the advantages of both ecosystems.
On the other hand, deploying an app packaged as a huge monolithic bundle into a OSGi container doesn't make much difference compared to tomcat.

Resources