Page 1 of 1

Answers Missmatch v6.2.132 and v6.2.133

Posted: Thu May 31, 2018 4:21 am
by Daniel R
Maybe this is a question already discussed in the forum, if so I am sorry if I have not found it.

Anyway I would like to ask you for help: block 3 question 40 and block 5 question 3, both are the same question with different solutions. I would like to know whether the answer is "byte[]" or a java.awt.Image. Many thanks.

Given the following type definition from an existing and published WSDL. It describes the response of a Web Service that returns images.
<xs:complexType name="getGifImageResponse">
<xs:sequence>
<xs:element name="return" type="xs:base64Binary" minOccurs="0" />
</xs:sequence>
</xs:complexType>
What code should be inserted on line //1 for the client software to compile and work correctly?
Assume that the client code is generated (by wsimport) using the published WSDL.
public class GifImageServiceClient {
public static void main(String[] args) {
GifServiceImplService service = new GifServiceImplService();
GifService port = service.getGifServiceImplPort();
//1 gifImage = port.getGifImage("rssLogo.gif");
. . .
}
}

Re: Answers Missmatch v6.2.132 and v6.2.133

Posted: Thu May 31, 2018 10:50 pm
by fjwalraven
Hi!

The question setup looks the same but there is a small difference.

In 132 there is xmime:expectedContentTypes="image/gif" added to the WSDL.

Regards,
Frits