You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Dmitry <re...@list.ru> on 2012/05/15 18:25:48 UTC
[WODEN-65] refloated
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: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
Re: [WODEN-65] refloated
Posted by Sagara Gunathunga <sa...@gmail.com>.
Can you provide complete code of your sample ?
Thanks !
On Tue, May 15, 2012 at 9:55 PM, Dmitry <re...@list.ru> 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: dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: dev-help@ws.apache.org
>
>
--
Sagara Gunathunga
Blog - http://ssagara.blogspot.com
Web - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara