java调用webservice访问时,有iis认证怎么解决
3个回答
展开全部
本地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.<init>(WSServiceDelegate.java:226)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:174)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.<init>(Service.java:56)
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.<init>(WSServiceDelegate.java:226)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:174)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.<init>(Service.java:56)
2016-04-14
展开全部
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;
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,换个前端软件啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询