summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-10-12 09:16:54 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-10-12 09:16:54 +0000
commit6b2492ecc25117702608cedf876ae48efb824e0e (patch)
treecfa9ccb82fa2c7022a4ab819f5a133b5786b7ded /sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src
parent4d98161f40fb1b67a605f0f73b028057efe3acd3 (diff)
Update with some guards to avoid NPEs
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1182279 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src')
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
index 6266920a27..0f37b1adb0 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
@@ -114,16 +114,19 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics {
protected Dispatch<SOAPMessage> createDispatch(WebServiceBinding wsBinding) {
URL wsdlLocation = null;
try {
- wsdlLocation = new URL(wsBinding.getGeneratedWSDLDocument().getDocumentBaseURI());
+ if (wsBinding.getGeneratedWSDLDocument() != null && wsBinding.getGeneratedWSDLDocument().getDocumentBaseURI() != null) {
+ wsdlLocation = new URL(wsBinding.getGeneratedWSDLDocument().getDocumentBaseURI());
+ }
} catch (Exception e) {
- try {
- if (wsBinding.getUserSpecifiedWSDLDefinition().getLocation() != null) {
- wsdlLocation = wsBinding.getUserSpecifiedWSDLDefinition().getLocation().toURL();
- }
- } catch (MalformedURLException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
+ // ignore and try getting the location from the other places
+ }
+ try {
+ if (wsBinding.getUserSpecifiedWSDLDefinition().getLocation() != null) {
+ wsdlLocation = wsBinding.getUserSpecifiedWSDLDefinition().getLocation().toURL();
}
+ } catch (MalformedURLException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
}
QName serviceName = null;