Re: No Deserializer found to deserialize ArrayOf_xsd_string

"Scott Nichol" <[email protected]>
Newsgroups gmane.text.xml.soap.devel
Message-ID <010801c34d40$8dc7c0b0$6401a8c0@northgate>
Sorry, it looks like the provided array deserializer will not work in this case.  I lifted the code from the interop sample, which I guess does not work when a type is used for an array.

I am sure Axis supports this.  If you need to do it in Apache SOAP, you will need your own deserializer, although you can undoubted steal a great deal of code from ArraySerializer.java.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Lior Weintraub" <[email protected]>
To: <[email protected]>
Sent: Tuesday, July 15, 2003 3:13 AM
Subject: RE: No Deserializer found to deserialize ArrayOf_xsd_string


Thanks for your answer.
I used your suggestion but now I get the following error:
[SOAPException: faultCode=SOAP-ENV:Client; msg=The &apos;http://schemas.xmlsoap.org/soap/encoding/:arrayType&apos; attribute must be specified for every array.; targetException=java.lang.IllegalArgumentException: The 'http://schemas.xmlsoap.org/soap/encoding/:arrayType' attribute must be specified for every array.]


Can you tell me what it means and how to solve this as well?

Regards,
Lior


-----Original Message-----
From: Scott Nichol [mailto:[email protected]]
Sent: 14 July 2003 19:26
To: [email protected]
Subject: Re: No Deserializer found to deserialize ArrayOf_xsd_string


You need to register a deserializer for ArrayOf_xsd_string, something 
like

    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    ArraySerializer arraySer = new ArraySerializer();
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,
        new QName("urn:mbws", "ArrayOf_xsd_string"),
        String[].class, arraySer, arraySer);
    call.setSOAPMappingRegistry(smr);


On 13 Jul 2003 at 17:31, Lior Weintraub wrote:

> Hi,
> 
> I have an Apache SOAP java client, and  I try to invoke a web service deployed on Tomcat with axis.
> The web service method looks like that:   
> public AssetProperties getAssetProperties(String in0, String in1) throws Exception
> 
> I keep getting the following error: 
> [SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to deserialize a &apos;urn:mbws:ArrayOf_xsd_string&apos; using encoding style &apos;http://schemas.xmlsoap.org/soap/encoding/&apos;.; targetException=java.lang.IllegalArgumentException: No Deserializer found to deserialize a 
'urn:mbws:ArrayOf_xsd_string' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.] 
> 
> I've registered the AssetProperties object using BeanSerializer and it is in a Bean format.
> 
> My Soap request looks as follows:
> 
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:getAssetProperties xmlns:ns1="urn:mbws" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <in0 xsi:type="xsd:string">dd</in0>
> <in1 xsi:type="xsd:string">Wall</in1>
> </ns1:getAssetProperties>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> And the response looks as follows:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <ns1:getAssetPropertiesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:mbws">
>    <getAssetPropertiesReturn href="#id0"/>
>   </ns1:getAssetPropertiesResponse>
>   <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:AssetProperties" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:mbws">
>    <startTimeInAsset xsi:type="xsd:long">0</startTimeInAsset>
>    <encodingType xsi:type="xsd:string">MPEG-1</encodingType>
>    <bitRate xsi:type="xsd:long">1500000</bitRate>
>    <duration xsi:type="xsd:long">632</duration>
>    <assets xsi:type="ns2:ArrayOf_xsd_string" xsi:nil="true"/>
>    <keywords xsi:type="xsd:string">Simple asset</keywords>
>    <prefix xsi:type="xsd:long">0</prefix>
>    <assetType xsi:type="xsd:string">SIMPLE</assetType>
>    <endTimeInAsset xsi:type="xsd:long">0</endTimeInAsset>
>    <assetName xsi:type="xsd:string">Wall</assetName>
>   </multiRef>
>  </soapenv:Body>
> </soapenv:Envelope>
> 
> Please tell me if you have any idea about this.
> Thanks,
> Lior Weintraub
> 
> 
> 


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.