Can you provide complete code of your sample ? Thanks !
On Tue, May 15, 2012 at 9:55 PM, Dmitry <[email protected]> wrote: > Hello, > > I got a NPE serializing my WSDL , probably don't understand how it > supposed to work... > > DOMWSDLWriter.**printInterfaceFaultReferences(**...) { > ... > QName attrQName=faulRef.getRef(); > String attrName= > DOMUtils.getQualifiedValue(**faulRef.getNamespaceURI(** > attrQName.getPrefix()).**toString(), > attrQName.getLocalPart(), > faulRef); > > So it supposed that I must know the correct prefix for the fault component? > > I have: > interfaceFaultReferenceElement**.setRef(new QName("http://mynamespace", > "myfault")); > > Of course I can always put: > > description.addNamespace("tns"**, targetNamespace); > interfaceFaultReferenceElement**.setRef(new QName("http://mynamespace", > "myfault", "tns")); > > That's ok then doing it by hand, but I am getting the QName from an RDF > model with no prefix defined. > > Why the code is trying to get a namespace by prefix, to search later a > prefix by the namespace? > > Things go worst for faultElement where I just have no idea which prefix to > put, the element name belongs to XML Schema global types. > > DOMWSDLWriter.printFaults(...) { > ... > //TODO check here - returns QNameTokenUnion but only take QName > QName attrElement=faulEle.**getElement().getQName(); > String attrEle= > DOMUtils.getQualifiedValue(**faulEle.getNamespaceURI(** > attrElement.getPrefix()).**toString(), > attrElement.getLocalPart(), > faulEle); > > Thank you in advance > > Dmitry Repchevsky > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://people.apache.org/~sagara/ LinkedIn - http://www.linkedin.com/in/ssagara
