xml - Error: Undeclared namespace prefix x: -
i soap newbie , struggling how resolve error message,
{:error, "500", "undeclared namespace prefix \"x\"\n @ [row,col {unknown-source}]: [1,168]"}
for below soap envelope. because of terms , conditions of host system trying access, have replaced identifying url , credential info "xxx" , removed majority of objects.
<x:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:read="urn://xxx/sdk/readobject" xmlns:obj="http://xxx/object"> <x:header> <wsse:security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:usernametoken> <wsse:username>xxx</wsse:username> <wsse:password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#passwordtext">xxx</wsse:password> </wsse:usernametoken> </wsse:security> </x:header> <x:body> <read:readestimate> <read:estimate> <obj:id>38945</obj:id> </read:estimate> </read:readestimate> </x:body> </x:envelope>
to fix problem of undeclared namespace prefix (x:
), one of following:
replace
x:
soapenv:
in soap envelope element names.change
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
.use default namespace changing
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://schemas.xmlsoap.org/soap/envelope/"
, removingx:
in soap envelope element names.
Comments
Post a Comment