- 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. 每日一刷(2018多校水题+2016icpc水题)

    11.9 线段树 http://acm.hdu.edu.cn/showproblem.php?pid=6315 求逆序对个数 http://acm.hdu.edu.cn/showproblem.php ...

  2. RabbitMQ (十四) 普通集群

    上篇文章把单机集群搭建好了,可以开始验证普通集群的相关功能了. 我们首先在管理后台(15672,15673 都可以)添加一个用户,并用新用户登录,添加一个虚拟主机 由于是在一台机器上模拟集群,所以我们 ...

  3. CSS排版常用值指南

    高对比度是确保网页阅读无障碍的关键,但也往往会被过分强调. 白底黑子会让打断文本显得过分密集,反而影响可读性. 文字颜色 3b4348 链接颜色 235ea7 衬线字体 font-family: &q ...

  4. [USACO 2016 Dec Gold] Tutorial

    Link: 传送门 A: 贪心从小到大插入,用并查集维护连通性 #include <bits/stdc++.h> using namespace std; #define X first ...

  5. 【凸包】【三分】Gym - 101309D - Dome of Circus

    容易发现,圆锥体积和点的具体x.y坐标无关,只与其到z轴的距离sqrt(x*x+y*y)有关. 于是将这些三维的点都投射到二维的xOy平面的第二象限(sqrt(x*x+y*y),z),求个上凸壳,然后 ...

  6. 免费网站监控服务阿里云监控,DNSPod监控,监控宝,360云监控使用对比

    网站会因为各种原因而导致宕机,具体表现为服务器没有响应,用户打不开网页,域名解析出错,搜索引擎抓取页面失败,返回各种HTTP错误代码.网站宕机可能带来搜索引擎的惩罚,网站服务器不稳定与百度关系文章中就 ...

  7. 手Q游戏中心上线 完美释放娱乐基因

        今年A股市场上手游概念股的表现可谓“独当一面”,不少和手游沾边的公司股价都翻了倍.在笔者看来,这些手游企业的股价明显高得离谱,这轮行情可以证明资本市场对手游的关注度非常高,但并不意味着这些手游 ...

  8. FIREDAC用于LINUX报头文件FireDAC.VCLUI.Wait找不到

    FIREDAC用于LINUX报头文件FireDAC.VCLUI.Wait找不到 FIREDAC LINUX下面,此控件 此属性 必须设为CONSOLE.  默认值只能用于WINDOWS操作系统.

  9. localstorge的缓存写法(超过一定时间自动清空)

    使用缓存: (设置缓存,尽量用大写,下划线的写法) const ls = { set: function (variable, value, ttl_ms) { var data = {value: ...

  10. iOS:对GCD中 同步、异步、并行、串行的见解

    1.GCD-同步执行多线程时          GCD中不管向什么类型的队列加同步任务,实际上都会加到当前线程中(一般为主线程). 2.GCD-异步执行多线程时          GCD中不管向什么类 ...