[prev in list] [next in list] [prev in thread] [next in thread]
List: apollo-dev
Subject: How to pass Stream/ByteArray:webService (WSDLtoJAVA)
From: "Sachin Sisodia" <sachin.sisodia () gmail ! com>
Date: 2007-03-14 1:35:15
Message-ID: acee60a50703131835w764b26a0hfa981b9acdfeb262 () mail ! gmail ! com
[Download RAW message or body]
Hi All,
I have written one java service in webMethods which is expecting input as a
stream. I am calling this java service as a web service from one java client
as follow:
public class wS_client {
public static void chooseWS(Object input) {
ServiceServiceLocator aService=new
ServiceServiceLocator();
try {
ServiceBindingStub aStub=(ServiceBindingStub)aService.getservicePort0();
String isOK=aStub.webServiceTest1
(input);
System.out.println("Executed
OK?\t"+isOK);
} catch (Exception e) {
System.out.println("Exception-------------"+e.toString());
}
}
public static void main(String[] arg ){
String testString = "testing is going on";
ByteArrayInputStream input= new ByteArrayInputStream(testString.getBytes());
chooseWS (input);
}
But I am getting the following exception on runtime:
java.io.IOException: No serializer found for class
java.io.ByteArrayInputStream in registry
org.apache.axis.encoding.TypeMappingImpl@76fba0
I also tried to pass byte array as an input but it doesn't work. Should I
have to pass stream as a base64? Is there any other work around for this
problem.
I would appreciate any help on the same.
Regards
Sachin
[Attachment #3 (text/html)]
<p>Hi All, </p>
<p>I have written one java service in webMethods which is expecting input as a \
stream. I am calling this java service as a web service from one java client as \
follow: </p> <p>public class wS_client {</p>
<p> public static \
void chooseWS(Object input) {</p> \
<div> \
ServiceServiceLocator aService=new ServiceServiceLocator();</div> <div> try \
{</div> <p> ServiceBindingStub \
aStub=(ServiceBindingStub)aService.getservicePort0(); </p> \
<div> &nb \
sp; \
String isOK=aStub.webServiceTest1(input);</div> \
<div> &nb \
sp; \
System.out.println("Executed OK?\t"+isOK);</div> \
<div> \
} catch (Exception e) { </div> \
<div>System.out.println("Exception-------------"+e.toString()); </div>
<div> }</div>
<div> }</div>
<div>public static void main(String[] arg ){</div>
<div>String testString = "testing is going on";</div>
<div>ByteArrayInputStream input= new \
ByteArrayInputStream(testString.getBytes());</div> <div>chooseWS (input);</div>
<div>}</div>
<div> </div>
<div>But I am getting the following exception on runtime:</div>
<div> </div>
<div>java.io.IOException: No serializer found for class java.io.ByteArrayInputStream \
in registry <a href="mailto:org.apache.axis.encoding.TypeMappingImpl@76fba0">org.apache.axis.encoding.TypeMappingImpl@76fba0</a></div>
<div> </div>
<div>I also tried to pass byte array as an input but it doesn't work. Should I \
have to pass stream as a base64? Is there any other work around for this \
problem.</div> <div> </div>
<div> I would appreciate any help on the same. </div>
<div> </div>
<div>Regards</div>
<div>Sachin<br> </div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic