This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 86513 - Nodes permit adding multiple soap:* elements even when not valid
Summary: Nodes permit adding multiple soap:* elements even when not valid
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: WSDL Tools (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Shivanand Kini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-04 20:30 UTC by jlautz
Modified: 2007-09-17 21:44 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jlautz 2006-10-04 20:30:58 UTC
Seen on Windows XP with NB 55 061003 and JDK 1.5.0_07:

According to the WSDL spec (http://www.w3.org/TR/wsdl#_soap-b):

1. Each binding input or output element must contain only one soap:body element.

==> The Add -> Soap Body context menu item is always available on the binding
input and output nodes, so the user can continue to add soap:body elements even
when they aren't valid (when a soap:body element is already defined for the
input or output element).

2. Each fault element must contain only one soap:fault element.
==> The Add -> Soap Fault context menu item is always available on the binding
fault nodes, so the user can continue to add soap:fault elements even when they
aren't valid (when a soap:fault element is already defined for the fault element).

3. Each binding operation can contain 0 or 1 soap:operation element.
==> The Add -> Soap Operation context menu item is always available on the
binding operation nodes, so the user can continue to add soap:operation elements
even when they aren't valid (when a soap:operation element is already defined
for the operation element).
Comment 1 jlautz 2006-10-04 20:34:31 UTC
4. Each binding must have one soap:binding element.
==> The Add -> Soap Binding context menu item is always available on the binding
nodes, so the user can continue to add soap:binding elements even
when they aren't valid (when a soap:binding element is already defined for the
binding element).
Comment 2 jlautz 2006-10-04 22:23:21 UTC
5. Each service port "using the SOAP binding MUST specify exactly one address."
==> The Add -> Soap Address context menu item is always available on the service
port nodes, so the user can continue to add soap:address elements even when they
aren't valid (when a soap:address element is already defined for the port element).
Comment 3 Shivanand Kini 2006-10-05 03:13:28 UTC
Current design creates the menu from schema and the schema doesnt provide this
information, as to how many times the elements can be created.
This needs more design and cannot be completed at this juncture. 

Changing this to enhancement.
Comment 4 Ritesh Adval 2006-10-05 05:21:19 UTC
one way to fix this is as follows:

we define what element should occur under binding operation fault as:

<folder name ="BindingOperationFault">
		      <file name="SoapBindingOperationFault">
	            <attr name="xsdFileName" stringvalue="soap" />
		        <attr name="element" stringvalue="fault" />
		        <attr name="SystemFileSystem.localizingBundle" 
stringvalue="org.netbeans.modules.xml.wsdlextui.resources.Bundle" />
		        <attr name="SystemFileSystem.icon" 
urlvalue="nbresloc:/org/netbeans/modules/xml/wsdlextui/resources/soap/fault.png"
 /> 
		      </file>
		      
	      </folder>
	      
we could add one additional attribute called maxOccurs under 
SoapBindingOperationFault and use it to enable/disable menu.

<file name="SoapBindingOperationFault">
<attr name="xsdFileName" stringvalue="soap" />
<attr name="maxOccurs" stringvalue="unbounded" />
Comment 5 Jiri Prox 2007-09-17 21:44:36 UTC
Obsolete milestone, please reevaluate