Skip to Content.
Sympa Menu

mace-opensaml-users - xml-tooling exception / hack in XSQNameImpl

Subject: OpenSAML user discussion

List archive

xml-tooling exception / hack in XSQNameImpl


Chronological Thread 
  • From: Asa Hardcastle <>
  • To:
  • Subject: xml-tooling exception / hack in XSQNameImpl
  • Date: Thu, 11 Oct 2007 10:56:46 -0400

Hi all,

I was getting a big fat null pointer exception when processing the following Body of a SOAP response (sent by HP's Select Federation):


      <S:Fault>
         <faultcode>S:Server</faultcode>
         <faultstring>security verification failure</faultstring>
      </S:Fault>
   </S:Body>


It didn't like faultcode or faultstring - I assume because they have no explicit NS prefix.  So in order to get through this problem, I made a small change to a class in XMLTooling.   I have no idea of the implications of this, or whether there is a better way.  Can someone help me out?


in the java-xmltooling class org.opensaml.xml.schema.impl.XSQNameImpl

OLD:

    /** {@inheritDoc} */
    public void setValue(QName newValue) {
        value = prepareForAssignment(value, newValue);
        addNamespace(new Namespace(value.getNamespaceURI(), value.getPrefix()));
    }


NEW:

    /** {@inheritDoc} */
    public void setValue(QName newValue) {
        // Asa Hardcastle added on October 11, 2007
        if(newValue.getPrefix().trim().length()!=0){
            value = prepareForAssignment(value, newValue);
            addNamespace(new Namespace(value.getNamespaceURI(), value.getPrefix()));
        }
    }




thanks,

asa






--
Asa Hardcastle, Technical Lead, openLiberty ID-WSF ClientLib
Skype: subsystem7





Archive powered by MHonArc 2.6.16.

Top of Page