You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Hamish Taylor (JIRA)" <ax...@ws.apache.org> on 2005/11/10 17:06:04 UTC

[jira] Commented: (AXIS-2188) No Deserializer found to deserialize xsd:string

    [ http://issues.apache.org/jira/browse/AXIS-2188?page=comments#action_12357225 ] 

Hamish Taylor commented on AXIS-2188:
-------------------------------------

You could work around this problem by registering your own type mappings for the string type
so that the SOAP request used the namespace "http://www.w3.org/2001/XMLSchema" instead
of  "http://schemas.xmlsoap.org/soap/encoding" for the strings you are passing as arguments
in your SOAP RPC call. I had this problem with Axis 1.3 when talking to Google's SOAP service
at "http://api.google.com/search/beta2". It was fixed by adding the following code

Class ss = SimpleSerializerFactory.class;
Class ds = SimpleDeserializerFactory.class;
call.registerTypeMapping(java.lang.String.class, new QName("http://www.w3.org/2001/XMLSchema", "string"), ss, ds);

after

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

I also had to do the same thing for Integers and Booleans that were arguments for this Google SOAP service.

> No Deserializer found to deserialize xsd:string
> -----------------------------------------------
>
>          Key: AXIS-2188
>          URL: http://issues.apache.org/jira/browse/AXIS-2188
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization, WSDL processing
>     Versions: 1.2, 1.2.1
>     Reporter: Javier Kohen

>
> Since I updated from Axis 1.1 to 1.2(.1), I cannot access the service at http://www.xmethods.net/sd/2001/EBayWatcherService.wsdl anymore. The following explanation is given:
> No Deserializer found to deserialize a 'http://schemas.xmlsoap.org/soap/encoding/:string' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
> My code is:
> 		URL srvUrl =
> 			new URL("http://www.xmethods.net/sd/2001/EBayWatcherService.wsdl");
> 		String namespace = "http://www.xmethods.net/sd/eBayWatcherService.wsdl";
> 		String opNamespace = "urn:xmethods-EbayWatcher";
> 		ServiceFactory serviceFactory = ServiceFactory.newInstance();
> 		Service service
> 			= serviceFactory.createService(
> 				srvUrl,
> 				new QName(namespace, "eBayWatcherService"));
> 		Call call = service.createCall(new QName(namespace, "eBayWatcherPort"));
> 		call.setOperationName(new QName(opNamespace, "getCurrentPrice"));
> 		Float price = (Float) call.invoke(
> 			new Object[] { auction_id });
> I found a couple other users reporting the similar problem on the web, but there aren't more than 5-10 matches on google.com.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira