You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Brian Ivey <cb...@comcast.net> on 2002/08/09 00:40:41 UTC

Building a UDDI Registry Browser JSP and SOAP

Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

	<head>

		<title>UDDI Registry Browser</title>

	</head>

	<body>

		<%

		try {

			URL u = new URL("http://uddi.ibm.com/testregistry/inquiryapi");
			URLConnection uc = u.openConnection();
			HttpURLConnection connection = (HttpURLConnection) uc;

			connection.setDoOutput(true);
			connection.setDoInput(true);
			connection.setRequestMethod("POST");
			connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

			Writer wout = new OutputStreamWriter(connection.getOutputStream());

			wout.write("<?xml version='1.0'?>\r\n");
			wout.write("<SOAP-ENV:Envelope ");
			wout.write("xmlns:SOAP-ENV=");
			wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
			wout.write("xmlns:xsi=");
			wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
			wout.write("<SOAP-ENV:Body>\r\n");
			wout.write("<find_business generic='2.0' xmlns='urn:uddi-org:api_v2'>");
			wout.write("<name>IBM</name>");
			wout.write("</find_business>");
			wout.write("</SOAP-ENV:Body>\r\n");
			wout.write("</SOAP-ENV:Envelope>\r\n");

			wout.flush();
			wout.close();

			InputStream is = connection.getInputStream();
			InputStreamReader isr = new InputStreamReader(is);
			BufferedReader br = new BufferedReader(isr);
			String line = null;
			while ( (line = br.readLine()) != null) {
				System.out.println("line: " + line);
			}

		}
		catch (IOException e) {
			out.println(e);
		}

		%>

	</body>

</html>

Thanks in advance,

Brian Ivey


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by William Brogden <wb...@bga.com>.
> -----Original Message-----
> From: Brian Ivey [mailto:cbivey@comcast.net] 
> Sent: Thursday, August 08, 2002 5:41 PM
> To: List - Apache SOAP (User); List - JSP
> Subject: Building a UDDI Registry Browser JSP and SOAP
> 
> 
> Hey,
> 
> I am trying to write a UDDI registry browser to be used on my 
> companies web
> portal. I am new to JSP, UDDI, SOAP, etc. I have checked and 
> double checked
> my code, but do not know where else to look. I am posting 
> this on both a
> SOAP and JSP mailing list, when this could be a UDDI issue 
> and off-topic for
> both lists. Please indulge me by having a look at my code. 
> Any suggestions
> will be appreciated. If someone knows of a UDDI mailing list, 
> please tell me
> where I can find it.
> 
> This is the error returned when the JSP page is called from 
> the browser:
> 
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://uddi.ibm.com/testregistry/inquiryapi
> 
> This is my code:
> 
> <%@ page language="java" contentType="text/html" %>
> 
> <%@ page import="java.net.*"%>
> <%@ page import="java.io.*"%>
> 
> <html>
> 
> 	<head>
> 
> 		<title>UDDI Registry Browser</title>
> 
> 	</head>
> 
> 	<body>
> 
> 		<%
> 
> 		try {
> 
> 			URL u = new 
> URL("http://uddi.ibm.com/testregistry/inquiryapi");
> 			URLConnection uc = u.openConnection();
> 			HttpURLConnection connection = 
> (HttpURLConnection) uc;
> 
> 			connection.setDoOutput(true);
> 			connection.setDoInput(true);
> 			connection.setRequestMethod("POST");
> 			connection.setRequestProperty("SOAPAction",
> "http://uddi.ibm.com/testregistry/inquiryapi");
> 
> 			Writer wout = new 
> OutputStreamWriter(connection.getOutputStream());
> 
> 			wout.write("<?xml version='1.0'?>\r\n");
> 			wout.write("<SOAP-ENV:Envelope ");
> 			wout.write("xmlns:SOAP-ENV=");
> 			
> wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
> 			wout.write("xmlns:xsi=");
> 			
> wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
> 			wout.write("<SOAP-ENV:Body>\r\n");
> 			wout.write("<find_business 
> generic='2.0' xmlns='urn:uddi-org:api_v2'>");
> 			wout.write("<name>IBM</name>");
> 			wout.write("</find_business>");
> 			wout.write("</SOAP-ENV:Body>\r\n");
> 			wout.write("</SOAP-ENV:Envelope>\r\n");
> 
> 			wout.flush();
> 			wout.close();

 I think you should not close wout until after you have read the input
stream.
Also you should catch a more general exception.

wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285



> 
> 			InputStream is = connection.getInputStream();
> 			InputStreamReader isr = new 
> InputStreamReader(is);
> 			BufferedReader br = new BufferedReader(isr);
> 			String line = null;
> 			while ( (line = br.readLine()) != null) {
> 				System.out.println("line: " + line);
> 			}
> 
> 		}
> 		catch (IOException e) {
> 			out.println(e);
> 		}
> 
> 		%>
> 
> 	</body>
> 
> </html>
> 
> Thanks in advance,
> 
> Brian Ivey
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@xml.apache.org>
> For additional 
> commands, e-mail: <ma...@xml.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Building a UDDI Registry Browser JSP and SOAP

Posted by Fred Meredith <fm...@nc.rr.com>.
Just to add my two cents:  a 405 is Service Not Available (or something
along those lines), but it means that the servlet you are calling doesn't
support your request method.  So against IBM, it's definitely looking for a
POST.

An error 500 is always misleading.  An IO Exception can get thrown any time
an unhandled error within the servlet occurs.  I would make sure you are
passing all the correct parameters and types to this servlet.

Good Luck,

----- Original Message -----
From: "Brian Ivey" <cb...@comcast.net>
To: "List - Apache SOAP (User)" <so...@xml.apache.org>; "A mailing list
about Java Server Pages specification and reference"
<JS...@JAVA.SUN.COM>
Sent: Thursday, August 08, 2002 11:41 PM
Subject: RE: Building a UDDI Registry Browser JSP and SOAP


> Hey Martin,
>
> I've switched the code from a POST to a GET and I received the same HTTP
500
> return code from both the Microsoft and SAP test registries. The IBM test
> registry now returns a 405. This is odd because I have not changed one
line
> of code, but now receive a different msg from the one server I was testing
> against all day.
>
> The 500 error makes me think that my SOAP or UDDI request are incorrect.
> After all it is an Internal Server error. That does mean something is
going
> on at servers end... right?
>
> I'm scratching my head on this one. Maybe I'll sleep on it.
>
> Thanks for your help.
>
> Brian
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
> Sent: Thursday, August 08, 2002 6:41 PM
> To: JSP-INTEREST@JAVA.SUN.COM
> Subject: Building a UDDI Registry Browser JSP and SOAP
>
>
> Hey,
>
> I am trying to write a UDDI registry browser to be used on my companies
web
> portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double
checked
> my code, but do not know where else to look. I am posting this on both a
> SOAP and JSP mailing list, when this could be a UDDI issue and off-topic
for
> both lists. Please indulge me by having a look at my code. Any suggestions
> will be appreciated. If someone knows of a UDDI mailing list, please tell
me
> where I can find it.
>
> This is the error returned when the JSP page is called from the browser:
>
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://uddi.ibm.com/testregistry/inquiryapi
>
> This is my code:
>
> <%@ page language="java" contentType="text/html" %>
>
> <%@ page import="java.net.*"%>
> <%@ page import="java.io.*"%>
>
> <html>
>
>         <head>
>
>                 <title>UDDI Registry Browser</title>
>
>         </head>
>
>         <body>
>
>                 <%
>
>                 try {
>
>                         URL u = new
> URL("http://uddi.ibm.com/testregistry/inquiryapi");
>                         URLConnection uc = u.openConnection();
>                         HttpURLConnection connection = (HttpURLConnection)
> uc;
>
>                         connection.setDoOutput(true);
>                         connection.setDoInput(true);
>                         connection.setRequestMethod("POST");
>                         connection.setRequestProperty("SOAPAction",
> "http://uddi.ibm.com/testregistry/inquiryapi");
>
>                         Writer wout = new
> OutputStreamWriter(connection.getOutputStream());
>
>                         wout.write("<?xml version='1.0'?>\r\n");
>                         wout.write("<SOAP-ENV:Envelope ");
>                         wout.write("xmlns:SOAP-ENV=");
>
> wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
>                         wout.write("xmlns:xsi=");
>
> wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
>                         wout.write("<SOAP-ENV:Body>\r\n");
>                         wout.write("<find_business generic='2.0'
> xmlns='urn:uddi-org:api_v2'>");
>                         wout.write("<name>IBM</name>");
>                         wout.write("</find_business>");
>                         wout.write("</SOAP-ENV:Body>\r\n");
>                         wout.write("</SOAP-ENV:Envelope>\r\n");
>
>                         wout.flush();
>                         wout.close();
>
>                         InputStream is = connection.getInputStream();
>                         InputStreamReader isr = new InputStreamReader(is);
>                         BufferedReader br = new BufferedReader(isr);
>                         String line = null;
>                         while ( (line = br.readLine()) != null) {
>                                 System.out.println("line: " + line);
>                         }
>
>                 }
>                 catch (IOException e) {
>                         out.println(e);
>                 }
>
>                 %>
>
>         </body>
>
> </html>
>
> Thanks in advance,
>
> Brian Ivey
>
>
===========================================================================
> To unsubscribe: mailto listserv@java.sun.com with body: "signoff
> JSP-INTEREST".
> For digest: mailto listserv@java.sun.com 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
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Building a UDDI Registry Browser JSP and SOAP

Posted by Fred Meredith <fm...@nc.rr.com>.
Just to add my two cents:  a 405 is Service Not Available (or something
along those lines), but it means that the servlet you are calling doesn't
support your request method.  So against IBM, it's definitely looking for a
POST.

An error 500 is always misleading.  An IO Exception can get thrown any time
an unhandled error within the servlet occurs.  I would make sure you are
passing all the correct parameters and types to this servlet.

Good Luck,

----- Original Message -----
From: "Brian Ivey" <cb...@comcast.net>
To: "List - Apache SOAP (User)" <so...@xml.apache.org>; "A mailing list
about Java Server Pages specification and reference"
<JS...@JAVA.SUN.COM>
Sent: Thursday, August 08, 2002 11:41 PM
Subject: RE: Building a UDDI Registry Browser JSP and SOAP


> Hey Martin,
>
> I've switched the code from a POST to a GET and I received the same HTTP
500
> return code from both the Microsoft and SAP test registries. The IBM test
> registry now returns a 405. This is odd because I have not changed one
line
> of code, but now receive a different msg from the one server I was testing
> against all day.
>
> The 500 error makes me think that my SOAP or UDDI request are incorrect.
> After all it is an Internal Server error. That does mean something is
going
> on at servers end... right?
>
> I'm scratching my head on this one. Maybe I'll sleep on it.
>
> Thanks for your help.
>
> Brian
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
> Sent: Thursday, August 08, 2002 6:41 PM
> To: JSP-INTEREST@JAVA.SUN.COM
> Subject: Building a UDDI Registry Browser JSP and SOAP
>
>
> Hey,
>
> I am trying to write a UDDI registry browser to be used on my companies
web
> portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double
checked
> my code, but do not know where else to look. I am posting this on both a
> SOAP and JSP mailing list, when this could be a UDDI issue and off-topic
for
> both lists. Please indulge me by having a look at my code. Any suggestions
> will be appreciated. If someone knows of a UDDI mailing list, please tell
me
> where I can find it.
>
> This is the error returned when the JSP page is called from the browser:
>
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://uddi.ibm.com/testregistry/inquiryapi
>
> This is my code:
>
> <%@ page language="java" contentType="text/html" %>
>
> <%@ page import="java.net.*"%>
> <%@ page import="java.io.*"%>
>
> <html>
>
>         <head>
>
>                 <title>UDDI Registry Browser</title>
>
>         </head>
>
>         <body>
>
>                 <%
>
>                 try {
>
>                         URL u = new
> URL("http://uddi.ibm.com/testregistry/inquiryapi");
>                         URLConnection uc = u.openConnection();
>                         HttpURLConnection connection = (HttpURLConnection)
> uc;
>
>                         connection.setDoOutput(true);
>                         connection.setDoInput(true);
>                         connection.setRequestMethod("POST");
>                         connection.setRequestProperty("SOAPAction",
> "http://uddi.ibm.com/testregistry/inquiryapi");
>
>                         Writer wout = new
> OutputStreamWriter(connection.getOutputStream());
>
>                         wout.write("<?xml version='1.0'?>\r\n");
>                         wout.write("<SOAP-ENV:Envelope ");
>                         wout.write("xmlns:SOAP-ENV=");
>
> wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
>                         wout.write("xmlns:xsi=");
>
> wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
>                         wout.write("<SOAP-ENV:Body>\r\n");
>                         wout.write("<find_business generic='2.0'
> xmlns='urn:uddi-org:api_v2'>");
>                         wout.write("<name>IBM</name>");
>                         wout.write("</find_business>");
>                         wout.write("</SOAP-ENV:Body>\r\n");
>                         wout.write("</SOAP-ENV:Envelope>\r\n");
>
>                         wout.flush();
>                         wout.close();
>
>                         InputStream is = connection.getInputStream();
>                         InputStreamReader isr = new InputStreamReader(is);
>                         BufferedReader br = new BufferedReader(isr);
>                         String line = null;
>                         while ( (line = br.readLine()) != null) {
>                                 System.out.println("line: " + line);
>                         }
>
>                 }
>                 catch (IOException e) {
>                         out.println(e);
>                 }
>
>                 %>
>
>         </body>
>
> </html>
>
> Thanks in advance,
>
> Brian Ivey
>
>
===========================================================================
> To unsubscribe: mailto listserv@java.sun.com with body: "signoff
> JSP-INTEREST".
> For digest: mailto listserv@java.sun.com 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
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Anne Thomas Manes <an...@manes.net>.
Brian,

There are two open source libraries that you can use:

- uddi4j: http://www-124.ibm.com/developerworks/oss/uddi4j/
- WASP UDDI client:
http://www.systinet.com/index.php?nav=/products/wasp_uddi/overview

uddi4j provides a non-validating API with a lot of overloaded methods. WASP
UDDI is a validating API where the methods map directly to the UDDI SOAP
messages.

Another solution that you might consider: Use a customized UDDI browser.
e.g., the WASP UDDI registry service includes a customizable UDDI browser
interface that you could embed into your portals (it's developed using JSP).

UDDI discussion lists:
- uddi-general@yahoogroups.com (See
http://groups.yahoo.com/group/uddi-general/)
- uddi-technical@yahoogroups.com (See
http://groups.yahoo.com/group/uddi-technical/)
- uddi4j-general@www-124.ibm.com (See
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/uddi4j-general)
- uddi4j-developers@www-124.ibm.com (See
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/uddi4j-developers
)
- systinet@list.systinet.com (See
http://list.systinet.com/l/index.xp?ln=systinet

Best regards,
Anne


> -----Original Message-----
> From: Brian Ivey [mailto:cbivey@comcast.net]
> Sent: Friday, August 09, 2002 7:41 AM
> To: soap-user@xml.apache.org
> Subject: RE: Building a UDDI Registry Browser JSP and SOAP
>
>
> I chose not to use a library for a couple of reasons:
>
> 1. This portal will be installed on 300+ intranets and
> I did not want to have to worry about distributing a library
> to each of these portals and the ensuing versioning conflicts
> that would occur as the portals and libraries evolved over time.
> 2. Less importantly, I just wanted to see if I could do it.
>
> Although, since I first started working on this yesterday, I am
> now leaning towards using a library.
>
> Thanks.
>
> -----Original Message-----
> From: Stefan Henke [mailto:stefanhenke@gmx.de]
> Sent: Friday, August 09, 2002 4:11 AM
> To: soap-user@xml.apache.org
> Subject: AW: Building a UDDI Registry Browser JSP and SOAP
>
>
> Hi,
>
> maybe my question is a bit "stupid", but why don´t you use a
> client library
> like uddi4j which helps you querying the registry. You don´t have
> to do any
> xml or http coding. SO, you shouldn´t have the problems you
> currently have.
>
> STefan
>
> -----Ursprüngliche Nachricht-----
> Von: Brian Ivey [mailto:cbivey@comcast.net]
> Gesendet: Freitag, 9. August 2002 05:42
> An: List - Apache SOAP (User); A mailing list about Java Server Pages
> specification and reference
> Betreff: RE: Building a UDDI Registry Browser JSP and SOAP
>
>
> Hey Martin,
>
> I've switched the code from a POST to a GET and I received the
> same HTTP 500
> return code from both the Microsoft and SAP test registries. The IBM test
> registry now returns a 405. This is odd because I have not
> changed one line
> of code, but now receive a different msg from the one server I was testing
> against all day.
>
> The 500 error makes me think that my SOAP or UDDI request are incorrect.
> After all it is an Internal Server error. That does mean
> something is going
> on at servers end... right?
>
> I'm scratching my head on this one. Maybe I'll sleep on it.
>
> Thanks for your help.
>
> Brian
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
> Sent: Thursday, August 08, 2002 6:41 PM
> To: JSP-INTEREST@JAVA.SUN.COM
> Subject: Building a UDDI Registry Browser JSP and SOAP
>
>
> Hey,
>
> I am trying to write a UDDI registry browser to be used on my
> companies web
> portal. I am new to JSP, UDDI, SOAP, etc. I have checked and
> double checked
> my code, but do not know where else to look. I am posting this on both a
> SOAP and JSP mailing list, when this could be a UDDI issue and
> off-topic for
> both lists. Please indulge me by having a look at my code. Any suggestions
> will be appreciated. If someone knows of a UDDI mailing list,
> please tell me
> where I can find it.
>
> This is the error returned when the JSP page is called from the browser:
>
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://uddi.ibm.com/testregistry/inquiryapi
>
> This is my code:
>
> <%@ page language="java" contentType="text/html" %>
>
> <%@ page import="java.net.*"%>
> <%@ page import="java.io.*"%>
>
> <html>
>
>         <head>
>
>                 <title>UDDI Registry Browser</title>
>
>         </head>
>
>         <body>
>
>                 <%
>
>                 try {
>
>                         URL u = new
> URL("http://uddi.ibm.com/testregistry/inquiryapi");
>                         URLConnection uc = u.openConnection();
>                         HttpURLConnection connection = (HttpURLConnection)
> uc;
>
>                         connection.setDoOutput(true);
>                         connection.setDoInput(true);
>                         connection.setRequestMethod("POST");
>                         connection.setRequestProperty("SOAPAction",
> "http://uddi.ibm.com/testregistry/inquiryapi");
>
>                         Writer wout = new
> OutputStreamWriter(connection.getOutputStream());
>
>                         wout.write("<?xml version='1.0'?>\r\n");
>                         wout.write("<SOAP-ENV:Envelope ");
>                         wout.write("xmlns:SOAP-ENV=");
>
> wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
>                         wout.write("xmlns:xsi=");
>
> wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
>                         wout.write("<SOAP-ENV:Body>\r\n");
>                         wout.write("<find_business generic='2.0'
> xmlns='urn:uddi-org:api_v2'>");
>                         wout.write("<name>IBM</name>");
>                         wout.write("</find_business>");
>                         wout.write("</SOAP-ENV:Body>\r\n");
>                         wout.write("</SOAP-ENV:Envelope>\r\n");
>
>                         wout.flush();
>                         wout.close();
>
>                         InputStream is = connection.getInputStream();
>                         InputStreamReader isr = new InputStreamReader(is);
>                         BufferedReader br = new BufferedReader(isr);
>                         String line = null;
>                         while ( (line = br.readLine()) != null) {
>                                 System.out.println("line: " + line);
>                         }
>
>                 }
>                 catch (IOException e) {
>                         out.println(e);
>                 }
>
>                 %>
>
>         </body>
>
> </html>
>
> Thanks in advance,
>
> Brian Ivey
>
> ==================================================================
> =========
> To unsubscribe: mailto listserv@java.sun.com with body: "signoff
> JSP-INTEREST".
> For digest: mailto listserv@java.sun.com 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
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Anne Thomas Manes <an...@manes.net>.
Brian,

There are two open source libraries that you can use:

- uddi4j: http://www-124.ibm.com/developerworks/oss/uddi4j/
- WASP UDDI client:
http://www.systinet.com/index.php?nav=/products/wasp_uddi/overview

uddi4j provides a non-validating API with a lot of overloaded methods. WASP
UDDI is a validating API where the methods map directly to the UDDI SOAP
messages.

Another solution that you might consider: Use a customized UDDI browser.
e.g., the WASP UDDI registry service includes a customizable UDDI browser
interface that you could embed into your portals (it's developed using JSP).

UDDI discussion lists:
- uddi-general@yahoogroups.com (See
http://groups.yahoo.com/group/uddi-general/)
- uddi-technical@yahoogroups.com (See
http://groups.yahoo.com/group/uddi-technical/)
- uddi4j-general@www-124.ibm.com (See
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/uddi4j-general)
- uddi4j-developers@www-124.ibm.com (See
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/uddi4j-developers
)
- systinet@list.systinet.com (See
http://list.systinet.com/l/index.xp?ln=systinet

Best regards,
Anne


> -----Original Message-----
> From: Brian Ivey [mailto:cbivey@comcast.net]
> Sent: Friday, August 09, 2002 7:41 AM
> To: soap-user@xml.apache.org
> Subject: RE: Building a UDDI Registry Browser JSP and SOAP
>
>
> I chose not to use a library for a couple of reasons:
>
> 1. This portal will be installed on 300+ intranets and
> I did not want to have to worry about distributing a library
> to each of these portals and the ensuing versioning conflicts
> that would occur as the portals and libraries evolved over time.
> 2. Less importantly, I just wanted to see if I could do it.
>
> Although, since I first started working on this yesterday, I am
> now leaning towards using a library.
>
> Thanks.
>
> -----Original Message-----
> From: Stefan Henke [mailto:stefanhenke@gmx.de]
> Sent: Friday, August 09, 2002 4:11 AM
> To: soap-user@xml.apache.org
> Subject: AW: Building a UDDI Registry Browser JSP and SOAP
>
>
> Hi,
>
> maybe my question is a bit "stupid", but why don´t you use a
> client library
> like uddi4j which helps you querying the registry. You don´t have
> to do any
> xml or http coding. SO, you shouldn´t have the problems you
> currently have.
>
> STefan
>
> -----Ursprüngliche Nachricht-----
> Von: Brian Ivey [mailto:cbivey@comcast.net]
> Gesendet: Freitag, 9. August 2002 05:42
> An: List - Apache SOAP (User); A mailing list about Java Server Pages
> specification and reference
> Betreff: RE: Building a UDDI Registry Browser JSP and SOAP
>
>
> Hey Martin,
>
> I've switched the code from a POST to a GET and I received the
> same HTTP 500
> return code from both the Microsoft and SAP test registries. The IBM test
> registry now returns a 405. This is odd because I have not
> changed one line
> of code, but now receive a different msg from the one server I was testing
> against all day.
>
> The 500 error makes me think that my SOAP or UDDI request are incorrect.
> After all it is an Internal Server error. That does mean
> something is going
> on at servers end... right?
>
> I'm scratching my head on this one. Maybe I'll sleep on it.
>
> Thanks for your help.
>
> Brian
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
> Sent: Thursday, August 08, 2002 6:41 PM
> To: JSP-INTEREST@JAVA.SUN.COM
> Subject: Building a UDDI Registry Browser JSP and SOAP
>
>
> Hey,
>
> I am trying to write a UDDI registry browser to be used on my
> companies web
> portal. I am new to JSP, UDDI, SOAP, etc. I have checked and
> double checked
> my code, but do not know where else to look. I am posting this on both a
> SOAP and JSP mailing list, when this could be a UDDI issue and
> off-topic for
> both lists. Please indulge me by having a look at my code. Any suggestions
> will be appreciated. If someone knows of a UDDI mailing list,
> please tell me
> where I can find it.
>
> This is the error returned when the JSP page is called from the browser:
>
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://uddi.ibm.com/testregistry/inquiryapi
>
> This is my code:
>
> <%@ page language="java" contentType="text/html" %>
>
> <%@ page import="java.net.*"%>
> <%@ page import="java.io.*"%>
>
> <html>
>
>         <head>
>
>                 <title>UDDI Registry Browser</title>
>
>         </head>
>
>         <body>
>
>                 <%
>
>                 try {
>
>                         URL u = new
> URL("http://uddi.ibm.com/testregistry/inquiryapi");
>                         URLConnection uc = u.openConnection();
>                         HttpURLConnection connection = (HttpURLConnection)
> uc;
>
>                         connection.setDoOutput(true);
>                         connection.setDoInput(true);
>                         connection.setRequestMethod("POST");
>                         connection.setRequestProperty("SOAPAction",
> "http://uddi.ibm.com/testregistry/inquiryapi");
>
>                         Writer wout = new
> OutputStreamWriter(connection.getOutputStream());
>
>                         wout.write("<?xml version='1.0'?>\r\n");
>                         wout.write("<SOAP-ENV:Envelope ");
>                         wout.write("xmlns:SOAP-ENV=");
>
> wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
>                         wout.write("xmlns:xsi=");
>
> wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
>                         wout.write("<SOAP-ENV:Body>\r\n");
>                         wout.write("<find_business generic='2.0'
> xmlns='urn:uddi-org:api_v2'>");
>                         wout.write("<name>IBM</name>");
>                         wout.write("</find_business>");
>                         wout.write("</SOAP-ENV:Body>\r\n");
>                         wout.write("</SOAP-ENV:Envelope>\r\n");
>
>                         wout.flush();
>                         wout.close();
>
>                         InputStream is = connection.getInputStream();
>                         InputStreamReader isr = new InputStreamReader(is);
>                         BufferedReader br = new BufferedReader(isr);
>                         String line = null;
>                         while ( (line = br.readLine()) != null) {
>                                 System.out.println("line: " + line);
>                         }
>
>                 }
>                 catch (IOException e) {
>                         out.println(e);
>                 }
>
>                 %>
>
>         </body>
>
> </html>
>
> Thanks in advance,
>
> Brian Ivey
>
> ==================================================================
> =========
> To unsubscribe: mailto listserv@java.sun.com with body: "signoff
> JSP-INTEREST".
> For digest: mailto listserv@java.sun.com 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
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Brian Ivey <cb...@comcast.net>.
I chose not to use a library for a couple of reasons:

1. This portal will be installed on 300+ intranets and
I did not want to have to worry about distributing a library
to each of these portals and the ensuing versioning conflicts
that would occur as the portals and libraries evolved over time.
2. Less importantly, I just wanted to see if I could do it.

Although, since I first started working on this yesterday, I am
now leaning towards using a library.

Thanks.

-----Original Message-----
From: Stefan Henke [mailto:stefanhenke@gmx.de]
Sent: Friday, August 09, 2002 4:11 AM
To: soap-user@xml.apache.org
Subject: AW: Building a UDDI Registry Browser JSP and SOAP


Hi,

maybe my question is a bit "stupid", but why don´t you use a client library
like uddi4j which helps you querying the registry. You don´t have to do any
xml or http coding. SO, you shouldn´t have the problems you currently have.

STefan

-----Ursprüngliche Nachricht-----
Von: Brian Ivey [mailto:cbivey@comcast.net]
Gesendet: Freitag, 9. August 2002 05:42
An: List - Apache SOAP (User); A mailing list about Java Server Pages
specification and reference
Betreff: RE: Building a UDDI Registry Browser JSP and SOAP


Hey Martin,

I've switched the code from a POST to a GET and I received the same HTTP 500
return code from both the Microsoft and SAP test registries. The IBM test
registry now returns a 405. This is odd because I have not changed one line
of code, but now receive a different msg from the one server I was testing
against all day.

The 500 error makes me think that my SOAP or UDDI request are incorrect.
After all it is an Internal Server error. That does mean something is going
on at servers end... right?

I'm scratching my head on this one. Maybe I'll sleep on it.

Thanks for your help.

Brian

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
Sent: Thursday, August 08, 2002 6:41 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: Building a UDDI Registry Browser JSP and SOAP


Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

        <head>

                <title>UDDI Registry Browser</title>

        </head>

        <body>

                <%

                try {

                        URL u = new
URL("http://uddi.ibm.com/testregistry/inquiryapi");
                        URLConnection uc = u.openConnection();
                        HttpURLConnection connection = (HttpURLConnection)
uc;

                        connection.setDoOutput(true);
                        connection.setDoInput(true);
                        connection.setRequestMethod("POST");
                        connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

                        Writer wout = new
OutputStreamWriter(connection.getOutputStream());

                        wout.write("<?xml version='1.0'?>\r\n");
                        wout.write("<SOAP-ENV:Envelope ");
                        wout.write("xmlns:SOAP-ENV=");

wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
                        wout.write("xmlns:xsi=");

wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
                        wout.write("<SOAP-ENV:Body>\r\n");
                        wout.write("<find_business generic='2.0'
xmlns='urn:uddi-org:api_v2'>");
                        wout.write("<name>IBM</name>");
                        wout.write("</find_business>");
                        wout.write("</SOAP-ENV:Body>\r\n");
                        wout.write("</SOAP-ENV:Envelope>\r\n");

                        wout.flush();
                        wout.close();

                        InputStream is = connection.getInputStream();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader br = new BufferedReader(isr);
                        String line = null;
                        while ( (line = br.readLine()) != null) {
                                System.out.println("line: " + line);
                        }

                }
                catch (IOException e) {
                        out.println(e);
                }

                %>

        </body>

</html>

Thanks in advance,

Brian Ivey

===========================================================================
To unsubscribe: mailto listserv@java.sun.com with body: "signoff
JSP-INTEREST".
For digest: mailto listserv@java.sun.com 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


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Brian Ivey <cb...@comcast.net>.
I chose not to use a library for a couple of reasons:

1. This portal will be installed on 300+ intranets and
I did not want to have to worry about distributing a library
to each of these portals and the ensuing versioning conflicts
that would occur as the portals and libraries evolved over time.
2. Less importantly, I just wanted to see if I could do it.

Although, since I first started working on this yesterday, I am
now leaning towards using a library.

Thanks.

-----Original Message-----
From: Stefan Henke [mailto:stefanhenke@gmx.de]
Sent: Friday, August 09, 2002 4:11 AM
To: soap-user@xml.apache.org
Subject: AW: Building a UDDI Registry Browser JSP and SOAP


Hi,

maybe my question is a bit "stupid", but why don´t you use a client library
like uddi4j which helps you querying the registry. You don´t have to do any
xml or http coding. SO, you shouldn´t have the problems you currently have.

STefan

-----Ursprüngliche Nachricht-----
Von: Brian Ivey [mailto:cbivey@comcast.net]
Gesendet: Freitag, 9. August 2002 05:42
An: List - Apache SOAP (User); A mailing list about Java Server Pages
specification and reference
Betreff: RE: Building a UDDI Registry Browser JSP and SOAP


Hey Martin,

I've switched the code from a POST to a GET and I received the same HTTP 500
return code from both the Microsoft and SAP test registries. The IBM test
registry now returns a 405. This is odd because I have not changed one line
of code, but now receive a different msg from the one server I was testing
against all day.

The 500 error makes me think that my SOAP or UDDI request are incorrect.
After all it is an Internal Server error. That does mean something is going
on at servers end... right?

I'm scratching my head on this one. Maybe I'll sleep on it.

Thanks for your help.

Brian

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
Sent: Thursday, August 08, 2002 6:41 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: Building a UDDI Registry Browser JSP and SOAP


Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

        <head>

                <title>UDDI Registry Browser</title>

        </head>

        <body>

                <%

                try {

                        URL u = new
URL("http://uddi.ibm.com/testregistry/inquiryapi");
                        URLConnection uc = u.openConnection();
                        HttpURLConnection connection = (HttpURLConnection)
uc;

                        connection.setDoOutput(true);
                        connection.setDoInput(true);
                        connection.setRequestMethod("POST");
                        connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

                        Writer wout = new
OutputStreamWriter(connection.getOutputStream());

                        wout.write("<?xml version='1.0'?>\r\n");
                        wout.write("<SOAP-ENV:Envelope ");
                        wout.write("xmlns:SOAP-ENV=");

wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
                        wout.write("xmlns:xsi=");

wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
                        wout.write("<SOAP-ENV:Body>\r\n");
                        wout.write("<find_business generic='2.0'
xmlns='urn:uddi-org:api_v2'>");
                        wout.write("<name>IBM</name>");
                        wout.write("</find_business>");
                        wout.write("</SOAP-ENV:Body>\r\n");
                        wout.write("</SOAP-ENV:Envelope>\r\n");

                        wout.flush();
                        wout.close();

                        InputStream is = connection.getInputStream();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader br = new BufferedReader(isr);
                        String line = null;
                        while ( (line = br.readLine()) != null) {
                                System.out.println("line: " + line);
                        }

                }
                catch (IOException e) {
                        out.println(e);
                }

                %>

        </body>

</html>

Thanks in advance,

Brian Ivey

===========================================================================
To unsubscribe: mailto listserv@java.sun.com with body: "signoff
JSP-INTEREST".
For digest: mailto listserv@java.sun.com 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


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


AW: Building a UDDI Registry Browser JSP and SOAP

Posted by Stefan Henke <st...@gmx.de>.
Hi,

maybe my question is a bit "stupid", but why don´t you use a client library
like uddi4j which helps you querying the registry. You don´t have to do any
xml or http coding. SO, you shouldn´t have the problems you currently have.

STefan

-----Ursprüngliche Nachricht-----
Von: Brian Ivey [mailto:cbivey@comcast.net]
Gesendet: Freitag, 9. August 2002 05:42
An: List - Apache SOAP (User); A mailing list about Java Server Pages
specification and reference
Betreff: RE: Building a UDDI Registry Browser JSP and SOAP


Hey Martin,

I've switched the code from a POST to a GET and I received the same HTTP 500
return code from both the Microsoft and SAP test registries. The IBM test
registry now returns a 405. This is odd because I have not changed one line
of code, but now receive a different msg from the one server I was testing
against all day.

The 500 error makes me think that my SOAP or UDDI request are incorrect.
After all it is an Internal Server error. That does mean something is going
on at servers end... right?

I'm scratching my head on this one. Maybe I'll sleep on it.

Thanks for your help.

Brian

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
Sent: Thursday, August 08, 2002 6:41 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: Building a UDDI Registry Browser JSP and SOAP


Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

        <head>

                <title>UDDI Registry Browser</title>

        </head>

        <body>

                <%

                try {

                        URL u = new
URL("http://uddi.ibm.com/testregistry/inquiryapi");
                        URLConnection uc = u.openConnection();
                        HttpURLConnection connection = (HttpURLConnection)
uc;

                        connection.setDoOutput(true);
                        connection.setDoInput(true);
                        connection.setRequestMethod("POST");
                        connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

                        Writer wout = new
OutputStreamWriter(connection.getOutputStream());

                        wout.write("<?xml version='1.0'?>\r\n");
                        wout.write("<SOAP-ENV:Envelope ");
                        wout.write("xmlns:SOAP-ENV=");

wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
                        wout.write("xmlns:xsi=");

wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
                        wout.write("<SOAP-ENV:Body>\r\n");
                        wout.write("<find_business generic='2.0'
xmlns='urn:uddi-org:api_v2'>");
                        wout.write("<name>IBM</name>");
                        wout.write("</find_business>");
                        wout.write("</SOAP-ENV:Body>\r\n");
                        wout.write("</SOAP-ENV:Envelope>\r\n");

                        wout.flush();
                        wout.close();

                        InputStream is = connection.getInputStream();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader br = new BufferedReader(isr);
                        String line = null;
                        while ( (line = br.readLine()) != null) {
                                System.out.println("line: " + line);
                        }

                }
                catch (IOException e) {
                        out.println(e);
                }

                %>

        </body>

</html>

Thanks in advance,

Brian Ivey

===========================================================================
To unsubscribe: mailto listserv@java.sun.com with body: "signoff
JSP-INTEREST".
For digest: mailto listserv@java.sun.com 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


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


AW: Building a UDDI Registry Browser JSP and SOAP

Posted by Stefan Henke <st...@gmx.de>.
Hi,

maybe my question is a bit "stupid", but why don´t you use a client library
like uddi4j which helps you querying the registry. You don´t have to do any
xml or http coding. SO, you shouldn´t have the problems you currently have.

STefan

-----Ursprüngliche Nachricht-----
Von: Brian Ivey [mailto:cbivey@comcast.net]
Gesendet: Freitag, 9. August 2002 05:42
An: List - Apache SOAP (User); A mailing list about Java Server Pages
specification and reference
Betreff: RE: Building a UDDI Registry Browser JSP and SOAP


Hey Martin,

I've switched the code from a POST to a GET and I received the same HTTP 500
return code from both the Microsoft and SAP test registries. The IBM test
registry now returns a 405. This is odd because I have not changed one line
of code, but now receive a different msg from the one server I was testing
against all day.

The 500 error makes me think that my SOAP or UDDI request are incorrect.
After all it is an Internal Server error. That does mean something is going
on at servers end... right?

I'm scratching my head on this one. Maybe I'll sleep on it.

Thanks for your help.

Brian

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
Sent: Thursday, August 08, 2002 6:41 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: Building a UDDI Registry Browser JSP and SOAP


Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

        <head>

                <title>UDDI Registry Browser</title>

        </head>

        <body>

                <%

                try {

                        URL u = new
URL("http://uddi.ibm.com/testregistry/inquiryapi");
                        URLConnection uc = u.openConnection();
                        HttpURLConnection connection = (HttpURLConnection)
uc;

                        connection.setDoOutput(true);
                        connection.setDoInput(true);
                        connection.setRequestMethod("POST");
                        connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

                        Writer wout = new
OutputStreamWriter(connection.getOutputStream());

                        wout.write("<?xml version='1.0'?>\r\n");
                        wout.write("<SOAP-ENV:Envelope ");
                        wout.write("xmlns:SOAP-ENV=");

wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
                        wout.write("xmlns:xsi=");

wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
                        wout.write("<SOAP-ENV:Body>\r\n");
                        wout.write("<find_business generic='2.0'
xmlns='urn:uddi-org:api_v2'>");
                        wout.write("<name>IBM</name>");
                        wout.write("</find_business>");
                        wout.write("</SOAP-ENV:Body>\r\n");
                        wout.write("</SOAP-ENV:Envelope>\r\n");

                        wout.flush();
                        wout.close();

                        InputStream is = connection.getInputStream();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader br = new BufferedReader(isr);
                        String line = null;
                        while ( (line = br.readLine()) != null) {
                                System.out.println("line: " + line);
                        }

                }
                catch (IOException e) {
                        out.println(e);
                }

                %>

        </body>

</html>

Thanks in advance,

Brian Ivey

===========================================================================
To unsubscribe: mailto listserv@java.sun.com with body: "signoff
JSP-INTEREST".
For digest: mailto listserv@java.sun.com 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


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by William Brogden <wb...@bga.com>.
> -----Original Message-----
> From: Brian Ivey [mailto:cbivey@comcast.net] 
> Sent: Friday, August 09, 2002 6:43 AM
> To: soap-user@xml.apache.org
> Subject: RE: Building a UDDI Registry Browser JSP and SOAP
> 
> 
> I've narrowed it down at least. This line:
> 
> InputStream is = connection.getInputStream();
> 
> throws an IOException.
> 
> Why? What am I missing here?
> 
..................................snip
                        wout.write("</SOAP-ENV:Body>\r\n");
>                         wout.write("</SOAP-ENV:Envelope>\r\n");
> 
>                         wout.flush();
>                         wout.close();

Because of that last line - when you close wout it closes the socket!!!!
Don't close until finished with the input stream.

wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285





--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by William Brogden <wb...@bga.com>.
> -----Original Message-----
> From: Brian Ivey [mailto:cbivey@comcast.net] 
> Sent: Friday, August 09, 2002 6:43 AM
> To: soap-user@xml.apache.org
> Subject: RE: Building a UDDI Registry Browser JSP and SOAP
> 
> 
> I've narrowed it down at least. This line:
> 
> InputStream is = connection.getInputStream();
> 
> throws an IOException.
> 
> Why? What am I missing here?
> 
..................................snip
                        wout.write("</SOAP-ENV:Body>\r\n");
>                         wout.write("</SOAP-ENV:Envelope>\r\n");
> 
>                         wout.flush();
>                         wout.close();

Because of that last line - when you close wout it closes the socket!!!!
Don't close until finished with the input stream.

wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285





RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Brian Ivey <cb...@comcast.net>.
I've narrowed it down at least. This line:

InputStream is = connection.getInputStream();

throws an IOException.

Why? What am I missing here?

-----Original Message-----
From: Brian Ivey [mailto:cbivey@comcast.net]
Sent: Thursday, August 08, 2002 11:42 PM
To: List - Apache SOAP (User); A mailing list about Java Server Pages
specification and reference
Subject: RE: Building a UDDI Registry Browser JSP and SOAP


Hey Martin,

I've switched the code from a POST to a GET and I received the same HTTP 500
return code from both the Microsoft and SAP test registries. The IBM test
registry now returns a 405. This is odd because I have not changed one line
of code, but now receive a different msg from the one server I was testing
against all day.

The 500 error makes me think that my SOAP or UDDI request are incorrect.
After all it is an Internal Server error. That does mean something is going
on at servers end... right?

I'm scratching my head on this one. Maybe I'll sleep on it.

Thanks for your help.

Brian

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
Sent: Thursday, August 08, 2002 6:41 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: Building a UDDI Registry Browser JSP and SOAP


Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

        <head>

                <title>UDDI Registry Browser</title>

        </head>

        <body>

                <%

                try {

                        URL u = new
URL("http://uddi.ibm.com/testregistry/inquiryapi");
                        URLConnection uc = u.openConnection();
                        HttpURLConnection connection = (HttpURLConnection)
uc;

                        connection.setDoOutput(true);
                        connection.setDoInput(true);
                        connection.setRequestMethod("POST");
                        connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

                        Writer wout = new
OutputStreamWriter(connection.getOutputStream());

                        wout.write("<?xml version='1.0'?>\r\n");
                        wout.write("<SOAP-ENV:Envelope ");
                        wout.write("xmlns:SOAP-ENV=");

wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
                        wout.write("xmlns:xsi=");

wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
                        wout.write("<SOAP-ENV:Body>\r\n");
                        wout.write("<find_business generic='2.0'
xmlns='urn:uddi-org:api_v2'>");
                        wout.write("<name>IBM</name>");
                        wout.write("</find_business>");
                        wout.write("</SOAP-ENV:Body>\r\n");
                        wout.write("</SOAP-ENV:Envelope>\r\n");

                        wout.flush();
                        wout.close();

                        InputStream is = connection.getInputStream();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader br = new BufferedReader(isr);
                        String line = null;
                        while ( (line = br.readLine()) != null) {
                                System.out.println("line: " + line);
                        }

                }
                catch (IOException e) {
                        out.println(e);
                }

                %>

        </body>

</html>

Thanks in advance,

Brian Ivey

===========================================================================
To unsubscribe: mailto listserv@java.sun.com with body: "signoff
JSP-INTEREST".
For digest: mailto listserv@java.sun.com 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


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Brian Ivey <cb...@comcast.net>.
I've narrowed it down at least. This line:

InputStream is = connection.getInputStream();

throws an IOException.

Why? What am I missing here?

-----Original Message-----
From: Brian Ivey [mailto:cbivey@comcast.net]
Sent: Thursday, August 08, 2002 11:42 PM
To: List - Apache SOAP (User); A mailing list about Java Server Pages
specification and reference
Subject: RE: Building a UDDI Registry Browser JSP and SOAP


Hey Martin,

I've switched the code from a POST to a GET and I received the same HTTP 500
return code from both the Microsoft and SAP test registries. The IBM test
registry now returns a 405. This is odd because I have not changed one line
of code, but now receive a different msg from the one server I was testing
against all day.

The 500 error makes me think that my SOAP or UDDI request are incorrect.
After all it is an Internal Server error. That does mean something is going
on at servers end... right?

I'm scratching my head on this one. Maybe I'll sleep on it.

Thanks for your help.

Brian

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
Sent: Thursday, August 08, 2002 6:41 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: Building a UDDI Registry Browser JSP and SOAP


Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

        <head>

                <title>UDDI Registry Browser</title>

        </head>

        <body>

                <%

                try {

                        URL u = new
URL("http://uddi.ibm.com/testregistry/inquiryapi");
                        URLConnection uc = u.openConnection();
                        HttpURLConnection connection = (HttpURLConnection)
uc;

                        connection.setDoOutput(true);
                        connection.setDoInput(true);
                        connection.setRequestMethod("POST");
                        connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

                        Writer wout = new
OutputStreamWriter(connection.getOutputStream());

                        wout.write("<?xml version='1.0'?>\r\n");
                        wout.write("<SOAP-ENV:Envelope ");
                        wout.write("xmlns:SOAP-ENV=");

wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
                        wout.write("xmlns:xsi=");

wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
                        wout.write("<SOAP-ENV:Body>\r\n");
                        wout.write("<find_business generic='2.0'
xmlns='urn:uddi-org:api_v2'>");
                        wout.write("<name>IBM</name>");
                        wout.write("</find_business>");
                        wout.write("</SOAP-ENV:Body>\r\n");
                        wout.write("</SOAP-ENV:Envelope>\r\n");

                        wout.flush();
                        wout.close();

                        InputStream is = connection.getInputStream();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader br = new BufferedReader(isr);
                        String line = null;
                        while ( (line = br.readLine()) != null) {
                                System.out.println("line: " + line);
                        }

                }
                catch (IOException e) {
                        out.println(e);
                }

                %>

        </body>

</html>

Thanks in advance,

Brian Ivey

===========================================================================
To unsubscribe: mailto listserv@java.sun.com with body: "signoff
JSP-INTEREST".
For digest: mailto listserv@java.sun.com 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


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Brian Ivey <cb...@comcast.net>.
Hey Martin,

I've switched the code from a POST to a GET and I received the same HTTP 500
return code from both the Microsoft and SAP test registries. The IBM test
registry now returns a 405. This is odd because I have not changed one line
of code, but now receive a different msg from the one server I was testing
against all day.

The 500 error makes me think that my SOAP or UDDI request are incorrect.
After all it is an Internal Server error. That does mean something is going
on at servers end... right?

I'm scratching my head on this one. Maybe I'll sleep on it.

Thanks for your help.

Brian

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
Sent: Thursday, August 08, 2002 6:41 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: Building a UDDI Registry Browser JSP and SOAP


Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

        <head>

                <title>UDDI Registry Browser</title>

        </head>

        <body>

                <%

                try {

                        URL u = new
URL("http://uddi.ibm.com/testregistry/inquiryapi");
                        URLConnection uc = u.openConnection();
                        HttpURLConnection connection = (HttpURLConnection)
uc;

                        connection.setDoOutput(true);
                        connection.setDoInput(true);
                        connection.setRequestMethod("POST");
                        connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

                        Writer wout = new
OutputStreamWriter(connection.getOutputStream());

                        wout.write("<?xml version='1.0'?>\r\n");
                        wout.write("<SOAP-ENV:Envelope ");
                        wout.write("xmlns:SOAP-ENV=");

wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
                        wout.write("xmlns:xsi=");

wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
                        wout.write("<SOAP-ENV:Body>\r\n");
                        wout.write("<find_business generic='2.0'
xmlns='urn:uddi-org:api_v2'>");
                        wout.write("<name>IBM</name>");
                        wout.write("</find_business>");
                        wout.write("</SOAP-ENV:Body>\r\n");
                        wout.write("</SOAP-ENV:Envelope>\r\n");

                        wout.flush();
                        wout.close();

                        InputStream is = connection.getInputStream();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader br = new BufferedReader(isr);
                        String line = null;
                        while ( (line = br.readLine()) != null) {
                                System.out.println("line: " + line);
                        }

                }
                catch (IOException e) {
                        out.println(e);
                }

                %>

        </body>

</html>

Thanks in advance,

Brian Ivey

===========================================================================
To unsubscribe: mailto listserv@java.sun.com with body: "signoff
JSP-INTEREST".
For digest: mailto listserv@java.sun.com 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


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Dan Allen <da...@nist.gov>.
	I forgot to mention that the getInputStream() method is the
	source of the IOException.  This method always throws an
	IOException if the HTTP status code is error (>= 400). So
	the exception can be caused by any server error, not just
	a SOAP Fault response.

	Dan

> -----Original Message-----
> From: Dan Allen [mailto:dallen@nist.gov]
> Sent: Friday, August 09, 2002 9:09 AM
> To: soap-user@xml.apache.org
> Subject: RE: Building a UDDI Registry Browser JSP and SOAP
> 
> 
> 
> 	Yep. Bet the server returned a SOAP Fault.  SOAP Faults
> 	are always sent with HTTP status of 500 (Server error).
> 	HttpURLConnection is busted in versions of the JDK prior
> 	to 1.4.  For a thoroughly mind-boggeling look at the
> 	brain-deadness of some of the Sun Java developers visit
> 	the Java bug database and peruse the error track on this
> 	bug (errr... sorry Sun, FEATURE).  If you want to use
> 	HttpURLConnection you MUST use JDK 1.4 and you must
> 	test the HTTP status code before you get the input stream
> 	for the response as follows:
> 		
> 		InputStream in;
> 		if(conn.getResponseCode() >= 400)
> 		   in = conn.getErrorStream();
> 		else
> 		   in = con.getInputStream();
> 
> 	Dan
> 	
> > -----Original Message-----
> > From: Brian Ivey [mailto:cbivey@comcast.net]
> > Sent: Thursday, August 08, 2002 6:41 PM
> > To: List - Apache SOAP (User); List - JSP
> > Subject: Building a UDDI Registry Browser JSP and SOAP
> > 
> > 
> > Hey,
> > 
> > I am trying to write a UDDI registry browser to be used on my companies web
> > portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
> > my code, but do not know where else to look. I am posting this on both a
> > SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
> > both lists. Please indulge me by having a look at my code. Any suggestions
> > will be appreciated. If someone knows of a UDDI mailing list, please tell me
> > where I can find it.
> > 
> > This is the error returned when the JSP page is called from the browser:
> > 
> > java.io.IOException: Server returned HTTP response code: 500 for URL:
> > http://uddi.ibm.com/testregistry/inquiryapi
> > 
> > This is my code:
> > 
> > <%@ page language="java" contentType="text/html" %>
> > 
> > <%@ page import="java.net.*"%>
> > <%@ page import="java.io.*"%>
> > 
> > <html>
> > 
> > 	<head>
> > 
> > 		<title>UDDI Registry Browser</title>
> > 
> > 	</head>
> > 
> > 	<body>
> > 
> > 		<%
> > 
> > 		try {
> > 
> > 			URL u = new URL("http://uddi.ibm.com/testregistry/inquiryapi");
> > 			URLConnection uc = u.openConnection();
> > 			HttpURLConnection connection = (HttpURLConnection) uc;
> > 
> > 			connection.setDoOutput(true);
> > 			connection.setDoInput(true);
> > 			connection.setRequestMethod("POST");
> > 			connection.setRequestProperty("SOAPAction",
> > "http://uddi.ibm.com/testregistry/inquiryapi");
> > 
> > 			Writer wout = new OutputStreamWriter(connection.getOutputStream());
> > 
> > 			wout.write("<?xml version='1.0'?>\r\n");
> > 			wout.write("<SOAP-ENV:Envelope ");
> > 			wout.write("xmlns:SOAP-ENV=");
> > 			wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
> > 			wout.write("xmlns:xsi=");
> > 			wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
> > 			wout.write("<SOAP-ENV:Body>\r\n");
> > 			wout.write("<find_business generic='2.0' xmlns='urn:uddi-org:api_v2'>");
> > 			wout.write("<name>IBM</name>");
> > 			wout.write("</find_business>");
> > 			wout.write("</SOAP-ENV:Body>\r\n");
> > 			wout.write("</SOAP-ENV:Envelope>\r\n");
> > 
> > 			wout.flush();
> > 			wout.close();
> > 
> > 			InputStream is = connection.getInputStream();
> > 			InputStreamReader isr = new InputStreamReader(is);
> > 			BufferedReader br = new BufferedReader(isr);
> > 			String line = null;
> > 			while ( (line = br.readLine()) != null) {
> > 				System.out.println("line: " + line);
> > 			}
> > 
> > 		}
> > 		catch (IOException e) {
> > 			out.println(e);
> > 		}
> > 
> > 		%>
> > 
> > 	</body>
> > 
> > </html>
> > 
> > Thanks in advance,
> > 
> > Brian Ivey
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <ma...@xml.apache.org>
> > For additional commands, e-mail: <ma...@xml.apache.org>
> > 
> > 
> 
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
> 
> 

RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Dan Allen <da...@nist.gov>.
	I forgot to mention that the getInputStream() method is the
	source of the IOException.  This method always throws an
	IOException if the HTTP status code is error (>= 400). So
	the exception can be caused by any server error, not just
	a SOAP Fault response.

	Dan

> -----Original Message-----
> From: Dan Allen [mailto:dallen@nist.gov]
> Sent: Friday, August 09, 2002 9:09 AM
> To: soap-user@xml.apache.org
> Subject: RE: Building a UDDI Registry Browser JSP and SOAP
> 
> 
> 
> 	Yep. Bet the server returned a SOAP Fault.  SOAP Faults
> 	are always sent with HTTP status of 500 (Server error).
> 	HttpURLConnection is busted in versions of the JDK prior
> 	to 1.4.  For a thoroughly mind-boggeling look at the
> 	brain-deadness of some of the Sun Java developers visit
> 	the Java bug database and peruse the error track on this
> 	bug (errr... sorry Sun, FEATURE).  If you want to use
> 	HttpURLConnection you MUST use JDK 1.4 and you must
> 	test the HTTP status code before you get the input stream
> 	for the response as follows:
> 		
> 		InputStream in;
> 		if(conn.getResponseCode() >= 400)
> 		   in = conn.getErrorStream();
> 		else
> 		   in = con.getInputStream();
> 
> 	Dan
> 	
> > -----Original Message-----
> > From: Brian Ivey [mailto:cbivey@comcast.net]
> > Sent: Thursday, August 08, 2002 6:41 PM
> > To: List - Apache SOAP (User); List - JSP
> > Subject: Building a UDDI Registry Browser JSP and SOAP
> > 
> > 
> > Hey,
> > 
> > I am trying to write a UDDI registry browser to be used on my companies web
> > portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
> > my code, but do not know where else to look. I am posting this on both a
> > SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
> > both lists. Please indulge me by having a look at my code. Any suggestions
> > will be appreciated. If someone knows of a UDDI mailing list, please tell me
> > where I can find it.
> > 
> > This is the error returned when the JSP page is called from the browser:
> > 
> > java.io.IOException: Server returned HTTP response code: 500 for URL:
> > http://uddi.ibm.com/testregistry/inquiryapi
> > 
> > This is my code:
> > 
> > <%@ page language="java" contentType="text/html" %>
> > 
> > <%@ page import="java.net.*"%>
> > <%@ page import="java.io.*"%>
> > 
> > <html>
> > 
> > 	<head>
> > 
> > 		<title>UDDI Registry Browser</title>
> > 
> > 	</head>
> > 
> > 	<body>
> > 
> > 		<%
> > 
> > 		try {
> > 
> > 			URL u = new URL("http://uddi.ibm.com/testregistry/inquiryapi");
> > 			URLConnection uc = u.openConnection();
> > 			HttpURLConnection connection = (HttpURLConnection) uc;
> > 
> > 			connection.setDoOutput(true);
> > 			connection.setDoInput(true);
> > 			connection.setRequestMethod("POST");
> > 			connection.setRequestProperty("SOAPAction",
> > "http://uddi.ibm.com/testregistry/inquiryapi");
> > 
> > 			Writer wout = new OutputStreamWriter(connection.getOutputStream());
> > 
> > 			wout.write("<?xml version='1.0'?>\r\n");
> > 			wout.write("<SOAP-ENV:Envelope ");
> > 			wout.write("xmlns:SOAP-ENV=");
> > 			wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
> > 			wout.write("xmlns:xsi=");
> > 			wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
> > 			wout.write("<SOAP-ENV:Body>\r\n");
> > 			wout.write("<find_business generic='2.0' xmlns='urn:uddi-org:api_v2'>");
> > 			wout.write("<name>IBM</name>");
> > 			wout.write("</find_business>");
> > 			wout.write("</SOAP-ENV:Body>\r\n");
> > 			wout.write("</SOAP-ENV:Envelope>\r\n");
> > 
> > 			wout.flush();
> > 			wout.close();
> > 
> > 			InputStream is = connection.getInputStream();
> > 			InputStreamReader isr = new InputStreamReader(is);
> > 			BufferedReader br = new BufferedReader(isr);
> > 			String line = null;
> > 			while ( (line = br.readLine()) != null) {
> > 				System.out.println("line: " + line);
> > 			}
> > 
> > 		}
> > 		catch (IOException e) {
> > 			out.println(e);
> > 		}
> > 
> > 		%>
> > 
> > 	</body>
> > 
> > </html>
> > 
> > Thanks in advance,
> > 
> > Brian Ivey
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <ma...@xml.apache.org>
> > For additional commands, e-mail: <ma...@xml.apache.org>
> > 
> > 
> 
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Dan Allen <da...@nist.gov>.
	Yep. Bet the server returned a SOAP Fault.  SOAP Faults
	are always sent with HTTP status of 500 (Server error).
	HttpURLConnection is busted in versions of the JDK prior
	to 1.4.  For a thoroughly mind-boggeling look at the
	brain-deadness of some of the Sun Java developers visit
	the Java bug database and peruse the error track on this
	bug (errr... sorry Sun, FEATURE).  If you want to use
	HttpURLConnection you MUST use JDK 1.4 and you must
	test the HTTP status code before you get the input stream
	for the response as follows:
		
		InputStream in;
		if(conn.getResponseCode() >= 400)
		   in = conn.getErrorStream();
		else
		   in = con.getInputStream();

	Dan
	
> -----Original Message-----
> From: Brian Ivey [mailto:cbivey@comcast.net]
> Sent: Thursday, August 08, 2002 6:41 PM
> To: List - Apache SOAP (User); List - JSP
> Subject: Building a UDDI Registry Browser JSP and SOAP
> 
> 
> Hey,
> 
> I am trying to write a UDDI registry browser to be used on my companies web
> portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
> my code, but do not know where else to look. I am posting this on both a
> SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
> both lists. Please indulge me by having a look at my code. Any suggestions
> will be appreciated. If someone knows of a UDDI mailing list, please tell me
> where I can find it.
> 
> This is the error returned when the JSP page is called from the browser:
> 
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://uddi.ibm.com/testregistry/inquiryapi
> 
> This is my code:
> 
> <%@ page language="java" contentType="text/html" %>
> 
> <%@ page import="java.net.*"%>
> <%@ page import="java.io.*"%>
> 
> <html>
> 
> 	<head>
> 
> 		<title>UDDI Registry Browser</title>
> 
> 	</head>
> 
> 	<body>
> 
> 		<%
> 
> 		try {
> 
> 			URL u = new URL("http://uddi.ibm.com/testregistry/inquiryapi");
> 			URLConnection uc = u.openConnection();
> 			HttpURLConnection connection = (HttpURLConnection) uc;
> 
> 			connection.setDoOutput(true);
> 			connection.setDoInput(true);
> 			connection.setRequestMethod("POST");
> 			connection.setRequestProperty("SOAPAction",
> "http://uddi.ibm.com/testregistry/inquiryapi");
> 
> 			Writer wout = new OutputStreamWriter(connection.getOutputStream());
> 
> 			wout.write("<?xml version='1.0'?>\r\n");
> 			wout.write("<SOAP-ENV:Envelope ");
> 			wout.write("xmlns:SOAP-ENV=");
> 			wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
> 			wout.write("xmlns:xsi=");
> 			wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
> 			wout.write("<SOAP-ENV:Body>\r\n");
> 			wout.write("<find_business generic='2.0' xmlns='urn:uddi-org:api_v2'>");
> 			wout.write("<name>IBM</name>");
> 			wout.write("</find_business>");
> 			wout.write("</SOAP-ENV:Body>\r\n");
> 			wout.write("</SOAP-ENV:Envelope>\r\n");
> 
> 			wout.flush();
> 			wout.close();
> 
> 			InputStream is = connection.getInputStream();
> 			InputStreamReader isr = new InputStreamReader(is);
> 			BufferedReader br = new BufferedReader(isr);
> 			String line = null;
> 			while ( (line = br.readLine()) != null) {
> 				System.out.println("line: " + line);
> 			}
> 
> 		}
> 		catch (IOException e) {
> 			out.println(e);
> 		}
> 
> 		%>
> 
> 	</body>
> 
> </html>
> 
> Thanks in advance,
> 
> Brian Ivey
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by William Brogden <wb...@bga.com>.
> -----Original Message-----
> From: Brian Ivey [mailto:cbivey@comcast.net] 
> Sent: Thursday, August 08, 2002 5:41 PM
> To: List - Apache SOAP (User); List - JSP
> Subject: Building a UDDI Registry Browser JSP and SOAP
> 
> 
> Hey,
> 
> I am trying to write a UDDI registry browser to be used on my 
> companies web
> portal. I am new to JSP, UDDI, SOAP, etc. I have checked and 
> double checked
> my code, but do not know where else to look. I am posting 
> this on both a
> SOAP and JSP mailing list, when this could be a UDDI issue 
> and off-topic for
> both lists. Please indulge me by having a look at my code. 
> Any suggestions
> will be appreciated. If someone knows of a UDDI mailing list, 
> please tell me
> where I can find it.
> 
> This is the error returned when the JSP page is called from 
> the browser:
> 
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://uddi.ibm.com/testregistry/inquiryapi
> 
> This is my code:
> 
> <%@ page language="java" contentType="text/html" %>
> 
> <%@ page import="java.net.*"%>
> <%@ page import="java.io.*"%>
> 
> <html>
> 
> 	<head>
> 
> 		<title>UDDI Registry Browser</title>
> 
> 	</head>
> 
> 	<body>
> 
> 		<%
> 
> 		try {
> 
> 			URL u = new 
> URL("http://uddi.ibm.com/testregistry/inquiryapi");
> 			URLConnection uc = u.openConnection();
> 			HttpURLConnection connection = 
> (HttpURLConnection) uc;
> 
> 			connection.setDoOutput(true);
> 			connection.setDoInput(true);
> 			connection.setRequestMethod("POST");
> 			connection.setRequestProperty("SOAPAction",
> "http://uddi.ibm.com/testregistry/inquiryapi");
> 
> 			Writer wout = new 
> OutputStreamWriter(connection.getOutputStream());
> 
> 			wout.write("<?xml version='1.0'?>\r\n");
> 			wout.write("<SOAP-ENV:Envelope ");
> 			wout.write("xmlns:SOAP-ENV=");
> 			
> wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
> 			wout.write("xmlns:xsi=");
> 			
> wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
> 			wout.write("<SOAP-ENV:Body>\r\n");
> 			wout.write("<find_business 
> generic='2.0' xmlns='urn:uddi-org:api_v2'>");
> 			wout.write("<name>IBM</name>");
> 			wout.write("</find_business>");
> 			wout.write("</SOAP-ENV:Body>\r\n");
> 			wout.write("</SOAP-ENV:Envelope>\r\n");
> 
> 			wout.flush();
> 			wout.close();

 I think you should not close wout until after you have read the input
stream.
Also you should catch a more general exception.

wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285



> 
> 			InputStream is = connection.getInputStream();
> 			InputStreamReader isr = new 
> InputStreamReader(is);
> 			BufferedReader br = new BufferedReader(isr);
> 			String line = null;
> 			while ( (line = br.readLine()) != null) {
> 				System.out.println("line: " + line);
> 			}
> 
> 		}
> 		catch (IOException e) {
> 			out.println(e);
> 		}
> 
> 		%>
> 
> 	</body>
> 
> </html>
> 
> Thanks in advance,
> 
> Brian Ivey
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@xml.apache.org>
> For additional 
> commands, e-mail: <ma...@xml.apache.org>
> 
> 



RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Brian Ivey <cb...@comcast.net>.
Hey Martin,

I've switched the code from a POST to a GET and I received the same HTTP 500
return code from both the Microsoft and SAP test registries. The IBM test
registry now returns a 405. This is odd because I have not changed one line
of code, but now receive a different msg from the one server I was testing
against all day.

The 500 error makes me think that my SOAP or UDDI request are incorrect.
After all it is an Internal Server error. That does mean something is going
on at servers end... right?

I'm scratching my head on this one. Maybe I'll sleep on it.

Thanks for your help.

Brian

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:JSP-INTEREST@JAVA.SUN.COM]On Behalf Of Brian Ivey
Sent: Thursday, August 08, 2002 6:41 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: Building a UDDI Registry Browser JSP and SOAP


Hey,

I am trying to write a UDDI registry browser to be used on my companies web
portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
my code, but do not know where else to look. I am posting this on both a
SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
both lists. Please indulge me by having a look at my code. Any suggestions
will be appreciated. If someone knows of a UDDI mailing list, please tell me
where I can find it.

This is the error returned when the JSP page is called from the browser:

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://uddi.ibm.com/testregistry/inquiryapi

This is my code:

<%@ page language="java" contentType="text/html" %>

<%@ page import="java.net.*"%>
<%@ page import="java.io.*"%>

<html>

        <head>

                <title>UDDI Registry Browser</title>

        </head>

        <body>

                <%

                try {

                        URL u = new
URL("http://uddi.ibm.com/testregistry/inquiryapi");
                        URLConnection uc = u.openConnection();
                        HttpURLConnection connection = (HttpURLConnection)
uc;

                        connection.setDoOutput(true);
                        connection.setDoInput(true);
                        connection.setRequestMethod("POST");
                        connection.setRequestProperty("SOAPAction",
"http://uddi.ibm.com/testregistry/inquiryapi");

                        Writer wout = new
OutputStreamWriter(connection.getOutputStream());

                        wout.write("<?xml version='1.0'?>\r\n");
                        wout.write("<SOAP-ENV:Envelope ");
                        wout.write("xmlns:SOAP-ENV=");

wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
                        wout.write("xmlns:xsi=");

wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
                        wout.write("<SOAP-ENV:Body>\r\n");
                        wout.write("<find_business generic='2.0'
xmlns='urn:uddi-org:api_v2'>");
                        wout.write("<name>IBM</name>");
                        wout.write("</find_business>");
                        wout.write("</SOAP-ENV:Body>\r\n");
                        wout.write("</SOAP-ENV:Envelope>\r\n");

                        wout.flush();
                        wout.close();

                        InputStream is = connection.getInputStream();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader br = new BufferedReader(isr);
                        String line = null;
                        while ( (line = br.readLine()) != null) {
                                System.out.println("line: " + line);
                        }

                }
                catch (IOException e) {
                        out.println(e);
                }

                %>

        </body>

</html>

Thanks in advance,

Brian Ivey

===========================================================================
To unsubscribe: mailto listserv@java.sun.com with body: "signoff
JSP-INTEREST".
For digest: mailto listserv@java.sun.com 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


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: Building a UDDI Registry Browser JSP and SOAP

Posted by Dan Allen <da...@nist.gov>.
	Yep. Bet the server returned a SOAP Fault.  SOAP Faults
	are always sent with HTTP status of 500 (Server error).
	HttpURLConnection is busted in versions of the JDK prior
	to 1.4.  For a thoroughly mind-boggeling look at the
	brain-deadness of some of the Sun Java developers visit
	the Java bug database and peruse the error track on this
	bug (errr... sorry Sun, FEATURE).  If you want to use
	HttpURLConnection you MUST use JDK 1.4 and you must
	test the HTTP status code before you get the input stream
	for the response as follows:
		
		InputStream in;
		if(conn.getResponseCode() >= 400)
		   in = conn.getErrorStream();
		else
		   in = con.getInputStream();

	Dan
	
> -----Original Message-----
> From: Brian Ivey [mailto:cbivey@comcast.net]
> Sent: Thursday, August 08, 2002 6:41 PM
> To: List - Apache SOAP (User); List - JSP
> Subject: Building a UDDI Registry Browser JSP and SOAP
> 
> 
> Hey,
> 
> I am trying to write a UDDI registry browser to be used on my companies web
> portal. I am new to JSP, UDDI, SOAP, etc. I have checked and double checked
> my code, but do not know where else to look. I am posting this on both a
> SOAP and JSP mailing list, when this could be a UDDI issue and off-topic for
> both lists. Please indulge me by having a look at my code. Any suggestions
> will be appreciated. If someone knows of a UDDI mailing list, please tell me
> where I can find it.
> 
> This is the error returned when the JSP page is called from the browser:
> 
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://uddi.ibm.com/testregistry/inquiryapi
> 
> This is my code:
> 
> <%@ page language="java" contentType="text/html" %>
> 
> <%@ page import="java.net.*"%>
> <%@ page import="java.io.*"%>
> 
> <html>
> 
> 	<head>
> 
> 		<title>UDDI Registry Browser</title>
> 
> 	</head>
> 
> 	<body>
> 
> 		<%
> 
> 		try {
> 
> 			URL u = new URL("http://uddi.ibm.com/testregistry/inquiryapi");
> 			URLConnection uc = u.openConnection();
> 			HttpURLConnection connection = (HttpURLConnection) uc;
> 
> 			connection.setDoOutput(true);
> 			connection.setDoInput(true);
> 			connection.setRequestMethod("POST");
> 			connection.setRequestProperty("SOAPAction",
> "http://uddi.ibm.com/testregistry/inquiryapi");
> 
> 			Writer wout = new OutputStreamWriter(connection.getOutputStream());
> 
> 			wout.write("<?xml version='1.0'?>\r\n");
> 			wout.write("<SOAP-ENV:Envelope ");
> 			wout.write("xmlns:SOAP-ENV=");
> 			wout.write("'http://schemas.xmlsoap.org/soap/envelope/' ");
> 			wout.write("xmlns:xsi=");
> 			wout.write("'http://www.w3.org/2001/XMLSchema-instance'>\r\n");
> 			wout.write("<SOAP-ENV:Body>\r\n");
> 			wout.write("<find_business generic='2.0' xmlns='urn:uddi-org:api_v2'>");
> 			wout.write("<name>IBM</name>");
> 			wout.write("</find_business>");
> 			wout.write("</SOAP-ENV:Body>\r\n");
> 			wout.write("</SOAP-ENV:Envelope>\r\n");
> 
> 			wout.flush();
> 			wout.close();
> 
> 			InputStream is = connection.getInputStream();
> 			InputStreamReader isr = new InputStreamReader(is);
> 			BufferedReader br = new BufferedReader(isr);
> 			String line = null;
> 			while ( (line = br.readLine()) != null) {
> 				System.out.println("line: " + line);
> 			}
> 
> 		}
> 		catch (IOException e) {
> 			out.println(e);
> 		}
> 
> 		%>
> 
> 	</body>
> 
> </html>
> 
> Thanks in advance,
> 
> Brian Ivey
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
> 
>