Recent changes to bugs doesn't return null if undefined porttyp2013-03-30T19:46:23Z2013-03-30T19:46:23ZAnonymous<div class="markdown_content"><p>As long as wsdl:binding contains an attribute named "type" in the WSDL file, the Binding.getPortType() method will not return NULL no matter if the PortType is defined in the file or not. I suspect this is a bug because i experience opposite behaviour of the Port.getBinding(). It returns NULL if the attribute "binding" is not defined in the wsdl:port OR if the Binding that is referenced doesnt exist/is not defined within the WSDL.</p> <p>However, I have discovered the method PortType.isUndefined(), but lack of the API documentation makes me not confident in trusting that this is the right place to the validation on.</p></div>Implement equals() and hashCode()2011-06-16T11:09:12Z2011-06-16T11:09:12ZTammo van Lessen<div class="markdown_content"><p>WSDL4J definition objects can become pretty memory consuming. This makes it sometimes important to cache definitions. This is however not easily possible since most WSDL4J implementation objects do not implement hashCode() and equals().</p> <p>Please implement these two methods.</p></div>MessageImpl.getOrderedParts() bug2011-04-14T18:20:31Z2011-04-14T18:20:31ZRatoo<div class="markdown_content"><p>The method returns duplicated parts when a part was reinserted into the message.</p> <p>Part part = definition.createPart();<br /> part.setName("part");</p> <p>message.addPart(part);<br /> message.removePart(part.getName());<br /> message.addPart(part);</p> <p>message.getOrderedParts(null) // returns 2 (!) parts</p> <p>Actually whole getOrderedParts() is a mess...</p> <p>Would it be better to use LinkedHashMap instead of HashMap for parts and reimplement the method:</p> <p>public List getOrderedParts(List partOrder)<br /> {<br /> if (partOrder == null)<br /> {<br /> return new ArrayList(parts.values());<br /> }</p> <p>List orderedParts = new ArrayList();</p> <p>Iterator partNameIterator = partOrder.iterator();</p> <p>while (partNameIterator.hasNext())<br /> {<br /> String partName = (String);<br /> Part part = getPart(partName);</p> <p>if (part != null)<br /> {<br /> orderedParts.add(part);<br /> }<br /> }</p></div>No defined Extension element for PolicyReference2010-11-22T04:14:26Z2010-11-22T04:14:26ZAnonymous<div class="markdown_content"><p>If we have a policyReference element in WSDL, we cannot get it as a defined element object like we do with SchemaReferences. So when we have a policyReference defined in our WSDL, WSDL4J parse it as an UnknownExtensionElement , I believe we should provide a defined object model for this otherwise users have to get iterate through all the UknownExtensionElements and find whether it's a policyReference or not from the value of the element.</p> <p>I have a patch created in 1.6.2 source pack and I will be able to provide the patch soon.</p> <p>Thanks<br /> Lahiru</p></div>Binary distribution still doesn't contain META-INF/services2010-10-07T13:31:20Z2010-10-07T13:31:20ZMichael Hollatz<div class="markdown_content"><p>...for the WSDLFactory.</p></div>API depends on implementation?2010-10-07T12:20:31Z2010-10-07T12:20:31ZMichael Hollatz<div class="markdown_content"><p>In the latest release (1.6.2) I still see imports like* inside the API:</p> <p>javax.wsdl.extensions.UnknownExtensionDeserializer<br /> javax.wsdl.extensions.UnknownExtensionSerializer</p> <p>So the API depends on the implementation, which is really weird.</p></div>Unable to send Basic authentication via WSDLReaderImpl2010-09-14T15:47:58Z2010-09-14T15:47:58Zmkinsella<div class="markdown_content"><p>I came to this via Axis2, which is apparently making use of this code, when I found I couldn't collect WSDL data from an authenticated site using their wsdl2java script. I did some testing it with a quick-and-dirty PHP page to view what (if any) credentials were being passed. None were.</p> <p>So, I looked into the source a bit to see what I could find.<br /> I'm a little rusty on how is intended to work these days, but it seemed that the root of this issue lies in the class and its method getContentAsInputStream(URL url) doesn't seem to be sending any authentication when it calls url.openStream()</p> <p>I believe the Java-approved approach for this is to extend the Authenticator class, so as a test, I added an inner class within StringUtils, and added one line to the getContentAsInputStream and was able to get access to the WSDL file using my credentials.<br /> ......<br /> Here's my inner class...<br /> .....</p> <p>static class WSDLAuthenticator extends Authenticator {</p> <p>public PasswordAuthentication getPasswordAuthentication() {<br /> String[] userInfoParts = uri.getUserInfo().split(":");<br /> return (new PasswordAuthentication(userInfoParts[0], userInfoParts[1].toCharArray()));<br /> }<br /> }<br /> ......<br /> and I added this line after the if (url == null) block, to point the URL object to the Authenticator<br /> ......<br /> Authenticator.setDefault(new WSDLAuthenticator());<br /> .......</p> <p>Not sure what the protocol is for suggesting patches to the wsdl4j project , but I suppose I'll cross my fingers that good karma will come my way if I try.</p> <p>Anyway, thought I'd post this in case anyone finds it useful, or has other suggestions for how this is intended to work.<br /> Thanks.</p></div>NPE when import can not be found by WSDL Locator2010-08-17T22:10:05Z2010-08-17T22:10:05ZAnonymous<div class="markdown_content"><p>I know this is a duplicate of 1802247, but it's so easy to fix and the other issue is 3 years old assigned to noone</p> <p>In WSDLReaderImpl:</p> <p>373 inputSource = loc.getImportInputSource(contextURI, locationURI);<br /> 374<br /> 375 /*<br /> 376 We now have available the latest import URI. This might<br /> 377 differ from the locationURI so check the importedDefs for it<br /> 378 since it is this that we pass as the documentBaseURI later.<br /> 379 */<br /> 380 String liu = loc.getLatestImportURI();<br /> 381<br /> 382 importedDef = (Definition)importedDefs.get(liu);<br /> 383 <br /> 384 inputSource.setSystemId(liu);</p> <p>Just add a if null check and you're good to go</p> <p>inputSource = wsdlLocator.getImportInputSource(contextURI, locationURI);</p> <p>if (inputStream != null) {<br /> /*<br /> We now have available the latest import URI. This might<br /> differ from the locationURI so check the importedDefs for it<br /> since it is this that we pass as the documentBaseURI later.<br /> */<br /> String liu = wsdlLocator.getLatestImportURI();</p> <p>importedDef = (Definition)importedDefs.get(UrlUtils.normalizeURL(liu));</p> <p>inputSource.setSystemId(liu);<br /> }</p></div>soap:header in a mime:part cannot be recognized2010-08-05T13:34:40Z2010-08-05T13:34:40ZDave Barfield<div class="markdown_content"><p>A multipartRelated construct within an element like the following:</p> <p>&lt;wsdl:input name="echoRequest"&gt; <br /> &lt;mime:multipartRelated&gt; <br /> &lt;mime:part&gt; <br /> &lt;soap:body parts="input1" use="literal"/&gt; <br /> &lt;soap:header message="Port_0:echoRequestMsg" part="input2"/&gt; <br /> &lt;/mime:part&gt; <br /> &lt;mime:part&gt; <br /> &lt;mime:content part="input3"/&gt; <br /> &lt;/mime:part&gt; <br /> &lt;/mime:multipartRelated&gt; <br /> &lt;/wsdl:input&gt; <br /> </p> <p>will parse but will not resolve the soap:header (or soap12:header) correctly but will resolve it as a UnknownExtensibilityElement rather than a SOAPHeader (or SOAP12Header).</p></div>Unit test failure in SetFactoryNameTest2010-07-27T13:43:41Z2010-07-27T13:43:41ZDave Barfield<div class="markdown_content"><p>Constructor count not being reset before test is run leading to a spurious error.</p></div>