当前项目要求使用java调用.net webservice。在网上search不到太多相关的资源,只能自己慢慢试了。经过长达一周的联调,终于实现。Java Clientimport javax.xml.namespace.QName; import javax.xml.rpc.ParameterMode;import org.apache.axis.client.Call; import org.apache.axis.client.Service; System.out.println("测试SOAP开始");Service service = new Service();Call call = (Call)service.createCall();String input="Yes";String endpoint="http://11.11.11.11/CAIE.EAI/UploadExpenseToConstract.asmx";call.setTargetEndpointAddress(new java.net.URL(endpoint));call.setOperationName(new QName("http://CAIE.EAI.ExpenseConstract.WebServices","ReturnYourInput"));call.addParameter("input", org.apache.axis.encoding.XMLType.XSD_STRING,ParameterMode.IN);call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);call.setUseSOAPAction(true);call.setSOAPActionURI("http://CAIE.EAI.ExpenseConstract.WebServices/ReturnYourInput");Java 调用 .net 主要是为了后序的 Java 启动 BizTalk流程做准备。 相关文章: 2022-01-31 2022-12-23 2022-12-23 2021-05-31 2021-10-28 2021-12-28 2021-09-08