Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

miha zoubek

+ Follow
since Sep 13, 2019
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 miha zoubek

Stephan van Hulst wrote:I think if you want to control what prefixes are used, you can do it by declaring an @XmlSchema annotation on the package itself in and configure the xmlns element. The Javadoc has an example:

ok, i will try. Thank you very much. But anyway if this is not issue, then i can leave it like it is.
2 hours ago
Another thing from logs: Null or empty transformation
at java.base/javax.crypto.Cipher.getInstance( ~[na:na]
at com.sun.xml.wss.impl.apachecrypto.EncryptionProcessor.encrypt( ~[xws-security-3.0.jar:3.0-FCS]
at com.sun.xml.wss.impl.filter.EncryptionFilter.encrypt( ~[xws-security-3.0.jar:3.0-FCS]
at com.sun.xml.wss.impl.filter.EncryptionFilter.process( ~[xws-security-3.0.jar:3.0-FCS]
at com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy( ~[xws-security-3.0.jar:3.0-FCS]
at com.sun.xml.wss.impl.HarnessUtil.processDeep( ~[xws-security-3.0.jar:3.0-FCS]

Does this mean that before was executed

In there is this:

I see this:

How this is string if I put flag on this line and trigger debug and it shows like object?

2 hours ago

Kristina Hansen wrote:Well, some of your code tries to initiate a XML cipher. So, look through your code where you call Cipher.getInstance(). Also: What you posted is just the exception message, but an exception always also have a stacktrace - if you don't get one in come catch block there's a printStackTrace() missing - as the stacktrace shows you exactly the information you want to know: where's the call that fails.
Look through all your catch blocks and make sure you have a printStackTrace in each one - this should help you to find the call failing.

Hi Kristina

i do not know where to put stacktrace as this is not my library, it is library of spring-ws which i can not edit.
2 hours ago

Campbell Ritchie wrote:How does that error occur? We need more details before we can help. Is this related to your previous post?

Hi Ritchie

yes it is related to this post. I am rreally struggling to debug this
2 hours ago

my error is this, but this is not really the case. I need to find out the flow of code which in some step trigger this error:

Error is this:

This is the method that triggers this error:

I do not know how to find out which method is calling this method, so that i do reverse engineering and find out why "String transformation" is not set and where/how must be set.
I  am using IDEA IDE.


9 hours ago

Stephan van Hulst wrote:It really should not matter what prefix you use, as long as the prefix is an alias for the correct namespace.

But if you have to change the prefix in order to make the receiver work, then the receiver doesn't know proper XML.

HI, so basically this should not be an issue:

as i have namespace and prefix the same:

Another thing. This "prefix" is itis parsed from wsdl file? Who defines this? I do not see this in wsdl.

16 hours ago

can someone point me what i am missing in my security policy looking at error bellow:

My Policy:

thank you.
1 day ago

Stephan van Hulst wrote:Why? Assuming the "Enevelope" in the first snippet was just a typo when you wrote your question, the only thing that's different is the namespace prefix.

Do "env" and "Soap" refer to the same namespace?


right now my request looks like:

I need to change this to:

Yes, the same namespace.

I will point out also this. When I import wsdl to SoapUI I get right namespaces but when I am generating classes via JAB2X module i get above result:

1 day ago

I need to change -> in my SOAP request.

I am using this:

and this:

I do not know if I must change this within above methods or must I do it differently. Or I can define this in classes generated from WSDL file?

thank you.
1 day ago

my sign of request is working perfectly. But when I add to encrypt also request i get this error:

2019-10-16 10:52:59.296 ERROR 6912 --- [nio-8080-exec-1]    : WSS0221: Unable to locate matching certificate for Key Encryption using Callback Handler.
2019-10-16 10:52:59.304 ERROR 6912 --- [nio-8080-exec-1] com.sun.xml.wss.logging.impl.filter      : WSS1413: Error extracting certificate

My code part:

from what i see the main issue is that alias for encry cert is not set. How to set it i do not know as the same handler is called for sign and encry. Sign is working.

Link: Encryption
To encrypt outgoing SOAP messages, the security policy file should contain a Encrypt element. This element can further carry a EncryptionTarget element which indicates which part of the message should be encrypted, and a SymmetricKey to indicate that a shared secret instead of the regular public key should be used to encrypt the message. You can read a description of the other elements here .

<xwss:SecurityConfiguration xmlns:xwss="">
   <xwss:Encrypt />
The XwsSecurityInterceptor will fire a EncryptionKeyCallback to the registered handlers in order to retrieve the encryption information. Within Spring-WS, there is one class which handled this particular callback: the KeyStoreCallbackHandler.

Picture of object:

And part of class that executes this:

3 days ago

Matt Wong wrote:would be helpfull by posting code causing the issue

I fixed this. It was issue with alias as I did not provide it:)
3 days ago

I am getting this error when trying so sign request with cert:

and latter:

I tried with generating new keypar for jks keystore and it is the same.

I guess it should be something else? I look at object and all properties for keystore are set.

Can anyone point me where i should look for?

4 days ago

no i was having issue as jks file was not inported to keystore. I found issue, now when I am returning KeyStore object not FactoryBean object KeyStore is generated

4 days ago

i am spinning in circles  and do not know how to fix this

So i am importing keystore like:

But I get:

Loading key store from class path resource [test.jks]
Creating empty key store

System.out.... gives me

Which is correct path. The same way I am loading policy file and it is loaded correctly. I tried with different keystore and it is the same.
Can anyone know what could be the issue ?

tnx so much!
5 days ago

I need to first sign outgoing SOAP request. The main issue is that i have configured and code everything it is in doc but reuqest is not signed. So, fure sure i missed something as my knowledge of java/spring is not very high (starting to lear). I would really be grateful for some help

My code:



I guess the main issue is how to trigger this interceptor. Thank you!
1 week ago