() {
+ @Override
+ public int compare(Method o1, Method o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+ });
for (Method method : methods) {
serviceStubs.addMethodStub(createWebMethodStubSet(method));
}
diff --git a/src/main/java/org/jaxws/stub2html/view/freemarker/FreemarkerWebServiceDisplayer.java b/src/main/java/org/jaxws/stub2html/view/freemarker/FreemarkerWebServiceDisplayer.java
index 1d1fbee..e5e562f 100644
--- a/src/main/java/org/jaxws/stub2html/view/freemarker/FreemarkerWebServiceDisplayer.java
+++ b/src/main/java/org/jaxws/stub2html/view/freemarker/FreemarkerWebServiceDisplayer.java
@@ -44,6 +44,7 @@ public String displayWebSerivce() {
rootMap.put("stubOgnl", new DisplayStubOgnlPathMethodModel());
rootMap.put("stubType", new DisplayStubTypeMethodModel());
rootMap.put("className", new DisplayClassNameMethodModel());
+ rootMap.put("description", new DisplayStubDescriptionMethodModel());
StringWriter out = new StringWriter();
template.process(rootMap, out);
@@ -81,6 +82,16 @@ public Object exec(List arguments) throws TemplateModelException {
}
}
+ private final class DisplayStubDescriptionMethodModel implements TemplateMethodModelEx {
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object exec(List arguments) throws TemplateModelException {
+ Stub stub = (Stub) DeepUnwrap.unwrap((TemplateModel) arguments.get(0));
+ return stub.getDescription();
+ }
+ }
+
private final class DisplayClassNameMethodModel implements TemplateMethodModelEx {
@SuppressWarnings("rawtypes")
diff --git a/src/main/java/org/jaxws/wsdl2html/ui/Wsdl2HtmlMain.java b/src/main/java/org/jaxws/wsdl2html/ui/Wsdl2HtmlMain.java
index a9c77bb..23d3df1 100644
--- a/src/main/java/org/jaxws/wsdl2html/ui/Wsdl2HtmlMain.java
+++ b/src/main/java/org/jaxws/wsdl2html/ui/Wsdl2HtmlMain.java
@@ -19,6 +19,8 @@
*
*/
public class Wsdl2HtmlMain {
+ private static final String TARGET_APIDOCS_LOCATION = "/target/classes/META-INF/apidocs/";
+ private static String descriptionsPath = "";
public static void main(String[] args) throws IOException, WsdlImportException {
@@ -41,6 +43,7 @@ public static void main(String[] args) throws IOException, WsdlImportException {
File htmlDir = getHtmlDir(outputRootDir);
System.out.println("Generating from " + wsdlUrl);
+ Wsdl2HtmlMain.descriptionsPath = wsdlUrl;
FreemarkerWebServiceDisplayEngine displayEngine = createDisplayEngine(argList);
String html = Wsdl2Html.generateHtml(byteCodeDir.getAbsolutePath(), wsdlUrl, displayEngine);
@@ -69,4 +72,7 @@ private static File getByteCodeDir(File outputRootDir) {
return byteCodeDir;
}
+ public static String getDescriptionsPath() {
+ return (new File(descriptionsPath)).getParent() + TARGET_APIDOCS_LOCATION;
+ }
}
diff --git a/src/main/resources/include/macros.ftl b/src/main/resources/include/macros.ftl
index 7004d81..6195c8f 100644
--- a/src/main/resources/include/macros.ftl
+++ b/src/main/resources/include/macros.ftl
@@ -4,7 +4,6 @@
Property |
Type |
- Required |
Description |
<#list stub.childStubs as childStub>
@@ -24,12 +23,10 @@
${stubType(stub)}
- ${stub.required?string("Y","N")} |
-
- |
-
-
+ ${stub.description!} |
+
+
<#list stub.childStubs as childStub>
<@stubRow stub=childStub parentPath=stubOgnl(stub, parentPath)/>
#list>
- #macro>
\ No newline at end of file
+ #macro>
diff --git a/src/main/resources/include/methodParams.ftl b/src/main/resources/include/methodParams.ftl
index 5878a22..2cec6f7 100644
--- a/src/main/resources/include/methodParams.ftl
+++ b/src/main/resources/include/methodParams.ftl
@@ -7,7 +7,6 @@
Name |
Type |
- Required |
Description |
diff --git a/src/main/resources/include/methodResponse.ftl b/src/main/resources/include/methodResponse.ftl
index af6318f..cd49d14 100644
--- a/src/main/resources/include/methodResponse.ftl
+++ b/src/main/resources/include/methodResponse.ftl
@@ -7,11 +7,8 @@
Name |
Type |
- Required |
- Description |
-
- <#include "rootStubRow.ftl"/>
+ <#include "responseRootStubRow.ftl"/>
diff --git a/src/main/resources/include/methodsSummary.ftl b/src/main/resources/include/methodsSummary.ftl
index e8c9e4c..20e7171 100644
--- a/src/main/resources/include/methodsSummary.ftl
+++ b/src/main/resources/include/methodsSummary.ftl
@@ -31,7 +31,7 @@
${stubType(method.responseStub)}
#if>
- |
+ ${method.methodDescription} |
#list>
@@ -40,4 +40,4 @@
<#else>
No Operations
- #if>
\ No newline at end of file
+ #if>
diff --git a/src/main/resources/include/responseRootStubRow.ftl b/src/main/resources/include/responseRootStubRow.ftl
new file mode 100644
index 0000000..f777479
--- /dev/null
+++ b/src/main/resources/include/responseRootStubRow.ftl
@@ -0,0 +1,10 @@
+
+ ${stubName(stub)} |
+
+
+ ${stubType(stub)}
+ <@stubChildrenAsTable stub=stub/>
+
+ |
+
+
diff --git a/src/main/resources/include/rootStubRow.ftl b/src/main/resources/include/rootStubRow.ftl
index fbcf78e..8885ca4 100644
--- a/src/main/resources/include/rootStubRow.ftl
+++ b/src/main/resources/include/rootStubRow.ftl
@@ -6,9 +6,8 @@
<@stubChildrenAsTable stub=stub/>
- ${stub.required?string("Y","N")} |
- ${stub.description!}
+ ${description(stub)}
|
-
\ No newline at end of file
+
diff --git a/src/main/resources/service.ftl b/src/main/resources/service.ftl
index 4da25e5..e963eed 100644
--- a/src/main/resources/service.ftl
+++ b/src/main/resources/service.ftl
@@ -26,41 +26,33 @@
width:20%;
}
.summary-table tr td:nth-child(4){
- width:20%;
- }
+ width:10%;
+ }
.summary-table tr td:nth-child(5){
- width:35%;
+ width:45%;
}
.stub-table tr td:nth-child(1){
- width:20%;
+ width:10%;
}
.stub-table tr td:nth-child(2){
width:60%;
}
- .stub-table tr td:nth-child(4){
- width:10%;
+ .stub-table tr td:nth-child(3){
+ width:30%;
}
- .stub-table tr td:nth-child(5){
- width:10%;
- }
-
.model-rows-table tr td:nth-child(1){
- width:55%;
+ width:20%;
}
.model-rows-table tr td:nth-child(2){
width:25%;
}
.model-rows-table tr td:nth-child(3){
- width:10%;
+ width:45%;
}
- .model-rows-table tr td:nth-child(4){
- width:10%;
- }
-