[Users] Corba support with JBI4Corba in Petals

jmt petals-components at ebmwebsourcing.com
Wed Mar 16 10:32:37 CET 2011


Hi cdeneux,

Yes, to install jbi4corba I had to add additional dependencies that were defined in the jbi4corba jbi.xml but not included in the distribution. There are a few:
- geronimo-ws-metadata_2.0_spec-1.1.2.jar
- jaxen-1.1.jar
- jdom-1.0.jar

Once I included those libraries the component can be successfully installed and started in Petals.

I´m using the ServiceMix example from JBI4Corba webpage for exposing a Corba service using a wsdl, link (http://jbi4corba.sourceforge.net/servicemixGettingStarted.html).

The SA that I´m using is :

SA jbi.xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<jbi version="1.0" xmlns="http://java.sun.com/xml/ns/jbi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<service-assembly>
		<identification>
			<name>sa-Test</name>
			<description>A description of sa-Test</description>
		</identification>
		<service-unit>
			<identification>
				<name>
					HelloWorldCorba
				</name>
				<description>
					This is an example of Corba usage.
				</description>
			</identification>
			<target>
				<artifacts-zip>JBI4CorbaSU.zip</artifacts-zip>
				<component-name>jbi4corba</component-name>
			</target>
		</service-unit>
		<service-unit>
			<identification>
				<name>
					HelloWorldSOAP
				</name>
				<description>
					This is an example of SOAP usage.
				</description>
			</identification>
			<target>
				<artifacts-zip>SOAPSU.zip</artifacts-zip>
				<component-name>petals-bc-soap</component-name>
			</target>
		</service-unit>

	</service-assembly>
</jbi>



JBI4CorbaSU jbi.xml:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0" 
	xmlns:jbi="http://java.sun.com/xml/ns/jbi"
	xmlns:corba_urn="http://Hello"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	
<jbi:services binding-component="true">
	
		<!-- Import a Service into PEtALS => provides a Service. -->
		<jbi:provides 		
			interface-name="corba_urn:HelloPortType"
			service-name="corba_urn:Hello"
			endpoint-name="HelloWorldEndpoint">
		</jbi:provides>			

	</jbi:services>>
</jbi:jbi>




JBI4CorbaSU Hello.wsdl, generated with Netbeans JBI4Corba plugin and HelloWorld.idl file:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Hello" targetNamespace="http://Hello" xmlns:tns="http://Hello" xmlns:imolacorba="uri://schemas.imola.it/jbi/wsdl-extensions/corba/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://HelloApp.Hello" xmlns="http://HelloApp.Hello" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="sayHello">
        <xs:complexType>
            <xs:sequence/>
        </xs:complexType>
    </xs:element>
    <xs:element name="sayHelloResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="return" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="shutdown">
        <xs:complexType>
            <xs:sequence/>
        </xs:complexType>
    </xs:element>
</xs:schema>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://HelloApp.Hello" xmlns="http://HelloApp.Hello" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="sayHello">
        <xs:complexType>
            <xs:sequence/>
        </xs:complexType>
    </xs:element>
    <xs:element name="sayHelloResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="return" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="shutdown">
        <xs:complexType>
            <xs:sequence/>
        </xs:complexType>
    </xs:element>
</xs:schema>
  </wsdl:types>
  <wsdl:message name="sayHelloResponse">
    <wsdl:part name="parameters" element="tns:sayHelloResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="sayHello">
    <wsdl:part name="parameters" element="tns:sayHello">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="shutdown">
    <wsdl:part name="parameters" element="tns:shutdown">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="HelloPortType">
    <wsdl:operation name="sayHello">
      <wsdl:input name="sayHello" message="tns:sayHello">
    </wsdl:input>
      <wsdl:output name="sayHelloResponse" message="tns:sayHelloResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="shutdown">
      <wsdl:input name="shutdown" message="tns:shutdown">
    </wsdl:input>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="HelloCorbaBinding" type="tns:HelloPortType">
<imolacorba:binding>
<imolacorba:idl>
module HelloApp
{
  interface Hello
  {
  string sayHello();
  oneway void shutdown();
  };
};
</imolacorba:idl>
</imolacorba:binding>
    <wsdl:operation name="sayHello">
      <wsdl:input name="sayHello">
      </wsdl:input>
      <wsdl:output name="sayHelloResponse">
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="shutdown">
      <wsdl:input name="shutdown">
      </wsdl:input>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Hello">
    <wsdl:port name="HelloCorbaPort" binding="tns:HelloCorbaBinding">
<imolacorba:address name="Hello" localizationType="NameService">
<imolacorba:orb>
<imolacorba:property name="org.omg.CORBA.ORBInitialPort" value="1050"/>
<imolacorba:property name="org.omg.CORBA.ORBInitialHost" value="localhost"/>
</imolacorba:orb>
</imolacorba:address>
    </wsdl:port>
  </wsdl:service>
<plnk:partnerLinkType name="Hello">
<plnk:role name="HelloPortTypeRole" portType="tns:Hello"/>
</plnk:partnerLinkType>
</wsdl:definitions>





SOAPSU jbi.xml:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	JBI descriptor for the PEtALS' "petals-bc-soap" component (SOAP).
	Originally created for the version 3.2 of the component.
 -->
<jbi:jbi version="1.0" 
	xmlns:jbi="http://java.sun.com/xml/ns/jbi"
	xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
	xmlns:soap="http://petals.ow2.org/components/soap/version-3.1"
	xmlns:corba_urn="http://Hello"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	
	<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
	<jbi:services binding-component="true">
	
		<!-- Expose a PEtALS Service => consumes a Service. -->
		<jbi:consumes
			interface-name="corba_urn:HelloPortType"
			service-name="corba_urn:Hello"
			endpoint-name="HelloWorldEndpoint">
	
			<!-- CDK specific elements -->
			<petalsCDK:mep xsi:nil="true" />
		
			<!-- Component specific elements -->	
			<soap:address>Hello</soap:address>
			<soap:remove-root>false</soap:remove-root>
			<soap:mode>SOAP</soap:mode>
			<soap:rest-add-namespace-prefix>soapbc</soap:rest-add-namespace-prefix>
		</jbi:consumes>
	</jbi:services>
</jbi:jbi>




I can load this SA, and there are some messages in the console that points that JBI4Corba is loading the wsdl:


Code:

[Petals.JBI-Management.DeploymentServiceImpl]-INFO 2009-07-01 11:38:11,796 Service Assembly 'sa-Test' succesfully deployed
Retrieving document at 'D:\ESBs-SCA\Petals\petals-quickstart-3.0\petals-quickstart-3.0\repository\service-assemblies\sa-Test-07-01-2009-113811531\install\HelloW
orldCorba\Hello.wsdl'.
Cannot find CatalogManager.properties




But there is no endpoint registered in the ESB under jbi4corba component. 

I have enabled log4j logging but does not appear to be passing through much jbi4corba code. 

jmt




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=799#799

-------------------- m2f --------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/737955a0/attachment.htm>


More information about the Users mailing list