RE: New to WSIF and "Unable to find an available port"
<[email protected]> Fri, 21 Sep 2007 22:59:52 +0530
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <[email protected]> |
------_=_NextPart_001_01C7FC75.A2F40E7E Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am not able to download the wsdl you attached.=20 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-0uwp0z4MgsuGWTQfUlqXWgC/[email protected]= [mailto:Walter.Heestermans-0uwp0z4MgsuGWTQfUlqXWgC/[email protected]] Sent: Fri 9/21/2007 1:48 PM To: [email protected] Subject: New to WSIF and "Unable to find an available port" =20 Hi, I'm new to the WSIF framework and trying to get a sample up-and-running=20 using one of our webservices. This is the wsdl file And I'm using the following code: ... // create a service factory WSIFServiceFactory factory =3D WSIFServiceFactory.newInstance(); System.out.println("WSDL file to use=3D>" + wsdlFile + "<"); WSIFService service =3D factory.getService(wsdlFile, null, null, "http://tempuri.org/TME.VehicleProduct.Service/2007/04/30", "VehicleProductSoap"); // get the port WSIFPort port =3D 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 The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments.=20 WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email. =20 www.wipro.com ------_=_NextPart_001_01C7FC75.A2F40E7E Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset= =3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version= 6.5.7652.24"> <TITLE>RE: New to WSIF and "Unable to find an available= port"</TITLE> </HEAD> <BODY> <!-- Converted from text/plain format --> <P><FONT SIZE=3D2>Hi,<BR> <BR> I am not able to download the wsdl you attached.<BR> <BR> Anyway, how many ports are there for the given service?<BR> <BR> If you have multiple ports, you can use another overloaded method= getPort(portName) which takes the name of the port.<BR> <BR> or, try to get the port for the given binding if you have multiple bindings= for the service.<BR> <BR> This you can do by<BR> <BR> 1) First , get all the ports from service by calling service.getPorts().= Will return you a Map.<BR> 2) Iterate through that and match the QName for the given binding and the= port.<BR> 3) If matches , then that is the port you are looking for.<BR> <BR> If you need more help. Pls send the WSDL again.<BR> <BR> Regards<BR> Gnanaprakash<BR> <BR> <BR> -----Original Message-----<BR> From: Walter.Heestermans-0uwp0z4MgsuGWTQfUlqXWgC/[email protected] [<A HREF= =3D"mailto:Walter.Heestermans-0uwp0z4MgsuGWTQfUlqXWgC/[email protected]">mailto:Walter.Heestermans@= toyota-europe.com</A>]<BR> Sent: Fri 9/21/2007 1:48 PM<BR> To: [email protected]<BR> Subject: New to WSIF and "Unable to find an available port"<BR> <BR> Hi,<BR> <BR> I'm new to the WSIF framework and trying to get a sample up-and-running<BR> using one of our webservices.<BR> <BR> This is the wsdl file<BR> <BR> <BR> <BR> And I'm using the following code:<BR> <BR> ...<BR> // create a service factory<BR> WSIFServiceFactory factory =3D WSIFServiceFactory.newInstance();<BR> System.out.println("WSDL file to use=3D>" + wsdlFile += "<");<BR> WSIFService service =3D factory.getService(wsdlFile, null, null,<BR> "<A HREF= =3D"http://tempuri.org/TME.VehicleProduct.Service/2007/04/30">http://tempur= i.org/TME.VehicleProduct.Service/2007/04/30</A>",<BR> &nb= sp; "VehicleProductSoap");<BR> // get the port<BR> WSIFPort port =3D service.getPort();<BR> ...<BR> <BR> But when running this I always have the following exception:<BR> <BR> org.apache.wsif.WSIFException: Unable to find an available port<BR> at= org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)<BR> at= org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)<BR> at= com.tme.ea.ws.wsif.CarConfiguratorWebService.getService(<BR> CarConfiguratorWebService.java:63)<BR> at= com.tme.ea.ws.wsif.CarConfiguratorWebService.main(<BR> CarConfiguratorWebService.java:43)<BR> <BR> Can somebody advice me on this one?<BR> <BR> Thanks<BR> Walter<BR> <BR> <BR> <BR> <BR> </FONT> </P> </BODY> </HTML> <table><tr><td bgcolor=3D#ffffff><font color=3D#000000><br> The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments. <br> <br> WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email.<br> <br> www.wipro.com<br> </font></td></tr></table> ------_=_NextPart_001_01C7FC75.A2F40E7E--