我正在尝试使用托管在TOMCAT上的java应用程序来调用webservice(SOAP1.2)。使用AXIS2生成了客户端。当我调用WS方法时,我正在低于错误。
org.apache.axis2.AxisFault:传输错误:415错误:无法处理 消息因为内容类型' application / soap + xml; 字符集= UTF-8;行动=" XXXXXXXXXXXX.SearchByName"'不是 预期类型' application / soap + msbin1' 在org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310) 在org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194) 在org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) 在org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404) 在org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231) 在org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443) 在org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) 在org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) 在XXXXXXXXXXXX.SearchByName(RelmgmtTool_WebService_BANDStub.java:937) 在XXXXXXXXXXXX.SearchACCLServiceImpl.searchACCL(SearchACCLServiceImpl.java:281) 在XXXXXXXXXXXX.ACCLSearchAction.execute(ACCLSearchAction.java:392) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在java.lang.reflect.Method.invoke(Method.java:597) 在com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452) 在com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) 在com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) 在com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) 在org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) 在com.ml.grci.webapp.interceptor.GcbParamInterceptor.intercept(GcbParamInterceptor.java:81) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) 在com.ml.grci.webapp.interceptor.SessionCheckInterceptor.intercept(SessionCheckInterceptor.java:120) 在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) 在org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) 在org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在com.ml.framework.webapp.filter.StaticFilter.doFilterInternal(StaticFilter.java:124) 在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在com.ml.framework.webapp.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:78) 在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在org.acegisecurity.util.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:265) 在org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110) 在org.acegisecurity.util.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) 在org.acegisecurity.util.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166) 在org.acegisecurity.util.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) 在org.acegisecurity.util.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) 在org.acegisecurity.util.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:275) 在org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) 在org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) 在org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在com.ml.framework.webapp.filter.TimerFilter.doFilter(TimerFilter.java:46) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 在org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) 在org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:606) 在org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:489) 在java.lang.Thread.run(Thread.java:662)
请帮忙。
答案 0 :(得分:0)
你有没有尝试降级你的轴肥皂uri?
stub._getServiceClient()
.getOptions()
.setSoapVersionURI(
SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);