使用 jax-ws 生成存根失败

2024-01-01

我正在尝试使用 jax-ws 为 WSO2 Identity Server 管理服务生成存根https://xx.xx.xx.xx:9447/services/RemoteUserStoreManagerService?wsdl https://xx.xx.xx.xx:9447/services/RemoteUserStoreManagerService?wsdl.

我已经下载了 wsdl,但是当我运行时:

wsimport -p org.wso2 RemoteUserStoreManagerService.xml

我收到以下错误

    [ERROR] operation "updateCredential" has an invalid style
  line 679 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "setUserClaimValue" has an invalid style
  line 683 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUserClaimValues" has an invalid style
  line 692 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUserClaimValue" has an invalid style
  line 696 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateCredentialByAdmin" has an invalid style
  line 705 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteRole" has an invalid style
  line 739 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUser" has an invalid style
  line 748 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateRoleName" has an invalid style
  line 762 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateRoleListOfUser" has an invalid style
  line 766 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "addUser" has an invalid style
  line 780 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "addRole" has an invalid style
  line 784 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateUserListOfRole" has an invalid style
  line 788 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "setUserClaimValues" has an invalid style
  line 797 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateCredential" has an invalid style
  line 857 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "setUserClaimValue" has an invalid style
  line 878 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUserClaimValues" has an invalid style
  line 887 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUserClaimValue" has an invalid style
  line 908 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateCredentialByAdmin" has an invalid style
  line 917 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteRole" has an invalid style
  line 1010 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUser" has an invalid style
  line 1019 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateRoleName" has an invalid style
  line 1040 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateRoleListOfUser" has an invalid style
  line 1061 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "addUser" has an invalid style
  line 1094 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "addRole" has an invalid style
  line 1103 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateUserListOfRole" has an invalid style
  line 1112 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "setUserClaimValues" has an invalid style
  line 1121 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateCredential" has an invalid style
  line 1205 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "setUserClaimValue" has an invalid style
  line 1226 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUserClaimValues" has an invalid style
  line 1235 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUserClaimValue" has an invalid style
  line 1256 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateCredentialByAdmin" has an invalid style
  line 1265 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteRole" has an invalid style
  line 1358 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "deleteUser" has an invalid style
  line 1367 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateRoleName" has an invalid style
  line 1388 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateRoleListOfUser" has an invalid style
  line 1409 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "addUser" has an invalid style
  line 1442 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "addRole" has an invalid style
  line 1451 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "updateUserListOfRole" has an invalid style
  line 1460 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] operation "setUserClaimValues" has an invalid style
  line 1469 of file:/C:/tmp/RemoteUserStoreManagerService.xml

[ERROR] missing required property "style" of element "operation"


        Failed to parse the WSDL.

以下是出现第一个错误的文件第 679 行附近的 wsdl 架构(未发布整个架构,因为它相当大):

       <wsdl:operation name="updateCredential">
        <wsdl:input message="ns:updateCredentialRequest" wsaw:Action="urn:updateCredential"/>
        <wsdl:fault message="ns:RemoteUserStoreManagerServiceUserStoreException" name="RemoteUserStoreManagerServiceUserStoreException" wsaw:Action="urn:updateCredentialRemoteUserStoreManagerServiceUserStoreException"/>
    </wsdl:operation>
    <wsdl:operation name="setUserClaimValue">
        <wsdl:input message="ns:setUserClaimValueRequest" wsaw:Action="urn:setUserClaimValue"/>
        <wsdl:fault message="ns:RemoteUserStoreManagerServiceUserStoreException" name="RemoteUserStoreManagerServiceUserStoreException" wsaw:Action="urn:setUserClaimValueRemoteUserStoreManagerServiceUserStoreException"/>
    </wsdl:operation>
    <wsdl:operation name="getUserClaimValuesForClaims">
        <wsdl:input message="ns:getUserClaimValuesForClaimsRequest" wsaw:Action="urn:getUserClaimValuesForClaims"/>
        <wsdl:output message="ns:getUserClaimValuesForClaimsResponse" wsaw:Action="urn:getUserClaimValuesForClaimsResponse"/>
        <wsdl:fault message="ns:RemoteUserStoreManagerServiceUserStoreException" name="RemoteUserStoreManagerServiceUserStoreException" wsaw:Action="urn:getUserClaimValuesForClaimsRemoteUserStoreManagerServiceUserStoreException"/>
    </wsdl:operation>

尝试在所有 wsdl 操作中添加输出消息。有趣的是注意到wsimport不抱怨getUserClaimValuesForClaims操作,并且该方法已定义输出消息。

EDIT:您可以毫无恐惧地编辑 wsdl,因为这些有问题的方法具有 void 返回类型,因此您可以将任何您想要的内容作为返回类型并忽略它。换句话说,当调用 Web 服务时,您只对输入参数感兴趣,因为这些方法实际上不返回任何内容。因此,请执行以下操作:

  1. 复制 wsdl,例如命名它client.wsdl
  2. 将输出消息添加到所有没有输出消息的操作
  3. 生成 Web 服务客户端client.wsdl (don't改变服务!)
  4. 调用 Web 服务方法并忽略这些“有问题”的方法的返回类型
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 jax-ws 生成存根失败 的相关文章

随机推荐

  • JOIN 或 WHERE 中的条件

    在 JOIN 子句中添加条件与在 WHERE 子句中添加条件之间是否有任何区别 性能 最佳实践等 例如 Condition in JOIN SELECT FROM dbo Customers AS CUS INNER JOIN dbo Or
  • 反应流与反应堆模式?

    我想知道反应流 由反应宣言定义 和反应器模式 https en wikipedia org wiki Reactor pattern https en wikipedia org wiki Reactor pattern 我读到 Proje
  • 从 Chrome 中打开的
    元素中删除蓝色边框?

    我正在升级我的网站以使用新的 HTML5details元素以获得更好的可访问性 一切正常 但不幸的是 当我单击打开元素时 Chrome 应用了丑陋的蓝色边框 有什么办法可以阻止 Chrome 这样做吗 我看不到任何显式的 CSS 样式被应用
  • 如何使用 apache POI 在 ms word doc 中使用 rowspan 和 colspan 创建表?

    我正在使用 APACHE POI 创建包含表的 Word 文档 表格如下所示 我想创建具有行跨度和列跨度的单元格 如图所示 可以使用 APACHE POI 吗 有没有其他java库可以实现同样的功能 任何帮助表示赞赏 你可以试试这个 pub
  • 在 Android 4.0.3 中插入​​错误 SqLite [重复]

    这个问题在这里已经有答案了 我的 Android 4 0 3v 平板电脑出现 Sqlite 问题 Error 07 28 14 28 18 495 6995 7125 com titan tablet E AndroidRuntime FA
  • 检测Python函数中的所有全局变量?

    我正在尝试分析一些混乱的代码 这些代码恰好在函数中大量使用全局变量 我正在尝试重构代码 以便函数仅使用局部变量 有没有办法检测函数内的全局变量 例如 def f x x x 1 z x y return z 这里的全局变量是y因为它不是作为
  • android活动截图如何?

    你好朋友我正在制作一个带有 webview 的应用程序 我想截取我的活动截图 目前我正在使用此代码来捕获图像 public Bitmap takeScreenshot View rootView findViewById android R
  • MySQLi 无法准备语句

    我在脚本中运行两个查询room php 两者都使用MySQLi准备好的语句 其代码如下 Get room name stmt mysqli gt prepare SELECT name FROM rooms WHERE r id stmt
  • 如何在Android中使用SmsManager发送具有自定义线程ID的短信?

    我想创建一条带有自定义线程 ID 例如 10001 的 SMS 我怎样才能做到这一点 原因是因为我需要实现删除短信功能 而删除特定短信线程的唯一方法是通过线程 ID 或电话号码 而此时获取电话号码并不完全可能 因此需要定义自定义线程 ID在
  • 如何处理应采用 https 保护的网站中的混合内容?

    我正在服务器 A 上构建一个网站 已注册域名 用于人们创建和运行他们的 应用程序 这些 应用程序 实际上是运行在服务器B上的docker容器 在容器中 有一个可以直接访问的小型Web应用程序 如下所示 http IP ADDR OF SER
  • 如何计算两个加权样本之间的 Kolmogorov-Smirnov 统计量

    假设我们有两个样本data1 and data2以及各自的权重weight1 and weight2我们想要计算两个加权样本之间的 Kolmogorov Smirnov 统计量 我们在 python 中执行此操作的方式如下 import n
  • 在 Yii 框架中包含 CSS、javascript 文件

    如何在 Yii 框架中包含 Javascript 或 CSS 文件 我想在我的网站上创建一个运行一些 Javascript 应用程序的页面 所以我想包括 js and css特定视图中的文件 像这样的事情
  • 使用另一个数组作为输入对数组进行排序[关闭]

    这个问题不太可能对任何未来的访客有帮助 它只与一个较小的地理区域 一个特定的时间点或一个非常狭窄的情况相关 通常不适用于全世界的互联网受众 为了帮助使这个问题更广泛地适用 访问帮助中心 help reopen questions 我想使用下
  • 谷歌电子表格根据其他值查找单元格

    我们正在尝试使用它 我将作为参考 我试图让单元格 X4 显示 A 列中相对于单元格 X3 中显示的 B 列最大值的数据 即在撰写本文时 最大值列为 27 这是由 Purelycraft 完成的 所以我希望它使用公式自动显示名称 Purely
  • 在其他应用程序窗口上创建按钮

    我编写了下面的代码来在计算器上创建一个额外的按钮 但该按钮不显示 var Object1 TButton Hand THandle begin Hand FindWindow CalcFrame Calculator Object1 TBu
  • 如何在 OS X 上全局设置 java 系统属性?

    短篇故事 我需要一种系统级方法来设置java awt headless财产给true 对于所有 java 调用 也就是说 使用 Djava awt headless true不是一个选项 因为 java 是从我无权访问的地方调用的 例如 从
  • 如何将树枝中的两个字符串组合在一起?

    我想做这样的事情 set c a b Where a and b是字符串 我该怎么做 做法是 set c a b
  • 隐藏 Nativescript-Angular TabView 上的选项卡按钮

    我正在尝试找到一种方法来使用 Angular 6 应用程序删除元素上的选项卡按钮 但到目前为止没有效果 基本上 我只想保留选项卡内容及其滑动功能 显然 您可以使用特定的 Android 和 iOS 方法 但我不确定如何做到这一点
  • 如何判断 NSTimer 是否处于活动状态?

    我有一个类似这样的计时器 NSTimer timer NSTimer scheduledTimerWithTimeInterval 1 0 target self selector selector updateCountdown user
  • 使用 jax-ws 生成存根失败

    我正在尝试使用 jax ws 为 WSO2 Identity Server 管理服务生成存根https xx xx xx xx 9447 services RemoteUserStoreManagerService wsdl https x