Issue Details (XML | Word | Printable)

Key: GLASSFISH-423
Type: Bug Bug
Status: Resolved Resolved
Resolution: Incomplete
Priority: Blocker Blocker
Assignee: vijaysr
Reporter: mkuchtiak
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
glassfish

Cannot create web service from WSDL

Created: 16/Mar/06 05:36 AM   Updated: 17/Mar/06 02:52 AM   Resolved: 17/Mar/06 02:52 AM
Component/s: web_services
Affects Version/s: 9.0pe
Fix Version/s: 9.0pe

Time Tracking:
Not Specified

File Attachments: 1. Microsoft Word WebApplication9.tar (170 kB) 16/Mar/06 05:38 AM - mkuchtiak

Environment:

Operating System: Linux
Platform: Linux


Issuezilla Id: 423
Tags:
Participants: mkuchtiak and vijaysr


 Description  « Hide

I've created web service from wsdl (using the Netbeans IDE for deployment).
Server doesn't complain in deployment time.
When I enter the wsdl url in browser:
http://localhost:8080/WebApplication9/AddNumbersService?WSDL
I see the wsdl file - its OK.
When I enter the Tester Page url:
http://localhost:8080/WebApplication9/AddNumbersService?Tester
I get the message in browser window :
------
Invalid wsdl request
http://localhost:8080/WebApplication9/AddNumbersService?Tester for web service
AddNumbersService
------
When I create a client againd this wsdl, I get this message in Server.log :
SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
ex2=javax.xml.ws.WebServiceException: Couldn't create SOAP message due to
exception: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid
Content-Type:text/html. Is this an error message instead of a SOAP response?

#]


mkuchtiak added a comment - 16/Mar/06 05:38 AM

Created an attachment (id=137)
Web Application


mkuchtiak added a comment - 16/Mar/06 05:40 AM

wsimport attributes :

<wsimport sourcedestdir="${build.generated.dir}/wsimport/service"
package="add.numbers"
destdir="${build.classes.dir.real}"
wsdl="file:/space/home/mkuchtiak/ws/jaxws-ri/samples/fromwsdl/etc/AddNumbers.wsdl"
wsdllocation="WEB-INF/wsdl/AddNumbers.wsdl"/>


mkuchtiak added a comment - 16/Mar/06 05:42 AM

I use the #41 GlassFish build


vijaysr added a comment - 16/Mar/06 08:13 AM

changing owner


vijaysr added a comment - 16/Mar/06 08:15 AM

started


vijaysr added a comment - 16/Mar/06 08:31 AM

I am not able to use this attachment because it looks like a doc file.

However, I tried some of our dev tests which has similar AddNumbersService and
the tester page works just fine.

This problem you are getting looks very similar to a regression that was
introduced in glassfish nightly build on March 9 which was resolved on March 10.
If you can please take a GF nightly build dated later than March 11 and see if
this problem recurs, it will be helpful.

I am not able to reproduce this problem on latest GF nightly.

If the problem recurs even with the latest nightly, please attach the proper WAR
file

Thanks


mkuchtiak added a comment - 16/Mar/06 08:57 AM

I attached the WebApplication9.tar file. I think it is correct as I was able to
download it back.

Please, try to deploy this war to GlassFish and create a client for this WS.
Or try to test WS in GlassFish Tester page.

I tested Nightly Builds #40 and #41.

Sorry, I am reopening the bug again. This is a serious bug for us as we are
blocked in Netbeans.


vijaysr added a comment - 16/Mar/06 11:58 AM

This is a test problem. Here are the details :

This is a wsdl-java case; in this scenario, the endpoint impl should be careful
to match the service name and port name in the WSDL with those specified in the
@WebService.serviceName and @WebService.portName

In this particular test case, the wsdl has serviceName = AddNumbersService and
portName=AddNumbersPort. The endpoint impl class has
@WebService.serviceName=AddNumbersServuce which is correct but the endpoint does
not have any @WebService.portName <- this is wrong.

Because the portName is not specified, the app server assumes the default
portName (implClass+"Port") and this is causing this problem. Agreed the error
message is not that friendly and there are bugs open to improve error messages.

the fix will be to add portName attribute to the endpoint Impl class and things
should be fine. For reference, check the test
glassfish/appserv-tests/devtests/webservice/annotations/prepkged-svc-1


mkuchtiak added a comment - 17/Mar/06 02:52 AM

Even when I set the attribute :
portName=AddNumbersPort

I couldn't get it work :

When called the operation from my client I got :
Couldn't create SOAP message due to exception:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is
this an error message instead of a SOAP response?

In the Tester page I got :
Exception raised during method invocation : javax.xml.ws.WebServiceException:
Port {http://numbers.add/}AddNumbersPortis not found in service
{http://duke.org}AddNumbersService

This last log gave me a hint. I had to set also the targetNamespace attribute in
implementation class :
targetNamespace="http://duke.org"

And ... I got it
UUff: this was like a climb on Nanga Parbat

You right, the error messages were not intuitive.