Oracle BPEL Web Service 能否将 html 输出到浏览器

发布于 2024-09-19 17:33:27 字数 681 浏览 1 评论 0原文

在 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 模式定义输出?

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

叹梦 2024-09-26 17:33:27

另一个简单的选择是从 servlet 调用该流程,应用 xslt 并(在 servlet 中)将 mime 类型更改为 html - 强制浏览器正确显示它......

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

恏ㄋ傷疤忘ㄋ疼 2024-09-26 17:33:27

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文