Bug #288969: CXF wsdl2java wsdlLocation argument not set
diff --git a/bundles/org.eclipse.jst.ws.annotations.core/schema/annotationInitializer.exsd b/bundles/org.eclipse.jst.ws.annotations.core/schema/annotationInitializer.exsd
index c0542a1..19e1db4 100644
--- a/bundles/org.eclipse.jst.ws.annotations.core/schema/annotationInitializer.exsd
+++ b/bundles/org.eclipse.jst.ws.annotations.core/schema/annotationInitializer.exsd
@@ -6,7 +6,7 @@
<meta.schema plugin="org.eclipse.jst.ws.annotations.core" id="annotationInitializer" name="Annotation Initializer"/>
</appInfo>
<documentation>
- This extension point allows clients to associate an annotation initializer with a contribute annotation definition.
+ This extension point allows clients to associate an annotation initializer with an annotation definition.
The annotation initializers role is to construct values for the annotations member value pairs.
</documentation>
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/src/org/eclipse/jst/ws/internal/cxf/consumption/core/commands/WSDL2JavaClientDefaultingCommand.java b/bundles/org.eclipse.jst.ws.cxf.consumption.core/src/org/eclipse/jst/ws/internal/cxf/consumption/core/commands/WSDL2JavaClientDefaultingCommand.java
index ded3661..ca7e166 100644
--- a/bundles/org.eclipse.jst.ws.cxf.consumption.core/src/org/eclipse/jst/ws/internal/cxf/consumption/core/commands/WSDL2JavaClientDefaultingCommand.java
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/src/org/eclipse/jst/ws/internal/cxf/consumption/core/commands/WSDL2JavaClientDefaultingCommand.java
@@ -93,11 +93,9 @@
model.setTargetNamespace(targetNamespace);
model.getIncludedNamespaces().put(targetNamespace, packageName);
- if (wsdlUrl.getProtocol().equals("file")) { //$NON-NLS-1$
- String wsdlLocation = WSDLUtils.getWSDLLocation(definition);
- if (wsdlLocation != null) {
- model.setWsdlLocation(wsdlLocation);
- }
+ String wsdlLocation = WSDLUtils.getWSDLLocation(definition);
+ if (wsdlLocation != null) {
+ model.setWsdlLocation(wsdlLocation);
}
model.setWsdlDefinition(definition);
diff --git a/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaDefaultingCommand.java b/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaDefaultingCommand.java
index b02fc22..3aa2ae0 100644
--- a/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaDefaultingCommand.java
+++ b/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaDefaultingCommand.java
@@ -131,11 +131,7 @@
definition = WSDLUtils.readWSDL(model.getWsdlURL());
if (definition != null) {
setTNSOnModel(definition);
-
- String wsdlLocation = WSDLUtils.getWSDLLocation(definition);
- if (wsdlLocation != null) {
- model.setWsdlLocation(wsdlLocation);
- }
+ setWSDLLocation(definition);
}
} else {
String filename = ""; //$NON-NLS-1$
@@ -144,6 +140,8 @@
Map servicesMap = definition.getServices();
Set<Map.Entry> servicesSet = servicesMap.entrySet();
setTNSOnModel(definition);
+ setWSDLLocation(definition);
+
for (Map.Entry serviceEntry : servicesSet) {
Service service = (Service) serviceEntry.getValue();
Map portsMap = service.getPorts();
@@ -196,6 +194,13 @@
return status;
}
+ private void setWSDLLocation(Definition definition) throws MalformedURLException {
+ String wsdlLocation = WSDLUtils.getWSDLLocation(definition);
+ if (wsdlLocation != null) {
+ model.setWsdlLocation(wsdlLocation);
+ }
+ }
+
private void setTNSOnModel(Definition definition) {
String targetNamespace = definition.getTargetNamespace();
String packageName = WSDLUtils.getPackageNameFromNamespace(targetNamespace);