1

在 Oracle BPEL 服务中,有没有办法让它向浏览器显示 HTML。我已经弄清楚如何通过 HTTP/GET 调用它,但结果总是以 XML 形式返回。我想显示 html 并消除对网页的需要。换句话说,我的 BPEL 服务可以像网页一样工作吗?我已经尝试过 XSL,但可能做得不对。

<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>

问题可能出在输出类型上吗?如果输出类型设置为“字符串”并且我插入了一些 html,它应该工作吗?或者是否需要使用 xhtml 模式定义输出?

谢谢

4

2 回答 2

1

Another simple option is to call the process from a servlet, apply an xslt and (wihtin the servlet) change the mime type to html- forcing the browser to display it correctly...

于 2012-11-16T15:39:09.397 回答
0

您可以使用 XSL 转换(W3C 上的 XSLTwiki 条目)将输出 XML 转换为格式良好的 HTML 页面。这就是 XSLT 的初衷。

于 2010-09-15T18:42:08.857 回答