I have tested your case and I have not found the same problem, with my client seems to work fine. I am using the latest version of WSIF.
It is possible that you are behind a firewall and the WSDL file can not be accessed. It is not right for all firewalls. For example in my company we have the same problem, because the firewall is in Windows and it requires Windows Autenthification that it is a little bit different. I don't know how to set this settings for this kind of firewall, maybe someone can help us in this issue.
I have tested at home and it is not a problem, I am not behind this kind of firewall.
Also, it could be that you have not set right the namespace when you load the service.
I write you here my source code of the client that I have just tested, if it could help you:
WSIFService service = null; WSIFPort port = null; WSIFOperation operation = null; boolean success;
// Get the service based on the WSDL
service = WSIFServiceFactory.newInstance().getService("http://www.xmethods.net/sd/2001/TemperatureService.wsdl", "http://www.xmethods.net/sd/TemperatureService.wsdl", "TemperatureService", "http://www.xmethods.net/sd/TemperatureService.wsdl", "TemperaturePortType");
// Get the port
port = service.getPort("TemperaturePort");// Create the operation to execute
operation = port.createOperation("getTemp", "getTempRequest", "getTempResponse");
// Create the input, output and fault messages
WSIFMessage inputMessage = operation.createInputMessage();
inputMessage.setObjectPart("zipcode", null);
WSIFMessage outputMessage = operation.createOutputMessage();
outputMessage.setObjectPart("return", null);
WSIFMessage faultMessage = operation.createFaultMessage();// Build the input message
inputMessage.setObjectPart("zipcode", "94041");// Execute the operation
success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
if (!success) {
java.util.Iterator i = faultMessage.getParts();
if (i.hasNext()) {
Object part = i.next();
if (part instanceof Exception)
((Exception) part).printStackTrace();
else
System.err.println ("WSIFException: " + String.valueOf(part));
}
}// Work with the output
System.out.println ("Result: " + outputMessage.getObjectPart("return"));I hope that it could help and if anyone knows something about the firewall problem, how to put this settings and configuration in the JVM it could be great.
Best regards,
Alfredo Navarro [EMAIL PROTECTED]
From: "Siegfried Perkles" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Unable to find an available port Date: Tue, 8 Jul 2003 17:05:53 +0200
Hello,
when I try to test the dynamicInvoker-sample I get the following error:
Reading WSDL document from 'http://www.xmethods.net/sd/2001/TemperatureService.wsdl' Preparing WSIF dynamic invocation Exception in thread "main" 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 clients.DynamicInvoker.invokeMethod(Unknown Source) at clients.DynamicInvoker.main(Unknown Source)
Can anyone help please?
_________________________________________________________________
MSN Compras: Veinte tiendas personales abiertas todo el d�a. http://www.msn.es/compras/
