本地java访问对方的webservice时,对方的服务器需有iis认证,在调用接口的时候
WebService webService=new WebService();会直接报错
Failed to access the WSDL at: http://xx.xx.xx.xx/xxxx/webservice.asmx?wsdl. It failed with:
Server returned HTTP response code: 401 for URL: http://xx.xx.xx.xx/xxxx/webservice.asmx?wsdl
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:162)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:144)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:263)
at com.sun.xml.ws.client.WSServiceDelegate.
at com.sun.xml.ws.client.WSServiceDelegate.
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.
package com.wujianjun.axis2.client;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties;
你用iis代理java,换个前端软件啊