changeset 23786:e5d5324d7c5e

8033113: wsimport fails on WSDL:header parameter name customization Reviewed-by: chegar
author mkos
date Tue, 08 Apr 2014 11:26:40 +0100
parents 54f3030334ea
children 053266219b53
files jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java	Tue Apr 01 17:27:04 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java	Tue Apr 08 11:26:40 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -177,7 +177,8 @@
             throw new AbortException();
         }
         _parameters.add(p);
-        _parametersByName.put(p.getName(), p);
+        String name = p.getCustomName() != null ? p.getCustomName() : p.getName();
+        _parametersByName.put(name, p);
     }
 
     public Parameter getParameterByName(String name) {
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java	Tue Apr 01 17:27:04 2014 -0700
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java	Tue Apr 08 11:26:40 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1791,9 +1791,9 @@
                 }
 
                 if (part.isIN()) {
-                    setCustomizedParameterName(info.portTypeOperation, inMsg, part, param, false);
+                    setCustomizedParameterName(info.bindingOperation, inMsg, part, param, false);
                 } else if (outMsg != null) {
-                    setCustomizedParameterName(info.portTypeOperation, outMsg, part, param, false);
+                    setCustomizedParameterName(info.bindingOperation, outMsg, part, param, false);
                 }
 
                 params.add(param);