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