Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[bpel-dev] Test case for WSDLUtil.resolveBPELPartnerLinkType bug

Hi Mike,

I tried to send this to you, but the mail keeps bouncing back (maybe it
doesn't like the attachments?), so I am trying to get this to you via the
list. 

Maybe it's not a bug and is just due to the resources I am using or due to
the way I exercising the code, but in case it's not, here is what I have
figured out so far.

In its current form, the code in question will throw a NPE. We have
discussed the reasons for that already (it's to do with the bpws:import with
null location, I think). 

If I take care of this by catching the exception, like that:
 
public static PartnerLinkType resolveBPELPartnerLinkType(Definition
definition, QName qname)

{
. 
// second for loop
for (Iterator.) {

  ImportImpl imp = (ImportImpl) impIterator.next();


  try {

    imp.importDefinitionOrSchema(); // if (location == null) will throw NPE
when trying to create URI
  

  } catch (NullPointerException e) {

    continue;

  }
 
  Definition importedDefinition = (Definition) imp.getDefinition();
  .
  // enter recursion on importedDefinition
  .
}

The result will be a StackOverflowException. And the reason for this seems
to be that importedDefinition always represents the BPEL file! It never
actually represents the definition that is being imported (and imp seems to
represent the correct WSDL resource), but just the same resource over and
over again. 

I haven't had time to figure out why this happens. Maybe the stack trace
will reveal an answer to you. So far it hasn't for me.  

Take care,

-- Bruno

P.S.:
I am using
Java 1.5.0_07
Eclipse 3.2.1
EMF 2.2.0
WST 1.5.1
Revision of org.eclipse.bpel.model.util.WSDLUtil is 1.2




______________________________________________
Bruno Wassermann 
           
Research Student                
                               
University College London      Tel: +44 (0)20 7679 0369 (Direct Dial)
Dept. of Computer Science      Fax: +44 (0)20 7387 1397
Gower Street		       
London WC1E 6BT                http://www.cs.ucl.ac.uk/staff/B.Wassermann
United Kingdom 
______________________________________________
  

Attachment: org.eclipse.bpel.model.tests.zip
Description: Binary data


Back to the top