[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsif-user
Subject:    Problems with EJB binding: NullPointerException in WSIFDynamicProvider_EJB.createDynamicWSIFPort(...
From:       Francesco Russo <f.russo () cineca ! it>
Date:       2005-06-16 15:37:06
Message-ID: 200506161742.30736.f.russo () cineca ! it
[Download RAW message or body]

Dear Sirs,
I'm trying to invoke a stateless session EJB method from a WSIF client that 
uses a WSDL with EJB extentions without success. 
After many debug sessions it seems to me like I've found out the problem, but 
I'm not able to solve it.

The problem is located in the 
WSIFDynamicProvider_EJB.createDynamicWSIFPort(Definition, Service, Port, 
WSIFDynamicTypeMap) method.
It fails throwing a NullPointerException since the Port binding has no EJB 
binding extensebility elements. 
It has only 2 UnknownExtensibilityElement:
1. "binding" NS="http://schemas.xmlsoap.org/wsdl/ejb"
2. "typeMapping" NS="http://schemas.xmlsoap.org/wsdl/formatbinding"

so to following code snippet always returns null:

-------------------- CODE SNIPPET BEGINS --------------------------
...
for (Iterator i = exs.iterator(); i.hasNext();) {
            Object o = i.next();
            if (o instanceof EJBBinding) {
                // if so try to create EJB dynamic port instance
                WSIFPort wp = new WSIFPort_EJB(def, port, typeMap);
                Trc.exit(wp);
                return wp;
            }
        }

// otherwise return null (so other providers can be checked)
Trc.exit();
return null;
-------------------- CODE SNIPPET ENDS -------------------------

Guessing that my WSDL might be wrong I checked out the provided ejb example 
with the AddressBook.xml WSDL file, but I got the very same result. 

What's wrong with what I'm doing???

I'm attaching the WSDL I'm using: could you please check it and tell me if it 
is wrong?

Thanks in advance for your help,


-- 
Francesco Russo [f.russo@cineca.it]
Architteture Applicative e Business Intelligence
Tel.:  +39  051 6171 775 
CINECA - Centro Interuniversitario di Calcolo
Via Manganelli, 6/3
40033 Casalecchio di Reno (Bologna) - Italy
Tel: +39 051 6171 411
www.cineca.it <http://www.cineca.it/>

["HelloWorld-WSDL4EJB.xml" (text/xml)]

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="HelloWorld"
        targetNamespace="http://it.cineca.test.webservices.ejb/HelloWorld.wsdl"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        xmlns:tns="http://it.cineca.test.webservices.ejb/HelloWorld.wsdl"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
	xmlns:ejb="http://schemas.xmlsoap.org/wsdl/ejb/"
	xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/">

  <documentation>
  WSDL for Service: HelloWorld, generated by Oracle WSDL toolkit (version: 1.1)
  </documentation>

  <types>
    <schema targetNamespace="http://it.cineca.test.webservices.ejb/HelloWorld.xsd" \
xmlns:tns="http://it.cineca.test.webservices.ejb/HelloWorld.xsd" \
xmlns="http://www.w3.org/2001/XMLSchema" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>  </types>

  <message name="sayHelloInput">
    <part name="param0" type="xsd:string"/>
  </message>
  <message name="sayHelloOutput">
    <part name="return" type="xsd:string"/>
  </message>

  <portType name="HelloWorldPortType">
    <operation name="sayHello">
      <input name="sayHelloInput" message="tns:sayHelloInput"/>
      <output name="sayHelloOutput" message="tns:sayHelloOutput"/>
    </operation>
  </portType>

  <binding name="HelloWorldBinding" type="tns:HelloWorldPortType">
    <ejb:binding/>
    <format:typeMapping style="Java" encoding="Java">
      <format:typeMap typeName="xsd:string" formatType="java.lang.String"/>
    </format:typeMapping>
    <operation name="sayHello">
      <ejb:operation 
		methodName="sayHello" 
		parameterOrder="param0" 
		returnPart="return" 
		interface="remote"/>
      <input name="sayHelloInput"/>
      <output name="sayHelloOutput"/>
    </operation> 
  </binding>

  <service name="HelloWorld">
    <port name="HelloWorldPort" binding="tns:HelloWorldBinding">
      <ejb:address 
		className="it.cineca.test.webservices.ejb.HelloWorldHome"
		jndiName="HelloWorld"
		initialContextFactory="com.evermind.server.rmi.RMIInitialContextFactory"
		jndiProviderURL="opmn:ormi://dhcp7-52.cineca.it:6020:test/HelloService"/>
    </port>
  </service>

</definitions>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic