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. General Programming
  3. XML / XSL
  4. XmlElement Question

XmlElement Question

Scheduled Pinned Locked Moved XML / XSL
xmldatabasewpfwcfcom
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.
  • R Offline
    R Offline
    rbreault
    wrote on last edited by
    #1

    I have the following webservice which gets a xml payload I would like to take that payload validate it against a schema then send it to websphere MQ. I have a good portion working but when I write the payload to MQ its empty almost like I am not able to get the information being sent in. Here is the code I am using and any help would be great as I have hit a road block and still pretty new to all this. /// [System.Web.Services.Protocols.SoapHeaderAttribute("payloadManifest", Direction=System.Web.Services.Protocols.SoapHeaderDirection.InOut)] [System.Web.Services.WebMethodAttribute()] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://arknet.arkona.com/wsTransport/service/ProcessMessage", RequestNamespace="http://www.starstandards.org/webservices/2005/10/transport", ResponseNamespace="http://www.starstandards.org/webservices/2005/10/transport", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Binding="starTransport")] public virtual void ProcessMessage([System.Xml.Serialization.XmlElementAttribute(ElementName="payload")] ref Payload payload) { //Here is the Code that reads the XML Payload Stream and Validates it to the correct Schema before sending the message forward. //System.Xml.XmlElement xe = payload.content[0].Any; //XmlDocument xmlDoc = xe.OwnerDocument; //xmlDoc.Schemas.Add(null, "http://localhost/wsTransport/ProcessCRM.xsd"); //xmlDoc.Validate(delegate(object sender, ValidationEventArgs vargs) //{ // Console.WriteLine("{0}: {1}", vargs.Severity, vargs.Message); //}, xe); System.Xml.XmlElement xe = payload.content[0].Any; XmlDocument xmlDoc = xe.OwnerDocument; string qManager = "ARKDEV.QUEUE.MANAGER"; string channel = "SYSTEM.ADMIN.SVRCONN"; string hostName = "arkdev.arkona.com"; string qName = "ROB.IN.QUEUE"; MQEnvironment.Hostname = (hostName); MQEnvironment.Channel = (channel); MQEnvironment.Port = 1414; try { MQQueueManager qMgr = new MQQueueManager(qManager); MQQueue queue = qMgr.AccessQueue(qName, MQC.MQOO_OUTPUT); MQMessage msgData = new MQMessage();

    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