ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snic...@apache.org
Subject cvs commit: xml-soap/java/src/org/apache/soap/server/http MessageRouterServlet.java RPCRouterServlet.java
Date Tue, 27 May 2003 22:21:03 GMT
snichol     2003/05/27 15:21:03

  Modified:    java/src/org/apache/soap/server/http
                        MessageRouterServlet.java RPCRouterServlet.java
  Log:
  Throw a specific exception when target URI is null, rather than an NPE.
  
  Revision  Changes    Path
  1.39      +3 -0      xml-soap/java/src/org/apache/soap/server/http/MessageRouterServlet.java
  
  Index: MessageRouterServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/server/http/MessageRouterServlet.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- MessageRouterServlet.java	21 Nov 2002 16:36:58 -0000	1.38
  +++ MessageRouterServlet.java	27 May 2003 22:21:02 -0000	1.39
  @@ -297,6 +297,9 @@
                                      "Message envelope's body is empty!");
           }
           String targetID = e.getNamespaceURI ();
  +        if (targetID == null)
  +          throw new SOAPException(Constants.FAULT_CODE_SERVER,
  +                                 "No target namespace specified in request.");
           String messageName = e.getLocalName ();
     
           // is this a valid message?
  
  
  
  1.46      +3 -0      xml-soap/java/src/org/apache/soap/server/http/RPCRouterServlet.java
  
  Index: RPCRouterServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/server/http/RPCRouterServlet.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- RPCRouterServlet.java	21 Nov 2002 16:36:58 -0000	1.45
  +++ RPCRouterServlet.java	27 May 2003 22:21:02 -0000	1.46
  @@ -332,6 +332,9 @@
             call = RPCRouter.extractCallFromEnvelope(serviceManager, callEnv,
                                                      reqCtx);
             targetID = call.getTargetObjectURI ();
  +          if (targetID == null)
  +            throw new SOAPException(Constants.FAULT_CODE_SERVER,
  +                                   "No target namespace specified in request.");
             fullTargetID = call.getFullTargetObjectURI ();
           } catch (IllegalArgumentException e) {
             String msg = e.getMessage ();
  
  
  

Mime
View raw message