Tom Squires
Tom Squires

Reputation: 9286

namespaces for returned xml from webservice

Probably a simple question but im unsure of the answer;

Is the namespacing of the below xml correct? Im thinking possibly all the namespaces should be http://wholesale.fluidata.co.uk

<MACRequestResponse xmlns="http://wholesale.fluidata.co.uk/MACRequestResponse"><MACRequestResult xmlns:a="http://wholesale.fluidata.co.uk/WebserviceMessage" xmlns:i="http://wholesale.fluidata.co.uk/MAC"><a:Error i:nil="true" xmlns:b="http://wholesale.fluidata.co.uk/Error"/><a:ID>BT3423</a:ID><a:Message i:nil="true"/><a:Status>0</a:Status></MACRequestResult></MACRequestResponse>

Any links to a relevent guide would be apreciated. Thanks

Upvotes: 0

Views: 61

Answers (1)

Onots
Onots

Reputation: 2118

I'm assuming you're defining your own XML schema.

The namespacing you suggest is correct, and seems to match the w3c used method of using http based URIs as namespace name.

Note though that XML namespaces only have to match in string. There is no requirement for the URI to point anywhere.

You might want to read this or this (see the paragraph "The namespace URI")

Upvotes: 3

Related Questions