473,387 Members | 1,798 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,387 software developers and data experts.

Adding a xml tag in dot net

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

i want to add the above tag to my coding.my coding is as follows.

string strurl = "http://service.ecocoma.com/shipping/fedex/GetFedExRate/";
strfedexxml = "<?xml version=" + @"""1.0""" + "?>";
strfedexxml = strfedexxml + "<soap:Envelope>";// xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">"; strfedexxml = strfedexxml + "<soap:Body>";

the bold and underlined place show me a error.pls halp
Oct 25 '07 #1
3 1846
dip_developer
648 Expert 512MB
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

i want to add the above tag to my coding.my coding is as follows.

string strurl = "http://service.ecocoma.com/shipping/fedex/GetFedExRate/";
strfedexxml = "<?xml version=" + @"""1.0""" + "?>";
strfedexxml = strfedexxml + "<soap:Envelope>";// xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">"; strfedexxml = strfedexxml + "<soap:Body>";

the bold and underlined place show me a error.pls halp
i think its a simple formatting problem.......you are not using the line breaks or escape sequences while concatenating......you have plenty of double qoutes("),forward slash(/),backward slash(\)...so keep in mind to put those escape sequences.......
Oct 25 '07 #2
dip_developer
648 Expert 512MB
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

i want to add the above tag to my coding.my coding is as follows.

string strurl = "http://service.ecocoma.com/shipping/fedex/GetFedExRate/";
strfedexxml = "<?xml version=" + @"""1.0""" + "?>";
strfedexxml = strfedexxml + "<soap:Envelope>";// xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">"; strfedexxml = strfedexxml + "<soap:Body>";

the bold and underlined place show me a error.pls halp
try something like...it is in vb.net


Expand|Select|Wrap|Line Numbers
  1.  
  2. strfedexxml = """<?xml version="" + @""1.0"" + ""?>"""
  3. strfedexxml =strfedexxml +"""<soap:Envelope>"";// xmlns" & _ ":xsi=""http://www.w3.org/2001/XMLSchema-instance""" & _ "xmlns:xsd=""http://www.w3.org/2001/XMLSchema""" & _ "xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope"">"
  4.  
Oct 25 '07 #3
mzmishra
390 Expert 256MB
As mentoned above it is the issue in formatting .
check for single and double quote.
I can show you one example how I have written one in C#

string Req="<?xml version=\"1.0\" encoding=\"UTF-8\"?><!-- VSS header --><!-- $Author: ntaylor $ --><!-- $Revision: #1 $ --><!-- $Date: 2005/02/08 $ --><!-- $Modtime: 6/10/04 6:06p $ --><!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Morgan Stanley (Morgan Stanley EDP Group) -->";
Req=Req+"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:msdwHdr=\"http://xml.msdw.com/ns/appmw/soap/1.0/header\" xmlns:saml=\"http://xml.msdw.com/ns/appmw/soap/1.0/saml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><SOAP-ENV:Header> <msdwHdr:ServiceID>msjava.soaptk.examples.echo</msdwHdr:ServiceID><msdwHdr:RequestID>adfareaerwrwe </msdwHdr:RequestID><msdwHdr:Timestamp/><msdwHdr:Principal><saml:Assertion xsi:type=\"saml:AuthenticationAssertionType\" Issuer=\"amr://application/appmw/corpdir/webClient\"><saml:Subject><saml:NameIdentifier><sa ml:SecurityDomain>amr://principal/person/internal/msUid</saml:SecurityDomain><saml:Name>archi</saml:Name>";
Req=Req+"</saml:NameIdentifier><saml:SubjectConfirmation><sam l:AuthenticationMethod>amr://service/authentication/netegrity</saml:AuthenticationMethod><saml:SubjectConfirmatio nData>";
Req=Req+token;
Req=Req+"</saml:SubjectConfirmationData></saml:SubjectConfirmation></saml:Subject></saml:Assertion></msdwHdr:Principal></SOAP-ENV:Header><SOAP-ENV:Body><FindTeamAndIdentityRelationshipsByRoleAn dCoverageReq xmlns=\"http://www.morganstanley.com/O2\"><O2:O2FindTeamRelationshipsHeader xmlns:O2=\"http://xml.msdw.com/ns/refdata/o2/1.0\"><VersionId xmlns=\"\">0</VersionId><PageNumber xmlns=\"\">-1</PageNumber><PageSize xmlns=\"\">-1</PageSize><IncludeTeams xmlns=\"\">false</IncludeTeams><IncludeIdentities xmlns=\"\">true</IncludeIdentities><IncludeCoverages xmlns=\"\">false</IncludeCoverages><IncludeRolesAndCoverages xmlns=\"\">true</IncludeRolesAndCoverages>";
Req=Req+"<IncludeRoles xmlns=\"\">true</IncludeRoles><IncludeCoverageAttributes xmlns=\"\">false</IncludeCoverageAttributes><IncludeParentTeam xmlns=\"\">true</IncludeParentTeam><IncludeRelatedOrgUnit xmlns=\"\">true</IncludeRelatedOrgUnit></O2:O2FindTeamRelationshipsHeader><RoleIds xmlns=\"\"/><O2:O2CoverageFilter xmlns:O2=\"http://xml.msdw.com/ns/refdata/o2/1.0\"><VersionId xmlns=\"\">0</VersionId><AttributeFilters xmlns=\"\"><O2:O2CoverageAttributeFilter><VersionI d>0</VersionId><AttributeSourceId>2293</AttributeSourceId><ExternalAttributeId>";
Req=Req+gr;
Req=Req+"</ExternalAttributeId><Mandatory>true</Mandatory><Inclusive>true</Inclusive></O2:O2CoverageAttributeFilter></AttributeFilters><Date xmlns=\"\"/><IncludeBackup xmlns=\"\">true</IncludeBackup><IncludeInterested xmlns=\"\">true</IncludeInterested><IncludeIdentities xmlns=\"\">true</IncludeIdentities><IncludeResponsible xmlns=\"\">true</IncludeResponsible><RequireAllAttributes xmlns=\"\">true</RequireAllAttributes>";
Req=Req+"<QueryResultCriteria xmlns=\"\">O</QueryResultCriteria></O2:O2CoverageFilter><IncludeFuture xmlns=\"\">false</IncludeFuture></FindTeamAndIdentityRelationshipsByRoleAndCoverageR eq></SOAP-ENV:Body></SOAP-ENV:Envelope>";
Oct 25 '07 #4

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

Similar topics

6
by: Jamie Fryatt | last post by:
Hi everyone, here's what id like to do. I have a table with 2 fields, name and value I need to be able to add multiple records quickly, for example I need to add name value abc 1...
10
by: sp0 | last post by:
Is there a reason why to make mix numbers improper when adding? It seems when subtracting and adding, adding a subtracting the whole numbers and fraction parts should be sufficient? what'ch think
1
by: hzgt9b | last post by:
When adding my VB .NET solution (with two sub-projects) the folder structure in VSS gets an extra level of folders... For example, here's the structure of the solution on my C:\...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
0
by: Sileesh | last post by:
Hi I have html table and a Button in an Aspx page. I am adding one row with some textboxes to Html table each time i click on the Button thru Javascript. Now problem is when when i try to...
1
by: seanmayhew | last post by:
I have a form page that that while editing saves the data to an xml doc before submitting to db. On each page unload it saves the xmldoc as the user can add multiple items to the company like...
6
by: vb | last post by:
Hi, I am new to .Net. I am using a Combo Box in my windows forms. I am adding the items by creating the instances and adding the same to the list. My questions/doubts are: 1. If I have 25 to...
9
by: Kadett | last post by:
Hi all, I have following problem: I'm creating a ListView (Details) control at run-time and filling it with some records (let's say 10 000). This operation seems to be quite fast, but when I call...
0
by: AndyL69 | last post by:
Hello I've got a very strange Problem. When im adding a new ACE entry to a UNC Direcotry the inherented ACL's will be lost. When I'm adding a new ACE to a directory / file in this UNC path the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.