错误信息如下:- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client faultSubcode: faultString: Server did not recognize the value of HTTP Header SOAPAction: . faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:Server did not recognize the value of HTTP Header SOAPAction: . at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1573) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) 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:424) 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:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.colorme.diy.cmcc.ZJCmccClient.main(ZJCmccClient.java:112) {http://xml.apache.org/axis/}hostname:OKServer did not recognize the value of HTTP Header SOAPAction: . at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1573) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.content(Parser2.java:1824) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534) at org.apache.crimson.parser.Parser2.parse(Parser2.java:318) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) 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:424) 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:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at com.colorme.diy.cmcc.ZJCmccClient.main(ZJCmccClient.java:112)
你用Axis的WSDL2Java生成客户端代码,这样可以早期绑定,访问Web服务,我想你一定用的是Axis1.3,Axis1.3的Soap实现跟1.2有区别,你可以downgrade到Axis1.2,当然,这不是个好主意,你可以用Axis2.0,这是最新的了,应该是Axis2 0.94版本,它是document based soap implementation,可以解决你上述说的问题
Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). 就是说,你缺少这2个Jar包。 去下载,并放在lib里,就可以了!
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Server did not recognize the value of HTTP Header SOAPAction: .
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Server did not recognize the value of HTTP Header SOAPAction: .
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1573)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:318)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
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:424)
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:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.colorme.diy.cmcc.ZJCmccClient.main(ZJCmccClient.java:112) {http://xml.apache.org/axis/}hostname:OKServer did not recognize the value of HTTP Header SOAPAction: .
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1573)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:318)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
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:424)
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:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.colorme.diy.cmcc.ZJCmccClient.main(ZJCmccClient.java:112)
就是说,你缺少这2个Jar包。 去下载,并放在lib里,就可以了!