cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with a WS and Byte[]

Former Member
0 Kudos

Hi everybody,

when I create a WebService from a EJB, at the time to test the WebService in the WSNAVIGATOR, the answer of the test page does not work, being left the page in target.

In my EJB, I have a called object ImagenVO.java. This object is for storing the return values of RFC, to send in the WebService.

The type of a parameter in my object is BYTE[]. When, in my object, this parameter like BYTE[] is declared; happen this problem. However, if change the type of BYTE to STRING, the WebService works correctly.

Is necessary the BYTE parameter, because of the length of the return parameter, and this BYTE is a image.

The code of my object is:

public class ImagenVO implements Serializable {

    /**
     *
     */
    private byte[] Orblk;
    
    public ImagenVO() {

        Orblk = new byte[]{};
    }
}

Please, any idea to solve this problem is welcome.

Best Regards.

JCZ

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

parameters of type byte[] are not supported in webservices on NW04 Sneak Preview Edition.

regards

Sebastian Voss

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks Sebastian, but exist other way to get this byte?? I can convert to String?

If I convert to String, i need the same information in bytes in a WebDynpro Application

Regards

JCZ

Sigiswald
Contributor
0 Kudos

Hi JC,

If you can define the interface of both the client and the server, you might consider encoding the byte[] as a base64 encoded string. <a href="http://jakarta.apache.org/commons/codec/">Jakarta Commons Codec</a> has a Base64 implementation. Your WD application then needs to decode the string, so you can't directly use the imported WS model.

Kind regards,

/Sigiswald