Velayudhaperumal bhagavathikannu

Greenhorn
+ Follow
since Nov 27, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Velayudhaperumal bhagavathikannu

Thanks for your reply Ulf. Able to solve that.

The message is not properly encoded in my case.
16 years ago
Hi,

Iam receving the encryted+encoded(TripleDES+Base64) input messages through a webservice as a string.When decoding and decrypting (Base64 and Triple DES) throws BadPaddingException.When reading through the forums found that Bad Padding Exception occurs in the convertion of string to byte[].But iam not in a position to change the webservice.

Is there any work arounds for this problem?

Thanks.
[ July 27, 2008: Message edited by: Velayudhaperumal bhagavathikannu ]
16 years ago
The problem is the handling of the input msg and is solved...
16 years ago
The input length must not be a multiple of 8.How do i encrpt this messge using triplpe des. My code is,

cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding");
final IvParameterSpec iv = new IvParameterSpec(new byte[]);
cipher.init(Cipher.DECRYPT_MODE, key, iv);
16 years ago
No the input length is not a multiple of 8.
16 years ago
Hi,


While decrypting a message , which is alreay encrpted using TripleDES in .net , using Triple DES an
IllegalBlockSizeException is thrown.


javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)

And the key is encrpted using tripleDES as well on both encrpting j.net piece and decrypting java piece.

Any thoughts on this?
16 years ago
Thanks peter.
No the application doent open any window

Iam able to solve the problem.
In the jsl.exe -debug mode, the configuration file is to be placed outside the application jar, but while running the application as a service ,it was not able to find the config file which is in the root directory.The config file should be placed inside the jar.

Iam able to debug this by uncommenting
systemerr=c:\systemerr.log
in the jsl.ini file

16 years ago
Hi,

I launched my application as windows service using JSL and iam able to start the application.But the application is not running(shows started in the services list) and iam not able to find the jsl log file.
But the application is running fine in the jsl -debug mode


Any help is highly appreciated...

Thanks
16 years ago
hi ben, try this ...

1. create a log4j.properties file like this:

log4j.rootCategory=TRACE, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

2. zip the file and rename it .jar (log4jprops.zip => log4jprops.jar), put the file in a folder you like (example: /workspace/log4jprops/log4jprops.jar)
3. in Eclipse: Run, Debug, click the configuration you want, select Classpath tab
4. click on the User Entries item in the tree view to select it
5. click advanced, select "Add Classpath Variables" radio, and click OK
6. select or create a variable named LOG4J_PROPS, and point it to the JAR created before.
A simple way to invoke a service in .net is
1. Using Axis convert the wsdl to java(using wsdl2java)
2. It creates all the classes required.
3. you just have to call the method in the class

pls refer to : http://www.codeproject.com/KB/dotnet/NET_WS_with_AXIS.aspx
[ June 02, 2008: Message edited by: Velayudha Perumal Bhagavathikannu ]
16 years ago
Okie. So encrypted data is a binary data, before putting the data in the xml you have to encode it. A simple base64 encode should do. You can use commons codec for encoding.

That works Nitesh .But axis itself has base64 encoding.
Thanks Nitesh
16 years ago
Thanks for your reply.
The data iam passing is some encrpted data.So iam not able to replace escape characters.
Assume it would be like

call.invoke(new Object[]{"Encrypted data"})

Tryed with appending this encrypted string with "<![CDATA["... but still throwing
BeanSerializer - Exception:
java.lang.IllegalArgumentException: The char '0x17' after ' <![CDATA[' is not a valid XML character.
[ May 28, 2008: Message edited by: Velayudha Perumal Bhagavathikannu ]
16 years ago
Iam using axis engine. In my message i have some escape characters, when passed from client throwing

BeanSerializer - Exception:
java.lang.IllegalArgumentException: The char '0x17' after '' is not a valid XML character.

It is not possible to remove or replace all the non xml formatted characters from my message.
What should i do to pass my message through axis now?
If writing a custom serializer is the only way how to do that?
16 years ago
While using axis for Webservice we are writing only the wsdd config file and the wsdl file is already implemented in Axis. Is my understanding is right?
New to webservices.What is the difference between a wsdd file and wsdl file?