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 77736 - wsdl-port missing in service-ref for web service clients for mls to work
Summary: wsdl-port missing in service-ref for web service clients for mls to work
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-12 18:14 UTC by Srividhya Narayanan
Modified: 2006-07-19 03:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srividhya Narayanan 2006-06-12 18:14:10 UTC
The service-ref generated by web service clients need to have the wsdl-port
defined in order for message-security-binding element to work. Here is an
example of the missing lines in generated web service client DD today.

<service-ref>
   <service-ref-name>service/StockQuoteService</service-ref-name>
   <port-info>

-->    <wsdl-port>
          <namepaceURI>...</namespaecURI>
          <localpart>...</localPart>
-->    </wsdl-port>

<service-endpoint-interface>com.sun.identity.wss.sample.stockclient.StockQ
uotePortType</service-endpoint-interface>
       <message-security-binding auth-layer="SOAP" provider-id="AMClientProvide
r">
         <message-security>
           <message>
               <!-- empty means all operations -->
           </message>
           <request-protection auth-source="content"/>
           <response-protection auth-source="content"/>
         </message-security>
       </message-security-binding>
   </port-info>
 </service-ref>
Comment 1 _ pcw 2006-06-25 07:14:35 UTC
Currently we automatically set the service-endpoint-interface field only.

To set wsdl-port (either "instead of" or "in addition to" the SEI), the plugin
code needs access to the WSDL model.  Before my vacation started 2 weeks ago, I
was investigating exactly how these fields should be set and when (it can get
pretty complicated), and where the data would come from.

If I can determined a closed-form solution to this problem, I will fix it for
5.5.  If I can't, then I'll write up what the different scenarios are for
posterity and we'll go from there I guess.  One possibility is to add the
ability to create a port-info entry to the message-security-binding api I
created for identity team.
Comment 2 Srividhya Narayanan 2006-07-15 00:01:51 UTC
This is a stopper for Enterprise Pack beta and hence the change of priority. 
Comment 3 _ pcw 2006-07-17 23:21:40 UTC
After consultation with Vidhya, we will resolve this problem for Identity team
by changing the MessageSecurityProvider API.  Specifically, the existing methods
get/setMessageSecurityBinding(String serviceRefName, ...) will be changed to
also require the namespaceURI and localpart that correspond to the WSDL port
they want to secure.

I have added the implemented the new methods and added them to the
MessageSecurityProvider interface.  I have also deprecated the old methods and
will remove them when Vidhya has confirmed she has upgraded and tested the
identity code against the new ones.

Diffs:
http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddapi/src/org/netbeans/modules/j2ee/sun/dd/api/services/MessageSecurityProvider.java?r1=1.1.2.4&r2=1.1.2.5
http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/configbean/ServiceRef.java?r1=1.1.16.2.2.3&r2=1.1.16.2.2.4
http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/configbean/services/MessageSecurityProviderImpl.java?r1=1.1.2.4&r2=1.1.2.5