Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Markus Jesner

+ Follow
since Nov 16, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Markus Jesner

The problem was the timeout. you have to set this like this

5 years ago

I've an .net webservice which has a byte[] as parameter in the webmethod.
I've generated classes with java2wsdl (cxf-2.2.12). When I try to call the method with a "simple" byteArray like "xxx".getBytes(), everything will work fine.
But when I try to call the method with a byte[] from a BLOB (database) oder a file (read as byte[]), I'll get response code 400 (bad request) and an exception
in cxf. Also tried to get bytes from a long string (xml message) with .getBytes() .. same error (400) will occur.

I set the maximum bytes for the webservice (in .net) up to 16MB and the files/blob have only 1-5 KB.

I'm not sure where there is a problem? Maybe the length of the byte[]? or some encoding issues?

Any ideas?

Thank you very much,
5 years ago

to geht a "good looking" string that can be used fort he xml, you have to encode the byte[] to bas64.

byte[] data = ...
String s = new String(Base64.encode(data));
6 years ago

I've following problem:

I fill a XML (with JaxB generated object factory, ... etc) and marshall a String.

I have to generate a signature of this content.
Therefore I've to use bouncycastle library.

I found some examples .. my code looks like this:
(privatekey+certificate are from the keystore and are okay)

I will get a signature containing funny charactes like these:

ž6ʁsF4í$¿ñ’ ... and so on.

When I try to copy (textpad) I got an error: "cannot copy .. text containg null (code=0) chars".
I have to add this signature to the xml tag (<signature>) and then marshall the message once again.

I got following exception:
Ok .. that means to me, that the signature could not be in the xml as tag because it would be invalid?

Is the way i to this okay?
I've done some Xml signing with the dsig lib from java and apache santuario. But they will create a own tag etc.

Any ideas?
Thank you very much!

Greetings from Austria,

6 years ago