Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » retruning a byte[]
retruning a byte[] [message #163391] Thu, 09 March 2006 10:20
plork123 is currently offline plork123Friend
Messages: 174
Registered: July 2009
Senior Member
hi, can anyone help me out

i'm writing a client to call a web service, the web service returns a type
type="xsd:base64Binary", so i do this

String = "some string in here to compress" ;

Service service = new Service();

Call call = (Call) service.createCall();

call.setTargetEndpointAddress(endpoint);

call.setOperationName("compress");

byte[] a = ((String)call.invoke(new Object[] {uncompressed})).getBytes();



then i want to user 'a' in the next call to uncompress the string


so i do this

Service service1 = new Service();

Call call1 = (Call) service1.createCall();

call1.setTargetEndpointAddress(endpoint);

call1.setOperationName("uncompress");

String st = (String) call1.invoke(new Object[] {a});

But it is hanging and just times out


this is part of the wsdl can anyone tell me what i'm doing wrong?

many thanks for any help

<element name="compress">
<complexType>
<sequence>
<element name="string" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="compressResponse">
<complexType>
<sequence>
<element name="compressReturn" type="xsd:base64Binary"/>
</sequence>
</complexType>
</element>
<element name="uncompress">
<complexType>
<sequence>
<element name="bytes" type="xsd:base64Binary"/>
</sequence>
</complexType>
</element>
<element name="uncompressResponse">
<complexType>
<sequence>
<element name="uncompressReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
Previous Topic:jdbc driver
Next Topic:exception: java.net.ConnectException: Connection refused: connect
Goto Forum:
  


Current Time: Thu Apr 25 00:19:42 GMT 2024

Powered by FUDForum. Page generated in 0.02469 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top