Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. why soap serializaiton take much time

why soap serializaiton take much time

Scheduled Pinned Locked Moved Web Development
xmlwcfjavadatabasejson
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eric Vonjacson
    wrote on last edited by
    #1

    Hi, I use the wsdl command to generate the client proxy for the java web service. And the service contain only one method and it like this:[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="namespacess", ResponseNamespace="namespacess", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public string execute([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg0) { object[] results = this.Invoke("execute", new object[] { arg0}); return ((string)(results[0])); }
    I create a custom SoapExtension class that is used to calculate the serialize and deserialize time when calling this method. I found that serialize will take more than 2000 Milliseconds. The soap serialization take much time and it's not acceptable. the soapextension class is like this: public class TraceSoapExtension : SoapExtension { public override void ProcessMessage(SoapMessage message) { string methodname = message.MethodInfo.Name; string tmpInfo = "Call web method: " + methodname + " "; switch (message.Stage) { case SoapMessageStage.BeforeSerialize: stc.Reset(); stc.Start(); tmpInfo = tmpInfo + "Before the soap message serialize: " + Environment.NewLine + "Time is: " + System.DateTime.Now.ToUniversalTime().ToString("MM/dd/yyyy hh:mm:ss.ffffff"); break; case SoapMessageStage.AfterSerialize: stc.Stop(); tmpInfo = tmpInfo + "After the soap message serialize: " + Environment.NewLine + "Time is: " + System.DateTime.Now.ToUniversalTime().ToString("MM/dd/yyyy hh:mm:ss.ffffff"); tmpInfo += " Client serialize stop watch take time: " + stc.ElapsedMilliseconds; break; case SoapMessageStage.BeforeDeserialize: stc.Reset(); stc.Start(); tmpInfo = tmpInfo + "Receive soap message before deserialize: " + Environment.NewLine + "Time is: " + System.DateTime.Now.ToUniversalTime().ToStrin

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups