You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by ja...@external.t-mobile.at on 2008/06/04 18:04:24 UTC

http servlet -> nicer list of services [Virus checked]

Hello,

is it by spec of jaxws or other spec, that GET request to cxf sevlet 
returns so ugly list of services?
If not, i'll create a issue for it and submit a patch with produces nicer 
(in my opinion) list of services, including operations etc.

best regards
jano

Re: Antwort: Re: http servlet -> nicer list of services [Virus checked]

Posted by Bharath Thippireddy <bt...@primavera.com>.
Thanks Jan.I was looking for something simiilar.
Is this a part of the binary release now?

thanks and regards,
Bharath

jan.minaroviech@external.t-mobile.at wrote on 06/04/2008 06:04:10 PM:

> Hello,
> 
> patch + sample configuration under issue 1630
> 
> pluggable optional stylesheet ... 
> 
> tested with wsdls initialized from wsdl and also from class
> 
> best regards
> jano
> 
> 
> 
> 
> Daniel Kulp <dk...@apache.org> 
> 06/04/2008 18:20
> Bitte antworten an
> users@cxf.apache.org
> 
> 
> An
> users@cxf.apache.org
> Kopie
> 
> Thema
> Re: http servlet -> nicer list of services  [Virus checked]
> 
> 
> 
> 
> 
> 
> 
> On Jun 4, 2008, at 12:04 PM, jan.minaroviech@external.t-mobile.at wrote:
> 
> > Hello,
> >
> > is it by spec of jaxws or other spec, that GET request to cxf sevlet
> > returns so ugly list of services?
> 
> Not per spec.   Mostly just no time to design something nicer.
> 
> >
> > If not, i'll create a issue for it and submit a patch with produces 
> > nicer
> > (in my opinion) list of services, including operations etc.
> 
> That would be super.   If you could also make it a bit pluggable (or 
> at least a pluggable style sheet or something) so the users could 
> customize it a bit, that would be super super.    :-)
> 
> Dan
> 
> 
> 
> >
> >
> > best regards
> > jano
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 
> 
> 
> 
> 
> 

Antwort: Re: http servlet -> nicer list of services [Virus checked]

Posted by ja...@external.t-mobile.at.
Hello,

patch + sample configuration under issue 1630

pluggable optional stylesheet ... 

tested with wsdls initialized from wsdl and also from class

best regards
jano




Daniel Kulp <dk...@apache.org> 
06/04/2008 18:20
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: http servlet -> nicer list of services  [Virus checked]







On Jun 4, 2008, at 12:04 PM, jan.minaroviech@external.t-mobile.at wrote:

> Hello,
>
> is it by spec of jaxws or other spec, that GET request to cxf sevlet
> returns so ugly list of services?

Not per spec.   Mostly just no time to design something nicer.

>
> If not, i'll create a issue for it and submit a patch with produces 
> nicer
> (in my opinion) list of services, including operations etc.

That would be super.   If you could also make it a bit pluggable (or 
at least a pluggable style sheet or something) so the users could 
customize it a bit, that would be super super.    :-)

Dan



>
>
> best regards
> jano

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog








Antwort: Re: http servlet -> nicer list of services [Virus checked]

Posted by ja...@external.t-mobile.at.
Hello,

atm i have a simple html table hardcoded ... i can add some stylesheets 
there and make stylesheet file configurable ... it seems to be a good 
start.

    private void generateServiceList(HttpServletRequest request, 
HttpServletResponse response)
        throws IOException {
        Collection<ServletDestination> destinations = transport
.getDestinations();
        response.setContentType("text/html"); 
        response.getWriter().write("<html><body>");
        if (!isHideServiceList) {
            if (destinations.size() > 0) { 
                response.getWriter().write("<table cellpadding=\"1\" 
cellspacing=\"1\" border=\"1\" width=\"100%\">");
                for (ServletDestination sd : destinations) {
                    if (null != sd.getEndpointInfo().getName()) {
                        response.getWriter().write("<tr><td>");
                        response.getWriter().write("</br>"
+sd.getEndpointInfo().getInterface().getName().getLocalPart());
                                response.getWriter().write("<ul>");
                        for (OperationInfo oi : 
sd.getEndpointInfo().getInterface().getOperations()) {
                                response.getWriter().write("<li>"
+oi.getName().getLocalPart()+"</li>");
                        }
                                response.getWriter().write("</ul>");
                        response.getWriter().write("</td><td>");
                        String address = 
sd.getEndpointInfo().getAddress();
                        response.getWriter().write("</br>Endpoint address: 
"+address);
                        response.getWriter().write("</br>Wsdl: <a href=\"" 
+ address + "?wsdl\">"+sd.getEndpointInfo().getService().getName()+"</a>"
);
                        response.getWriter().write("</br>Target namespace: 
"+sd.getEndpointInfo().getService().getTargetNamespace());
                        response.getWriter().write("</td></tr>");
                    } 
                }
                response.getWriter().write("</table>");
            } else {
                response.getWriter().write("No service was found.");
            }
        } 
        response.getWriter().write("</body></html>");
    }



does someone has an idea how to do it even more pluggable and 
configurable?

well, i can create an interface with method
private void generateServiceList(HttpServletRequest request, 
HttpServletResponse response)
and make its implementation class pluggable.

other idea is to make template plugable .. but IMHO current set of 
dependencies doesn't contain any templating engine. 

other idea is to build xml from data and make xsl transform to produce 
result. Xsl will be input in this case. .. but it's a quite strange for a 
simple page ;)

best regards
jano




Daniel Kulp <dk...@apache.org> 
06/04/2008 18:20
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: http servlet -> nicer list of services  [Virus checked]







On Jun 4, 2008, at 12:04 PM, jan.minaroviech@external.t-mobile.at wrote:

> Hello,
>
> is it by spec of jaxws or other spec, that GET request to cxf sevlet
> returns so ugly list of services?

Not per spec.   Mostly just no time to design something nicer.

>
> If not, i'll create a issue for it and submit a patch with produces 
> nicer
> (in my opinion) list of services, including operations etc.

That would be super.   If you could also make it a bit pluggable (or 
at least a pluggable style sheet or something) so the users could 
customize it a bit, that would be super super.    :-)

Dan



>
>
> best regards
> jano

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog








Re: http servlet -> nicer list of services [Virus checked]

Posted by Daniel Kulp <dk...@apache.org>.
On Jun 4, 2008, at 12:04 PM, jan.minaroviech@external.t-mobile.at wrote:

> Hello,
>
> is it by spec of jaxws or other spec, that GET request to cxf sevlet
> returns so ugly list of services?

Not per spec.   Mostly just no time to design something nicer.

>
> If not, i'll create a issue for it and submit a patch with produces  
> nicer
> (in my opinion) list of services, including operations etc.

That would be super.   If you could also make it a bit pluggable (or  
at least a pluggable style sheet or something) so the users could  
customize it a bit, that would be super super.    :-)

Dan



>
>
> best regards
> jano

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog