[jboss-dev-forums] [JBoss ESB Development] - Problem in retrieving WSDL from remote endpoint

Magesh Bojan do-not-reply at jboss.com
Wed Apr 28 09:56:59 EDT 2010


Magesh Bojan [http://community.jboss.org/people/mageshbk%40jboss.com] replied to the discussion

"Problem in retrieving WSDL from remote endpoint"

To view the discussion, visit: http://community.jboss.org/message/540032#540032

--------------------------------------------------------------
> StreamUtils.readStreamString(stream, charset):String was incorrectly implemented.

Well it is correctly implemented, it is meant to read bytes to String using the passed encoding and not for conversion.

> Unfortunately, there is nothing in the JDK that can determine what character encoding a set of bytes or stream is, and this is paramount to creating a String that can be outputted correctly.

Yes, that is why most applications do not try to guess the encoding themselves. Guessing/Intelligently identifying the encoding could pose problems, for e.g.,

"The user application may be expecting only the specified encoding, whereas due to intelligent scanning we might read all encoded streams"

Will this lead to Security issue? I do not know ATM.

> Maybe for the purpose of this bug, we just stick to fixing the WSDL encoding problem?

I would do this. A setting in the SOAPProxy action like this would be sufficient for downloading and converting the file.

<action name="proxy" ..>
    <property name="wsdl-encoding" value="ISO-8859-1" />
</action>


But the major setback is this[1] as the BasicProfile mandates the WSDL and SOAP be only UTF-8 or UTF-16.

One more thing is that the attached ItemService.wsdl is actually "ISO-8859-1" encoded file, but just has been specified as "UTF-8":

This type of WSDL should not be allowed according to BP!

[1]  http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16527096 http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16527096

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/540032#540032]

Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2032]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20100428/9d4694b8/attachment.html 


More information about the jboss-dev-forums mailing list