- This topic has 24 replies, 3 voices, and was last updated 16 years, 11 months ago by Riyad Kalla.
-
AuthorPosts
-
blueyPinkyMemberHi there,
I m very new to myEclipse..and e version i m using is 5.. and i have been using it to develop web services for my project..the server i am using is tomcat 4.0.
but somehow I have this error after i have run it on the Web Services Explorer..
The error message is:
“XML document must have a top level element. Error processing resource ‘http://localhost:51852/wsexplorer/wsdl/soap_envelope…”does anyone know how to show it?
Your help is greatly appreciated..
Thanks
Loyal WaterMemberThe issue is related to your XML document. You must close the tags that you have opened in your document. Please double check the document.
blueyPinkyMemberHi Nipun,
Thanks for your reply..
Below is my XML document..But i have check and see no errors in it..all the tags has an open and close tags..i don’t see any errors..
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<!DOCTYPE web-app
PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
“http://java.sun.com/dtd/web-app_2_3.dtd”>
<web-app>
<servlet>
<servlet-name>XFireServlet</servlet-name> <servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>XFireServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>
Riyad KallaMemberWhat is the contents of your services.xml file?
Also have you really set Tomcat up to run on port 51852?
blueyPinkyMemberHi rkalla,
Thanks for your reply..
The contents of my services.xml is as below:
<beans xmlns=”http://xfire.codehaus.org/config/1.0″>
<service>
<name>CSITWebService</name>
<serviceClass>
com.csit.webServices.ICSITWebService
</serviceClass>
<implementationClass>
com.csit.webServices.CSITWebServiceImpl
</implementationClass>
<style>wrapped</style>
<use>literal</use>
<scope>application</scope>
</service>
</beans>But how do I set up my Tomcat to let it run on the port??
Thanks for your help..
Riyad KallaMemberPinky,
I just re-read your inital post more closely, are you really trying to run this on Tomcat 4? I don’t believe Tomcat 4 supported the J2EE 1.3 spec, which is what you are trying to deploy to it.
blueyPinkyMemberOh my goodness..So you mean i cannot deploy my project on Tomcat 4?
Then which version i must use? Does Tomcat 5 support the J2EE 1.3 spec??
Thanks for your reply..=)
Riyad KallaMemberNOTE: Tomcat supports a subset of the collections of specs that make up the “J2EE” and “Java EE” specs, so I’m using it in a very loose sense… you can’t take a full J2EE or Java EE compliant application and deploy it to Tomcat at all, but you can deploy a Web Application to Tomcat. I just wanted to clarify that.
Yea Tomcat 5.0 supports J2EE 1.3 spec, Tomcat 5.5 supported the J2EE 1.4 spec, and Tomcat 6 supports the Java EE 5 spec… also worth noting is that MyEclipse 6 comes bundled with Tomcat 6 preconfigured and ready to run out of the box. So you can run your projects immediately using the “MyEclipse Tomcat Server” if you wanted.
blueyPinkyMemberI have just install Tomcat 5. But I still receive the same error:
XML document must have a top level element. Error processing resource ‘http://localhost:58947/wsexplorer/wsdl/soap_envelope..
Anymore advises?
Thanks..
Riyad KallaMember1. How are you accessing that URL? Inside a browser? The WS Explorer? If so, which mode are you using in the WS Explorer to access it?
2. Where did you get that URL from?
3. Are you launching Tomcat on port 58947?
4. Can you paste your entire Tomcat startup log here.
blueyPinkyMember1. I am accessing my web service project in the WS Explorer under the WSDL Main..
2. I get the URL from an example of HelloWorld. But I got change the URL name to my project name my the web service name.
3. How do I launch the Tomcat? After i configure it in myEclipse, I start the server and test my project.
4. My Tomcat 5.0 startup log is:
Feb 1, 2008 10:32:03 AM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 1, 2008 10:32:04 AM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Feb 1, 2008 10:32:04 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 719 ms
Feb 1, 2008 10:32:04 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 1, 2008 10:32:04 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
Feb 1, 2008 10:32:04 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 1, 2008 10:32:04 AM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
Feb 1, 2008 10:32:06 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 1, 2008 10:32:06 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Feb 1, 2008 10:32:06 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 1, 2008 10:32:06 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
Feb 1, 2008 10:32:08 AM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 1, 2008 10:32:08 AM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Feb 1, 2008 10:32:08 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Feb 1, 2008 10:32:08 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4250 msThanks..
Riyad KallaMemberBluey,
Thank you for the information I asked for… the one very strange part here is I have no idea where you are getting this URL from:
“http://localhost:58947/wsexplorer/wsdl/soap_envelope..”The reason I say that is because:
1. From your Tomcat log, it looks like Tomcat is running on the normal 8080 port, so your URL should start with:
http://localhost:80802. I’m not sure what the name or deployment context root for your project is, but you mentioned “HelloWorld”, so my guess is your project is deployed to:
http://localhost:8080/HelloWorld3. Your web.xml file says that your services are bound to the /services/* path, which means all your services will be accessible under the root:
http://localhost:8080/HelloWorld/services/4. Your services.xml file says your service name is CSITWebService, which means it’s URL will be:
http://localhost:8080/HelloWorld/services/CSITWebServiceand to get WSDL from it, for the WS Explorer or for your own use in a browser, you would use the URL:
http://localhost:8080/HelloWorld/services/CSITWebService?WSDLso given that, I hope you see why I’m totally confused as to where that other URL you are referring to comes from… if you open your project properties, and go to MyEclipse > Web, the 2nd text box “Web Context-root” should tell you which value you should use to access your web app. In the example URL above I assumed it was “/HelloWorld”, but you will want to double check that value to see what it is set to on your end.
blueyPinkyMemberBut the URL that I have been using is the same as what you have reply in your earlier message.
What you have given me:
http://localhost:8080/HelloWorld/services/CSITWebService?WSDLThe URL that i have been using:
http://localhost:8080/CSIT/services/CSITWebService?WSDLwhere CSIT is my project name..
After i have test it, the first error that occur is ‘The SOAP response failed schema validation. Please switch to the source view for the SOAP response in XML format. ‘
After I switch to source view, the error in the SOAP Response Envelope is ‘XML document must have a top level element. Error processing resource ‘http://localhost:49360/wsexplorer/wsdl/soap_envelope…’
And i found something where there is someone who say maybe can try using (https://tcpmon.dev.java.net/ ). I have download it, but i don not know how to use it.
blueyPinkyMemberAnd this is my web.xml
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<web-app xmlns=”http://java.sun.com/xml/ns/j2ee”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”
version=”2.4″>
<servlet>
<servlet-name>XFireServlet</servlet-name>
<servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServlet
</servlet-class>
<load-on-startup>1</load-on-startup></servlet>
<servlet-mapping>
<servlet-name>XFireServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>and my SOAP Request Envelope is:
<?xml version=”1.0″ encoding=”UTF-8″ ?>
– <soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:q0=”http://webServices.csit.com” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
– <soapenv:Body>
<q0:getSec />
</soapenv:Body>
</soapenv:Envelope>
Riyad KallaMemberblueyPinky,
I’m not sure what is going on, but can you export this project to an Archive for me (File > Export > Archive) and email it to support@genuitec.com ATTN Riyad, with a link to this thread for reference? I’ll see if I can reproduce the problem on my end. -
AuthorPosts