Hi Ant and Haneef, It's not a bug, it's the defined behavior.
Definition.getPortType(QName) will search the current definition, as well as all imported definitions, for the specified portType. Definition.getPortTypes() will return all the portTypes defined on the current definition. If the definition exists as a WSDL file, this means all the portTypes contained within that file would be returned. > What you can do is go from service - port - binding - portType and that > does find the portType even for ones in imported wsdl. When you invoke Binding.getPortType(), it returns the portType that the binding refers to (if there is one). It does not perform any sort of search, it simply returns whatever portType was set using Binding.setPortType(PortType). So, Ant's suggestion would work fine (assuming the Definition was created correctly, either by a WSDLReader or directly by the programmer). Thanks, -Matt > -----Original Message----- > From: Anthony Elder [mailto:[EMAIL PROTECTED] > Sent: Friday, February 28, 2003 4:33 AM > To: [EMAIL PROTECTED] > Subject: Re: WSIF - WSDL4J > > > > I think this is a bug in WSDL4J. > > What you can do is go from service - port - binding - portType and that > does find the portType even for ones in imported wsdl. > > ...ant > > Anthony Elder > [EMAIL PROTECTED] > Web Services Development > IBM UK Laboratories, Hursley Park > (+44) 01962 818320, x248320, MP208. > > > "Jeremy Hughes" <[EMAIL PROTECTED]> on 28/02/2003 09:24:15 > > Please respond to [EMAIL PROTECTED] > > To: <[EMAIL PROTECTED]> > cc: <[EMAIL PROTECTED]> > Subject: Re: WSIF - WSDL4J > > > > Haneef, not sure if you've got a response to this yet. > > WSDL4J can be discussed on [EMAIL PROTECTED] WSDL4J is the > reference impl. for JSR110. > > Today, if you wanted to get all the porttypes you would have to go through > the imports yourself in a similar way > DefinitionImpl.getFromImports() does. > > Regards, > Jeremy > > ----- Original Message ----- > From: "ALI,HANEEF (HP-Cupertino,ex1)" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, February 25, 2003 8:19 PM > Subject: WSIF - WSDL4J > > > Hi, > > This question is more to do with WSDL4j rather than wsif. > > > Defintion.getPortType(QName) -- returns the correct portTypeImpl > > Definition.getPortType() -- returns a map with size 0 > > This happens only when the wsdl uses import statements. > Eg: > My WSDL has only service elements. It imports other wsdls where > portTypes, Bindings etc are defined > > > JavaDoc for the operation state > > "Get all the portTypes defined here." -- What does "here" mean? Does it > include imported wsdls > > Will some one let me know whether this is the bug or expected behaviour > > > regards > Haneef > > > > > > >
