[jboss-user] [JBossWS] - Unable to connect webservice deployed on JBOSS AS version 4.

ajayks do-not-reply at jboss.com
Fri Sep 26 04:14:51 EDT 2008

Hello all,
I have created EJB3.0 stateteless session bean named "Greeting" as a webservice using JAX-WS specifcation. This web service simply returning the  parameter what is sent to it. I am successfully able to deploy   the  created web service on JBOSS application server 4.2.2 and the WSDL file is successfully created by the application server. 
When  I tred to   invoke the the deployed webservice from java client ,I am not gettig reference of  Service object. I am using following code  to  get reference of Service object :-

String url="http://dlhlx09.dlh.st.com:20120/mywebservice/Greeting?wsdl";
URL wsdlLocation=new URL(url);
QName serviceName = new QName("http://ccc/", "GreetingService");
Service service = Service.create(wsdlLocation, serviceName);

The Service.create call is returning null  reference.

The following is the content of the  WSDL file created by the JBOSS :-

<definitions name="GreetingService" targetNamespace="http://ccc/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ccc/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xs:schema targetNamespace="http://ccc/" version="1.0" xmlns:tns="http://ccc/" 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:element minOccurs="0" name="arg0" type="xs:string" /> 
 <xs:complexType name="echoResponse">
  <xs:element minOccurs="0" name="return" type="xs:string" /> 
  <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://dlhlx09.dlh.st.com:20120/mywebservice/Greeting" /> 

can any one help me out what is going wrong here.How can I  invoke webservice  deployed on JBOSS from a java client.

with best regards,
Ajay kumar

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178988#4178988

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178988

More information about the jboss-user mailing list