Skip to main content

Jax-RPC Client accesing WSDL file created by WCF

No replies
sunil_ktg
Offline
Joined: 2010-08-23
Points: 0

Hi

Environment details :
-----------------------------
1) Created a Web Service in using WCF
2) BInding type is basic http binding
3) Wsdl file is generated successfully

I am trying to use Jax-RPC java client to get the necessary information from the WSDL. I am able to get the required result if I use proxy. However stand alone client fails with the follwing exception

Exception in thread "main" org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://tempuri.org/}>GetEmployeeDetails

Source Code is as follows.
===================
url = new URL("http://win-depfq3pjedv/sample/EmployeeService.svc?wsdl");
QName qname = new QName("http://tempuri.org/", "EmployeeService");
Service service = null;
ServiceFactory factory = ServiceFactory.newInstance();
service = factory.createService(url,qname);
IEmployeeService port = (IEmployeeService) service.getPort(new QName("http://tempuri.org/", "BasicHttpBinding_IEmployeeService"), IEmployeeService.class);
EmployeeService obj = null;
obj = (EmployeeService) service.getPort(EmployeeService.class);

It fails in line createService() Method.