---
title: "解决The message with Action '' cannot be processed at the receiver, due "
author: "com_zyq"
date: "2014-03-19T16:19:23Z"
tags: []
categories: ["行业应用"]
slug: "the-message-with-action-cannot-be-processed-at-the-receiver-due"
draft: false
lastmod: "2014-03-19T16:21:12Z"
id: 2033602
url: "https://com-zyq.iteye.com/blog/2033602"
---

我是JAVA调用.NET SVC的接口
一直报错
AxisFault
 faultCode: {http://schemas.microsoft.com/ws/2005/05/addressing/none}ActionNotSupported
 faultSubcode: 
 faultString: The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

这个是我要调用的WSDL http://11.18.2.3/OutService.svc?wsdl
调用的服务名是: OutService
函数是:selectName

设置几个地方:
call.setOperationName(new javax.xml.namespace.QName("http://tempuri.org/", operationName));   

call.addParameter(new javax.xml.namespace.QName("http://tempuri.org/", "对方参数名"), org.apache.axis.encoding.XMLType.XSD_STRING, String.class, javax.xml.rpc.ParameterMode.IN);


call.setUseSOAPAction(true); 
call.setSOAPActionURI("http://tempuri.org/OutService/selectName);