Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 1.1-beta-1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Eclipse 3.12 + JDK 1.5 + xfire 1.1-beta-1
-
Number of attachments :
Description
Java code:
package org.codehaus.xfire.demo;
import org.codehaus.xfire.client.*;
import org.codehaus.xfire.XFireRuntimeException;
import java.net.*;
public class test {
public static void main(String [] args)
{
test testInst = new test();
try
catch (MalformedURLException e)
{ // TODO 自动生成 catch 块 e.printStackTrace(); } catch (Exception e) { // TODO 自动生成 catch 块 e.printStackTrace(); }}
public void testGoogleAPI() throws MalformedURLException, Exception
{
Client client = new Client(new URL("http://api.google.com/GoogleSearch.wsdl"));
Object[] results = client.invoke("doSpellingSuggestion", new Object[]
{"FCszK/FQFHJWQE1n5OkeGmZAWzCFY5+7","Test"});
// Service returns a double of the currency conversion rate.
System.out.println((String) results[0]);
}
}
Error message:
2006-4-20 12:25:18 org.apache.commons.httpclient.HttpMethodBase writeRequest
信息: 100 (continue) read timeout. Resume sending the request
org.codehaus.xfire.fault.XFireFault: No Deserializer found to deserialize a 'http://www.w3.org/2001/XMLSchema:xsd:string' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:108)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
at org.codehaus.xfire.client.Client.onReceive(Client.java:448)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:173)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:66)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
at org.codehaus.xfire.client.Client.invoke(Client.java:359)
at org.codehaus.xfire.client.Client.invoke(Client.java:389)
at org.codehaus.xfire.demo.test.testCurrencyConverter(test.java:43)
at org.codehaus.xfire.demo.test.main(test.java:13)
The google web service is done with RPC-Encoding, which XFire doesn't support. I believe your only open source option for this is Axis 1.2.