Ola Daniel

Ranch Hand
+ Follow
since Jul 27, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ola Daniel

Thanks for that explanation Jimmy.

I appreciate it.
Jimmy thanks for your reply.

I'll give you more information on what I am trying to do. I have created a subset of a parent schema i.e. http://www.landxml.org/schema/LandXML-1.2/LandXML-1.2.xsd. My new custom schema is based on this one. What I would like to do is programmatically make sure that all XML files based on my schema pass validation against my schema and the parent schema. And I think if I could somehow validate my manually created schema against the parent one, I will not have to validate XML files against both schemas?

Does this make sense or am I going about this wrong?
Hi all,

I need to validate an XML schema, please note I am not talking about validating an XML document against a schema. I would like to validate the XSD and in addition to validating my XSD i would like to make sure that it is a subset of a large schema. Any ideas on how to do this?

thanks.


Hi Guys,

I was wondering if it is possible supply values to an annotation dynamically. Say I want the default message in the above piece of code to come from an Database Entity POJO. Is it possible to do this? If yes, how. Just a nudge in the right direction.

is it possible to set these values in the Validation class' initialize method?

Thanks.
Hello everyone,

1. I have an XML schema from which I generate java classes using JAXB.
2. The application I am working on has complex Business Validation rules rules which are not part of XML schema. I would like to custom Bean Validation Annotations - JSR 303 to validate the objects generated from JAXB.

Is it possible to get JAXB to annotate the fields or methods which I need? If yes, can someone give me a nudge in the right direction on how to get this done.

Thanks.
Hi all,

i am getting this same error that the author of this thread had. Any idea how to resolve the issue.

Same problem.

Help.

Thanks.
Ola
8 years ago
Hi Guys,

I created a JAX WS client with wsimport and try to make a call but all attempts give me the following exception


My code is as follows:


I think this is because the WSDL is a HTTPS call. Please help, How do I fix this?
8 years ago
Is this correct way of doing it (see code below)? using PBEWithMD5AndDES for key factory? and MD5 hashing? Is it possible to use SHA-256 to generate a 128 bit hash?



9 years ago
I need to create a Java version of an existing .NET application which uses Xceed Encryption Library to encrypt and decrypt files. I need help on how to get a Java to encrypt and decrypt files which have been encrypted with the .NET Xceed Encryption library.


See this link here for an example of how the Xceed encryption library works: http://doc.xceedsoft.com/products/XceedCry/Encrypting_and_decrypting_from_file_to_file_%28C__example%29.html

The Xceed library creates a symmetric key using a passphrase from the user. How do I do this in Java?

I already have code which generates a random secret key, this is no good. How do I create an AES 128 bit SecretKey from a given passphrase.

Any Ideas?
9 years ago
Hello,

I need a database for a standalone Java desktop application. Can anyone make any recommendations:

For now I have two options which I am considering, they are:

1. Hypersonic SQL
2. Java DB (from Sun)

Any ideas, am I on track with these options or should I look at something else?

Looking forward to hearing some thoughts on this.

Thanks

Daniel
10 years ago
Looks to me like you need to learn how to use the MVC Model. I could give you a quick fix and tell you exactly what to do but I don't think that is what Java Ranch is all about. Do some search on these patterns: FrontControllers Pattern, The Model-View-Controller Pattern. While your at it pay attention to the RequestDispatcher
10 years ago
Google up SimpleDateFormat i.e. java.text.SimpleDateFormat and you will get what you need.
10 years ago
Why don't you just try it and see?
10 years ago


Nothing wrong with your redirect line. A servlet cannot output to two pages at the same time, the out.println(...) is going to be ignored and the page will only get redirected to home.html which is what you say is happening.

There are many ways of doing this, One way is to comment out the response.sendRedirect line and send your output to the browser and include a javascript (window.location.href='src/jsp/home.html') to redirect to the home page after the alert shows.

Personal note: I'm not fond of constructing HTML in servlets (its a nightmare).
10 years ago
But if you insist on doing it this way:


response.sendRedirect("src/jsp/second.jsp");



That line looks wrong, but I can't know for sure because I don't know what your web archive directory structure looks like.
10 years ago