[GLASSFISH-423] Cannot create web service from WSDL Created: 16/Mar/06  Updated: 17/Mar/06  Resolved: 17/Mar/06

Status: Resolved
Project: glassfish
Component/s: web_services
Affects Version/s: 9.0pe
Fix Version/s: 9.0pe

Type: Bug Priority: Blocker
Reporter: mkuchtiak Assignee: vijaysr
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: Linux


Attachments: Microsoft Word WebApplication9.tar    
Issuezilla Id: 423

 Description   

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?

#]


 Comments   
Comment by mkuchtiak [ 16/Mar/06 ]

Created an attachment (id=137)
Web Application

Comment by mkuchtiak [ 16/Mar/06 ]

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"/>

Comment by mkuchtiak [ 16/Mar/06 ]

I use the #41 GlassFish build

Comment by vijaysr [ 16/Mar/06 ]

changing owner

Comment by vijaysr [ 16/Mar/06 ]

started

Comment by vijaysr [ 16/Mar/06 ]

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

Comment by mkuchtiak [ 16/Mar/06 ]

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.

Comment by vijaysr [ 16/Mar/06 ]

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

Comment by mkuchtiak [ 17/Mar/06 ]

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.

Generated at Fri Dec 09 03:54:20 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.