tags:

views:

22

answers:

1

In an Oracle BPEL service, is there a way to make it display HTML to a browser. I have figured out how to call it via HTTP/GET but the result always comes back as XML. I want to display the html and eliminate the need for a web page. In other words can my BPEL service act like a web page? I've tried XSL but may not be doing it right.

<binding name="HTTPGet" type="tns:HTTPGetService">
   <http:binding verb="GET"/>
     <operation name="process">
       <http:operation location="/process"/>
         <input>
            <http:urlEncoded/>
         </input>
         <output>
            <mime:content part="body" type="text/html" />
         </output>
    </operation>
</binding>

Could the problem be in the output type? If the output type is set to "string" and I plug some html into, should it work? Or does there need to be an output defined using the xhtml schema?

Thanks

A: 

You can use XSL Transformations (XSLT on W3C, wiki entry) to transform your output XML into a nice formatted HTML page. That's what XSLT was conceived for.

Pablo Santa Cruz
Thanks but I've put a transform in my BPEL just before the output but the results just show the html code in the browser. How do I get it to recognize it as a web page?
SRollins
You can use CLIENT SIDE XSLT. Check this out: http://www.xml.com/pub/a/2004/12/01/tr.html
Pablo Santa Cruz
Do I plug it into the BPEL somewhere?
SRollins
This is all being done from BPEL...how do I apply the XSLT to my output?
SRollins
You can do it server side (developing a proxy that connects to your BPEL and merge it with XSLT) or client side (just use your browser to combine XSLT with XML).
Pablo Santa Cruz
This is what I get in Firefox.This XML file does not appear to have any style information associated with it. The document tree is shown below. −<html><head/><body>xxx</body></html>
SRollins
Not sure what you mean by "develop a proxy".
SRollins
A proxy can be a WEBAPPLICATION that your Browser will access, and in that Application you will make the BPEL call, combine with your XSLT and produce the desired output. Read about XSLT. I don't think you are getting the idea of using XSLT to produce XHTML from an XML document.
Pablo Santa Cruz
I am very familiar with XSLT and use it a lot in BPEL transformations. I have been trying to apply it in the BPEL to get HTML output and even setting the mimetype in the wsdl. I'm told my workgroup does not do web programming and doesn't have access to a web server. For that reason, I wanted to know if it was possible to output HTML from the BPEL without an extra web page. But we are tasked with replacing a web page that is going away because the server it's on is being retired.
SRollins