- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 JAX-WS RI 与第三方 Web 服务 (Adyen) 集成。我已经下载了他们的 wsdl 副本,并在我的构建中使用了 jaxws:wsdl2java
来生成 Web 服务实现源代码。在运行时,当我尝试通过调用自动生成的付款服务类的 getPort() 方法来设置端口时,我收到以下异常,声称有一个方法已公开,但它不存在于 wsdl portType 元素中:
javax.xml.ws.WebServiceException: Method adjustAuthorisation is exposed as WebMethod, but there is no corresponding wsdl operation with name {http://payment.services.adyen.com}adjustAuthorisation in the wsdl:portType{http://payment.services.adyen.com}PaymentPortType
但是,它存在于 portType 元素中。这是 wsdl 的相关片段:
<wsdl:portType name="PaymentPortType">
<wsdl:operation name="adjustAuthorisation">
<wsdl:input name="adjustAuthorisationRequest" message="tns:adjustAuthorisationRequest" />
<wsdl:output name="adjustAuthorisationResponse" message="tns:adjustAuthorisationResponse" />
<wsdl:fault name="ServiceException" message="tns:ServiceException" />
</wsdl:operation>
...
</wsdl:portType>
完整的 wsdl 可以在这里看到:https://pal-live.adyen.com/pal/servlet/Payment/v30?wsdl
wsdl 包含在类路径为/wsdl/Payment.wsdl 的目标 jar 中。我在配置类中使用此代码在运行时加载它:
URL wsdl = getClass().getResource(wsdlLocation);
onlineService = new Payment(wsdl, new QName(serviceUrl, serviceName));
其中 serviceUrl = "http://payment.services.adyen.com"
和 serviceName = "Payment"
匹配 wsdl。
最后,这是我尝试打开端口并最终得到异常的代码片段:
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
try
{
port = config.getOnlineService().getPaymentHttpPort(); // exception thrown here
}
finally
{
Thread.currentThread().setContextClassLoader(oldClassLoader);
}
为什么它似乎误读了 wsdl?另一个可能重要的信息是我最近更新了 wsdl,之前我的应用程序使用 Adyen API 的版本 12 和相应的 wsdl,现在我升级到版本 30。该应用程序使用之前的相同代码运行良好。
最佳答案
您用于生成类的 wsdl 文件与您在运行时加载的 wsdl 文件不匹配。
adjustAuthorisation
。adjustAuthorization
方法。关于javax.xml.ws.WebServiceException : Method X is exposed as WebMethod, 但是没有对应的wsdl操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63850416/
我之前已经使用以下完全相同的代码片段成功注册了一个模型: #register model from azureml.core.model import Model register_model = M
我创建了一个使用 Web 服务来登录、注册、添加和编辑客户的应用程序。当我在部署 Web 服务后运行应用程序时,它会在应用程序的控制台中抛出一个名为 webServiceException 的异常。这
我目前在使用 Websphere 7.0.0.27 和使用 org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean 的特定 Web 服
我正在尝试使用 jax-ws 进行动态 WS 调用。 但是我无法创建调度程序,代码是: String namespace= "http://wsf.cdyne.com/WeatherWS/Weathe
我迫切需要帮助来弄清楚为什么我的应用程序没有创建网络服务。 这是我的网络服务 Java 类: @WebService @Component public class LoginWs ext
我有一个类似这样的 Controller 方法: public class FooController : Controller { private IApi api; public
我做了一个 SOAP 客户端,我收到了下一个答案: javax.xml.ws.WebServiceException: no response returned. at com.sun.xml
我希望使用 Travelport Universal API 来开发航类预订系统,因此我使用了此 Travelport 开发人员官方链接作为引用: Getting Started for Travel
在我的 ServiceStack 服务中,我抛出了一个具有内部异常的异常。当我在客户端捕获 WebServiceRequest 时,ErrorCode 是内部异常类型名称。 这对我不利,因为它不允许我
我在调用 SOAP Web 服务时收到以下错误 Caused by: javax.xml.ws.WebServiceException: Could not find service named {h
我有已注入(inject)服务的 REST 端点。 @Singleton @Path("/v1/service") public class MyService { @Inject p
我有 3 个使用 netbean 6.9 创建的 Web 服务 当我在工作时在我的电脑上工作时,它运行顺利,没有错误。但是,当我将 netbean 项目复制到家中的计算机时,它运行时出现错误,如下所示
我正在使用 JAX-WS RI 与第三方 Web 服务 (Adyen) 集成。我已经下载了他们的 wsdl 副本,并在我的构建中使用了 jaxws:wsdl2java 来生成 Web 服务实现源代码。
在 java 文件中导入 javax.xml.ws.WebServiceException; 时,出现编译错误 cannot resolve symbol ws. 我已经清理并安装了 POM.xml
我正在使用 JAX-WS RI 与第三方 Web 服务 (Adyen) 集成。我已经下载了他们的 wsdl 副本,并在我的构建中使用了 jaxws:wsdl2java 来生成 Web 服务实现源代码。
我在使用 Apache CXF 生成的类 (wsdl2java) 访问 Web 服务时遇到问题。 一切正常,直到网络服务提供商突然更改了他们防火墙上的规则并关闭了我们。他们说的是他们不再允许 http
我有一个 wsdl 文件,很多 xsd 文件,jxb 绑定(bind)文件。我使用 Apache CXF cxf-codegen-plugin 创建了一个 Web 服务客户端。 Java 类的创建没有
我正在运行 Spring Boot 应用程序 (mvn:spring-boot:run) 并获取下一个堆栈跟踪: \\/ ___)| |_)| | | | | || (_| | ) ) ) )
我正在创建 Jersey Web 服务,我发现自己使用了上述两种异常类型。 WebServiceException 的构造函数允许您传递一个 String 作为原因,而 WebApplicationE
我使用 CXF 开发了网络服务。今天我为 Web 服务添加了简单的用户名 token 安全性。之后,当我尝试部署 Web 服务时出现以下异常 javax.xml.ws.WebServiceExcept
我是一名优秀的程序员,十分优秀!