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: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://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