javax.xml.ws.soap.SOAPFaultException: java.net.URL cannot be cast to java.lang.String at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157) at com.sun.proxy.$Proxy83.importCapturedData(Unknown Source) at com.flipkart.dynamics.api.DynamicsClientService.handleDataLoadRequest(DynamicsClientService.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.flipkart.recon.api.filter.ContentTypeFilter.doFilter(ContentTypeFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:695) Caused by: java.lang.ClassCastException: java.net.URL cannot be cast to java.lang.String at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:99) at org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63) at org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:886) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:560) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) ... 41 more [2014-01-28 16:07:44.572] ERROR [http-bio-8082-exec-2][ContentTypeFilter][ContentTypeFilter.java:93] Unhandled Exception. javax.xml.ws.soap.SOAPFaultException: java.net.URL cannot be cast to java.lang.String at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157) ~[cxf-2.7.8.jar:2.7.8] at com.sun.proxy.$Proxy83.importCapturedData(Unknown Source) ~[na:na] at com.flipkart.dynamics.api.DynamicsClientService.handleDataLoadRequest(DynamicsClientService.java:109) ~[DynamicsClientService.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_65] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_65] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_65] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_65] at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350) ~[jersey-server-1.14.jar:1.14] at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) ~[jersey-servlet-1.14.jar:1.14] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) ~[jersey-servlet-1.14.jar:1.14] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) ~[jersey-servlet-1.14.jar:1.14] at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) ~[servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.47] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.47] at com.flipkart.recon.api.filter.ContentTypeFilter.doFilter(ContentTypeFilter.java:73) ~[ContentTypeFilter.class:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.47] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.47] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.47] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [catalina.jar:7.0.47] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:7.0.47] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.47] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [catalina.jar:7.0.47] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) [catalina.jar:7.0.47] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.47] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.47] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) [tomcat-coyote.jar:7.0.47] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) [tomcat-coyote.jar:7.0.47] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) [tomcat-coyote.jar:7.0.47] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [na:1.6.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [na:1.6.0_65] at java.lang.Thread.run(Thread.java:695) [na:1.6.0_65] Caused by: java.lang.ClassCastException: java.net.URL cannot be cast to java.lang.String at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:99) ~[cxf-2.7.8.jar:2.7.8] at org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63) ~[cxf-2.7.8.jar:2.7.8] at org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:886) ~[cxf-2.7.8.jar:2.7.8] at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:560) ~[cxf-2.7.8.jar:2.7.8] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474) ~[cxf-2.7.8.jar:2.7.8] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377) ~[cxf-2.7.8.jar:2.7.8] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330) ~[cxf-2.7.8.jar:2.7.8] at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) ~[cxf-2.7.8.jar:2.7.8] at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) ~[cxf-2.7.8.jar:2.7.8] ... 41 common frames omitted
下面是我正在使用的代码:
try
{
wsdlURL =
new URL("some http url with requiring basic authentication");
}
catch (MalformedURLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(wsdlURL);
OPSRequestManagement opsRequestManagement = new OPSRequestManagement(wsdlURL, SERVICE_NAME);
OPSRequestManagementPort opsRequestManagementPort = opsRequestManagement.getOPSRequestManagementPort();
Map<String, Object> req_ctx = ((BindingProvider) opsRequestManagementPort).getRequestContext();
req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsdlURL);
Map<String, List<String>> headers = new HashMap<String, List<String>>();
headers.put("Username", Collections.singletonList("domain\\username"));
headers.put("Password", Collections.singletonList("password"));
req_ctx.put(MessageContext.HTTP_REQUEST_HEADERS, headers);
boolean resp;
List<CapturedData> capturedDataList = dynamicsDao.getCapturedData(startDate.getTime(), endDate.getTime());
FKPG fkpg = new FKPG();
fkpg.getContent().addAll(capturedDataList);
resp = opsRequestManagementPort.importCapturedData(fkpg);
@sadhu的回答为我自己的问题指明了正确的方向,但对我的口味来说太神秘了。
请看以下片段:
wsdlURL = new URL("some http url with requiring basic authentication");
这告诉我们wsdlURL属于java.net.url
类型。接下来我们发现:
Map<String, Object> req_ctx = ((BindingProvider) opsRequestManagementPort).getRequestContext();
req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsdlURL);
req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsdlURL.toExternalForm());
我有一个基于ofbizsoap的web服务,它是公开的(可以接受请求),并且生成了WSDL代码和WSDL URL。我的问题是,有没有一种方法可以使用CXF Java客户端或JAX-WS客户端使用此web服务? 总的来说,我希望能够将客户机添加到Mule esb组件中,作为Mule流的一部分。我可以使用AXIS2调用Obiz web服务,但Mule ESB似乎不支持AXIS2,这给我带来了另一个问题
我尝试在weblogic服务器上部署使用Spring apache cxf的应用程序。我一直收到这条错误消息: javax。servlet。ServletException:Servlet类:org。阿帕奇。cxf。运输servlet。CXFServlet’不实现javax。servlet。weblogic上的Servlet。servlet。内部的StubSecurityHelper$Servle
这是示例代码。在使用mockito或@Beofre注释之前,一切似乎都很好。现在它可以正确地模拟对象,但某些工厂没有正确地自动连接。 在莫基托之前,一切都很顺利。
我第一次面对的问题很小。我试图使用一个简单的useState,但出于某种原因,我不明白为什么React会给我一个错误,不管我想做什么--没有什么能修复它。 这是错误的图像:错误描述: 错误:无效的钩子调用。钩子只能在函数组件的主体内部调用。这可能是由于以下原因之一:1.React和呈现器(例如React DOM)2的版本可能不匹配。你可能违反了钩子3的规则。在同一个应用程序中可能有多个React副
通过io的requestAbs方法调用/调用/使用REST API的vertx实现。vertx。果心http。vertx-core-3.2.0中的HttpClient类。jar导致HTTP错误::302,响应数据为HTML Erro响应。 不确定requestAbs方法的行为,因为没有引发异常,也没有写入任何日志。此外,还随附了使用vertx JAR的此方法的源代码。如果方法实现有bug,是否有问
我们正在尝试开发一个自调用的lambda来成批处理S3文件。lambda角色具有附加调用所需的策略。 以下是自调用lambda的代码: 其中是对同一个lambda的调用调用。其余的事情都按预期工作,只要调用堆栈出现在这个调用请求上,它就会超时: 这是记录到CloudWatch的堆栈跟踪: