[jboss-user] [JBossWS] - Re: JAX-WS servlet initializing error during deployment of j
trivedi
do-not-reply at jboss.com
Tue May 1 07:00:40 EDT 2007
"oskar.carlstedt" wrote : Hi Trivedi!
|
| Can you please give me some more of your code. Then I might help you. I have been struggeling al lot now an finally found a solution that seems to work for me.
|
| //Oskar
|
Hi Oskar,
Sorry for the late response from my side. Currently I again started working on web services, got stuck now with the above issue. Here is the code that I written:
Here is my wsdl
----------------------------------------------------------------------
<definitions name='EchoService' targetNamespace='http://echo/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://echo/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<xs:schema targetNamespace='http://echo/' version='1.0' xmlns:tns='http://echo/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='echo' type='tns:echo'/>
<xs:element name='echoResponse' type='tns:echoResponse'/>
<xs:complexType name='echo'>
<xs:sequence>
<xs:element minOccurs='0' name='arg0' type='xs:string'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='echoResponse'>
<xs:sequence>
<xs:element minOccurs='0' name='return' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
<soap:operation soapAction=''/>
<soap:body use='literal'/>
<soap:body use='literal'/>
<soap:address location='http://AIBD305014842:8080/AddNumbersWS/Echo'/>
----------------------------------------------------------
Using Jax-WS generated the java classes from it.
Here is the interface that got created with it
================================
@WebService(name = "Echo", targetNamespace = "http://echo/")
public interface Echo {
/**
*
* @param arg0
* @return
* returns java.lang.String
*/
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "echo", targetNamespace = "http://echo/", className = "echo.Echo_Type")
@ResponseWrapper(localName = "echoResponse", targetNamespace = "http://echo/", className = "echo.EchoResponse")
public String echo(
@WebParam(name = "arg0", targetNamespace = "")
String arg0);
}
The Implementation Class is here:
package echo;
@javax.jws.WebService(endpointInterface="echo.Echo",
portName="EchoPort")
public class EchoImpl implements Echo{
public String echo(String arg0) {
return "hi " + arg0;
}
}
Here are the artifacts that i created for this service:
1. web.xml
<servlet-name>Echo</servlet-name>
<display-name>Echo</display-name>
JAX-WS endpoint - InteropWS
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Echo</servlet-name>
<url-pattern>/Echo</url-pattern>
</servlet-mapping>
2. sun-jaxws.xml
<endpoint name="Echo"
implementation="echo.EchoImpl"
url-pattern="/Echo" />
And after this I created the war from it by adding the following jars into WEB-INF lib folder
1. jaxws-api.jar 2.jaxws-rt.jar 3. jaxws-tools.jar 4. jsr181-api.jar 5.jsr250-api.jar
After deploying I was getting the above error.
Pls help me in running this service. Thanks in advance.
Again I am really sorry for the late reply.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042046#4042046
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042046
More information about the jboss-user
mailing list