Hi All, I believe I'm having the same problem as Rahul.
Basically I have a .Net webservice that I am trying to call. The request contains a complex data type which I have been able to replicate and use with KSoap2. Using a proxy I can see the request is almost the same as a working call from a flash UI. The difference between the working flash call and the failing KSoap2 call is the <request> tag from KSoap is <request i:type="d:anyType"> and .Net is refusing to parse this. Please note that I cannot change the webservice in anyway. The solution to this problem has to be via a change to the Android app. Cheers, Ed On Jun 1, 10:25 pm, rrohilla <[email protected]> wrote: > Hi, > > I am calling a web service which has the following request format. > > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/ > envelope/" xmlns:ns="http://test.com/2009/08" xmlns:dat="http:// > test.com/2009/08/DataContracts"> > <soapenv:Header/> > <soapenv:Body> > <ns:ProcessData> > <ns:data> > <dat:InFields> > <dat:ExServiceDataField> > <dat:FieldData>Sample Field Data</ns:FieldData> > <dat:ServiceField> > <dat:ServiceField> > <dat:Displayname>Books</ns:Displayname> > <dat:FieldType>Both</ns:FieldType> > <dat:GroupType>MyInfo</ns:GroupType> > <dat:Id>2</ns:Id> > <dat:Required>true</ns:Required> > </dat:ServiceField> > </dat:ExServiceDataField> > > <dat:ExServiceDataField> > <dat:FieldData>Sample Field Data</ns:FieldData> > <dat:ServiceField> > <dat:ServiceField> > <dat:Displayname>Clothes</ns:Displayname> > <dat:FieldType>Both</ns:FieldType> > <dat:GroupType>MyInfo</ns:GroupType> > <dat:Id>2</ns:Id> > <dat:Required>true</ns:Required> > </dat:ServiceField> > </dat:ExServiceDataField> > </dat:InFields> > </ns:data> > </ns:ProcessData> > </soapenv:Body> > </soapenv:Envelope> > > Now when I call the web service I get the following error > SoapFault - faultcode: 'a:DeserializationFailed' faultstring: 'The > formatter threw an exception while trying to deserialize the message: > There was an error while trying to deserialize > parameterhttp://test.com/2009/08:data. The InnerException message was 'Error > in > line 1 position 463. Element 'http://test.com/2009/08/ > DataContracts:InFields' contains data of the 'http://test.com/2009/08/ > DataContracts:anyType' data contract. The deserializer has no > knowledge of any type that maps to this contract. Add the type > corresponding to 'anyType' to the list of known types - for example, > by using the KnownTypeAttribute attributre or by adding it to the list > of known types passed to DataContractSerializer.'. Please see > InnerException for more details.' faultactor: 'null' detail: > org.kxml2.kdom.n...@43bcb040 > > The Request sent is has i:type="n0:anytype" in each tag which is > creating an error in server side. How do T remove the attribute from > the XML tag of the request XML for example > <n0:ExServiceDataField i:type="n0:anyType"> should be as > <n0:ExServiceDataField> > > Thanks, > Rahul -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

