- 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. 【Go】基础语法之接口

    接口定义: 利用关键字interface来定义一个接口,接口是一组方法的集合. 例如: type People interface { Show(name string, age int) (id i ...

  2. python Tkinter 写一个弹球的小游戏

    #!usr/bin/python #-*- coding:utf-8 -*- from Tkinter import * import Tkinter import random import tim ...

  3. [BZOJ5251][九省联考2018]劈配(网络流)

    5251: [2018多省省队联测]劈配 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 33  Solved: 22[Submit][Status][ ...

  4. C++中的读入输出优化及清新脱俗的宏命令

    C和C++有了#define,从此它就变了模样 宏命令就是#define,#if,#error之类的 本文主要介绍宏命令和相关的骚操作 读入输出优化 inline int read() { int a ...

  5. HDU 6035 Colorful Tree (树形DP)

    [题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=6035 [题目大意] 给出一颗树,一条路径的价值为其上点权的种类数,求路径总价值 [题解] 我们计算 ...

  6. 【动态规划】Gym - 101201A - Alphabet

    题意:一个字符串被定义为“alphabetical”,当且仅当它能够删除一些字符,变成“ab...yz”,给你一个只由小写字母组成的字符串,问你最少插入几个字母,使它变成“alphabetical”的 ...

  7. [洛谷P3809]【模板】后缀排序

    [洛谷P3809][模板]后缀排序 题目大意: 对于给定的长度为\(n(n\le10^6)\)的字符串求后缀数组\(sa[i]\). 思路: 倍增+快排构造后缀数组.代码参考<挑战程序设计竞赛& ...

  8. linux 配置信息

    # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/cpuinfo # 查看CPU信息 # hostn ...

  9. ps制作导航条 分割线技巧

    1 用矩形工具画一个像素的矩形(注意不是路径) 2给矩形添加蒙版,用渐变工具对其进行渐变,达到两头渐隐藏的效果. 制作按钮技巧 用矩形工具画出矩形 然后给矩形添加 内发光 渐变叠加 光泽  描边等操作 ...

  10. NHibernate 之数据操作 (第五篇)

    数据操作,在这里主要介绍INSERT.UPDATE.DELETE.我们在使用NHibernate的时候,如果只是查询数据,不需要改变数据库的值,那么是不需要提交或者回滚到数据库的. 一.INSERT ...