SAXParseException while creating deployable WAR file
I hav created a simple java package, and compiled that to create class file. After that i hav created one temp WAR file using the command
jar cfv temp.war *
Then for making the deployable WAR file i hav used the command
wsdeploy -o FileName.war temp.war
but I got some errors while executing this command
error msg is like:
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity
[479 byte] By [
Hilara] at [2007-10-2 10:55:59]

OK.
:) Not sure what's preventing you from reading jwsdp documentation :)
And once i have a time here is a plane english :)
> hav created a simple java package, and compiled that to create class
> file
This is far not enought simply have a "some" classes compiled and packaged in your web archive. You need
- your interface class (extendes Remote)
- your interface implementation class
Now using wscompile you need to generate a wsdl. In order to do this you must have a som-config.xml file with content as following:
<?xml version="1.0" ?>
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<service name="Yor Service Name" targetNamespace="http://company.com/wsdl" typeNamespace="http://company.com/types" packageName="com.package.name.where.to.put.generated.proxy.stubs">
<interface name="com.your.company.package.InterfaceClass.from.see.above" servantName="com.your.company.package.ImplementationClass.from.see.above"/>
</service>
</configuration>
Now you can execute wscompile command:
wscompile -gen:server -nd ups\WEB-INF\where\put\your\nonjavafiles -g -verbose -keep -s src -model ups\WEB-INF\config\modelwillbegeneratedforyou.gz -classpath where\to\find\your\classes -f:documentliteral -f:wsi -f:donotunwrap -f:strict WEB-INF\config\configuration-file-from-above.xml -d where\to\put\classes
> Then for making the deployable WAR file i hav used the command
> wsdeploy -o FileName.war temp.war
FileName.war suppose to contain a following files:
WEB-INF/jaxrpc-ri.xml - this class will tell web service what is the endpoing name is, what is the class which will handle soap request
<webServices xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd" version="1.0" name="YourWebServiceName" description="Description of your Web Service" targetNamespaceBase="http://company.com/wsdl" typeNamespaceBase="http://company.com/sometypes_doesnt_really_matter" urlPatternBase="/endpoint">
<endpoint name="YourEndpoint" displayName="Some EndpointName" description="Endpoint Description name" wsdl="/WEB-INF/where/to/find/your/webservice.wsdl" interface="com.your.company.package.InterfaceClass.from.see.above" implementation="com.your.company.package.ImplementationClass.from.see.above" model="/WEB-INF/where/to/put/model.gz"/>
<endpointMapping endpointName="YourWebServiceName" urlPattern="/endpoint"/>
</webServices>
WEB-INF/web.xml - suppose to have
1. listener defined<listener>
<listener-class>com.sun.xml.rpc.server.http.JAXRPCContextListener</listener-class>
</listener>
2. endpoint defined (use the same name as you define in jaxrpc-ri.xml )
<servlet>
<servlet-name>endpoint</servlet-name>
<display-name>endpoint</display-name>
<description>JAX-RPC endpoint - your endpoint (doesn't matter)</description>
<servlet-class>com.sun.xml.rpc.server.http.JAXRPCServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>endpoint</servlet-name>
<url-pattern>/endpoint</url-pattern>
</servlet-mapping>
after you will heve everything in you war file you should be able to cook it by executing a wsdeploy command - this will
1. check your war file
2. create a web service runtime descriptor (jaxrpc-ri-runtime.xml)