URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

prempalod
This post was updated on .
Hi everyone,

As per the migration document it is clear that "URIMappingInterceptor" is removed from cxf jars.

Here is the statement regarding it.

The deprecated URIMappingInterceptor has been removed.  This hasn't been on the default chain for some time due to a bunch of security related issues.

Previously I used to use the cxf 2.2.6 jars. Now I am upgrading to cxf 3.1.11 where in my code we were using the URIMappingInterceptor in one of the class files as follows.

SoapJmsInInterceptor.java

In which the constructor is defined as follows.

public SoapJmsInInterceptor() {
                super(Phase.UNMARSHAL);
        addAfter(URIMappingInterceptor.class.getName());
        addBefore(DocLiteralInInterceptor.class.getName());
        }


Now I need to know with what can we replace the URIMappingInterceptor and DocLiteralInInterceptor So that I don't have any issues at compile time. Also the DocLiteralInInterceptor is also removed from the below package of cxf jars

"org.apache.cxf.interceptor"


Could any help in this regard at the earliest as I am struck at this point from the past 20 days..
I could not find any possible solution for this

Thanks in advance,
Rahul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

Dennis Kieselhorst-2
Hi Rahul,

you are right that URIMappingInterceptor was dropped.

org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor and org.apache.cxf.binding.soap.jms.interceptor.SoapJMSInInterceptor are still part of CXF.

Regards
Dennis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

prempalod
This post was updated on .
Hi Dennis,

Thanks for the reply.

So what can we possibly replace URIMappingInterceptor with to remove compile time errors.

As of now I Have added a comment in that line and generated all the class files related to the application

But Now I am getting runtime exception as follows

"Error creating bean with name 'EquipmentInventoryRetrievalSoapJms': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException"

For which I have raise one more question in this forum

http://cxf.547215.n5.nabble.com/Error-creating-bean-with-name-RetrievalSoapJms-Invocation-of-init-method-failed-nested-exception-is-n-td5780367.html

which I believe is due to the Interceptors as per the below definition for interceptors in CXF website

Interceptors are the fundamental processing unit inside CXF. When a SERVICE is invoked, an InterceptorChain is created and invoked. Each interceptor gets a chance to do what they want with the message. This can include reading it, transforming it, processing headers, validating the message, etc.

So can you suggest any replacement for the URIMappingInterceptor by which we may reduce the errors

Regards,
Rahul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

Dennis Kieselhorst-2
> "Error creating bean with name 'EquipmentInventoryRetrievalSoapJms':
> Invocation of init method failed; nested exception is
> javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException"

Please post the full stacktrace.

Cheers
Dennis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

prempalod
[main].BaseApplication.main:591 {29/05/2017 10:14:35.525} >> ERROR
> EXCEPTION {
>   Cause   : javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
>   Message : Error creating bean with name 'EquipmentInventoryRetrievalSoapJms': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceE
> xception: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
>   Class   : org.springframework.beans.factory.BeanCreationException
>   Stack   : {
>     [0] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(initializeBean:1572)
>     [1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(doCreateBean:539)
>     [2] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(createBean:476)
>     [3] at org.springframework.beans.factory.support.AbstractBeanFactory$1(getObject:303)
>     [4] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry(getSingleton:230)
>     [5] at org.springframework.beans.factory.support.AbstractBeanFactory(doGetBean:299)
>     [6] at org.springframework.beans.factory.support.AbstractBeanFactory(getBean:194)
>     [7] at org.springframework.beans.factory.support.DefaultListableBeanFactory(preInstantiateSingletons:755)
>     [8] at org.springframework.context.support.AbstractApplicationContext(finishBeanFactoryInitialization:762)
>     [9] at org.springframework.context.support.AbstractApplicationContext(refresh:480)
>     [10] at org.apache.cxf.bus.spring.BusApplicationContext$1(run:107)
>     [11] at org.apache.cxf.bus.spring.BusApplicationContext$1(run:105)
>     [12] at java.security.AccessController(doPrivileged)
>     [13] at org.apache.cxf.bus.spring.BusApplicationContext(<init>:105)
>     [14] at org.apache.cxf.bus.spring.BusApplicationContext(<init>:96)
>     [15] at org.apache.cxf.bus.spring.BusApplicationContext(<init>:78)
>     [16] at com.fusion.tmf.mtosi.MTOSIAgent(init:115)
>     [17] at com.fusion.tmf.Main(initApplication:154)
>     [18] at com.fusion.base.application.BaseApplication(newApplication:176)
>     [19] at com.fusion.base.application.BaseApplication(main:567)
>   }
> }
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

Dennis Kieselhorst-2
Well no cause is given there. Can you please increase the loglevel and post the output?

Cheers
Dennis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

prempalod
Hi Dennis,

I am just importing the CXF and Spring jars into my application.

So How can I increase the logging level of the exception

we have a property file called logging.xml
In which I tried to enable logs as follows

<logger name="org.springframework.beans.factory">
        <level value="debug"/>
</logger>

But I am getting the same stack trace

Can you please suggest me any other ways in doing it.



Regards,
Rahul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

Dennis Kieselhorst-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

prempalod
These changes are already present in our property files...
But still I am getting the same stack trace

regards,
Rahul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

prempalod
Hi All,

forget about the runtime exception, I need to eliminate the compile time error first.

So could any one suggest a possible replica or any alternative for the interceptor(URIMappingInterceptor)

I need help regarding this issue as I am struck here for a very long time(nearly one month)

from the website of cxf - http://cxf.apache.org/docs/interceptors.html
I found that "URIMappingInterceptor Can handle HTTP GET, extracts operation info and sets the same in the Message". But I could not figure out if this interceptor can be replaced with other interceptors or not.

Thanks in advance,
Rahul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

prempalod
This post was updated on .
In reply to this post by Dennis Kieselhorst-2
Hi Dennis,

In replacement to the older DocLiteralInInterceptor, can we import the new DocLiteralInInterceptor from the package "org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor" as an alternative for the previous DocLiteralInInterceptor from the package "org.apache.cxf.interceptor.DocLiteralInInterceptor" as present in the jar cxf-2.2.6.jar

Thanks & Regards,
Rahul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: URIMappingInterceptor and DocLiteralInInterceptor is removed from cxf jars

Dennis Kieselhorst-2
> In replacement to the older DocLiteralInInterceptor, can we import the new
> DocLiteralInInterceptor from the package
> "org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor"

Sure, should be possible in general but would be interesting to read more about your use case.

Regards
Dennis
Loading...