serialize « soap « Java Enterprise Q&A

1. Deserialize SOAP array in C#

In working with another company I'm trying to write a SOAP client to talk to their service. The service itself has no wsdl-files but I've managed to successfully write my own ...

2. SOAP to Stream to String

I have a SOAP object that I want to capture as a string. This is what I have now:

RateRequest request = new RateRequest();
//Do some stuff to request here

SoapFormatter soapFormat = ...

3. SoapFormatter versioning problem

In the application(C#) I am maintaining, there are some serialized object stored in the database, and some are created several versions ago. Now when the app tries to deserialize those objects, it ...

4. InvalidOperationException while SOAP serialization of complex type

I encountered a problem with SOAP serialization and it would be great to find an answer. Here's a very simplified example:

public void Test()
    StringBuilder sb = new StringBuilder();

5. How to control namespace in .NET SoapFormatter?

I am writing some code that needs to be backwards compatible with EXISTING remoting code that is using SOAP to serialize some objects. My difficulty is that I have had to move ...

6. .NET 2.0 Client fails to deserialize valid Apache-SOAP web service XML, shows null for all properties

A coworker has made a Java web service running on the Apache-SOAP runtime on a Tomcat 6 server, but only tested it using Eclipse's built-in tool and SoapUI. The output of ...

7. Using SoapFormatter to Serialize Selective Properties of a Class

Hi I need to serialize several fields of my class

class Foo
 Guid value1;
 decimal value2;
 SomeCustomEnum value3;
Can I serialize all fields one by one:

8. Web Service and System.InvalidOperationException while serializing

I have the following class which throws an InvalidOperationException when the class is serialized

public class CustomFieldList : CustomField, IList
        public CustomFieldList()

9. Applying SoapIgnore attribute doesn't take any effect to serialization result

I'm trying to figure out .NET serialization stuff and experiencing a problem. I've made a simple program to test it and got stuck with using attributes. Here's the code:

public class SampleClass

10. XML Serialization and Soap Serialization

I think even if we will not need interoperability between applications, and even we do not communicate with web services, it is easier to serialize using SoapFormatter than XmlSerializer because SOAP ...

11. Serialization problem: Different namespaces (.NET)

We released a program that serializes a very complex object using the .NET soap formatter. Soap didn't handle new versions of the classes involved very well so we're switching to ...

12. Soap Ui serialization error

a:DeserializationFailed The formatter threw an ...

13. LINQ to SQL serialization issue with SOAP object

OK, so this is the strangest issue in .net programming I have ever seen. It seems that object fields are serialized in .net web services in order of field initialization. It all ...

14. Should data classes which are passed by a webservice be attributes with [Serializable]

I want to transfer some data classes via Webservice:

public class MyClass
    public int Int { get; set; }

    public MyClass(int v)

15. Converting binary serialization to Soap serialization

I want to send binary serialized messages, but I am worried that if there is an error when de-serializing, I won't be able to figure out the problem. For SOAP, ...

16. How can I pass complex types like objects using Webservices?

This may sound like a simple question but as am newbie in Webservies and this is my first time using it and so am asking my doubt. Q: How can I ...

17. Generate XSD for SOAP messages

I'm consuming a classic Web Service using .NET. Is it possible to automatically generate a XSD for the messages from client to service? The service proxy can be generated using svcutil ...

18. JAX-RPC webservice serialization issue on WAS6.1 test environment

I'm trying to pass Vector of complex objects as a result of a WS method. I'm following a JavaBeans scheme and all Collections are replaced by Vectors already, but I'm still ...

19. How to get Memory Stream to output my soap formatter message

I wrote the following code, but the line MessageBox.Show(sr.ReadToEnd) didn't show anything? Does anyone know what I'm doing wrong? I want to send an exception object to a web service for remote ...

20. C# Troubleshooting object serialization error

I'm having problems sending a soap request to a webservice. I create an order, including an array of order details. Then I send that order to the webservice. ...

21. How to prevent .Net SOAP Serialization from eating NewLines

I'm using the built-in SOAP support in .Net through a wrapper class generated by Visual Studio from a WSDL.
Now, when I call one one of the methods on the wrapper and ...

22. Maintain .NET Serialized data compatability when moving classes

I have data that's been serialized. The classes associated with the serialized data is part of a large legacy project which has a number of 3rd party references which are ...

23. Should I serialize .net objects to *file* using SOAPFormatter or XMLFormatter if the files are going to later be used by Unix+PC

I have a desktop app that saves out user data (mostly arrays of numbers) to a file by Serializing an object. This file will later be used to reload user data ...

24. Prefix in Webservice with SOAP

i was cheaching this link: i this is part of what i need, i use the same kind of code with SoapDocumentMethodAttribute and the Invoke Method, and this is my ...

25. How to set field element name in SOAP (body)?

We're using SoapFormatter to serialize objects.
We need to control the object field element name.
SoapElementAttribute - "Specifies that the public member value be serialized by the XmlSerializer as an encoded SOAP XML ...

26. class object soap serialization issues

I generated a proxy class using wsdl and i created a soap serialization of that object. i need to send the xml as httpwebrequest. output xml i got is this. This is a ...

27. Seralizing data to and from string with soap message style

I have a web service proxy. On that proxy there is a method that takes two custom types. When I call the web service, a soap message is generated. In ...

28. Create soap request

I've tried to serialize an object with XmlSerializer and SoapFormatter but i can't get the output to look like this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="">
 <soap:Body xmlns:xsi="" xmlns:xsd="">
<Login xmlns="">

29. Extension method to serialize generic objects as a SOAP formatted stream

I'm having a hard time trying to figure out a generic extension method that would serialize a given object as SOAP formatted. The actual implementation looks somewhat like this: Foobar.cs

[Serializable, XmlRoot("foobar"), DataContract]
public ...

30. Serializing both to local and SOAP with private members c#

Can someone please point me in the right direction? I am trying to serialize some classes for dual use: 1) to save data locally in XML format and 2) to ...

31. Issue serializing xml from base class to derived class

I am having an issue serializing a derived class from an array of base class type. It is successfully recognizing the derived class upon serialization, as the serialized element names reflect the ...

32. Object's life cycle in a WS call

What happens to a Java object's life when it is passed to a SOAP web service and returned after modification? I know it is serialized, mar-shelled, converted to XML etc. But ...

33. Why web services in .NET use XML Serializer rather then SOAP Serializer?

I am new with web services and I cannot find answer why web services in .NET use XML serialization in order to generate SOAP message rather then use SOAP serialization and ...

34. How to force setting a certain member value when want to serialize for soap

I have this method:

public OpenAccountResult OpenAccount()
    OpenAccountResult test = new OpenAccountResult(/*true*/)//the true  here wont let the object to be serialized

35. How to serialize xml-object in string array in Java with KSOAP?

I have response from server (WSDL SOAP) with following code:

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
    <GetChanelResponse xmlns="">

36. Signed assembly generates an "Application has stopped working" on SOAP deserialization

I'm instantiating an object, and filling it up using SOAP data. This used to work well. However, after giving the assembly a strong name, I'm getting the following error: error window The important ...

37. Java SOAP XML Serialization Error

I have a .net server hosting some webservices. I am making a Java client. I used Apache CFX to autocreate some useful classes based on the given wsdl file. However, when I make ...

39. help regarding bypassing Soap engine serialization deserialization

I need to create a web service which takes an xml document as input returns an xml document.Is this kind of implementation possible? what I need to do is like this: public Document webserviceName(Document inputDocument){ .... Document outputDocument; .... return d; } I need to bypass the Soap engine serialization deserialization. TIA