My servicemix.xml is given below:
--------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xbean.org/schemas/spring/1.0"; 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
      xmlns:sm="http://servicemix.org/config/1.0";
      xmlns:lb="http://servicemix.org/demos/loan-broker";
      xsi:schemaLocation="http://xbean.org/schemas/spring/1.0
../../conf/spring-beans.xsd 
                          http://servicemix.org/config/1.0
../../conf/servicemix.xsd">
                          
   <sm:container name="jbi"
                 monitorInstallationDirectory="false"
                 createMBeanServer="true"
                 useMBeanServer="true">
      <sm:activationSpecs>

        <sm:activationSpec componentName="wsifEJBBC" service="lb:wsifEJBBC">
         <sm:component>
         <bean xmlns="http://xbean.org/schemas/spring/1.0";
                 class="org.servicemix.components.wsif.WSIFBinding">
           <property name="definitionResource"
value="simplebeanEjbBinding.wsdl"/>
         </bean>  
         </sm:component>
         </sm:activationSpec>

      </sm:activationSpecs>
   </sm:container>                

    <bean id="client" class="WSIFClientWS">
      <constructor-arg ref="jbi"/>
      <constructor-arg>
        <sm:activationSpec destinationService="lb:wsifEJBBC"/>
      </constructor-arg>
    </bean>

</beans>

My simplebeanEjbBinding.wsdl is given below:
--------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://wsifservice.addressbook/"; 

      xmlns="http://schemas.xmlsoap.org/wsdl/"; 
      xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
      xmlns:impl="http://wsifservice.addressbook/"; 
      xmlns:intf="http://wsifservice.addressbook/"; 
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
      xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
      xmlns:ejb="http://schemas.xmlsoap.org/wsdl/ejb/";
      xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/";
      xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

   <wsdl:message name="sayHelloResponse">
   </wsdl:message>

   <wsdl:message name="sayHelloRequest">
   </wsdl:message>

   <wsdl:portType name="AddressBookBI">
      <wsdl:operation name="sayHello">
         <wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest"/>
         <wsdl:output message="impl:sayHelloResponse"
name="sayHelloResponse"/>
      </wsdl:operation>
   </wsdl:portType>

  <wsdl:binding name="EJBBinding" type="impl:AddressBookBI">
    <ejb:binding/>
    <format:typeMapping encoding="Java" style="Java">
      <format:typeMap typeName="xsd:string" formatType="java.lang.String" />
    </format:typeMapping>
    <wsdl:operation name="sayHello">
      <ejb:operation
         methodName="sayHello"
         interface="remote" />
      <wsdl:input name="sayHelloRequest"/>
    </wsdl:operation>
  </wsdl:binding>

  <wsdl:service name="AddressBookService">
    <wsdl:port name="EJBPort" binding="impl:EJBBinding">
   <ejb:address className="ejb.service.AddressBookSessionHome"
           jndiName="ejb20-address-AddressBookSessionHome"
                    
initialContextFactory="weblogic.jndi.WLInitialContextFactory"
                jndiProviderURL="t3://localhost:7001"/>
    </wsdl:port>
  </wsdl:service>
   
</wsdl:definitions>

My WSIFClientWS.java is given below:
------------------------------------

public class WSIFClientWS extends DefaultServiceMixClient{

    public WSIFClientWS(){
    }

    public WSIFClientWS(JBIContainer container)throws JBIException{
        super(container, new ActivationSpec());
    }

    public WSIFClientWS(JBIContainer container, ActivationSpec
activationSpec)throws JBIException{
        activationSpec.setComponent(this);
        container.activateComponent(activationSpec);
    }

    protected void init()throws JBIException{

       System.out.println(" **************** WSIFClientWS.init()...");
        InOut exchange = createInOutExchange();
        QName service = new QName("lb:wsifEJBBC", "wsifEJBBC");
        exchange.setService(service);
        try{
            sendSync(exchange);
        }
        catch(Exception e){
            e.printStackTrace();
        }
        System.out.println(" **************** WSIFClientWS.init() Done.");
    }
}

I am getting following Exception in ServiceMix_2.0.2:
-----------------------------------------------------

D:\esb\ServiceMix\VoidVoidEjb>D:\applns\ServiceMix\servicemix-2.0.2\bin\servicemix
servicemix.xml
ServiceMix ESB: 2.0.2

Loading ServiceMix from file: servicemix.xml
[INFO] XBeanXmlBeanDefinitionReader - Loading XML bean definitions from file
[D:\esb\ServiceMix\VoidVoidEjb\servicemix.xml]
[INFO] FileSystemXmlApplicationContext - Bean factory for application
context [org.xbean.spring.cont
ext.FileSystemXmlApplicationContext;hashCode=22540508]:
org.springframework.beans.factory.support.De
faultListableBeanFactory defining beans [jbi,client]; root of BeanFactory
hierarchy
[INFO] FileSystemXmlApplicationContext - 2 beans defined in application
context [org.xbean.spring.co
ntext.FileSystemXmlApplicationContext;hashCode=22540508]
[INFO] CollectionFactory - JDK 1.4+ collections available
[INFO] CollectionFactory - Commons Collections 3.x available
[INFO] FileSystemXmlApplicationContext - Unable to locate MessageSource with
name 'messageSource': u
sing default
[EMAIL PROTECTED]
[INFO] FileSystemXmlApplicationContext - Unable to locate
ApplicationEventMulticaster with name 'app
licationEventMulticaster': using default
[org.springframework.context.event.SimpleApplicationEventMu
[EMAIL PROTECTED]
[INFO] DefaultListableBeanFactory - Pre-instantiating singletons in factory
[org.springframework.bea
ns.factory.support.DefaultListableBeanFactory defining beans [jbi,client];
root of BeanFactory hiera
rchy]
[INFO] SpringInitialContextFactory - Loading JNDI context from: class path
resource [jndi.xml]
[INFO] XBeanXmlBeanDefinitionReader - Loading XML bean definitions from
class path resource [jndi.xm
l]
[INFO] JBIContainer - Activating component for:
[container=jbi,name=#SubscriptionManager#,id=#Subscr
iptionManager#] with service: null component:
[EMAIL PROTECTED]
[INFO] JBIContainer - ServiceMix JBI Container (http://servicemix.org/)
name: jbi running version: 2
.0.2
[INFO] JBIContainer - Activating component for:
[container=jbi,name=wsifEJBBC,id=wsifEJBBC] with ser
vice: {http://servicemix.org/demos/loan-broker}wsifEJBBC component:
org.servicemix.components.wsif.W
[EMAIL PROTECTED]
[INFO] DefaultListableBeanFactory - Destroying singletons in factory
{org.springframework.beans.fact
ory.support.DefaultListableBeanFactory defining beans [jbi,client]; root of
BeanFactory hierarchy}
Caught: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'jbi'
 defined in file [D:\esb\ServiceMix\VoidVoidEjb\servicemix.xml]: Initial
ization of bean failed; nested exception is javax.jbi.JBIException:
org.apache.wsif.WSIFException: U
nable to find an available port (no ports declared?)
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'jbi' defined
 in file [D:\esb\ServiceMix\VoidVoidEjb\servicemix.xml]: Initialization
of bean failed; nested exception is javax.jbi.JBIException:
org.apache.wsif.WSIFException: Unable to
 find an available port (no ports declared?)
javax.jbi.JBIException: org.apache.wsif.WSIFException: Unable to find an
available port (no ports de
clared?)
        at
org.servicemix.components.wsif.WSIFBinding.init(WSIFBinding.java:88)
        at
org.servicemix.components.util.PojoSupport.init(PojoSupport.java:88)
        at
org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:887)
        at
org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:855)
        at
org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:817)
        at
org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:765)
        at
org.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(SpringJBIContainer.jav
a:52)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMe
thods(AbstractAutowireCapableBeanFactory.java:1058)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(A
bstractAutowireCapableBeanFactory.java:363)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory
.java:226)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory
.java:147)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingle
tons(DefaultListableBeanFactory.java:275)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicatio
nContext.java:318)
        at
org.xbean.spring.context.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationC
ontext.java:149)
        at
org.xbean.spring.context.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationC
ontext.java:48)
        at org.servicemix.Main.main(Main.java:76)
Caused by: org.apache.wsif.WSIFException: Unable to find an available port
(no ports declared?)
        at
org.apache.wsif.base.WSIFServiceImpl.getPort(WSIFServiceImpl.java:557)
        at
org.apache.wsif.base.WSIFServiceImpl.getPort(WSIFServiceImpl.java:538)
        at
org.servicemix.components.wsif.WSIFOperationMap.addBindingOperation(WSIFOperationMap.java
:105)
        at
org.servicemix.components.wsif.WSIFOperationMap.addBinding(WSIFOperationMap.java:98)
        at
org.servicemix.components.wsif.WSIFBinding.init(WSIFBinding.java:84)
        ... 15 more


Any help would be appreciated

Thanks
Mike (mikegeorge12<{at}>yahoo.com)
--
View this message in context: 
http://www.nabble.com/WSIFException%3A-Unable-to-find-an-available-port-t1469084.html#a3971297
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to