仿照例程查找在公共uddi服务器上的business已经没有问题,但是连接windows 2003的私有uddi服务时出现以下的exception:
Exception: Unsupported response content type "text/html", must be: "text/xml". Response was:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>?ú??±????¨?é??????</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=GB2312">
<STYLE type="text/css">
BODY { font: 9pt/12pt ???? }
H1 { font: 12pt/15pt ???? }
H2 { font: 9pt/12pt ???? }
A:link { color: red }
A:visited { color: maroon }
</STYLE>
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
<h1>?ú??±????¨?é??????</h1>
?ú????±??????ù?á?????????é?????????ò?????¨?????ò?? Web ?????÷????·??? Web ·????÷???????????? WWW-Authenticate ±¨?·×?????
<hr>
<p>????????????×÷??</p>
<ul>
<li>?????ú????×????????????é?????????ò?????????????????í?±??????</li>
<li>???÷<a href="javascript:location.reload()">????</a>°?????????????????????????</li>
</ul>
<h2>HTTP ?í?ó 401.2 - ???????¨??·???????·????÷????±???????<br>Internet ????·??? (IIS)</h2>
<hr>
<p>?????????¨???????§?????±?á????</p>
<ul>
<li>×??? <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft ?ú?·?§??·???</a>?????÷°ü?¨“HTTP”??“401”??±ê????</li>
<li>?ò??“IIS °??ú”?¨???? IIS ???í?÷ (inetmgr) ??·??????????ó???÷±ê????“????°???”??“?í·??é?¤”??“????×??¨???í?ó????”???÷????</li>
</ul>
</TD></TR></TABLE></BODY></HTML>
请问是什么问题,代码如下:
package uddi4j;
import java.util.*;
import org.uddi4j.client.UDDIProxy;
import org.uddi4j.datatype.*;
import org.uddi4j.datatype.business.PersonName;
import org.uddi4j.response.*;
public class uddi4jQuery {
private static UDDIProxy proxy;
private String inquiryURL =
"http://127.0.0.1/uddi/inquire.asmx";
private String publishURL =
"https://127.0.0.1/uddi/publish.asmx";
public uddi4jQuery() throws Exception {
setupProxy();
}
private void setupProxy() throws Exception {
//set up proxy
proxy = new UDDIProxy();
proxy.setInquiryURL(inquiryURL);
proxy.setPublishURL(publishURL);
}
public static void printBusiness(Vector names) throws Exception {
BusinessList bl =
proxy.find_business(names, null, null, null, null, null, 100);
Vector businessInfoVector = bl.getBusinessInfos().getBusinessInfoVector();
for (int i = 0; i < businessInfoVector.size(); i++) {
BusinessInfo businessInfo = (BusinessInfo)businessInfoVector.elementAt(i);
Vector businessNameVector = businessInfo.getNameVector();
for (int j = 0; j < businessNameVector.size(); j++) {
System.out.println(((Name)businessNameVector.elementAt(j)).getText());
System.out.println(((Name)businessNameVector.elementAt(j)).getLang());
}
System.out.println(businessInfo.getBusinessKey().toString());
}
}
public static void main(String[] args) {
try{
Name name = new Name();
name.setText("%Coffee%");
name.setLang("en-us");
Vector names;
uddi4jQuery u4jq = new uddi4jQuery();
names = new Vector();
names.add(name);
printBusiness(names);
}
catch (Exception e) {
System.out.println("Exception: " + e.getMessage());
}
}
}
--
FROM 218.19.61.6