Advertisement

07.19.2007 at 01:53PM PDT, ID: 22708295
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

XML C# stream to String writing to Websphere MQ

Tags: stream, string, xml
ok question I have is how do I get this stream that I write to a string later in my code.

      // 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/ProcessCreditContract.xsd");
                  xmlDoc.Validate(delegate(object sender, ValidationEventArgs vargs)
                  {
                        Console.WriteLine("{0}: {1}", vargs.Severity, vargs.Message);
                  }, xe);

When I grab it here I can validate the xml against a .xsd file without issue. Now I want to take that same xml

and write it to a Websphere MQ Queue

something like this

MQMessage xmlPayload = new MQMessage();
                    XmlDocument xmlDoc = xe.OwnerDocument;
                    xmlPayload.WriteString(xmlPayload);

but I get the following error

------ Build started: Project: e:\projects\transWSEngine\, Configuration: Debug .NET ------
Validating Web Site
Building directory '/transWSEngine/App_Code/STARTransport2005ArkonaMS/'.

e:\projects\transWSEngine\App_Code\STARTransport2005ArkonaMS\service.cs(129,33): error CS0136: A local variable named 'xmlDoc' cannot be declared in this scope because it would give a different meaning to 'xmlDoc', which is already used in a 'parent or current' scope to denote something else
e:\projects\transWSEngine\App_Code\STARTransport2005ArkonaMS\service.cs(130,21): error CS1502: The best overloaded method match for 'IBM.WMQ.MQMessage.WriteString(string)' has some invalid arguments
e:\projects\transWSEngine\App_Code\STARTransport2005ArkonaMS\service.cs(130,44): error CS1503: Argument '1': cannot convert from 'IBM.WMQ.MQMessage' to 'string'
Validation Complete
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

any help would be great as I am so close to getting this project finished just need to get over this last step.
Start your free trial to view this solution
Question Stats
Zone: Software
Question Asked By: jareddraper
Solution Provided By: drichards
Participating Experts: 2
Solution Grade: B
Views: 243
Translate:
Loading Advertisement...
07.19.2007 at 02:05PM PDT, ID: 19526130

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.19.2007 at 02:14PM PDT, ID: 19526217

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.19.2007 at 02:19PM PDT, ID: 19526254

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.19.2007 at 02:28PM PDT, ID: 19526338

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.19.2007 at 02:38PM PDT, ID: 19526426

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.19.2007 at 02:43PM PDT, ID: 19526464

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.19.2007 at 02:50PM PDT, ID: 19526522

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.19.2007 at 03:08PM PDT, ID: 19526660

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.19.2007 at 03:46PM PDT, ID: 19527033

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29