• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How to access webservice on LAN

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, as a sequel to my last post, could anyone tell me how to access a web service deployed on a local area network (LAN). My development laptop is one of many on the network with name Igwe, it is under the workgroup development and I have tomcat running on it. How can a user on our network but on a different machine access a web service deployed on tomcat on my machine from his own machine.


using kSOAP j2SE, my code looks like this:

SoapObject("http://localhost:8080/axis/CM_ErrorWebService.jws","CM_ErrorCheck");
HttpTransportSE transport = new HttpTransportSE("http://localhost:8080/axis/CM_ErrorWebService.jws","");

what changes should be made to the URL so that it can get to axis/CM_ErrorWebService.jws on my machine instead of using localhost:8080. Should I share the folder or what?


Thanks. Igwe.
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Replace localhost by your IP address.
Ex : SoapObject("http://10.10.10.10:8080/axis/CM_ErrorWebService.jws","CM_ErrorCheck");

10.10.10.10 is just an example. Of course I've no idea of what your real IP address is.

Was it really your question ?... I'm not sure
 
igwe kalu kalu ogba
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi jean-louis, thanks for your answer. That was my original question, but it doesn't seem to work, my new question is basically how to make it work across a local area network. my computer name is Igwe and I'm running tomcat at port 8080. I dunno how to figure this out. It's got me tearing my hair out.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean you are not able to reach your web service deployed on your machine from another machine, right ?

Is your machine itself reachable from the network. ??
I mean, does a ping on your IP (or ping igwe) works properly from another pc ?
If not, you've got to solve your network problem first.
 
igwe kalu kalu ogba
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've tried that, pinging from another machine works.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If pinging from another machine works, there's no reason why a call to the web service fails.

What is the kind of error you have when you try to access it from the other machine ?
 
igwe kalu kalu ogba
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry about the inactivity here, I travelled for a while. Yeah, pinging works, but I guess the real question is, how would you locate the webservice? I dont think you can use http://localhost:8080/axis/ws.jws? So, given a computer name, how can I access a web service on it, what syntax would I use. Thanks.
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by igwe kalu kalu ogba:
I guess the real question is, how would you locate the webservice? I dont think you can use http://localhost:8080/axis/ws.jws? So, given a computer name, how can I access a web service on it, what syntax would I use. Thanks.


Yes you cant use localhost, Read the JeanLouis post again, it has the answer for you.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I just had the same problem but now it's fixed. In my case I am using win xp prof with sp2 and jboss 4

- I just add the port 8080 to the windows firewall exceptions

After doing that every computer from my lan was able to enter to http://my ip address:8080/my app
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please check Lan Setting from connection tab is disbaled
i think your problem will be solved.
i have similar problem before,

Thanks a lot.
 
reply
    Bookmark Topic Watch Topic
  • New Topic