You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2005/12/01 04:23:04 UTC
svn commit: r350124 -
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java
Author: chinthaka
Date: Wed Nov 30 19:22:57 2005
New Revision: 350124
URL: http://svn.apache.org/viewcvs?rev=350124&view=rev
Log:
- Fixing a possible NPE problem in using Options
- defaulting the SOAP version to SOAP 1.1
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java?rev=350124&r1=350123&r2=350124&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java Wed Nov 30 19:22:57 2005
@@ -197,10 +197,18 @@
* @throws AxisFault
*/
protected SOAPEnvelope createDefaultSOAPEnvelope() throws AxisFault {
+
+ // I added code to check the nullity in the prepareInvocation(). But it seems that this method
+ // can be called before prepareInvocation().
+ if(clientOptions == null){
+ throw new AxisFault("Can not proceed without options being set for invocation. Set the" +
+ "properties for this invocation via MEPClient.setOptions(Options) first.");
+ }
+
String soapVersionURI = clientOptions.getSoapVersionURI();
if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) {
return OMAbstractFactory.getSOAP12Factory().getDefaultEnvelope();
- } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) {
+ } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI) || "".equals(soapVersionURI) || soapVersionURI == null) {
return OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
} else {
throw new AxisFault(Messages.getMessage("invaidSOAPversion"));