facebook

HelloWorld Web Service Example

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #265162 Reply

    Hi,

    I am new to webservices & was trying to get the HelloWorld example in your Help Tutorial to work. I am following the ‘Code-First Service Development’.

    When I reach the stage where I launch the WebServices Explorer , the WSDL is still not generated through XFire. i.e.The exploded WAR doesnt have it. At what point does the WSDL auto generated ?

    Your tutorial does say : ‘The Web Services Explorer will download the auto-generated WSDL document created by the XFire framework and create a list of operations that can be invoked on the service.’ I dont see the WSDL generated.

    And get this in the status :
    IWAB0379E Unable to open http://localhost:8085/HelloWorld/services/HelloWorldService?WSDL.
    IWAB0135E An unexpected error has occurred.
    WSDLException
    WSDLException: faultCode=OTHER_ERROR: Server returned HTTP response code: 500 for URL: http://localhost:8085/HelloWorld/services/HelloWorldService?WSDL

    Am I missing something ?


    MyEclipse Enterprise Workbench
    Version: 5.1.0 GA
    Build id: 20061111-5.1.0-GA
    Java version “1.5.0_08”
    Tomcat-5.0.30

    #265198 Reply

    Riyad Kalla
    Member

    code 500 is an internal server error… can you check your Tomcat console from within MyEclipse and see what exception is getting spit out to the console?

    #265226 Reply

    I should have checked the logs before bothering you. The tomcat console logs showed it was missing the xalan jars. I added them to the tomcat path through myeclipse & got it working. Thanks a lot.

    I also managed to import the WSDL. The WSDL editor provided in myeclipse is really good.

    Where does the wsdl get generated when I type the URL in the Web Services Explorer ? ( You need not investigate if you dont know the answer off-hand )

    Happy MyEclipse User

    #265227 Reply

    Riyad Kalla
    Member

    kapilmistry,
    The wsdl is generated on the fly by XFire when it sees the ?wsdl query. There is an optional argument that can be specified to direct to an existing XML file (wsdl) but there were some bugs in the current XFire impl that the XFire team is fixing so we don’t expose that at this time. It might be back in 5.5.

    #291053 Reply

    Pradeep_J
    Member

    Hi Tried HelloWorld e.g. of web Service
    I m using Tomcat 5

    I m getting error———

    IWAB0379E Unable to open http://localhost:8080/HelloWorld/services/HelloWorldService.
    IWAB0135E An unexpected error has occurred.
    WSDLException
    WSDLException: faultCode=OTHER_ERROR: Server returned HTTP response code: 500 for URL: http://localhost:8080/HelloWorld/services/HelloWorldService

    and in Servers Cosole i M getting like this———

    Nov 17, 2008 12:31:15 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 18297 ms
    Nov 17, 2008 12:33:28 PM org.codehaus.xfire.handler.DefaultFaultHandler invoke
    INFO: Fault occurred!
    [b]com.ctc.wstx.exc.WstxEOFException[/b]: Unexpected EOF in prolog
    at [row,col {unknown-source}]: [1,0]
    at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:628)
    at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2021)
    at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:1927)
    at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1054)
    at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:44)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
    at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
    at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:301)
    at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130)
    at org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:595)

    #291079 Reply

    Riyad Kalla
    Member

    com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:628)
    at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2021)
    at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:1927)
    at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1054)

    Pradeep, it looks like your code is throwing the exception. The problem isn’t with XFire or the Web Service, but somewhere in your code.

    #291111 Reply

    Pradeep_J
    Member

    Yes.I found it i forgot to add xalan.jar in my Project

    #329894 Reply

    mohanadduru
    Member

    IWAB0379E Unable to open http://localhost:8080/HelloWorld/services/HelloWorldService?WSDL.
    IWAB0135E An unexpected error has occurred.
    WSDLException
    WSDLException: faultCode=OTHER_ERROR: Server returned HTTP response code: 400 for URL: http://localhost:8080/HelloWorld/services/HelloWorldService?WSDL

    and i have added xalan.jar in to library..still i am getting above error..can let me know the cause…

    #329896 Reply

    support-swapna
    Moderator

    Mohan,

    Sorry that you are seeing this issue.

    Can you give us some information to investigate the issue ?

    1. Can you please copy paste the Installation Details from MyEclipse > Installation Summary > Installation Details ?

    2. Which server are you working with ? Can you clarify if the server, on which your webservice is deployed, is running or not?

    3.Are there any console messages displayed when launching the web service? Please paste them here for us.

    #329940 Reply

    mohanadduru
    Member

    Hi swapna,,

    thanks for ur reply..pls find the my comments below..

    @support-swapna wrote:

    Mohan,

    Sorry that you are seeing this issue.

    Can you give us some information to investigate the issue ?

    1. Can you please copy paste the Installation Details from MyEclipse > Installation Summary > Installation Details ?
    Mohan: PFA note
    2. Which server are you working with ? Can you clarify if the server, on which your webservice is deployed, is running or not?
    Mohan: tomcat 5, in the same server i deployed my webservice..

    3.Are there any console messages displayed when launching the web service? Please paste them here for us.
    Mohan: When i am run the project in myeclipse its run successfully. while i try to test my service in web service explorer..
    1. selected wsdl option in wer service explorer.
    2. in wsdl url added path : http://localhost:8080/HelloWorld/services/HelloWorldService?wsdl
    3. clicked on Go.

    in status tab…showing below error.

    IWAB0379E Unable to open http://localhost:8080/HelloWorld/services/HelloWorldService?wsdl.
    IWAB0135E An unexpected error has occurred.
    WSDLException
    WSDLException: faultCode=OTHER_ERROR: Server returned HTTP response code: 400 for URL: http://localhost:8080/HelloWorld/services/HelloWorldService?wsdl

    Attachments:
    You must be logged in to view attached files.
    #329944 Reply

    support-swapna
    Moderator

    Mohan,

    Thank you for the details. From the installation details, it looks like you are on an older version of MyEclipse.

    I strongly recommend upgrading to MyEclipse 10.6 to take advantage of over 2-3 years of development work and several new features added to MyEclipse.
    The license you hold currently is valid for 10.6 too as our licenses are time based and not version based.

    You can download MyEclipse 10.6 from here :
    https://www.myeclipseide.com/index.php?name=Recommend_Us&req=Download&version=ME

    Click the ‘Download’ button to download the offline installer. Alternatively you can use Pulse to install MyEclipse 10.6. Take a look at this FAQ on how to install :
    https://www.genuitec.com/forums/topic/installation-how-to-install-myeclipse-from-pulse/ . Select ‘Eclipse – Indigo’ from the Explore list and follow the wizard.

    Let us know if you see any issues.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: HelloWorld Web Service Example

You must be logged in to post in the forum log in