final SignatureAttribute signatureAttribute = new SignatureAttribute(constantPool, signature) ;
seiClass.getClassFile().addAttribute(signatureAttribute) ;
AnnotationsAttribute attribute = new AnnotationsAttribute(
constantPool, AnnotationsAttribute.visibleTag);
Annotation annotation = new Annotation(
"javax.xml.ws.WebServiceProvider", constantPool);
StringMemberValue strValue1 = new StringMemberValue(constantPool);
strValue1.setValue(epInfo.getWSDLFileName());
annotation.addMemberValue("wsdlLocation", strValue1);
StringMemberValue strValue2 = new StringMemberValue(constantPool);
strValue2.setValue(epInfo.getServiceName());
annotation.addMemberValue("serviceName", strValue2);
StringMemberValue strValue3 = new StringMemberValue(constantPool);
strValue3.setValue(epInfo.getPortName());
annotation.addMemberValue("portName", strValue3);
StringMemberValue strValue4 = new StringMemberValue(constantPool);
strValue4.setValue(epInfo.getNamespace());
annotation.addMemberValue("targetNamespace", strValue4);
attribute.addAnnotation(annotation);
Annotation annotation2 = new Annotation("javax.xml.ws.ServiceMode",
constantPool);
EnumMemberValue enumValue = new EnumMemberValue(constantPool);
enumValue.setType("javax.xml.ws.Service$Mode");
enumValue.setValue("MESSAGE");
annotation2.addMemberValue("value", enumValue);
attribute.addAnnotation(annotation2);
if (epInfo.isAddressing() && JBossDeployerUtil.getWSImpl().equals(JBossDeployerUtil.WSIMPL_CXF))
{
Annotation annotation3 = new Annotation("javax.xml.ws.soap.Addressing", constantPool);
BooleanMemberValue boolEnabled = new BooleanMemberValue(constantPool);
boolEnabled.setValue(true);
BooleanMemberValue boolRequired = new BooleanMemberValue(constantPool);
boolRequired.setValue(true);
annotation3.addMemberValue("enabled", boolEnabled);
annotation3.addMemberValue("required", boolEnabled);
attribute.addAnnotation(annotation3);
}
if (includeHandlers)
{
final Annotation handlerChainAnnotation = new Annotation("javax.jws.HandlerChain", constantPool) ;
final StringMemberValue handlerValue = new StringMemberValue(constantPool) ;
handlerValue.setValue("esb-jaxws-handlers.xml") ;
handlerChainAnnotation.addMemberValue("file", handlerValue) ;
attribute.addAnnotation(handlerChainAnnotation) ;
}
seiClass.getClassFile().addAttribute(attribute);