473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

XML formatting issue...

Hi,

I am new to .Net. Actually I need to pass an XML string to a webservice.Below is the way how I assign the XML to a variable strXmlReportRequest1.

strXmlReportRequest1 = "<PARAMETERS><ReportPath>\\\\%COMPUTERNAME%\\ezsb\ \PMS\\</ReportPath><ReportName>ZZPMS</ReportName><ForceReport>True</ForceReport><DataConnectionString>DSN=COSPROD</DataConnectionString><ReturnType>5</ReturnType><DisplayFormat>5</DisplayFormat><PolicyNumber>LPR 0000771 04</PolicyNumber><CrystalReportName>rptMainInForce.rpt </CrystalReportName><CrystalConnection>PADBS0001</CrystalConnection><UserID>FERptUser</UserID><Password>user</Password><DataBaseName>db_FSFELIP</DataBaseName><REPORTPARAMETERS><EndDate>09/13/2008</EndDate><PolicyNumbers>LPR 0000771 04</PolicyNumbers><UserName>jkwooden</UserName><LocationTypes>01,02</LocationTypes><LocationTypeNames>FP,REO</LocationTypeNames></REPORTPARAMETERS></PARAMETERS>";

Problem is when I am trying to get the string through response.write just after assignment . I am getting a weired string, I am getting all the node names lost !! -

\\%COMPUTERNAME%\ezsb\PMS\ZZPMSTrueDSN=COSPROD55LP R 0000771 04rptMainInForce.rptPADBS0001FERptUseruserdb_FSFEL IP09/13/2008LPR 0000771 04jkwooden01,02FP,REO


So can any one help me , how can I retain the xml node names along with data.
Sep 13 '08 #1
3 1111
Shashi Sadasivan
1,435 Expert 1GB
If you have a look at web services, it transfers data as SOAP, which is XML.
unfortunately it puts all the contents of the string within the string type element and sends it,
at the receiving end, it takes all the text in the node of the element the web service is expecting
and hence you loose all the xml information
the way to solve it is to convert the xml format as a class and pass it through, which means that your data will be easier to process and will be strongly type (less prone to errors)
Sep 14 '08 #2
Thanks for the reply. But the webservice is expecting the input to be in string format . Can I send the class yet ? A code snippet will help me to better understand


Again, Thanks !!
Sep 14 '08 #3
Let me come to the point.. Actually above string is being sent to a webservice. The webservice in response returns another XML which our code interprets and converts to PDF.

This code had been working fine since last 3 years.. we have been facing this problem since last one week.. I tried to catch the exception . I got "Non-negative number required. Parameter Name: Byet count ..... "

Seems like webservice response is changed than earlier.

Any idea on this ?
Sep 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: brAccess | last post by:
I recently installed Access 2003 and immediately noticed problems with applications that work fine in 2000 and XP. I use conditional formatting on continuous forms for a number of reasons. When...
2
by: Megan | last post by:
Can you write conditional VBA code that affects only one or two records on a continuous subform? I have a form with a subform on it. The parent/ child field that links the forms is CaseID. The...
2
by: Alan | last post by:
I have a database I created on a network share when I print a report from my computer the printed copy contains the colors specified in conditional formatting but if I go to another computer on the...
2
by: Von Bailey | last post by:
I have a form where the conditional formatting is set on some fields to bold if certain conditions are met. However, when the conditions are met some of the data that is to bold is either not...
5
by: Andrew Chanter | last post by:
Does anyone know a way you can use conditional formatting to create a banded style view as is commonly seen on the internet. (In othe words the first record appears on a gray background, the 2nd...
9
by: sck10 | last post by:
Hello, I have a page with an ImageButton that is used to redirect to another page. When the page first opens, everything looks as expected. However, when I click on the image, the new page...
8
by: gopal | last post by:
Hi I am trying to write to log file but the formatting of string is not properly aligned in log file result The results looks some thing like this OK move.xml Successful OK ...
5
by: CarrieR | last post by:
I am working within a DB I have been devolping in Access 2003, and have encountered a report coding issue I was hoping someone could help me with: I have 18 reports, each running off some smaller...
2
by: =?Utf-8?B?VG9jbw==?= | last post by:
Hello. My goal is to pain the entire row fore color as Red. If the value of column 24 is true (boolean), I wish to paint the row as Red. Otherwise, leave row as default (no formatting). The...
6
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.