|
Hi,
I am not able to download the wsdl you attached.
Anyway, how many ports are there for the given service?
If you have multiple ports, you can use another overloaded method getPort(portName) which takes the name of the port.
or, try to get the port for the given binding if you have multiple bindings for the service.
This you can do by
1) First , get all the ports from service by calling service.getPorts(). Will return you a Map.
2) Iterate through that and match the QName for the given binding and the port.
3) If matches , then that is the port you are looking for.
If you need more help. Pls send the WSDL again.
Regards
Gnanaprakash
-----Original Message-----
From: Walter.Heestermans toyota-europe.com [ Walter.Heestermans toyota-europe.com">mailto:Walter.Heestermans toyota-europe.com]
Sent: Fri 9/21/2007 1:48 PM
To: wsif-user ws.apache.org
Subject: New to WSIF and "Unable to find an available port"
Hi,
I'm new to the WSIF framework and trying to get a sample up-and-running
using one of our webservices.
This is the wsdl file
And I'm using the following code:
...
// create a service factory
WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
System.out.println("WSDL file to use=>" + wsdlFile + "<");
WSIFService service = factory.getService(wsdlFile, null, null,
"http://tempuri.org/TME.VehicleProduct.Service/2007/04/30",
"VehicleProductSoap");
// get the port
WSIFPort port = service.getPort();
...
But when running this I always have the following exception:
org.apache.wsif.WSIFException: Unable to find an available port
at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)
at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)
at com.tme.ea.ws.wsif.CarConfiguratorWebService.getService(
CarConfiguratorWebService.java:63)
at com.tme.ea.ws.wsif.CarConfiguratorWebService.main(
CarConfiguratorWebService.java:43)
Can somebody advice me on this one?
Thanks
Walter
|