1
+ /*
2
+ * JBoss, Home of Professional Open Source.
3
+ * See the COPYRIGHT.txt file distributed with this work for information
4
+ * regarding copyright ownership. Some portions may be licensed
5
+ * to Red Hat, Inc. under one or more contributor license agreements.
6
+ *
7
+ * This library is free software; you can redistribute it and/or
8
+ * modify it under the terms of the GNU Lesser General Public
9
+ * License as published by the Free Software Foundation; either
10
+ * version 2.1 of the License, or (at your option) any later version.
11
+ *
12
+ * This library is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ * Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public
18
+ * License along with this library; if not, write to the Free Software
19
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20
+ * 02110-1301 USA.
21
+ */
22
+
1
23
package org .teiid .resource .adapter .ws ;
2
24
3
25
import java .io .IOException ;
@@ -188,6 +210,9 @@ public <T> Dispatch<T> createDispatch(String binding, String endpoint, Class<T>
188
210
String defaultEndpoint = mcf .getEndPoint ();
189
211
String defaultQueryString = null ;
190
212
String defaultFragment = null ;
213
+ if (defaultEndpoint == null ) {
214
+ throw new WebServiceException (WSManagedConnectionFactory .UTIL .getString ("null_default_endpoint" )); //$NON-NLS-1$
215
+ }
191
216
String [] parts = defaultEndpoint .split ("\\ ?" , 2 ); //$NON-NLS-1$
192
217
defaultEndpoint = parts [0 ];
193
218
if (parts .length > 1 ) {
@@ -212,6 +237,9 @@ public <T> Dispatch<T> createDispatch(String binding, String endpoint, Class<T>
212
237
}
213
238
} else {
214
239
endpoint = mcf .getEndPoint ();
240
+ if (endpoint == null ) {
241
+ throw new WebServiceException (WSManagedConnectionFactory .UTIL .getString ("null_endpoint" )); //$NON-NLS-1$
242
+ }
215
243
}
216
244
Dispatch <T > dispatch = null ;
217
245
if (HTTPBinding .HTTP_BINDING .equals (binding ) && type == DataSource .class ) {
0 commit comments