- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 SOAP 新手,无法弄清楚问题出在哪里。我看过similar SO post但不幸的是这没有帮助。错误信息是:
WARNING: Interceptor for {http://bbbts/Service}Service#{http://bbbts/Service}ConfirmAStatus has thrown exception, unwinding now
IllegalArgumentException: Part {http://bbbts/Service}parameters should be of type package.ConfirmAStatusResponse, not package.ConfirmAStatus
我在 Camel 中配置了端点,如下所示:
CxfEndpoint cxfEndpoint = new CxfEndpoint();
cxfEndpoint.setAddress("http://0.0.0.0:8888/aaans/services/Service");
cxfEndpoint.setWsdlURL("Service.wsdl");
cxfEndpoint.setCamelContext(camelContext);
cxfEndpoint.setBus(bus);
cxfEndpoint.setServiceNameString("bbbts:Service");
cxfEndpoint.setDefaultOperationName("ConfirmAStatus");
cxfEndpoint.setDefaultOperationNamespace("http://bbbts/Service");
try {
cxfEndpoint.setServiceClass("package.Service");
} catch (ClassNotFoundException e1) {
}
cxfEndpoint.setDataFormat(DataFormat.POJO);
我已经通过 cxf-codegen 生成了 Service 类,它看起来像这样:
@WebService(targetNamespace = "http://bbbts/Service", name = "Service")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Service {
@WebMethod(operationName = "ConfirmAStatus", action = "http://aaans/2012/nsv1/ConfirmARecallStatus")
@Action(input = "http://aaans/2012/nsv1/ConfirmProductBatchRecallStatus", output = "http://aaans/2012/nsv1/ConfirmAStatusResponse")
@WebResult(name = "ConfirmAStatusResponse", targetNamespace = "http://aaans/2012/", partName = "parameters")
public ConfirmAStatusResponse confirmAStatus(
@WebParam(partName = "parameters", name = "ConfirmAStatus", targetNamespace = "http://aaans/2012/")
ConfirmAStatus parameters
);
.... ConfirmBStatusResponse ...
我继承了 WSDL 文件,但没有任何使用 WSDL 文件的经验,因此请让我知道哪些部分会有所帮助。这是wsdl文件中的操作:
<wsdl:operation name="ConfirmAStatus">
<wsdl:input wsaw:Action="http://aaans/2012/nsv1/ConfirmAStatus" message="tns:Service_ConfirmAStatus_InputMessage"/>
<wsdl:output wsaw:Action="http://aaans/2012/nsv1/ConfirmAStatusResponse" message="tns:Service_ConfirmAStatus_OutputMessage"/>
</wsdl:operation>
我对错误消息很不理解。该函数的参数类型显然是ConfirmAStatus 类型,而不是错误消息中声明的...StatusResponse 类型。我尝试添加默认操作 namespace ,如另一篇 SO 帖子中提到的,但无济于事。我什至不知道它是否与 namespace 有关。如果有人能指出我可以尝试解决这个问题的方向,我将非常感激。
编辑:添加 wsdl:message 部分
<wsdl:message name="Service_ConfirmAStatus_InputMessage">
<wsdl:part name="parameters" element="q1:ConfirmAStatus" xmlns:q1="hhttp://aaans/2012/"/>
</wsdl:message>
<wsdl:message name="Service_ConfirmAStatus_OutputMessage">
<wsdl:part name="parameters" element="q2:ConfirmAStatusResponse" xmlns:q2="http://aaans/2012/"/>
</wsdl:message>
最佳答案
错误消息表明参数 parameters
的类型为 ConfirmAStatus
,但应为 ConfirmAStatusResponse
类型
由于您的实现需要类型 ConfirmAStatus
ConfirmAStatus parameters
我怀疑 WSDL 中输入消息的定义是错误的,但这部分内容未包含在您的问题中。
您可能有这样的消息定义
<wsdl:message name="Service_ConfirmAStatus_InputMessage">
<wsdl:part name="NameOfTheElement" element="ReferenceToTheSchemaElementThatRepresentsThisMessagePart"/>
</wsdl:message>
在此示例中,ReferenceToTheSchemaElementThatRepresentsThisMessagePart
的 XML 架构定义似乎是 ConfirmAStatus
类型,而不是 ConfirmAStatusResponse
关于java - Camel CXF 抛出 Part{example.com} 参数应该是 X 类型而不是 Y 类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51208262/
我正在使用 Mechanize 配置 ssl , 根据 document我需要设置 agent.cert = 'example.cer' agent.key='example.cer' 但是我怎样才能
我有一个表格,允许人们将士兵添加到列表中,该列表可以很好地传输到 mysql。如果我在没有变量的情况下这样做甚至很好,但是一旦我尝试添加一个如下所示。 // Get Variable from Loc
使用 .htaccess 重写,我想要: http://example.com 重定向到:http://www.example.comhttps://www.example.com 重定向到:http
我想将所有流量重定向到 https://www.sitename.com 例子 http://sitename.com --> https://www.sitename.com http://www.
我只有 example.com 的 SSL 证书,并且想同时重定向 http://example.com和 http://*.example.com 到 https://example.com使用 n
我有服务器 A,它托管我们在 www.example.com 上的主要站点;我们有一个涵盖 *.example.com 的 SSL 证书。 在我们网站的安全部分,我们希望向我们编写并托管在单独机器/I
我正在努力平衡多行上的一些文本,并且我正在添加手动换行符以将文本均匀地分割在各行上。为了弄清楚这一点,我需要查看在哪里添加“\n”来测试我的代码,但我发现的唯一方法是将其全部打印为字符: ["T",
我在我们的域中安装了 Apache 和 Tomcat 服务器,因为我有超过 25 个服务,一些服务由 Apache 处理,一些服务由 Tomcat 处理。 tomcat 服务显示 http://exa
编辑:问题终于解决了。详细信息可以在此消息末尾的疑难解答部分中找到。 我在这里保留了详细的步骤,以防可能对某人有所帮助。 设置OpenLDAP I-创建服务器 该文档通常已经过时,并且您会找到多种实现
这个问题在这里已经有了答案: offsetting an html anchor to adjust for fixed header [duplicate] (28 个答案) 关闭 8 年前。
目前谷歌将我的网站链接显示为... example.com/ ...但是,我希望它显示为... example.com 我确实有以下元数据 ...下面是我的 htaccess 文件... Index
我使用 Microsoft Visual Studio 2012。当我将代码示例放入 C# 类/方法的 XML 注释中时,我想知道:引用我的程序集的用户将如何看到该代码示例? 我试图引用我自己的程序集
我对正则表达式还很陌生,无法真正弄清楚它是如何工作的。我试过这个: function change_email($email){ return preg_match('/^[\w]$/', $e
我正在使用 Hibernate 版本 4.3.5.Final。这里的问题是 Hibernate 找到 Foo 类型的实体,其中属性 address 的大小写不同(例如“BLAFOO”)。但是,在我的示
我为环境特定变量(如用户名和密码)设置了一个环境 YAML 文件。要在我的应用程序中使用这些变量,我需要使用 APP_CONFIG['username']而不是 APP_CONFIG[:usernam
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
这个问题在这里已经有了答案: Does Python have a string 'contains' substring method? (10 个答案) 关闭 8 年前。 我想检查发件人 hea
我已经在 https://arieldemian.it 上配置了 SSL/TLS但似乎https://www.arieldemian.it不安全。这是为什么?我需要注册他们两个吗?我正在使用 http
当我使用 ProGuard 时,com.example.** 和 com.example.**{*;} 之间的区别是什么?例如,每种情况会发生什么情况? -keep class com.examp
我的主页的内容是根据使用 slug“home”对数据库的查询提取的。例如,如果我在地址栏中输入 example.com/home,它会根据看到的“/home”查询数据库并提取正确的内容(使用变量“$p
我是一名优秀的程序员,十分优秀!