Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

HandlerChain annotation name attribute deprecated.

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using @HandlerChain(file="HandlerConfig.xml") annotation to configure a SOAPMessageHandler in my Impl file. This annotation contains a deprecated "name" attribute. When I am not specifying "name" attribute in the annotation, JWSC task is throwing "Null Pointer Exception" while creating the war of the service. This is probably because the HandlerConfig.xml contains handler-chain-name element and the annotation doesn't contain "name" attribute. When I am specifying name attribute in the annotation everything is fine. Please help me in resolving the problem without "name" attribute.

This is the code I am having:

SubmitApplicationServiceImpl.java:

package com.project.webservices.submitappservice;
import javax.jws.WebService;
import weblogic.jws.WLHttpTransport;
import javax.jws.HandlerChain;

@HandlerChain(file = “SubmitAppHandlerChain.xml”)
@WebService(serviceName = "SubmitApplicationService", targetNamespace = "http://project.com/ SubmitApplicationService", endpointInterface = "com.project.webservices.submitappservice.SubmitApplicationServiceSoap")
@WLHttpTransport(contextPath = "SubmitApplicationService", serviceUri = "SubmitApplicationService", portName = "SubmitApplicationServiceSoapSoapPort")
public class SubmitApplicationServiceSoapImpl implements
SubmitApplicationServiceSoap {
public SubmitApplicationRes submitApplication(
SubmitApplicationReq submitApplicationRq) {
// Our business logic here.
return submitApplicationRes;
}
}



This is my handler configuration file in the same package:

SubmitAppHandlerChain.xml:

<?xml version='1.0' encoding='UTF-8'?>
<jwshc:handler-config xmlns:jwshc="http://www.bea.com/xml/ns/jws"
xmlns="http://java.sun.com/xml/ns/j2ee" >

<jwshc:handler-chain>
<jwshc:handler-chain-name>HandlerChain</jwshc:handler-chain-name>
<jwshc:handler>
<handler-name>AppServiceHandler</handler-name>
<handler-class>com.project.webservices.submitappservice.AppServiceHandler</handler-class>
</jwshc:handler>
</jwshc:handler-chain>

</jwshc:handler-config>




This is the build target that creates war of the service:

<taskdef name="jwsc"
classname="weblogic.wsee.tools.anttasks.JwscTask"
classpathref="compile.classpath" />

<target name="create-appservice-war>
<jwsc srcdir="${basedir}/project/src" destdir="${basedir}/projectEAR/build">
<jws file="com/project/webservices/submitappservice/SubmitApplicationServiceSoapImpl.java"/>
<classpath refid="jwsant.classpath" />
</jwsc>
</target>



Thanks,
Satya
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually the javadocs of a class (here: HandlerChain) mention what should be used instead of deprecated features.

If the attribute works fine for you, what's the need to avoid it?
 
satyanarayana bnv
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for replying. I am not supposed to use deprecated attributes.

Thanks,
Satya.
 
Ulf Dittmer
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am not supposed to use deprecated attributes.


As a hard and fast rule, that doesn't make sense. There's no harm in using this, but there is (obviously, in this case) harm in NOT using it, so I'd say that's a good reason to use it.

Maybe there's a newer version of the JWSC task that knows about this deprecation?
 
Don't touch me. And dont' touch this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic