wood burning stoves 2.0*
The moose likes Web Services and the fly likes webservice with apache axis using eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "webservice with apache axis using eclipse" Watch "webservice with apache axis using eclipse" New topic
Author

webservice with apache axis using eclipse

anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
Hi all,
I am trying to develop a sample webservice using apache axis, and tomcat.
I am using the eclipse IDE, I am having the axis plugins in eclipse.
According to the help given in eclipse im creating a bottom-up webservice,
I have created a Simpe Hello.java file in dynamic web project.

public class Hello {
public String sayHello(String name){

return "Hello " + name;

}
}

This is the error i get when try to create webservice, At bottom it is showing publishing to TomcatServer IWAB01991PublishingServer.



IWAB0014E Unexpected exception occured.
protocol = http host = null
java.lang.IllegalArgumentException: protocol = http host = null
at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:146)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:739)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:913)
at java.net.URL.openStream(URL.java:1007)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.GSTCLaunchCommand.launchSample(GSTCLaunchCommand.java:86)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.GSTCLaunchCommand.execute(GSTCLaunchCommand.java:46)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand.commandFactoryExecution(ClientTestDelegateCommand.java:111)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand.execute(ClientTestDelegateCommand.java:98)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:335)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:301)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:217)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$4.run(SimpleCommandEngineManager.java:208)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:830)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:177)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:80)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:220)
at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:336)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:676)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:349)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2572)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:809)
at org.eclipse.jface.window.Window.open(Window.java:787)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:181)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2572)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)

Can any one tell me what this error and how to resolve it?

Thanks & Regards
Anuja K
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42283
    
  64
protocol = http host = null


I'm not familiar with Eclipse, but apparently you need to figure out how to set the protocol and host correctly (might be localhost, unless the service gets deployed to another machine). That should be covered by the Eclipse (or web service plugin) manual.
[ November 01, 2005: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
Thank you for the reply Ulf,
But I have already mentioned the server as tomcat 5.5v and its path where it asked for it.

Regards ,
Anuja K
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42283
    
  64
From the error message it seems to be a problem of accessing the web service, not deploying it. No path of any kind is mentioned in the error message, just the end point address (host and protocol).
naveen
Greenhorn

Joined: Sep 09, 2005
Posts: 6
what do you got in the WSDD file?

and where you able to generate the WSDL file ?

it is getting the Hostname as NULL, i am not sure how are you creating the webservice

Do you specify the HOSTNAME, while creating the webservice using Eclipse ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42283
    
  64
@Naveen:

Welcome to JavaRanch. You probably missed the naming policy that's in effect here. Have a look at this page and adjust your display name accordingly. Thanks.
anuja Edathu
Ranch Hand

Joined: Sep 09, 2005
Posts: 84
Thank you for the reply Naveen,

In eclipse it doesn't prompt for the host name but it asks for the server side deployment selection.I have given the webservice run time as "Apache Axis",
and server as "To.mcat v5.5 Server @ localhost.
I've also given the Web Service URI as"http://localhost:8080/WebServicesTutorial/services/Hello" which is the service im intending to deploy to tomcat.

All the deploy.wsdd ,Hello.wsdl,HelloService.java,HelloServiceLocator.java,
HelloSoapBindingImpl.java,HelloSoapBindingStub.java are been created by the eclipse itself.
I don't know where i can set the hostname except iam mentioning the server .


Any help would be highly appreciated .
Thanks in advance
Anuja K.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: webservice with apache axis using eclipse