关于网络服务 [英] regarding web serivces

查看:66
本文介绍了关于网络服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个Java Web服务,该服务返回从文件生成的byte数组.

I wrote a java web service that returns byte array generated from a file.

public byte[] callByte(){
   // code that return byte array
}


在我的客户端中,我尝试将字节数组读取为-


In my client I try to read that byte array as -

CallStub stub = new CallStub();
byte[] b = stub.callByte();


其中,CallStub是轴客户端存根.

就是说类型不匹配:无法从CallStub.CallByteResponse转换为byte [],因此我知道该字节是以CallByteResponse对象的形式返回的.

但我希望将其转换为byte数组.


Where CallStub is the axis client stub.

It is saying type mismatch: cannot convert from CallStub.CallByteResponse to byte[] so I understood that the byte is returned in the form of CallByteResponse object.

But I want that to be converted into a byte array.

Can you please tell me how to do that.

推荐答案

亲爱的elgaabeb,

使用Eclipse Indigo IDE生成的Web服务客户端存根.
Dear elgaabeb,

The Web Service Client Stub generated Using Eclipse Indigo IDE.


这篇关于关于网络服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆