Topic
  • 17 replies
  • Latest Post - ‏2012-06-21T15:11:23Z by diegoloro
diegoloro
diegoloro
14 Posts

Pinned topic SCA EJB Binding - Unable to call EJB Endpoint

‏2012-01-03T08:16:05Z |
Hi all,

this is my problem.
I have an OSGI Bundle in OSGI Internal Repository. This bundle exposes a remotable service (XASService) by blueprint configuration.
I declare this service also in the EBA configuration to be visible from SCA components.
When I expose this service with SCA Webservice Binding I don't have any problem, but when I use the EJB (3.0) Binding I'm not able to call it.

My documentation is (I will refere to as "IBM documentation"):
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.jpafep.multiplatform.doc%2Finfo%2Fae%2Fae%2Ftsca_ejb_binding.html

I'm using WAS Base 7.0.0.19
JPA 2.0 Feature 1.0.0.5
OSGi Apps Feature 1.0.0.5
SCA FEP 1.0.1.11
XML FEP 1.0.0.7

This is my simple SCA configuration:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:was="http://www.ibm.com/xmlns/prod/websphere/sca/1.0/2007/06" autowire="false" name="ClienteComposite" targetNamespace="http://interfaces.ClienteInterface">
<component name="ClienteComponent">
<was:implementation.osgiapp applicationSymbolicName="SBeba" applicationVersion="1.0.0"/>
<service name="XASService">
<binding.ejb ejb-version="EJB3"/>
</service>
</component>
</composite>

I generated the EJB Client classes with "createEJBStubs" and I included it in my webapp using the code:
remoteObj = ctxt.lookup("lookup-path");
XASSessionRemote xas = (XASSessionRemote) PortableRemoteObject.narrow(remoteObj, _XASSessionRemote_Stub.class);
XASResponse = xas.callXAS(req);

So these are my questions:
1) IBM documentation says that:
"The generated enterprise bean for the composite service is in the directory, WAS_HOME\AppServer\profiles\PROFILE_NAME\installedApps\CELL_NAME\COMPOSITE_NAME.ear"
but I don't find it in any directory of WAS.

2) IBM documentation says that the look up path to my service should be:
A. ejb/sca/ejbbinding/ClienteComponent/XASService#interfaces.XASInterfaceRemote
But in the Application server logs I find this one:
B. ejb/ClienteComponent/XASService#interfaces.XASInterfaceRemote

3) When I do my lookup with these URLs I have this result:
A. Context: CAD381Node01Cell/nodes/CAD381Node01/servers/server1, name: ejb/sca/ejbbinding/ClienteComponent/XASService#interfaces.XASInterfaceRemote: First component in name sca/ejbbinding/ClienteComponent/XASService#interfaces.XASInterfaceRemote not found.
Code:
remoteObj = ctxt.lookup("ejb/sca/ejbbinding/ClienteComponent/XASService#interfaces.XASInterfaceRemote");
XASSessionRemote xas = (XASSessionRemote) PortableRemoteObject.narrow(remoteObj, _XASSessionRemote_Stub.class);
XASResponse = xas.callXAS(req);
B. cannot cast class org.omg.stub.java.rmi._Remote_Stub to class ejb._XASSessionRemote_Stub
Code:
remoteObj = ctxt.lookup("ejb/ClienteComponent/XASService#interfaces.XASInterfaceRemote");
XASSessionRemote xas = (XASSessionRemote) PortableRemoteObject.narrow(remoteObj, _XASSessionRemote_Stub.class);
XASResponse = xas.callXAS(req);

Any ideas?
Thanks a lot,
Diego
Updated on 2012-06-21T15:11:23Z at 2012-06-21T15:11:23Z by diegoloro
  • SystemAdmin
    SystemAdmin
    126 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-01-04T15:45:11Z  
    I present a workshop in CASCON 2011 using a similar approach, basically a OSGi service exposed with SCA EJB 3.0 binding. I use RAD 8.0.3 with WAS 8 if you are interested in the project let me know and I will attach it.

    As for your questions:
    1) I think that only works for SCA EJB 2.0 binding (not sure and haven't find any place to prove it, but I was not able to get those for EJB 3.0).
    2) "ejb/sca/ejbbinding/" is the default URL and it was working for me, but I was aware that you can modify it in the SCA Configuration (.composite file) not sure if you can modify it somewhere else. NOTE: I use Universal Test Client (UTC) to find the location of my services.
    3) Not sure what this problem is, but I guess that if you can share the instruction you are using to call your EJB we can compare to what I have.
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-01-05T07:57:14Z  
    I present a workshop in CASCON 2011 using a similar approach, basically a OSGi service exposed with SCA EJB 3.0 binding. I use RAD 8.0.3 with WAS 8 if you are interested in the project let me know and I will attach it.

    As for your questions:
    1) I think that only works for SCA EJB 2.0 binding (not sure and haven't find any place to prove it, but I was not able to get those for EJB 3.0).
    2) "ejb/sca/ejbbinding/" is the default URL and it was working for me, but I was aware that you can modify it in the SCA Configuration (.composite file) not sure if you can modify it somewhere else. NOTE: I use Universal Test Client (UTC) to find the location of my services.
    3) Not sure what this problem is, but I guess that if you can share the instruction you are using to call your EJB we can compare to what I have.
    Hi Adrian,

    thanks a lot for you response.
    I'm very interested in your project, so if you can attach it I will test it in my platform and I can see if I'm doing something wrong.
    Please if you can attach your OSGI service, the EBA, the SCA composite and your EJB client I can compare all these with mine.

    These are the instruction I use to call my EJB:
    InitialContext ctxt = new InitialContext();
    Object remoteObj = ctxt.lookup("ejb/sca/ejbbinding/ClienteComponent/XASService#interfaces.XASInterfaceRemote");
    XASSessionRemote xas = (XASSessionRemote) PortableRemoteObject.narrow(remoteObj, _XASSessionRemote_Stub.class);

    My OSGI service is XASService and its interface is interfaces.XASInterface (I think the remote one is generated by SCA in WAS).
    XASSessionRemote is the remote stub generated with "createEJBStubs".

    I wait for your attachments.
    Best Regards.
    Diego
  • SystemAdmin
    SystemAdmin
    126 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-01-05T18:14:22Z  
    • diegoloro
    • ‏2012-01-05T07:57:14Z
    Hi Adrian,

    thanks a lot for you response.
    I'm very interested in your project, so if you can attach it I will test it in my platform and I can see if I'm doing something wrong.
    Please if you can attach your OSGI service, the EBA, the SCA composite and your EJB client I can compare all these with mine.

    These are the instruction I use to call my EJB:
    InitialContext ctxt = new InitialContext();
    Object remoteObj = ctxt.lookup("ejb/sca/ejbbinding/ClienteComponent/XASService#interfaces.XASInterfaceRemote");
    XASSessionRemote xas = (XASSessionRemote) PortableRemoteObject.narrow(remoteObj, _XASSessionRemote_Stub.class);

    My OSGI service is XASService and its interface is interfaces.XASInterface (I think the remote one is generated by SCA in WAS).
    XASSessionRemote is the remote stub generated with "createEJBStubs".

    I wait for your attachments.
    Best Regards.
    Diego
    I think you are calling the EJB the right way, and you can find that call in the BankingEJBHelper/ejbModule/com/cascon/batch/helpers/DataReaderBean.java within the method getRealData(). Give this app a try and let me know your thoughts.

    Here is the link where you can download the workshop contents (it doesn't fit here), the SCA Lab is the #3, I think you may find it interesting.

    https://www.ibm.com/developerworks/mydeveloperworks/files/form/anonymous/api/library/2f021983-bfec-427c-8eb6-5cbe138233a9/document/043e40a4-144c-4627-bbe0-2094364c2f16/media/RAD_CASCON2011_WORKSHOP.zip
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-01-11T12:58:44Z  
    I think you are calling the EJB the right way, and you can find that call in the BankingEJBHelper/ejbModule/com/cascon/batch/helpers/DataReaderBean.java within the method getRealData(). Give this app a try and let me know your thoughts.

    Here is the link where you can download the workshop contents (it doesn't fit here), the SCA Lab is the #3, I think you may find it interesting.

    https://www.ibm.com/developerworks/mydeveloperworks/files/form/anonymous/api/library/2f021983-bfec-427c-8eb6-5cbe138233a9/document/043e40a4-144c-4627-bbe0-2094364c2f16/media/RAD_CASCON2011_WORKSHOP.zip
    Hi Adrian,
    your project is very interesting and really similar to mine!

    I managed to solve my problem and I'm able to call my EJB exposed as SCA Service in that way:
    
    remoteObj = ctxt.lookup(
    "ejb/ClienteComponent/XASService#interfaces.XASInterfaceRemote"); XASInterfaceRemote xas = (XASInterfaceRemote) PortableRemoteObject.narrow(remoteObj, XASInterfaceRemote.class); XASResponse = XASResponse+xas.callXAS(req);
    


    The problem was caused by two facts:
    1. I was using the wrong remoteObj interface for the remote call
    2. The only url that works on my WAS is "ejb/" instead of "ejb/sca/ejbbinding/"

    I have other two questions about SCA:

    1. Is it mandatory to put in the SCA asset all the interfaces of my OSGI services with Remote and Remotable annotation?
    My prototype works fine also without this classes inside SCA asset, if I don't specify the tag "interface.java" in the composition configuration:
    
    <service name=
    "XASService"> <!--interface.java interface=
    "interfaces.XASInterface"/--> <binding.ejb ejb-version=
    "EJB3"/> </service>
    

    Which is the best/right way to do?
    2. My XASService return a simple type (String) and works fine, but if I call a service exposed as EJB3 SCA Binding that returns a complex type I get an exception:
    
    java.rmi.MarshalException: CORBA MARSHAL 0x4942f896 No; nested exception is: org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : beans.Cliente is not Serializable and not Externalizable  vmcid: IBM  minor code: 896  completed: No
    

    That is my object (in my opinion it is serializabile, it is a simple bean with another bean inside):
    
    
    
    package beans;   
    
    import java.io.Serializable;   
    
    public 
    
    class Cliente  
    
    implements Serializable
    {   
    
    private 
    
    int id; 
    
    private Anagrafica anagrafica; 
    
    public 
    
    int getId() 
    { 
    
    return id; 
    } 
    
    public 
    
    void setId(
    
    int id) 
    { this.id = id; 
    } 
    
    public Anagrafica getAnagrafica() 
    { 
    
    return anagrafica; 
    } 
    
    public 
    
    void setAnagrafica(Anagrafica anagrafica) 
    { this.anagrafica = anagrafica; 
    } 
    }
    


    
    
    
    package beans;   
    
    import java.io.Serializable; 
    
    import java.util.Date;   
    
    public 
    
    class Anagrafica 
    
    implements Serializable
    {   
    
    private String nome; 
    
    private String cognome; 
    
    private Date dataNascita; 
    
    public String getCognome() 
    { 
    
    return cognome; 
    } 
    
    public 
    
    void setCognome(String cognome) 
    { this.cognome = cognome; 
    } 
    
    public String getNome() 
    { 
    
    return nome; 
    } 
    
    public 
    
    void setNome(String nome) 
    { this.nome = nome; 
    } 
    
    public Date getDataNascita() 
    { 
    
    return dataNascita; 
    } 
    
    public 
    
    void setDataNascita(Date dataNascita) 
    { this.dataNascita = dataNascita; 
    } 
    }
    

    Have you ever try this case?

    Thanks a lot,
    Diego
  • SystemAdmin
    SystemAdmin
    126 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-01-11T15:15:00Z  
    • diegoloro
    • ‏2012-01-11T12:58:44Z
    Hi Adrian,
    your project is very interesting and really similar to mine!

    I managed to solve my problem and I'm able to call my EJB exposed as SCA Service in that way:
    <pre class="jive-pre"> remoteObj = ctxt.lookup( "ejb/ClienteComponent/XASService#interfaces.XASInterfaceRemote"); XASInterfaceRemote xas = (XASInterfaceRemote) PortableRemoteObject.narrow(remoteObj, XASInterfaceRemote.class); XASResponse = XASResponse+xas.callXAS(req); </pre>

    The problem was caused by two facts:
    1. I was using the wrong remoteObj interface for the remote call
    2. The only url that works on my WAS is "ejb/" instead of "ejb/sca/ejbbinding/"

    I have other two questions about SCA:

    1. Is it mandatory to put in the SCA asset all the interfaces of my OSGI services with Remote and Remotable annotation?
    My prototype works fine also without this classes inside SCA asset, if I don't specify the tag "interface.java" in the composition configuration:
    <pre class="jive-pre"> <service name= "XASService"> <!--interface.java interface= "interfaces.XASInterface"/--> <binding.ejb ejb-version= "EJB3"/> </service> </pre>
    Which is the best/right way to do?
    2. My XASService return a simple type (String) and works fine, but if I call a service exposed as EJB3 SCA Binding that returns a complex type I get an exception:
    <pre class="jive-pre"> java.rmi.MarshalException: CORBA MARSHAL 0x4942f896 No; nested exception is: org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : beans.Cliente is not Serializable and not Externalizable vmcid: IBM minor code: 896 completed: No </pre>
    That is my object (in my opinion it is serializabile, it is a simple bean with another bean inside):
    <pre class="jive-pre"> package beans; import java.io.Serializable; public class Cliente implements Serializable { private int id; private Anagrafica anagrafica; public int getId() { return id; } public void setId( int id) { this.id = id; } public Anagrafica getAnagrafica() { return anagrafica; } public void setAnagrafica(Anagrafica anagrafica) { this.anagrafica = anagrafica; } } </pre>

    <pre class="jive-pre"> package beans; import java.io.Serializable; import java.util.Date; public class Anagrafica implements Serializable { private String nome; private String cognome; private Date dataNascita; public String getCognome() { return cognome; } public void setCognome(String cognome) { this.cognome = cognome; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public Date getDataNascita() { return dataNascita; } public void setDataNascita(Date dataNascita) { this.dataNascita = dataNascita; } } </pre>
    Have you ever try this case?

    Thanks a lot,
    Diego
    Hi Diego

    For your first question, I have the answer right off hand. When using implementation.osgiapp you are not required to declare the interface.java in the OSGi service and have a copy of the Java interfaces with @Remotable annotation. This is stated in the WAS Infocenter. Here the link to that, look at the Annotations section
    http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.soafep.multiplatform.doc/info/ae/ae/csca_osgi_overview.html

    Hope this helps.

    ________________________________________________
    "If you prefer to speak in Spanish, please contact me directly"
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-01-12T13:24:51Z  
    Hi Diego

    For your first question, I have the answer right off hand. When using implementation.osgiapp you are not required to declare the interface.java in the OSGi service and have a copy of the Java interfaces with @Remotable annotation. This is stated in the WAS Infocenter. Here the link to that, look at the Annotations section
    http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.soafep.multiplatform.doc/info/ae/ae/csca_osgi_overview.html

    Hope this helps.

    ________________________________________________
    "If you prefer to speak in Spanish, please contact me directly"
    Thanks a lot for confirming what I had tested empirically!
    I hope Adrian or someone else could answer my second question,

    best regards,
    Diego
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-01-31T08:11:04Z  
    • diegoloro
    • ‏2012-01-12T13:24:51Z
    Thanks a lot for confirming what I had tested empirically!
    I hope Adrian or someone else could answer my second question,

    best regards,
    Diego
    Hi all,

    I'm not able to solve my problem on:
    1) unmarshalling of complex type as described before.

    But I have also another problem:
    2) when I publish SCA Services with complex types the return type on the WSDL is AnyType, so Axis is not able to deserialize the soap response.
    This is my service interface:
    
    
    
    public 
    
    interface DaoInterface 
    { 
    
    public List<Bundle> getBundles(String infoProvider); 
    }
    

    This is my WSDL:
    
    code
    
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-01-31T08:19:11Z  
    • diegoloro
    • ‏2012-01-12T13:24:51Z
    Thanks a lot for confirming what I had tested empirically!
    I hope Adrian or someone else could answer my second question,

    best regards,
    Diego
    Hi all,

    I'm not able to solve my problem on:
    1) unmarshalling of complex type as described before.

    But I have also another problem:
    2) when I publish SCA Services with complex types the return type on the WSDL is AnyType, so Axis is not able to deserialize the soap response.
    This is my service interface:
    
    
    
    public 
    
    interface DaoInterface 
    { 
    
    public List<Bundle> getBundles(String infoProvider); 
    }
    

    This is my WSDL, as you can see the return element is "AnyType", but it should be "Bundle" with maxOccurs="unbounded":
    
    <?xml version=
    "1.0" encoding=
    "UTF-8"?> <wsdl:definitions xmlns:wsdl=
    "http://schemas.xmlsoap.org/wsdl/" xmlns:tns=
    "http://dao.interfaces/" xmlns:SOAP11=
    "http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs=
    "http://www.w3.org/2001/XMLSchema" xmlns:SOAP=
    "http://schemas.xmlsoap.org/wsdl/soap/" name=
    "DaoInterfaceService" targetNamespace=
    "http://dao.interfaces/"> <wsdl:types> <xs:schema xmlns:tns=
    "http://dao.interfaces/" xmlns:xs=
    "http://www.w3.org/2001/XMLSchema" attributeFormDefault=
    "qualified" elementFormDefault=
    "unqualified" targetNamespace=
    "http://dao.interfaces/"> <xs:element name=
    "getBundlesResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "return" nillable=
    "true" type=
    "xs:anyType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name=
    "getBundles"> <xs:complexType> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "arg0" nillable=
    "true" type=
    "xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name=
    "bundle"> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "bundleInfo" type=
    "xs:base64Binary"/> <xs:element minOccurs=
    "0" name=
    "idBundle" type=
    "xs:string"/> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "serviceList" nillable=
    "true" type=
    "tns:service"/> <xs:element minOccurs=
    "0" name=
    "symbolicName" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "version" type=
    "xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name=
    "service"> <xs:sequence> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "bundleList" nillable=
    "true" type=
    "tns:bundle"/> <xs:element minOccurs=
    "0" name=
    "description" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "idService" type=
    "xs:string"/> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "methodList" nillable=
    "true" type=
    "tns:method"/> <xs:element minOccurs=
    "0" name=
    "serviceName" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "serviceType" type=
    "tns:serviceType"/> <xs:element minOccurs=
    "0" name=
    "signatures" type=
    "xs:base64Binary"/> </xs:sequence> </xs:complexType> <xs:complexType name=
    "method"> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "dataType" type=
    "tns:dataType"/> <xs:element minOccurs=
    "0" name=
    "idMappedMethod" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "idMethod" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "methodName" type=
    "xs:string"/> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "methodParametersList" nillable=
    "true" type=
    "tns:methodParameters"/> <xs:element minOccurs=
    "0" name=
    "service" type=
    "tns:service"/> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "transformationList" nillable=
    "true" type=
    "tns:transformation"/> </xs:sequence> </xs:complexType> <xs:complexType name=
    "dataType"> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "dataTypeName" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "idDataType" type=
    "xs:string"/> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "methodList" nillable=
    "true" type=
    "tns:method"/> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "methodParametersList" nillable=
    "true" type=
    "tns:methodParameters"/> </xs:sequence> </xs:complexType> <xs:complexType name=
    "methodParameters"> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "dataType" type=
    "tns:dataType"/> <xs:element minOccurs=
    "0" name=
    "method" type=
    "tns:method"/> <xs:element minOccurs=
    "0" name=
    "methodParametersPK" type=
    "tns:methodParametersPK"/> <xs:element minOccurs=
    "0" name=
    "order" type=
    "xs:integer"/> </xs:sequence> </xs:complexType> <xs:complexType name=
    "methodParametersPK"> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "idDataType" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "idMethod" type=
    "xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name=
    "transformation"> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "description" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "direction" type=
    "xs:string"/> <xs:element minOccurs=
    "0" name=
    "idTransformation" type=
    "xs:string"/> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "methodList" nillable=
    "true" type=
    "tns:method"/> <xs:element minOccurs=
    "0" name=
    "order" type=
    "xs:integer"/> <xs:element minOccurs=
    "0" name=
    "transformationName" type=
    "xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name=
    "serviceType"> <xs:sequence> <xs:element minOccurs=
    "0" name=
    "idServiceType" type=
    "xs:string"/> <xs:element maxOccurs=
    "unbounded" minOccurs=
    "0" name=
    "serviceList" nillable=
    "true" type=
    "tns:service"/> <xs:element minOccurs=
    "0" name=
    "type" type=
    "xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types> <wsdl:message name=
    "getBundlesResponse"> <wsdl:part name=
    "getBundlesResponse" element=
    "tns:getBundlesResponse"> </wsdl:part> </wsdl:message> <wsdl:message name=
    "getBundles"> <wsdl:part name=
    "getBundles" element=
    "tns:getBundles"> </wsdl:part> </wsdl:message> <wsdl:portType name=
    "DaoInterface"> <wsdl:operation name=
    "getBundles"> <wsdl:input message=
    "tns:getBundles"> </wsdl:input> <wsdl:output message=
    "tns:getBundlesResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name=
    "DaoInterfaceBinding" type=
    "tns:DaoInterface"> <SOAP11:binding style=
    "document" transport=
    "http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name=
    "getBundles"> <SOAP11:operation soapAction=
    "urn:getBundles"/> <wsdl:input> <SOAP11:body use=
    "literal"/> </wsdl:input> <wsdl:output> <SOAP11:body use=
    "literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name=
    "DaoInterfaceService"> <wsdl:port name=
    "DaoInterfacePort" binding=
    "tns:DaoInterfaceBinding"> <SOAP11:address location=
    "http://CAD381:9080/ClienteComponent/DaoService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
    


    Someone can help me?
    Thanks a lot,
    Diego
  • SystemAdmin
    SystemAdmin
    126 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-02-01T15:32:17Z  
    • diegoloro
    • ‏2012-01-31T08:19:11Z
    Hi all,

    I'm not able to solve my problem on:
    1) unmarshalling of complex type as described before.

    But I have also another problem:
    2) when I publish SCA Services with complex types the return type on the WSDL is AnyType, so Axis is not able to deserialize the soap response.
    This is my service interface:
    <pre class="jive-pre"> public interface DaoInterface { public List<Bundle> getBundles(String infoProvider); } </pre>
    This is my WSDL, as you can see the return element is "AnyType", but it should be "Bundle" with maxOccurs="unbounded":
    <pre class="jive-pre"> <?xml version= "1.0" encoding= "UTF-8"?> <wsdl:definitions xmlns:wsdl= "http://schemas.xmlsoap.org/wsdl/" xmlns:tns= "http://dao.interfaces/" xmlns:SOAP11= "http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs= "http://www.w3.org/2001/XMLSchema" xmlns:SOAP= "http://schemas.xmlsoap.org/wsdl/soap/" name= "DaoInterfaceService" targetNamespace= "http://dao.interfaces/"> <wsdl:types> <xs:schema xmlns:tns= "http://dao.interfaces/" xmlns:xs= "http://www.w3.org/2001/XMLSchema" attributeFormDefault= "qualified" elementFormDefault= "unqualified" targetNamespace= "http://dao.interfaces/"> <xs:element name= "getBundlesResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs= "0" name= "return" nillable= "true" type= "xs:anyType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name= "getBundles"> <xs:complexType> <xs:sequence> <xs:element minOccurs= "0" name= "arg0" nillable= "true" type= "xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name= "bundle"> <xs:sequence> <xs:element minOccurs= "0" name= "bundleInfo" type= "xs:base64Binary"/> <xs:element minOccurs= "0" name= "idBundle" type= "xs:string"/> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "serviceList" nillable= "true" type= "tns:service"/> <xs:element minOccurs= "0" name= "symbolicName" type= "xs:string"/> <xs:element minOccurs= "0" name= "version" type= "xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name= "service"> <xs:sequence> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "bundleList" nillable= "true" type= "tns:bundle"/> <xs:element minOccurs= "0" name= "description" type= "xs:string"/> <xs:element minOccurs= "0" name= "idService" type= "xs:string"/> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "methodList" nillable= "true" type= "tns:method"/> <xs:element minOccurs= "0" name= "serviceName" type= "xs:string"/> <xs:element minOccurs= "0" name= "serviceType" type= "tns:serviceType"/> <xs:element minOccurs= "0" name= "signatures" type= "xs:base64Binary"/> </xs:sequence> </xs:complexType> <xs:complexType name= "method"> <xs:sequence> <xs:element minOccurs= "0" name= "dataType" type= "tns:dataType"/> <xs:element minOccurs= "0" name= "idMappedMethod" type= "xs:string"/> <xs:element minOccurs= "0" name= "idMethod" type= "xs:string"/> <xs:element minOccurs= "0" name= "methodName" type= "xs:string"/> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "methodParametersList" nillable= "true" type= "tns:methodParameters"/> <xs:element minOccurs= "0" name= "service" type= "tns:service"/> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "transformationList" nillable= "true" type= "tns:transformation"/> </xs:sequence> </xs:complexType> <xs:complexType name= "dataType"> <xs:sequence> <xs:element minOccurs= "0" name= "dataTypeName" type= "xs:string"/> <xs:element minOccurs= "0" name= "idDataType" type= "xs:string"/> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "methodList" nillable= "true" type= "tns:method"/> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "methodParametersList" nillable= "true" type= "tns:methodParameters"/> </xs:sequence> </xs:complexType> <xs:complexType name= "methodParameters"> <xs:sequence> <xs:element minOccurs= "0" name= "dataType" type= "tns:dataType"/> <xs:element minOccurs= "0" name= "method" type= "tns:method"/> <xs:element minOccurs= "0" name= "methodParametersPK" type= "tns:methodParametersPK"/> <xs:element minOccurs= "0" name= "order" type= "xs:integer"/> </xs:sequence> </xs:complexType> <xs:complexType name= "methodParametersPK"> <xs:sequence> <xs:element minOccurs= "0" name= "idDataType" type= "xs:string"/> <xs:element minOccurs= "0" name= "idMethod" type= "xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name= "transformation"> <xs:sequence> <xs:element minOccurs= "0" name= "description" type= "xs:string"/> <xs:element minOccurs= "0" name= "direction" type= "xs:string"/> <xs:element minOccurs= "0" name= "idTransformation" type= "xs:string"/> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "methodList" nillable= "true" type= "tns:method"/> <xs:element minOccurs= "0" name= "order" type= "xs:integer"/> <xs:element minOccurs= "0" name= "transformationName" type= "xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name= "serviceType"> <xs:sequence> <xs:element minOccurs= "0" name= "idServiceType" type= "xs:string"/> <xs:element maxOccurs= "unbounded" minOccurs= "0" name= "serviceList" nillable= "true" type= "tns:service"/> <xs:element minOccurs= "0" name= "type" type= "xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types> <wsdl:message name= "getBundlesResponse"> <wsdl:part name= "getBundlesResponse" element= "tns:getBundlesResponse"> </wsdl:part> </wsdl:message> <wsdl:message name= "getBundles"> <wsdl:part name= "getBundles" element= "tns:getBundles"> </wsdl:part> </wsdl:message> <wsdl:portType name= "DaoInterface"> <wsdl:operation name= "getBundles"> <wsdl:input message= "tns:getBundles"> </wsdl:input> <wsdl:output message= "tns:getBundlesResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name= "DaoInterfaceBinding" type= "tns:DaoInterface"> <SOAP11:binding style= "document" transport= "http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name= "getBundles"> <SOAP11:operation soapAction= "urn:getBundles"/> <wsdl:input> <SOAP11:body use= "literal"/> </wsdl:input> <wsdl:output> <SOAP11:body use= "literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name= "DaoInterfaceService"> <wsdl:port name= "DaoInterfacePort" binding= "tns:DaoInterfaceBinding"> <SOAP11:address location= "http://CAD381:9080/ClienteComponent/DaoService"/> </wsdl:port> </wsdl:service> </wsdl:definitions> </pre>

    Someone can help me?
    Thanks a lot,
    Diego
    Hi Diego,

    I don't really have any ideas on either of these two problems.

    For the first problem, I'm not sure why the type you pasted is being flagged as not Serializable or Externalizable. Is it possible you have a different version of the class floating around in your SCA asset vs. your OSGI bundle??

    For the second problem, it's possible you could have uncovered a defect in the SCA wsdl generation code. I am not aware of one personally, but that could be the case.

    Obviously one approach would be to take the generated WSDL as an intermediate result, and then manually edit the WSDL to provide the appropriate values, and then package the edited WSDL along with the app.

    But that doesn't address the original problem, it just deals with it.

    Scott
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-02-02T13:50:46Z  
    Hi Scott,

    to solve the Serializable-Externalizable object problem, I will look into my bundles.

    But what about the WSDL generated by SCA?
    I hope you or some IBM programmer can test this issue and tell me if it is a SCA bug.
    In that case you can open an bug issue.

    As a workaround I can modify the WSDL generated by SCA, but where I can find it in WAS?

    Thanks a lot,
    Diego
  • SystemAdmin
    SystemAdmin
    126 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-02-02T17:45:02Z  
    • diegoloro
    • ‏2012-02-02T13:50:46Z
    Hi Scott,

    to solve the Serializable-Externalizable object problem, I will look into my bundles.

    But what about the WSDL generated by SCA?
    I hope you or some IBM programmer can test this issue and tell me if it is a SCA bug.
    In that case you can open an bug issue.

    As a workaround I can modify the WSDL generated by SCA, but where I can find it in WAS?

    Thanks a lot,
    Diego
    Diego,

    I can give this a further look if you attach the Java interface/classes (or simply the whole contribution JAR) to a forum post. Ideally this would include the source.

    As far as where to get the WSDL, how did you get it previously when you posted the incorrect WSDL onto the forum? Via a ?wsdl request from the browser or from RAD?

    You could use ?wsdl and then save the result as a WSDL file... and then, after editing the WSDL and zipping it up in your SCA contribution, you could reference it from a Web Services binding (I'm assuming this is what you were trying to do) via wsdlElement.
    (See here for examples.)

    Thanks,
    Scott
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-02-03T12:37:25Z  
    Hi Scott,

    in the attachment you can find all you need to do your tests (bundles, eba, sca composition).

    I'm using WAS Base 7.0.0.19
    JPA 2.0 Feature 1.0.0.5
    OSGi Apps Feature 1.0.0.5
    SCA FEP 1.0.1.11
    XML FEP 1.0.0.7

    I get the WSDL from my browser, I don't use RAD but a normal Eclipse.
    I don't want to modify the WSDL because I don't want to insert it in my SCA Composition.
    The reason is simple: the main benefit of SCA to me is that I can publish a service in many ways without knowing technical info about it.
    So I would like it to work fine without workarounds.

    Thanks a lot Scott!
    I wait for your answer.
    Diego
  • SystemAdmin
    SystemAdmin
    126 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-02-03T16:37:30Z  
    • diegoloro
    • ‏2012-02-03T12:37:25Z
    Hi Scott,

    in the attachment you can find all you need to do your tests (bundles, eba, sca composition).

    I'm using WAS Base 7.0.0.19
    JPA 2.0 Feature 1.0.0.5
    OSGi Apps Feature 1.0.0.5
    SCA FEP 1.0.1.11
    XML FEP 1.0.0.7

    I get the WSDL from my browser, I don't use RAD but a normal Eclipse.
    I don't want to modify the WSDL because I don't want to insert it in my SCA Composition.
    The reason is simple: the main benefit of SCA to me is that I can publish a service in many ways without knowing technical info about it.
    So I would like it to work fine without workarounds.

    Thanks a lot Scott!
    I wait for your answer.
    Diego
    Diego,

    In testing your app, I seem to have confirmed that this is indeed a problem with the SCA Feature Pack runtime.

    Would you be able to open a problem report with IBM service ?

    Scott
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-02-06T10:51:21Z  
    Hi Scott,

    please, could you explain me where and I should I open the problem report to IBM Service?
    Could you open it for me and tell me where to follow it's fix evolution?

    Thanks, i wait for your response.
    Diego
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-02-06T10:52:26Z  
    Hi Scott,

    please, could you explain me where and how should I open the problem report to IBM Service?
    Could you open it for me and tell me where to follow it's fix evolution?

    Thanks, i wait for your response.
    Diego
  • SystemAdmin
    SystemAdmin
    126 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-02-06T15:40:04Z  
    • diegoloro
    • ‏2012-02-06T10:51:21Z
    Hi Scott,

    please, could you explain me where and I should I open the problem report to IBM Service?
    Could you open it for me and tell me where to follow it's fix evolution?

    Thanks, i wait for your response.
    Diego
    Diego,

    I'm sorry, I'm not able to open a PMR on your behalf.

    Is there an IBM account rep your company works with that you could ask for help here?

    Scott
  • diegoloro
    diegoloro
    14 Posts

    Re: SCA EJB Binding - Unable to call EJB Endpoint

    ‏2012-06-21T15:11:23Z  
    Diego,

    I'm sorry, I'm not able to open a PMR on your behalf.

    Is there an IBM account rep your company works with that you could ask for help here?

    Scott
    Hi Scott,

    I can't open the PMR because my company has not an adeguate commercial contract.
    I tried with WAS 8.5 and I saw that the problem persits.

    Do you know if the bug will be solved in next releases?

    Thanks a lot,
    Diego