You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Jim Cross <ji...@jimcross.com> on 2002/05/03 15:23:39 UTC

IllegalArgumentException in processing server exceptions on client side

I'm running SOAP 2.2 with WebLogic 6.1 SP2.

Whenever an exception gets generated on the server side, the fault 
information is not processed correctly on the client side.

The problem is in the unmarshall code of Fault.

The problem is this:


String namespaceURI = tempEl.getNamespaceURI();
// other code

if (namespaceURI == null
           || namespaceURI.equals(Constants.NS_URI_SOAP_ENV))
{

// do logic to retrieve fault code and other fault information
// this code never executes because namespaceURI is zero length string not null

}
// therefore faultCodeEl  is null
  if (faultCodeEl != null)
       {
         String faultCode = DOMUtils.getChildCharacterData(faultCodeEl);

         fault.setFaultCode(faultCode);
       }
       else
       {
// this exception gets thrown
         throw new IllegalArgumentException("A '" + Constants.Q_ELEM_FAULT +
                                            "' element must contain a: '" +
                                            Constants.ELEM_FAULT_CODE +
                                            "' element.");
       }

Any ideas?

Jim Cross
Jim Cross Java News!
http://www.jimcross.com
404 271 2571