Hoping someone can help with this problem.
We have a web service that outputs complex XML structure.
The output is of the form defined by an xml schema (internal to the web service).
This same XML schema has been used to generate a publishable webMethods document type within wm.
The problem is, the New Document wizard creates the document with prefix of “ns:”, while the web service connector wizard creates input/output documents with prefix “tns1:”.
This means we cannot do top-level mapping from one to the other… it has do be done at the leaf-node level which is frustrating given the number of nodes (and nested lists of nodes) involved.
The obvious way to fix this would be to update the web service connector nsDecls statements from tns1 to ns, however because the new web service connector wizard builds the flow service using references to tns1 throughout the flow and within the output document, there’s a bit more to it than that, and fiddling with tool-generated code has its pitfalls.
Is there a way to change the prefixes of a document? I guess a global search/replace across the document element names is required - sounds like a job for a java-service to me, as I don’t know any way to actually access/modify element names at run-time.
Otherwise, is there a way to edit the “template” that either the new document from xml schema wizard, or the new web service connector wizard, such that the default namespace prefix can be adjusted?
Any help appreciated, as we have numerous instances of this problem!