使用Axis 调用 .net c#提供的webservise接口 急!
使用Axis 调用 .net c#提供的webservise接口这是通过IE访问url返回的值
<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://tempuri.org/">{\rtf1\ansi\ansicpg936\deff0\ deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fcharset134 \cb\ce\cc\e5;}{\f1\fnil\fcharset134 ;}} \viewkind4\uc1\pard\lang2052\f0\fs18{\object\objemb{\*\objclass AutoCAD.Drawing.15}\objw6960\objh5307{\*\objdat a 01050000 02000000 13000000 4175746f4341442e44726177696e672e313500 00000000 00000000 00 380000 d0cf11e0a1b11ae1000000000000000000000000000000003e000300f eff090006000000000000 </string>
这是调用的程序
String namespace = "http://tempuri.org/";
String actionMethod = "GetPictureInfoByID";
Service service = new Service();
Call call = (Call) service.createCall();
call.setUseSOAPAction(false);
call.setTargetEndpointAddress(new URL("http://10.136.122.30/YZInte易做图ce/YZService.asmx"));
call.setTimeout(new Integer(15*1000));
call.setOperationName(new QName(namespace ,actionMethod));
call.addParameter(new QName(namespace, "id"), Constants.SOAP_STRING, ParameterMode.IN);
call.setReturnType(Constants.SOAP_STRING);
call.setUseSOAPAction(true);
call.setSOAPActionURI(namespace + actionMethod);
Object o = call.invoke(new Object[]{"80450"});
System.out.println(o);
这个程序报的错误信息
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: Character reference "�" is an invalid XML character.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: Character reference "�" is an invalid XML character.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) --------------------编程问答-------------------- 自己顶上 --------------------编程问答-------------------- 楼主问题解决了没有啊,说说经验,我也遇到了这样的问题
补充:Java , Web 开发