Element must have a namespace specified if there is a default namespace in scope.
Whilst writing the XMLNS message, element 'GenericMessage' was found to be in scope of a default namespace, but this element does not have a namespace defined.
This error can occur if the NamespaceDecl correlation name has been used to create a default namespace for a parent element, and a child element has been created that does not have a namespace. If you have defined a default namespace in your output message tree, then all elements that are in scope of this default namespace must be defined to be in a namespace. Modify the output message tree so that element 'GenericMessage' is defined to be in a namespace. If element 'GenericMessage' belongs to the default namespace, then this element needs to be created in the default namespace.
How can I get around this??
--madi _________________ IBM Certified Solutions Developer - WMB 6.0
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
I have a very very similar requirement long time back and jeeth_m helped me to get out of that issue..
All you need to do is .
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xsd NAMESPACE 'http://staples.com/xsd';
DECLARE soap NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE cert NAMESPACE 'http://staples.com/certify';
DECLARE JME NAMESPACE 'http://staples.com/certify/UserAdmin';
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"soap" = 'http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"cert" = 'http://staples.com/certify';
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"xsd" = 'http://ibm.com/xsd';
--Default namespace
SET OutputRoot.XMLNS.mySoapNS:Envelope.soap:Body.JME:Information.(XML.NamespaceDecl)xmlns = 'http://staples.com/certify/UserAdmin';
SET OutputRoot.XMLNS.mySoapNS:Envelope.soap:Body.JME:Information.JME:UserId = '34566775';
SET OutputRoot.Properties.MessageDomain = 'XMLNS';
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum