在引用 XSD 的端点上创建 wso2 esb 代理服务 [英] Creating wso2 esb proxy service on an endpoint which has references to XSD

查看:16
本文介绍了在引用 XSD 的端点上创建 wso2 esb 代理服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在端点上创建了一个直通代理服务,并在发布 wsdl 选项中选择了指定源 URL.wsdl 定义中对 xsd 的端点引用.代理 Web 服务生成罚款,但是当尝试从客户端 (SOAP UI) 加载此 Web 服务时,由于在代理服务 wsdl URL 中引用 xsd 的方式,它会引发错误.

I've created a pass through proxy service on top on a endpoint and selected Specify Source URL in publish wsdl options. The endpoint references to xsd's in the wsdl definition. The proxy web service generated fines, but when trying to load this web service from a client (SOAP UI), it throws an error because of the way the xsd is referenced in the proxy service wsdl URL.

具有 xsd 定义的实际 Web 服务示例

Sample of Actual web service with an xsd definition

<types>
    <xsd:schema>
        <xsd:import namespace="http://service.example.com/" schemaLocation="http://172.16.91.82:7001/DemoService/DemoService?xsd=1"/>
    </xsd:schema>
</types>

引用架构的代理服务示例.

Sample of the proxy service with a reference to schema.

<wsdl:types>
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
        <xsd:import namespace="http://service.example.com/" schemaLocation="SecuredServiceProxy?xsd=http://172.16.91.82:7001/DemoService/DemoService?xsd=1"/>
    </xsd:schema>
</wsdl:types>

客户端加载架构位置时出现问题(当然看起来无效)

The client has a problem loading the schema location (which of course looks invalid)

1) 我正在寻找一种方法来摆脱这种情况.

1) I'm looking at a way to get rid of this.

2) 此代理服务旨在向最终用户隐藏实际服务.xsd 模式在代理服务 wsdl 定义中列出的方式将实际端点信息泄漏给最终用户.有没有办法避免在生成的代理服务的 wsdl 定义中显示 xsd url?

2) This proxy service is intended to hide the actual service from the end user. The way the xsd schema is listed in proxy service wsdl definition, is leaking the actual endpoint information to the end user. Is there a way to avoid the xsd url displayed in the generated wsdl definition of proxy service ?

谢谢.

推荐答案

所以你的意思是说你的端点是 URL 而你的发布 wsdl 也是 url?您可以尝试将您的发布 wsdl 指定为内联,您可以在 ESB_Home 中创建一个 .xsd 文件,该文件应包含您的 xsd URL 的内容.然后,您可以通过将位置从 url 更改为内联 wsdl 中 ESB_Home 目录中的 xsd 文件的名称来引用您的 .xsd 文件:

So you mean to say that your endpoint is the URL and your publish wsdl is also url? you can try specifying your publish wsdl as inline and you can create a .xsd file in ESB_Home which should contain the contents of your xsd URL. And then you can refrence your .xsd file by changing the location from url to simply the name of the xsd file present in your ESB_Home directory in your inline wsdl as :

<wsdl:types>
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
        <xsd:import namespace="http://service.example.com/" schemaLocation="DemoService.xsd"/>
    </xsd:schema>
</wsdl:types>

希望这对你有用

这篇关于在引用 XSD 的端点上创建 wso2 esb 代理服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆