I am sending a SOAP message using:

message.send( url, SOAPActionURI, env );

 where URL is the URL of the web service, SOAPActionURI is the web service
and webmethod to be executed, and env is the SOAP Envelope.

For testing purposes, I have changed the hostname in the URL to an invalid
hostname.  The message.send method throws a SOAPException and this is being
correctly handled and caught in my code.  Before the catch logic for the
SOAPException is processed there is an UnknownHostException that is being
thrown in the chain, but is not being caught.

Here is the error listing.  Modules DCFController, UOWBrokerBase, and
SLMReader of package dcf.frame are within my application.

java.net.UnknownHostException: w2bzbt4407
        at java.net.InetAddress.getAllByName0(Unknown Source)
        at java.net.InetAddress.getAllByName0(Unknown Source)
        at java.net.InetAddress.getByName(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at
org.apache.soap.util.net.HTTPUtils.buildSocket(HTTPUtils.java:126)
        at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:208)
        at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnec
tion.java:282)
        at org.apache.soap.messaging.Message.send(Message.java:123)
        at dcf.frame.SLMReader.DownloadTables(SLMReader.java:139)
        at dcf.frame.SLMReader.doLoad(SLMReader.java:47)
        at dcf.frame.UOWBrokerBase.notifyDCFReaders(UOWBrokerBase.java:181)
        at dcf.frame.DCFController.processFeeds(DCFController.java:207)
        at dcf.frame.DCFController.main(DCFController.java:57)
DCF Exception: SLM00006 - Error sending/receiving soap message:
[SOAPException:
faultCode=SOAP-ENV:Client; msg=Error opening socket: w2bzbt4407;
targetException
=java.lang.IllegalArgumentException: Error opening socket: w2bzbt4407]

The DCF Exception at the bottom is an application exception that all
exceptions are converted to.  In this case it is correctly catching the SOAP
Exception, wrapping it with some user information and displaying the error.

Before the SOAPException is caught, there is an UnknowHostException that is
being thrown.  A review of the documentation shows that this message is
first thrown from java.net.InetAddress.getByName.  I would think that this
exception would be passed back up the chain.  However, the way the output
reads it looks like there is someplace where it is not being handled at or
prior to Message.send.  Message.send sees that there is an error and throws
a SOAPException.  This SOAPException is being caught by my module SLMReader,
converted to a DCFException, passed up to the DCFController and correctly
displayed and handled.

I have a general catch statement as well as a specific catch statement for
UnknowHostException.  The fact that Message.send is throwing a SOAPException
(which is being correctly caught) leads me to believe that somewhere between
Message.send and InetAddress.getAllByName the UnknownHostException is being
thrown and not handled.

I am using apache soap 2.3.1.  

Can anyone tell me what is going on and how the UnknownHostException can be
caught and handled.

Thanks,

Dave



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to