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 71780 - Provide customization facility when creating ws and client from wsdl
Summary: Provide customization facility when creating ws and client from wsdl
Status: RESOLVED DUPLICATE of bug 77248
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Roderico Cruz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-24 03:03 UTC by coldrick
Modified: 2008-01-07 20:06 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
sample wsdl (60.04 KB, text/xml)
2006-01-24 03:04 UTC, coldrick
Details
class not generated for this (2.69 KB, text/xml)
2006-01-24 22:45 UTC, coldrick
Details
this wsdl generates ok (2.67 KB, text/xml)
2006-01-24 22:46 UTC, coldrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description coldrick 2006-01-24 03:03:39 UTC
Several Java classes are not generated when creating a web service from the
attached wsdl: no error messages are generated, and it is not clear why the
classes are not generated
Comment 1 coldrick 2006-01-24 03:04:22 UTC
Created attachment 28561 [details]
sample wsdl
Comment 2 _ pcw 2006-01-24 06:06:27 UTC
The java classes not being generated is more of a JWSDP issue so we'll have to
file that one with them.

But there is a NetBeans bug wrt/ to this issue as well:  The service name is
"NMIStandingDataResponse", but due to name space conflicts, the java class for
the service name becomes "NMIStandingDataResponse_Service".  Unfortunately, the
IDE code to anticipate the server name is incorrect and doesn't add the _Service
portion, causing the WSDL to never synchronize with the registry.

BTW: A temporary workaround for this is to go into the WSDL and change the
service name to _Service.  Just make sure you change it back before production
(or modify the build script to package the original - that could be a bit
tricky), or find a way to truely rename the actual service.
Comment 3 coldrick 2006-01-24 22:44:06 UTC
I have another simple case: I'll attach two wsdls, good.wsdl and bad.wsdl: good
generates properly, bad doesn't. The only difference is in the name of the
element: MYResponse in good, XmlInterfaceResponse in bad
Comment 4 coldrick 2006-01-24 22:45:16 UTC
Created attachment 28585 [details]
class not generated for this
Comment 5 coldrick 2006-01-24 22:46:07 UTC
Created attachment 28586 [details]
this wsdl generates ok
Comment 6 Roderico Cruz 2006-05-27 03:16:29 UTC
Both the "good" and "bad" wsdls from David generate properly in NB5.5
(wsimport). The NMIStandingDataResponse.wsdl produces a "uniqueness constraint
violation" from wsimport. I verified this by running wsimport on this wsdl
outside of the IDE, from the command line. Peter W, did we open a bug on jwsdp
on this? Can we now close this bug?
Comment 7 _ pcw 2006-05-29 19:37:02 UTC
I don't think I entered a bug for JWSDP about the bad class generation.  (That
probably means none was opened.)

OTOH, assuming it's fixed in JAX-WS, they'll probably say fixed in later
release, won't patch in older one.  I thnk it should be filed anyway.  Rico, can
you do that?
Comment 8 Roderico Cruz 2006-06-09 02:16:58 UTC
Regarding the "uniqueness constraint violation" from wsimport when using
NMIStandingDataResponse.wsdl, Vivek Pandey offered this explanation:
------------------------------------------------------------------------------
This error is due to the fact that the Response operation qualifies for wrapper
style and the local name for wrapper child for request and response are the
same. Since the wrapper child does not qualify for INOUT, wsimport finds that
the in parameter and OUT parameter (appears as holder) have then same name and
fails. Since you can't have a java signature such as echo(int foo, String foo); 
----------------------------------------------------------------------------------
This can be fixed by customizing the wsdl and turning off the wrapper style in
the method generation. This is not possible in NB because the error is
encountered when the wsdl is being parsed for the first time at creation time
where customization is not yet possible. In future releases we may want to
provide customization capability at creation time.

Now, since both the "good" and "bad" wsdls from David generate properly in NB
5.5, I am closing this as "WORKSFORME". David, if you don't agree, kindly reopen.
Comment 9 coldrick 2006-06-09 02:39:52 UTC
Well, bottom line is (correct me if I'm wrong), a valid wsdl fails in nb,
regardless of the reason.

So this is a problem that needs to be addressed, right?

Thanks and regards,
David
Comment 10 Roderico Cruz 2006-06-21 02:20:15 UTC
This will require an enhancement in the Create Web Service (from wsdl) wizard.
The enhancement will allow the user to customize the wsdl at web service
creation time. This will probably be another page in the wizard. Currently, our
facility allows customization only after the web service has been created. 
I suggest we change this into an RFE.

Comment 11 coldrick 2006-06-21 02:49:45 UTC
Change to RFE makes sense. Thanks.
Comment 12 Martin Grebac 2006-06-21 08:45:53 UTC
I thought we discussed this some time ago and the result was that we should
allow creation of web service from wizard and then user should be able to
customize and regenerate correctly? Or am I missing something?
Comment 13 Roderico Cruz 2006-06-21 18:51:09 UTC
Yes, and that is the current design. However, there are cases like this
(hopefully these are corner cases) where wsimport fails because by default,
wsimport uses wrapper style in generation and there are wsdls that do not
qualify for wrapper style. Hence, customization is needed at web service
creation time (i.e., the first time the client is generated from wsimport),
otherwise generation will fail. 
Comment 14 Roderico Cruz 2008-01-07 19:50:23 UTC
Changed the Summary
Comment 15 Roderico Cruz 2008-01-07 20:06:28 UTC
Closing as duplicate of http://www.netbeans.org/issues/show_bug.cgi?id=77248

*** This issue has been marked as a duplicate of 77248 ***