Skip to main content

Jax-RPC Client accesing WSDL file created by WCF

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


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" Cannot obtain java type mapping for: {}>GetEmployeeDetails

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

It fails in line createService() Method.