I've relented and have decided to use UDDI4J.
Has anyone on this list successfully incorporated UDDI4J into a JSP page?
When I invoke my JSP page I get a HTTP 500 error. I have included the error
and my JSP file. Please feel free to have a look and there is no need to
hold anything back when you let me know just how stupid I am.
I have tested my Apache SOAP (version 2.3.1) and UDDI4J (latest)
installations by running the included samples and everything worked fine. My
JSP file is a cut-and-paste of the UDDI4J stock example, except I removed
reading the properties file.
=================================
browser.jsp
=================================
<%@ page language="java" contentType="text/html" %>
<%@ page import="org.uddi4j.*"%>
<%@ page import="org.uddi4j.client.*"%>
<%@ page import="org.uddi4j.datatype.*"%>
<%@ page import="org.uddi4j.datatype.assertion.*"%>
<%@ page import="org.uddi4j.datatype.binding.*"%>
<%@ page import="org.uddi4j.datatype.business.*"%>
<%@ page import="org.uddi4j.datatype.service.*"%>
<%@ page import="org.uddi4j.datatype.tmodel.*"%>
<%@ page import="org.uddi4j.request.*"%>
<%@ page import="org.uddi4j.response.*"%>
<%@ page import="org.uddi4j.util.*"%>
<%@ page import="java.util.Properties"%>
<%@ page import="java.util.Vector"%>
<html>
<head>
<title>UDDI Registry Browser</title>
</head>
<body>
<%
// Construct a UDDIProxy object.
UDDIProxy proxy = new UDDIProxy();
try {
// Select the desired UDDI server node
proxy.setInquiryURL("http://test.uddi.microsoft.com/inquire");
//creating vector of Name Object
Vector names = new Vector();
names.add(new Name("Microsoft"));
// Setting FindQualifiers to 'caseSensitiveMatch'
FindQualifiers findQualifiers = new FindQualifiers();
Vector qualifier = new Vector();
qualifier.add(new FindQualifier("caseSensitiveMatch"));
findQualifiers.setFindQualifierVector(qualifier);
// Find businesses by name and setting the maximum
rows to be returned
as 5.
BusinessList businessList = proxy.find_business(names,
null, null,
null,null, findQualifiers, 5);
Vector businessInfoVector =
businessList.getBusinessInfos().getBusinessInfoVector();
for (int i = 0; i < businessInfoVector.size(); i++) {
BusinessInfo businessInfo =
(BusinessInfo)businessInfoVector.elementAt(i);
// Print name for each business
out.println(businessInfo.getNameString());
}
}
// Handle possible errors
catch (UDDIException e) {
DispositionReport dr = e.getDispositionReport();
if (dr!=null) {
out.println("UDDIException faultCode:" +
e.getFaultCode() +
"\n operator:" +
dr.getOperator() +
"\n generic:" +
dr.getGeneric() +
"\n errno:" +
dr.getErrno() +
"\n errCode:" +
dr.getErrCode() +
"\n errInfoText:" +
dr.getErrInfoText());
}
e.printStackTrace();
// Catch any other exception that may occur
}
catch (org.uddi4j.transport.TransportException e) {
e.printStackTrace();
}
catch (Exception e) {
e.printStackTrace();
}
%>
</body>
</html>
=================================
error message
=================================
HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: org/apache/soap/SOAPException
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
46)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
...
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1040)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151
)
at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
javax.servlet.ServletException: org/apache/soap/SOAPException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:495)
at org.apache.jsp.browser$jsp._jspService(browser$jsp.java:157)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
02)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
...
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1040)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151
)
at java.lang.Thread.run(Thread.java:536)
If you are inclined to help and you have trouble reading this because of
wrapped text, please let me know. I can send the JSP file and error msg as
attachments.
Thanks,
Brian Ivey
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com