NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Test Web Service URL incorrect

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
apriebe



Joined: 01 Nov 2010
Posts: 6

PostPosted: Mon Nov 01, 2010 10:43 pm    Post subject: Test Web Service URL incorrect Reply with quote

I'm using NetBeans 6.8 and Java EE6 build 22. I'm trying to create a web service and when I right click my web service and select test web service I get a warning (I've attached a screenshot), "Unable to open web service tester page" and it gives the URL it's trying to hit. The warning is legitimate because it's trying to hit a URL that doesn't exist.

As I've deployed the web application to GlassFish 3.01 I checked to see that the URL is correct, and it's not. See the attached image.

Basically NetBeans is adding a word to the URL that shouldn't exist.
NetBeans tries: http://localhost:8080/PulseWSInterface/PulseWSService?Tester
GlassFish has: http://localhost:8080/PulseWSInterface/PulseWS?Tester

Notice how "Service" is added right before the question mark. I know GlassFish has it correctly because the tester URL that it gives works, along with the fact that my web service is called "PulseWS" and not "PulseWSService." Adding "Service" would be redundant, like saying "ATM Machine" where the M already represents "Machine."



WebServiceEndpointInformation.png
 Description:
The tester URL in GlassFish
 Filesize:  163.32 KB
 Viewed:  6577 Time(s)

WebServiceEndpointInformation.png



Warning.png
 Description:
Warning message
 Filesize:  13.46 KB
 Viewed:  6577 Time(s)

Warning.png


Back to top
apriebe



Joined: 01 Nov 2010
Posts: 6

PostPosted: Tue Nov 02, 2010 4:37 pm    Post subject: bump Reply with quote

bump[/quote]
Back to top
apriebe



Joined: 01 Nov 2010
Posts: 6

PostPosted: Tue Nov 02, 2010 5:04 pm    Post subject: RE:Test Web Service URL incorrect Reply with quote

I tried upgrading to NetBeans 6.9 and the problem persists. The problem persists throughout the development of the entire web service as well.
Netbeans looks for the WSDL at http://localhost:8080/CalculatorWSService/CalculatorWSService?wsdl
But GlassFish is using http://localhost:8080/CalculatorWSService/CalculatorWS?wsdl

Anyone?
Back to top
Jeffrey Rubinoff
Posted via mailing list.





PostPosted: Wed Nov 03, 2010 8:34 pm    Post subject: Re: Test Web Service URL incorrect Reply with quote

This was fixed for the 6.9.1 upgrade. Is your NB fully updated?

On 11/2/2010 6:04 PM, apriebe wrote:
Quote:
I tried upgrading to NetBeans 6.9 and the problem persists. The problem persists throughout the development of the entire web service as well.
Netbeans looks for the WSDL at http://localhost:8080/CalculatorWSService/CalculatorWSService?wsdl
But GlassFish is using http://localhost:8080/CalculatorWSService/CalculatorWS?wsdl

Anyone?



Back to top
apriebe



Joined: 01 Nov 2010
Posts: 6

PostPosted: Thu Nov 04, 2010 2:33 pm    Post subject: Test Web Service URL incorrect Reply with quote

Quote:
This was fixed for the 6.9.1 upgrade. Is your NB fully updated?


Yes, I downloaded the newest version and did a full install. It asked if I wanted to keep anything from the previous installation and I chose no. This is not the NetBeans version available from Ubuntu either; I downloaded directly from the NetBeans website.

Here's what I'm running:
Product Version: NetBeans IDE 6.9.1 (Build 201007282301)
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
System: Linux version 2.6.32-25-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/apriebe/.netbeans/6.9

I was thinking that if I used Tomcat6 as my integrated server I would be able to hand the properly generated .war to GlassFish, but they do not interoperate. A .war generated by NetBeans using Tomcat6 cannot be deployed on GlassFish3.0.1.
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 608
Location: Simpsonville, SC

PostPosted: Fri Nov 05, 2010 12:21 pm    Post subject: Re: Test Web Service URL incorrect Reply with quote

I am not sure what your particulars are with regards to your web application, but I just created one for tomcat (6.0.29) and ran it. It worked fine. I then took the war file without modification and deployed it to GF 3.0.1 without issue. This should be the case unless you create an EE6 based application which will run on 3.0.1, but not on tomcat.


On Thu, Nov 4, 2010 at 10:33 AM, apriebe <address-removed ([email]address-removed[/email])> wrote:
Quote:

Quote:
This was fixed for the 6.9.1 upgrade. Is your NB fully updated?



Yes, I downloaded the newest version and did a full install. It asked if I wanted to keep anything from the previous installation and I chose no. This is not the NetBeans version available from Ubuntu either; I downloaded directly from the NetBeans website.

Here's what I'm running:
Product Version: NetBeans IDE 6.9.1 (Build 201007282301)
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
System: Linux version 2.6.32-25-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/apriebe/.netbeans/6.9

I was thinking that if I used Tomcat6 as my integrated server I would be able to hand the properly generated .war to GlassFish, but they do not interoperate. A .war generated by NetBeans using Tomcat6 cannot be deployed on GlassFish3.0.1.







--
John Yeary
--
http://javaevangelist.blogspot.com
http://www.johnyeary.com

"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat."
-- Theodore Roosevelt
Back to top
apriebe



Joined: 01 Nov 2010
Posts: 6

PostPosted: Fri Nov 05, 2010 3:52 pm    Post subject: Test Web Service URL incorrect Reply with quote

Quote:
I am not sure what your particulars are with regards to your web application, but I just created one for tomcat (6.0.29) and ran it. It worked fine. I then took the war file without modification and deployed it to GF 3.0.1 without issue. This should be the case unless you create an EE6 based application which will run on 3.0.1, but not on tomcat.


The web app I was building is directly from NetBeans as an example/getting started app. The example is the calculator example located here: http://netbeans.org/kb/docs/websvc/jax-ws.html

I'm not so much concerned with the interoperability between Tomcat and GlassFish. When I pick a web server I'll most likely stick with it for quite a while and not switch. I'm in development phase where I'm deciding which one I want to use. Because I can only get the web app to work on Tomcat, I'm using it.

I follow the steps in the example to the letter. I've run through it step by step at least a dozen times now. I always have the same issue with the tester and wsdl URL when using GlassFish as the integrated server in NetBeans. Tomcat works perfectly everytime.

As you stated, when I create the web app in Tomcat I have to create it as a EE5 app rather than an EE6 app. When I was using GlassFish I was creating the app as an EE6. Could the problem be with NetBeans and EE6?

There's also no way to edit the relative URL in NetBeans to be the correct one. I go to the properties of the application, and change the relative URL under the Run section to be what it should be but it never changes it regardless of what I put, and regardless of the test server (Tomcat or GlassFish).
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 608
Location: Simpsonville, SC

PostPosted: Sat Nov 06, 2010 12:16 am    Post subject: Re: Test Web Service URL incorrect Reply with quote

I created the sample version in NB, and could not duplicate your issues. I am sorry that I don't have any recommendations.


On Fri, Nov 5, 2010 at 11:53 AM, apriebe <address-removed ([email]address-removed[/email])> wrote:
Quote:

Quote:
I am not sure what your particulars are with regards to your web application, but I just created one for tomcat (6.0.29) and ran it. It worked fine. I then took the war file without modification and deployed it to GF 3.0.1 without issue. This should be the case unless you create an EE6 based application which will run on 3.0.1, but not on tomcat.


The web app I was building is directly from NetBeans as an example/getting started app. The example is the calculator example located here: http://netbeans.org/kb/docs/websvc/jax-ws.html

I'm not so much concerned with the interoperability between Tomcat and GlassFish. When I pick a web server I'll most likely stick with it for quite a while and not switch. I'm in development phase where I'm deciding which one I want to use. Because I can only get the web app to work on Tomcat, I'm using it.

I follow the steps in the example to the letter. I've run through it step by step at least a dozen times now. I always have the same issue with the tester and wsdl URL when using GlassFish as the integrated server in NetBeans. Tomcat works perfectly everytime.

As you stated, when I create the web app in Tomcat I have to create it as a EE5 app rather than an EE6 app. When I was using GlassFish I was creating the app as an EE6. Could the problem be with NetBeans and EE6?

There's also no way to edit the relative URL in NetBeans to be the correct one. I go to the properties of the application, and change the relative URL under the Run section to be what it should be but it never changes it regardless of what I put, and regardless of the test server (Tomcat or GlassFish).







--
John Yeary
--
http://javaevangelist.blogspot.com
http://www.johnyeary.com

"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat."
-- Theodore Roosevelt
Back to top
kman



Joined: 18 Feb 2011
Posts: 3

PostPosted: Fri Feb 18, 2011 1:32 pm    Post subject: Test Web Service URL incorrect Reply with quote

apriebe have you been able to resolve this issue. I am having the same problem.

I am following the tutorial at http://netbeans.org/kb/docs/websvc/jax-ws.html

Using...
Product Version: NetBeans IDE 6.9.1 (Build 201011082200)
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
System: Windows XP version 5.1 running on x86; Cp1254; tr_TR (nb)

My Web Service Project name is "WebServiceProjectName"
The name of the Web Service created in the Project is "WebServiceName"
The name of the Operation created in the "WebServiceName" is "add"

"add" operation just adds 2 int and returns another int as in the tutorial.

Following the tutorial I get...
Netbeans URL = http://localhost:8080/WebServiceProjectName/WebServiceNameService?Tester
Glassfish URL = http://localhost:8080/WebServiceNameService/WebServiceName?Tester

For the netbeans URL I can change the middle part of the URL by
right click the Project -> Properties -> Run
Change the Context Path from "/WebServiceProjectName" to "/WebServiceNameService"

then I get these as the URLs
Netbeans URL = http://localhost:8080/WebServiceNameService/WebServiceNameService?Tester
Glassfish URL = http://localhost:8080/WebServiceNameService/WebServiceName?Tester

but obviously I still have an extra "Service" before the question mark for the Netbeans URL...

Any help please?
Back to top
JEFFREY RUBINOFF
Posted via mailing list.





PostPosted: Fri Feb 18, 2011 9:55 pm    Post subject: Re: Test Web Service URL incorrect Reply with quote

Check the version of GlassFish that you are using. URL construction for
web services as session beans changed during GF 3.0.1 development. If
you are using an older GF build than 3.0.1 final, you will have this
difference between the GF URL and what NB expects the GF URL to be.

Jeff

On 18.2.2011 14:33, kman wrote:
Quote:
apriebe have you been able to resolve this issue. I am having the same problem.

I am following the tutorial at http://netbeans.org/kb/docs/websvc/jax-ws.html

Using...
Product Version: NetBeans IDE 6.9.1 (Build 201011082200)
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
System: Windows XP version 5.1 running on x86; Cp1254; tr_TR (nb)

My Web Service Project name is "WebServiceProjectName"
The name of the Web Service created in the Project is "WebServiceName"
The name of the Operation created in the "WebServiceName" is "add"

"add" operation just adds 2 int and returns another int as in the tutorial.

Following the tutorial I get...
Netbeans URL = http://localhost:8080/WebServiceProjectName/WebServiceNameService?Tester
Glassfish URL = http://localhost:8080/WebServiceNameService/WebServiceName?Tester

For the netbeans URL I can change the middle part of the URL by
right click the Project -> Properties -> Run
Change the Context Path from "/WebServiceProjectName" to "/WebServiceNameService"

then I get these as the URLs
Netbeans URL = http://localhost:8080/WebServiceNameService/WebServiceNameService?Tester
Glassfish URL = http://localhost:8080/WebServiceNameService/WebServiceName?Tester

but obviously I still have an extra "Service" before the question mark for the Netbeans URL...

Any help please?




Back to top
kman



Joined: 18 Feb 2011
Posts: 3

PostPosted: Sun Feb 20, 2011 2:36 pm    Post subject: Reply with quote

Thank you for your reply Jeff.

I am using GlassFish Server Open Source Edition 3.0.1 (build 22) which came with the Netbeans 6.9.1 bundle. I downloaded them from http://netbeans.org/downloads/ about one or two months ago (All options selected for Windows platform, English IDE language 319 MB). So I guess they should be fine. Maybe I need to do a configuration change in GlassFish or Netbeans??
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo