mObj = method.invoke(objectFactory.newInstance(), new Object[] {obj});
}
}
javax.xml.stream.XMLOutputFactory fact = javax.xml.stream.XMLOutputFactory.newInstance();
XMLStreamWriter writer = fact.createXMLStreamWriter(pw);
writer.setNamespaceContext(new javax.xml.namespace.NamespaceContext() {
public String getNamespaceURI(String arg) {
return wsdl.getNamespace(arg);
}
public String getPrefix(String arg) {
for (Object ent : wsdl.getNamespaces().entrySet()) {
Map.Entry entry = (Map.Entry)ent;
if (arg.equals(entry.getValue())) {
return (String)entry.getKey();
}
}
return null;
}
public Iterator getPrefixes(String arg) {
return wsdl.getNamespaces().keySet().iterator();
}
});
u.marshal(mObj, writer);
writer.flush();
} catch (Exception ex) {
throw new WSDLException(WSDLException.PARSER_ERROR,
"",
ex);
}