[341728] WebService annotation member value pairs not initialized when quick fix invoked
diff --git a/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/annotations/correction/AddAnnotationToTypeCorrectionProposal.java b/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/annotations/correction/AddAnnotationToTypeCorrectionProposal.java
index c191a9c..d17f3ed 100644
--- a/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/annotations/correction/AddAnnotationToTypeCorrectionProposal.java
+++ b/bundles/org.eclipse.jst.ws.jaxws.ui/src/org/eclipse/jst/ws/internal/jaxws/ui/annotations/correction/AddAnnotationToTypeCorrectionProposal.java
@@ -14,6 +14,7 @@
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.Annotation;
 import org.eclipse.jdt.core.dom.CompilationUnit;
@@ -25,6 +26,7 @@
 import org.eclipse.jst.ws.annotations.core.AnnotationsManager;
 import org.eclipse.jst.ws.annotations.core.initialization.IAnnotationAttributeInitializer;
 import org.eclipse.jst.ws.annotations.core.utils.AnnotationUtils;
+import org.eclipse.jst.ws.jaxws.core.utils.JDTUtils;
 import org.eclipse.ltk.core.refactoring.TextFileChange;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.text.edits.TextEdit;
@@ -32,38 +34,41 @@
 public class AddAnnotationToTypeCorrectionProposal extends AbstractJavaCorrectionPropsoal {
 
     private Class<? extends java.lang.annotation.Annotation> annotationClass;
-    
+
     public AddAnnotationToTypeCorrectionProposal(IInvocationContext invocationContext,
             Class<? extends java.lang.annotation.Annotation> annotationClass, String displayString, int relevance, Image image) {
         super(invocationContext, displayString, relevance, image);
         this.annotationClass = annotationClass;
-   }
+    }
 
     @Override
     public void addEdits(TextFileChange textChange) throws CoreException {
         ICompilationUnit compilationUnit = invocationContext.getCompilationUnit();
-        
+
         CompilationUnit astRoot = invocationContext.getASTRoot();
-        
+
         AST ast = astRoot.getAST();
 
-        IAnnotationAttributeInitializer annotationAttributeInitializer = 
-            AnnotationsManager.getAnnotationDefinitionForClass(annotationClass).
-                getAnnotationAttributeInitializer();
-        
-        List<MemberValuePair> memberValuePairs = annotationAttributeInitializer.getMemberValuePairs(
-                compilationUnit.findPrimaryType(), ast, annotationClass);
-        
+        IAnnotationAttributeInitializer annotationAttributeInitializer =
+            AnnotationsManager.getAnnotationDefinitionForClass(annotationClass.getCanonicalName()).getAnnotationAttributeInitializer();
+
+        List<MemberValuePair> memberValuePairs = null;
+        IType annotationType = JDTUtils.findType(compilationUnit.getJavaProject(), annotationClass.getCanonicalName());
+        if (annotationType != null) {
+            memberValuePairs = annotationAttributeInitializer.getMemberValuePairs(compilationUnit.findPrimaryType(),
+                    ast, annotationType);
+        }
+
         Annotation annotation = AnnotationsCore.createNormalAnnotation(ast, annotationClass.getSimpleName(),
                 memberValuePairs);
-        
+
         textChange.addEdit(AnnotationUtils.createAddAnnotationTextEdit(compilationUnit.findPrimaryType(), annotation));
-            
+
         ImportRewrite importRewrite = CodeStyleConfiguration.createImportRewrite(compilationUnit, true);
         importRewrite.addImport(annotationClass.getCanonicalName());
         if (importRewrite.hasRecordedChanges()) {
             TextEdit importTextEdit = importRewrite.rewriteImports(null);
-            textChange.addEdit(importTextEdit);           
+            textChange.addEdit(importTextEdit);
         }
     }