src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
67 67
68 Action a = method.getSEIMethod().getAnnotation(Action.class); 68 Action a = method.getSEIMethod().getAnnotation(Action.class);
69 if (a != null && !a.input().equals("")) { 69 if (a != null && !a.input().equals("")) {
70 addAttribute(input, a.input()); 70 addAttribute(input, a.input());
71 } else { 71 } else {
72 if (method.getBinding().getSOAPAction().equals("")) { 72
73 String soapAction = method.getBinding().getSOAPAction();
74 // in SOAP 1.2 soapAction is optional ...
75 if (soapAction == null || soapAction.equals("")) {
73 //hack: generate default action for interop with .Net3.0 when soapAction is non-empty 76 //hack: generate default action for interop with .Net3.0 when soapAction is non-empty
74 String defaultAction = getDefaultAction(method); 77 String defaultAction = getDefaultAction(method);
75 addAttribute(input, defaultAction); 78 addAttribute(input, defaultAction);
76 } 79 }
77 } 80 }
141 144
142 @Override 145 @Override
143 public void addBindingExtension(TypedXmlWriter binding) { 146 public void addBindingExtension(TypedXmlWriter binding) {
144 if (!enabled) 147 if (!enabled)
145 return; 148 return;
146 UsingAddressing ua = binding._element(AddressingVersion.W3C.wsdlExtensionTag, UsingAddressing.class); 149 binding._element(AddressingVersion.W3C.wsdlExtensionTag, UsingAddressing.class);
147 /* 150 /*
148 Do not generate wsdl:required=true 151 Do not generate wsdl:required=true
149 if(required) { 152 if(required) {
150 ua.required(true); 153 ua.required(true);
151 } 154 }

mercurial