By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,168 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,168 IT Pros & Developers. It's quick & easy.

Multiple XML Namespace prefixes (in a webservice)

P: n/a
Dear all,

This is probably very much rtfm, but i think i'm just searching in the
wrong places or with the wrong keywords. Can anybody tell me how to
achieve the following:

I have:
public class SearchRetrieveRequest {
public string query;
public int startRecord;
etc. etc.
}
public class SearchRetrieveResponse {
public int numberOfRecords;
public List<RecordRecords;
etc. etc.
}
I have a WebMethod like:
public SearchRetrieveResponse SearchRetrieve(string query, int
startRecord, etc.)
that i would want to output something like:
<soap:envelope ...>
<soap:body>
<SRW:searchRetrieveResponse xmlns:SRW="http://www.loc.gov/zing/
srw/" xmlns:DIAG="http://www.loc.gov/zing/srw/diagnostics/">
<SRW:version>1.1</SRW:version>
(...)
</SRW:records>
<SRW:diagnostics>
<DIAG:diagnostic>
(...)

In other words: I want to output a prefix and be able to use different
prefixes. However, I just cannot get my visual studio (2k5) to do this
[apparently, my jedi mind trick power is diminishing ;)]
So, euhmm, help? please?

Chris

Jan 29 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.