Hi All,

I'm using similiar code as below to connect to other web services, but it 
doesn't seem to be working for babelfish. Anyone tell me why? I'm wondering if 
its an incompatible WS somehow. If so, can anyone tell me how I could figure 
that out? Something in the wsdl maybe? Any ideas appreciated.

Mark

public class BabelFishWS {
  | 
  |     public static void main(String[] args) 
  | throws ServiceException, MalformedURLException, RemoteException {
  |             String wsdlUrl = 
"http://www.xmethods.com/sd/2001/BabelFishService.wsdl";;
  |             String namespace = 
"http://www.xmethods.net/sd/BabelFishService.wsdl";;
  |             String serviceName = "BabelFishService";
  |             String portName = "BabelFishPort";
  |             
  |             QName serviceQN = new QName(namespace, serviceName);
  |             QName portQN = new QName(namespace, portName);
  |     
  |             ServiceFactoryImpl sf = 
(ServiceFactoryImpl)ServiceFactory.newInstance();
  |             Service service = sf.createService(new URL(wsdlUrl), serviceQN);
  |                             
  |     Call call = (Call) service.createCall(portQN,"BabelFish");
  |     String s = (String) call.invoke(new Object[]{"es_fr", "Hola Mundo"});
  | 
  |             System.out.println(s);
  | 
  |     }
  | }

I get the following error:

Exception in thread "main" AxisFault
  |  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
  |  faultSubcode: 
  |  faultString: Read timed out
  |  faultActor: 
  |  faultNode: 
  |  faultDetail: 
  |     {http://xml.apache.org/axis/}stackTrace: 
java.net.SocketTimeoutException: Read timed out
  |     at java.net.SocketInputStream.socketRead0(Native Method)
  |     at java.net.SocketInputStream.read(Unknown Source)
  |     at java.io.BufferedInputStream.fill(Unknown Source)
  |     at java.io.BufferedInputStream.read(Unknown Source)
  |     at 
org.jboss.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:572)
  |     at org.jboss.axis.transport.http.HTTPSender.invoke(HTTPSender.java:130)
  |     at 
org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
  |     at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
  |     at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
  |     at 
org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:128)
  |     at org.jboss.axis.client.Call.invokeEngine(Call.java:3054)
  |     at org.jboss.axis.client.Call.invoke(Call.java:3039)
  |     at org.jboss.axis.client.Call.invoke(Call.java:2629)
  |     at org.jboss.axis.client.Call.invoke(Call.java:2538)
  |     at org.jboss.axis.client.Call.invokeInternal(Call.java:1976)
  |     at org.jboss.axis.client.Call.invoke(Call.java:1914)
  |     at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
  |     at com.BabelFishWS.main(BabelFishWS.java:31)
  | 
  | 
  | org.jboss.axis.AxisFault: Read timed out
  |     at org.jboss.axis.AxisFault.makeFault(AxisFault.java:99)
  |     at org.jboss.axis.transport.http.HTTPSender.invoke(HTTPSender.java:136)
  |     at 
org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
  |     at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
  |     at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
  |     at 
org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:128)
  |     at org.jboss.axis.client.Call.invokeEngine(Call.java:3054)
  |     at org.jboss.axis.client.Call.invoke(Call.java:3039)
  |     at org.jboss.axis.client.Call.invoke(Call.java:2629)
  |     at org.jboss.axis.client.Call.invoke(Call.java:2538)
  |     at org.jboss.axis.client.Call.invokeInternal(Call.java:1976)
  |     at org.jboss.axis.client.Call.invoke(Call.java:1914)
  |     at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
  |     at com.BabelFishWS.main(BabelFishWS.java:31)
  | Caused by: java.net.SocketTimeoutException: Read timed out
  |     at java.net.SocketInputStream.socketRead0(Native Method)
  |     at java.net.SocketInputStream.read(Unknown Source)
  |     at java.io.BufferedInputStream.fill(Unknown Source)
  |     at java.io.BufferedInputStream.read(Unknown Source)
  |     at 
org.jboss.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:572)
  |     at org.jboss.axis.transport.http.HTTPSender.invoke(HTTPSender.java:130)
  |     ... 12 more
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3887132#3887132

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3887132


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to