- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
AxisFault
faultCode: {http://schemas.microsoft.com/ws/2005/05/addressing/none}ActionNotSupported
faultSubcode:
faultString: The message with Action 'http://tempuri.org/addUser' 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).
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:The message with Action 'http://tempuri.org/addUser' 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).
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1789)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2965)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at InterfaceUserTest.main(InterfaceUserTest.java:84)

{http://xml.apache.org/axis/}hostname:Rubert-PC

The message with Action 'http://tempuri.org/addUser' 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).
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1789)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2965)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at InterfaceUserTest.main(InterfaceUserTest.java:84)

-------------------------------------------------------------------------------------------------------------------------------------------------------------

报上面的错误一般都是URL,参数没配置好。

解决代码:

public static void main(String[] args) {
String url = "http://tjgeo.cn:7101/OAService/idealUserService.svc?wsdl" ;
String xmlData= get() ;
Service service = new Service();
try {
Call call2 = (Call) service.createCall();
call2.setTargetEndpointAddress(url);
call2.setUseSOAPAction(true);
call2.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "string"));//设置返回参数
call2.setOperationName(new QName("http://tempuri.org/", "addUser"));//设置函数名
call2.setSOAPActionURI("http://tempuri.org/IidealUserService/addUser");//设置URI
call2.addParameter(new QName("http://tempuri.org/", "requestData"),XMLType.XSD_STRING, ParameterMode.IN); // 这里设置对应参数名称
String retVal2 = (String) call2.invoke(new Object[] { xmlData }); //调用并带上参数数据
System.out.println(retVal2);
} catch(Exception e) {
e.printStackTrace();
}
} private static String get() {
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \r\n <serialId>46667888</serialId>\r\n<usermsg><user><uid>454545</uid><userName>张三</userName><employeeNumber>31001234</employeeNumber><title>总经理</title><email>abc@ njmetro.com.cn</email><employeeType>001</employeeType><sex>M</sex><pid>012345678912345</pid><mobilePhone1>18930416789</mobilePhone1><mobilePhone2>18930416789</mobilePhone2><tel>025-12345678</tel><fax>0987654</fax><location>办公室2105</location><homeAddress>南京101</homeAddress><homePhone>025-12345678</homePhone><qq>12345678</qq><msn>12345678</msn><org><orgName>浦东电信局|外高桥金桥分局|公众客户班</orgName><orgCode>55|5500|550001</orgCode><orderNum>1</orderNum></org></user></usermsg>";
}
<wsdl:definitions name="idealUserService" targetNamespace="http://tempuri.org/">
<wsdl:types><xsd:schema targetNamespace="http://tempuri.org/Imports"><xsd:import schemaLocation="http://tjgeo.cn:7102/OAService/idealUserService.svc?xsd=xsd0" namespace="http://tempuri.org/"/><xsd:import schemaLocation="http://tjgeo.cn:7102/OAService/idealUserService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/></xsd:schema></wsdl:types><wsdl:message name="IidealUserService_addUser_InputMessage"><wsdl:part name="parameters" element="tns:addUser"/></wsdl:message><wsdl:message name="IidealUserService_addUser_OutputMessage"><wsdl:part name="parameters" element="tns:addUserResponse"/></wsdl:message><wsdl:message name="IidealUserService_deleteUser_InputMessage"><wsdl:part name="parameters" element="tns:deleteUser"/></wsdl:message><wsdl:message name="IidealUserService_deleteUser_OutputMessage"><wsdl:part name="parameters" element="tns:deleteUserResponse"/></wsdl:message><wsdl:message name="IidealUserService_updateUser_InputMessage"><wsdl:part name="parameters" element="tns:updateUser"/></wsdl:message><wsdl:message name="IidealUserService_updateUser_OutputMessage"><wsdl:part name="parameters" element="tns:updateUserResponse"/></wsdl:message><wsdl:portType name="IidealUserService"><wsdl:operation name="addUser"><wsdl:input wsaw:Action="http://tempuri.org/IidealUserService/addUser" message="tns:IidealUserService_addUser_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IidealUserService/addUserResponse" message="tns:IidealUserService_addUser_OutputMessage"/></wsdl:operation><wsdl:operation name="deleteUser"><wsdl:input wsaw:Action="http://tempuri.org/IidealUserService/deleteUser" message="tns:IidealUserService_deleteUser_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IidealUserService/deleteUserResponse" message="tns:IidealUserService_deleteUser_OutputMessage"/></wsdl:operation><wsdl:operation name="updateUser"><wsdl:input wsaw:Action="http://tempuri.org/IidealUserService/updateUser" message="tns:IidealUserService_updateUser_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IidealUserService/updateUserResponse" message="tns:IidealUserService_updateUser_OutputMessage"/></wsdl:operation></wsdl:portType><wsdl:binding name="BasicHttpBinding_IidealUserService" type="tns:IidealUserService"><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="addUser"><soap:operation soapAction="http://tempuri.org/IidealUserService/addUser" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="deleteUser"><soap:operation soapAction="http://tempuri.org/IidealUserService/deleteUser" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="updateUser"><soap:operation soapAction="http://tempuri.org/IidealUserService/updateUser" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="idealUserService"><wsdl:port name="BasicHttpBinding_IidealUserService" binding="tns:BasicHttpBinding_IidealUserService"><soap:address location="http://tjgeo.cn:7102/OAService/idealUserService.svc"/></wsdl:port></wsdl:service></wsdl:definitions>

上面重要的信息都标成粉了,可以可以留意一下。

参考资料:

http://com-zyq.iteye.com/blog/2033602

http://blog.csdn.net/xw13106209/article/details/7067495

[Java - 调用WebService]{http://schemas.microsoft.com/ws/2005/05/addressing/none}ActionNotSupported的更多相关文章

  1. A claim of type 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier' or 'http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider' was not present on the pro

    Try setting (in global.cs): AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.NameIdentifier; ...

  2. Java调用WebService方法总结(1)--准备工作

    WebService是一种跨编程语言.跨操作系统平台的远程调用技术,已存在很多年了,很多接口也都是通过WebService方式来发布的:本系列文章主要介绍Java调用WebService的各种方法,使 ...

  3. Java调用WebService方法总结(9,end)--Http方式调用WebService

    Http方式调用WebService,直接发送soap消息到服务端,然后自己解析服务端返回的结果,这种方式比较简单粗暴,也很好用:soap消息可以通过SoapUI来生成,也很方便.文中所使用到的软件版 ...

  4. Java调用WebService方法总结(2)--JAX-WS调用WebService

    用JAX-WS(Java API for XML Web Services)调用WebService不需要引入其他框架,都是JDK自带的:文中所使用到的软件版本:Java 1.8.0_191.Dom4 ...

  5. Java调用webservice接口方法

                             java调用webservice接口   webservice的 发布一般都是使用WSDL(web service descriptive langu ...

  6. java 调用webservice的各种方法总结

    java 调用webservice的各种方法总结 几种流行的开源WebService框架Axis1,Axis2,Xfire,CXF,JWS比较 方法一:创建基于JAX-WS的webservice(包括 ...

  7. java调用webservice,restful

    java调用webservice public String redoEsb(String loguid, String user, String comments, String newMsg, S ...

  8. Java调用WebService方法总结(8)--soap.jar调用WebService

    Apache的soap.jar是一种历史很久远的WebService技术,大概是2001年左右的技术,所需soap.jar可以在http://archive.apache.org/dist/ws/so ...

  9. Java调用WebService方法总结(7)--CXF调用WebService

    CXF = Celtix + XFire,继承了Celtix和XFire两大开源项目的精华,是一个开源的,全功能的,容易使用的WebService框架.文中所使用到的软件版本:Java 1.8.0_1 ...

随机推荐

  1. web worker 实践

    1.web worker 在浏览器中JavaScript主线程与UI渲染线程是互斥的.即UI渲染线程会阻塞JavaScript线程的运行. web worker允许创建工作线程,并可以与JavaScr ...

  2. PMP的六大管理学定律

    ★墨菲定律PMP考试六大管理学定律之1-PMP专业辅导 1.什么是墨菲定律?最简单的表达形式是“有可能出错的事情,就会出错(Anything that can go wrong will go wro ...

  3. [Nescafé41]异化多肽(多项式求逆元)

    2015年的题,应该是将形式幂级数引入国内的元老级题目. 大意:给定一个大小为m的正整数序列和n,问有多少种选法可以凑成n,每个数可以选多次,种类不同算不同方案.$n,m,C \leqslant 10 ...

  4. 【2-SAT(最小字典序/暴力染色)】HDU1814-Peaceful Commission

    [题目大意] 和平委员会每个党派有2个人,只能派出其中1个,其中有一些人之间互相讨厌不能同时派出.求出派遣方案,如果有多种方案输出字典序最小的方案. [思路] 最小字典序只能用暴力染色.初始时均没有染 ...

  5. 【枚举+贪心】POJ2718-Smallest Difference

    [题目大意] 按升序输出几个不同的数字,任意组成两个数字,输出最小的差值. [思路] 虽然是在穷竭搜索的章节里找到的题目,但是我觉得不需要穷竭搜索,枚举一下就可以了,0MS.分为一下三种情况: (1) ...

  6. Spring p名称空间配置属性

    1.p 名称空间介绍 从 2.0开始,Spring支持使用名称空间的可扩展配置格式.这些名称空间都是基于一种XML Schema定义.事实上,我们所看到的所有bean的配置格式都是基于一个 XML S ...

  7. ACM/CF赛制getstart模板

    (包含整型变量快速读入.简易循环和连续容器的迭代器循环的宏定义.调试时的运行时间输出(编译选项应有“DEBUG”宏定义)等)  1 /*================================ ...

  8. [转]SSH整合 简单的增删改查

      Database 使用 Mysql , 建立User 表 CREATE TABLE `user` ( `id` int(11) NOT NULL, `firstName` varchar(20)  ...

  9. Sys.dm_os_wait_stats Sys.dm_performance_counters

    wait_type waiting_tasks_count wait_time_ms max_wait_time_ms signal_wait_time_ms MISCELLANEOUS 0 0 0 ...

  10. 微软浏览器兼容工具modern.IE

    http://www.browserstack.com/screenshots