KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > soap > impl > llom > SOAPFaultTextImpl


1 package org.apache.axis2.soap.impl.llom;
2
3 import org.apache.axis2.om.OMAbstractFactory;
4 import org.apache.axis2.om.OMAttribute;
5 import org.apache.axis2.om.OMNamespace;
6 import org.apache.axis2.om.OMXMLParserWrapper;
7 import org.apache.axis2.om.impl.llom.OMAttributeImpl;
8 import org.apache.axis2.soap.SOAPFaultReason;
9 import org.apache.axis2.soap.SOAPFaultText;
10 import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
11
12 import javax.xml.namespace.QName JavaDoc;
13
14 /**
15  * Copyright 2001-2004 The Apache Software Foundation.
16  * <p/>
17  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
18  * use this file except in compliance with the License. You may obtain a copy of
19  * the License at
20  * <p/>
21  * http://www.apache.org/licenses/LICENSE-2.0
22  * <p/>
23  * Unless required by applicable law or agreed to in writing, software
24  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
25  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
26  * License for the specific language governing permissions and limitations under
27  * the License.
28  * <p/>
29  */

30 public abstract class SOAPFaultTextImpl extends SOAPElement implements SOAPFaultText {
31     protected OMAttribute langAttr;
32     protected OMNamespace langNamespace = OMAbstractFactory.getOMFactory().createOMNamespace(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
33
34     protected SOAPFaultTextImpl(SOAPFaultReason parent) throws SOAPProcessingException {
35         super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true);
36     }
37
38     protected SOAPFaultTextImpl(SOAPFaultReason parent, OMXMLParserWrapper builder) {
39         super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder);
40     }
41
42
43     public void setLang(String JavaDoc lang) {
44         //langAttr = new OMAttributeImpl(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, parent.getNamespace(), lang);
45
langAttr = new OMAttributeImpl(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, langNamespace, lang);
46         this.addAttribute(langAttr);
47     }
48
49     public String JavaDoc getLang() {
50         if (langAttr == null) {
51             //langAttr = this.getFirstAttribute(new QName(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, parent.getNamespace().getName()));
52
langAttr = this.getFirstAttribute(new QName JavaDoc(langNamespace.getName(),SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX ));
53         }
54
55         return langAttr == null ? null : langAttr.getValue();
56     }
57 }
58
Popular Tags