miha zoubek

Ranch Hand
+ Follow
since Sep 13, 2019
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
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by miha zoubek

Campbell Ritchie wrote:I think you are overloading the method in question; if you overrode it, it would have the same signature including the same parameters. You have different parameter types.




Hmm, but method calncePortingNotify has the same types defined as "public class CancelPortingNotify". Can you maybe show me how this would be right? tnx

2 weeks ago
Hello

so my error is:



which indicate that i did not implement or did not implement properly method cancelPortingNotify.

I would like to know what I am doing wrong:








My implementation:



thank you
3 weeks ago
Hello


this is my whole log from spring that I get. I do not know why i get this errors and how to fix them.
I have cloded this project as I need it for decrypting soap request. https://github.com/JuanMorenoDeveloper/ws-security-spring-boot-cxf


br
miha



3 weeks ago
my error is this:

org.apache.cxf.interceptor.Fault: Message part {http://www.w3.org/2001/04/xmlenc#}EncryptedData was not recognized. (Does it exist in service WSDL?)

Which is due to setting properties for decoding ecrypted data. My issue is that I am having problems how to do that with apache cxf (Timestamp and Signature works ok).

Here is my part of code:



So I define "loadDecryptionKeystore" in which I get keystore. But where do I define which certificate to take (with setEncryptionUser("xxx"); ?) and where password to access private key in certificate? Should I define also something else, how ?

ps.: this is configuration for server part when receiving request

thank you
1 month ago
Hello

can someone maybe know how to fix this or what is a solution for this issue?

Issue is this:
When the soap message is encrypted, the PayloadRootAnnotationMethodEndpointMapping is unable to map the soap message because The security interceptor did not have yet the time to decipher it. The solution is to replace @PayloadRoot with @SoapAction.

When a soap message is received, spring-ws calls first the PayloadRootAnnotationMethodEndpointMapping then SoapActionAnnotationMethodEndpointMapping.


My client can not add @SoapAction to the header for request so I have to somehow decrypt first this.


tnx
miha
2 months ago

Tim Moores wrote:Is there a problem with using the annotation?



Hello

yes, but the main issue is that @Endpoint is triggered before request is decrypted. So if you use @SoapAction then @Endpoint is found and request is decrypted. But what if I do not want to use @SoapAction annotaion as otherside does not use it?
2 months ago
Hello

in my case in spring decryption is not working without @SoapAction annotation. This is caused as @Endpoint is searched before body of request is decrypted. Is there any way so that on the client side costumers will not have to use @SoapAction option?

Exp:



thank you
miha
3 months ago

Himai Minh wrote:You may find this site helpful https://memorynotfound.com/spring-ws-intercept-request-response-soap-messages/
You may need new PayloadRootSmartSoapEndpointInterceptor(new GlobanEndpointInterceptor()).



Hi @Himai Minh i tried like this but not working in my case. Thing is that the request is send to @Endpoint before it is decrypted and checked with security Interecptor. Due to this it can not find @Endpoint. Why it does not reach interceptor i am just unable to figure it out

Can some please help me.
3 months ago

Himai Minh wrote:EndpointInterceptor is an interface with 4 methods definitions.
Your GlobanEndpointInterceptor only overrides 2 of them. So, you need to define the implementations of the other two methods.

Reference: https://docs.spring.io/spring-ws/docs/2.2.3.RELEASE/api/index.html?org/springframework/ws/server/EndpointInterceptor.html




@Himai Minh thank you. This was the case. But the main issue perssist. I do not know why EndpointInterceptor in not triggered when request is recevied.





interceptor class:



}


thank you
4 months ago
Hello

So i have created web services which is working ok and @Endpoint is detected when there is no ws-security enabled (Wss4jSecurityInterceptor). If I enable security   I get: No Endpoint found.

I guess the main issue here is that the @Endpoint is triggered before interceptor decodes request from client (I guess).

I am trying like this if interceptor will be triggered but i get different error which i am unable to fix:

Error:(10, 8) java: softnet.si.ldp.client.GlobanEndointInterceptor is not abstract and does not override abstract method afterCompletion(org.springframework.ws.context.MessageContext,java.lang.Object,java.lang.Exception) in org.springframework.ws.server.EndpointInterceptor



import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;
import org.springframework.ws.context.MessageContext;
import org.springframework.ws.server.EndpointInterceptor;




My interceptors:
 

thank you for all help!



4 months ago
Hello

I will kindly as you to help me debug this as I am spinning in endless loop

So, here is first my error:


2020-03-27 11:35:07.491  WARN 33616 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'portingNotification' defined in class path resource [softnetservice/local/softnet/config/SoapServerConfig.class]: Unsatisfied dependency expressed through method 'defaultWsdl11Definition' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'portingShema' defined in class path resource [softnetservice/local/softnet/config/SoapServerConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: class path resource [PortingNotification_WS.xsd] has invalid root element : [definitions] instead of [schema]



And here is my code:



and my pom: I am puting it on pastebin link due to size: https://pastebin.com/ePbTL3VW


thank you.
miha
8 months ago

Campbell Ritchie wrote:Too difficult a question for “Beginning”. Moving discussion.
Please supply more details about the XML calendar class, and how it is supposed to take its input. I am not familiar with it. Are you supposed to use a date format object to parse that text? Why aren't you using the current date‑time classes?



Class in which there are methods:
public void setFromDate(XMLGregorianCalendar value) {
       this.fromDate = value;
   }

and "setToDate" are generated from wsdl, which i got for implementation of SOAP. From this method you can see that type is  "XMLGregorianCalendar": https://docs.oracle.com/javase/7/docs/api/javax/xml/datatype/XMLGregorianCalendar.html

The main issue if for me that in doc from provider i can see that date should be like year/month/day hour/minutes, which is not what I am seeing in XMLGregorianCalendar method
1 year ago
Hi

in method defenition I have this:

public void setFromDate(XMLGregorianCalendar value) {
       this.fromDate = value;
   }



So i should set value as type XMLGregorianCalendar.

I see that xml is set with this annotation:  

Problem is this: in documentation i see that time should be send in request like:


Problem is that this give me error: I guess due to "/"

How can I set (esace /) that this will wokr?


tnx
miha
1 year ago
This is whole request, i was having that part as you were asking ecrypted, so that is why i printed only ecrypted part:
1 year ago