Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Incomplete
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe
    • Component/s: web_services
    • Labels:
      None
    • Environment:

      Operating System: Linux
      Platform: Linux

    • 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?

      #]

        Activity

        mkuchtiak created issue -
        Hide
        mkuchtiak added a comment -

        Created an attachment (id=137)
        Web Application

        Show
        mkuchtiak added a comment - Created an attachment (id=137) Web Application
        Hide
        mkuchtiak added a comment -

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

        Show
        mkuchtiak added a comment - 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"/>
        Hide
        mkuchtiak added a comment -

        I use the #41 GlassFish build

        Show
        mkuchtiak added a comment - I use the #41 GlassFish build
        Hide
        vijaysr added a comment -

        changing owner

        Show
        vijaysr added a comment - changing owner
        Hide
        vijaysr added a comment -

        started

        Show
        vijaysr added a comment - started
        Hide
        vijaysr added a comment -

        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

        Show
        vijaysr added a comment - 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
        Hide
        mkuchtiak added a comment -

        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.

        Show
        mkuchtiak added a comment - 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.
        Hide
        vijaysr added a comment -

        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

        Show
        vijaysr added a comment - 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
        Hide
        mkuchtiak added a comment -

        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.

        Show
        mkuchtiak added a comment - 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.
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 423 32027

          People

          • Assignee:
            vijaysr
            Reporter:
            mkuchtiak
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: