javax.xml.namespace
Class QName
- Serializable
QName class represents the value of a qualified name
as specified in
XML
Schema Part2: Datatypes specification.
The value of a QName contains a
namespaceURI, a
localPart and a
prefix.
The localPart provides the local part of the qualified name. The
namespaceURI is a URI reference identifying the namespace.
clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait |
QName
public QName(String localPart)
Constructor for the QName.
localPart - Local part of the QName
View More Examples of QName(String localPart)
1: ServiceFactoryImpl factory = new ServiceFactoryImpl();
2: Service service = factory.createService(new QName("ANY_SERVICE_NAME"));
3:
4: ...
5: ServiceFactoryImpl factory = new ServiceFactoryImpl();
6: Service service = factory.createService(new QName("ANY_SERVICE_NAME"));
7:
8: Call call = service.createCall();
9: call.setOperationName(new QName(TARGET_NAMESPACE, "echoSimpleUserType"));
View Full Code Here
1: ServiceFactoryImpl factory = new ServiceFactoryImpl();
2: Service service = factory.createService(new QName("ANY_SERVICE_NAME"));
3:
4: ...
5: ServiceFactoryImpl factory = new ServiceFactoryImpl();
6: Service service = factory.createService(new QName("ANY_SERVICE_NAME"));
7:
8: Call call = service.createCall();
9: call.setOperationName(new QName(TARGET_NAMESPACE, "echoSimpleUserType"));
View Full Code Here
1: ServiceFactory.newInstance();
2: this.service = factory.createService( new QName( "" ) );
3: }
4: try{
5: _call = (org.act.soap.client.Call) service.createCall();
View Full Code Here
1: new URL("file:/tmp/foo"),
2: new QName(""),
3: ...
4: new QName(""));
5:
6: ...
7:
8: Object o = cf.getConnection(Runnable.class, new URL("file:/tmp/foo"), new QName(""), new QName(""));
9: assertNull("got the result (the passed in ConnectionRequestInfo) from out mock manager",
View Full Code Here
1: {
2: QName xmlName = new QName(paramName);
3: addParameter(xmlName, xmlType, javaType, mode, false);
4: ...
5: OperationMetaData opMetaData = getOperationMetaData();
6: QName xmlName = new QName(Constants.DEFAULT_RPC_RETURN_NAME);
7: String javaTypeName = javaType.getName();
8: ...
9:
10: return new QName("");
11: }
View Full Code Here
QName
public QName(String namespaceURI,
String localPart) Constructor for the QName.
namespaceURI - Namespace URI for the QNamelocalPart - Local part of the QName.
View More Examples of QName(String namespaceURI,String localPart)
1: private static final javax.xml.namespace.QName ACTION$0 =
2: new javax.xml.namespace.QName("", "Action");
3:
4:
5: public java.lang.String getAction()
View Full Code Here
1: private static final javax.xml.namespace.QName ACTION$0 =
2: new javax.xml.namespace.QName("", "Action");
3:
4:
5: public java.lang.String getAction()
View Full Code Here
1: elemField.setFieldName("amount");
2: elemField.setXmlName(new javax.xml.namespace.QName("", "Amount"));
3: typeDesc.addFieldDesc(elemField);
4: ...
5: elemField.setFieldName("currencyCode");
6: elemField.setXmlName(new javax.xml.namespace.QName("", "CurrencyCode"));
7: typeDesc.addFieldDesc(elemField);
8: }
View Full Code Here
1: attrField.setFieldName("name");
2: attrField.setXmlName(new javax.xml.namespace.QName("", "Name"));
3: typeDesc.addFieldDesc(attrField);
4: ...
5: attrField.setFieldName("alias");
6: attrField.setXmlName(new javax.xml.namespace.QName("", "Alias"));
7: typeDesc.addFieldDesc(attrField);
8: }
View Full Code Here
QName
public QName(String namespaceURI,
String localPart,
String prefix) Constructor for the QName.
namespaceURI - Namespace URI for the QNamelocalPart - Local part of the QName.prefix - Prefix of the QName.
View More Examples of QName(String namespaceURI,String localPart,String prefix)
1: {
2: public static final QName faultCode = new QName("UnsupportedSecurityToken", Constants.WSSE_PREFIX, Constants.WSSE_NS);
3:
4: public static final String faultString = "An unsupported token was provided.";
View Full Code Here
1: {
2: public static final QName faultCode = new QName("UnsupportedAlgorithm", Constants.WSSE_PREFIX, Constants.WSSE_NS);
3:
4: public static final String faultString = "An unsupported signature or encryption algorithm was used.";
View Full Code Here
1: {
2: QName TERMINATIONTIME = new QName( "", "TerminationTime", "wsrf-rl" );
3:
4: QName JOB_ORIGINATING_USER_NAME =
5: "job_originating_user_name", "wsrf-pr" );
View Full Code Here
equals
public final boolean equals(Object obj)
Tests this QName for equality with another object.
If the given object is not a QName or is null then this method
returns
false.
For two QNames to be considered equal requires that both
localPart and namespaceURI must be equal. This method uses
String.equals to check equality of localPart
and namespaceURI. Any class that extends QName is required
to satisfy this equality contract.
This method satisfies the general contract of the
Object.equals method.
- equals in interface Object
obj - the reference object with which to compare
true if the given object is identical to this
QName: false otherwise.
View More Examples of equals(Object obj)
1:
2: import ;
3: import ;
4: ...
5: private String bindingId;
6: private QName portName;
7: ...
8: private QName serviceName;
9:
10: ...
11: PortInfo info = (PortInfo) obj;
12: if (bindingId.equals(info.getBindingID()) &&
View Full Code Here
1:
2: import ;
3:
4: ...
5: public void testEquals() throws Exception {
6: assertTrue("One instance is the same as itself", qn1.equals(qn1));
7: ...
8: assertTrue("Two equivalent instances are equal qn1=qn2", qn1.equals(qn2));
9: ...
10: assertTrue("Two equivalent instances are equal qn2=qn1", qn2.equals(qn1));
View Full Code Here
View More Examples of getLocalPart()
1:
2: import ;
3:
4: ...
5:
6: public final QName tagName;
7:
8: ...
9:
10: public TypeReference(QName tagName, Type type, Annotation... annotations) {
11: if(tagName==null || type==null || annotations==null)
12: ...
13:
14: this.tagName = new QName(tagName.getNamespaceURI().intern(), tagName.getLocalPart().intern(), tagName.getPrefix());
View Full Code Here
1:
2: import ;
3:
4: ...
5: Type elemType = elem.getType();
6: QName elemName = elem.getName();
7:
8: ...
9: {
10: elemType.setName(new QName(elemName.getNamespaceURI(), elemName.getLocalPart() + "Type" + (i==0 ? "" : "" + i)));
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: log.info("echoQName: " + val.value);
6: QName qn = val.value;
7: ...
8: val.value = new QName(qn.getNamespaceURI(), qn.getLocalPart() + "Response", qn.getPrefix());
9: }
View Full Code Here
1:
2: import ;
3:
4: ...
5:
6: private HashMap<QName, ElementParser> parsers = new HashMap<QName, ElementParser>();
7:
8: ...
9: if ( name.getNamespaceURI() == null ) {
10: name = new QName( defaultName, name.getLocalPart() );
11: }
12: ...
13: if ( name.getNamespaceURI() == null ) {
14: name = new QName( defaultName, name.getLocalPart() );
View Full Code Here
1:
2: import ;
3:
4: ...
5:
6: register(MethodParser.QNAME, new MethodParser(this));
7: ...
8: register(RunAsParser.QNAME, new RunAsParser(this));
9: register(AuthMethodParser.QNAME, new AuthMethodParser(this));
10: ...
11: if (runAsType == null) {
12: QName methodName = new QName(method.getLocalPart());
View Full Code Here
View More Examples of getNamespaceURI()
1:
2: import ;
3:
4: ...
5:
6: public final QName tagName;
7:
8: ...
9:
10: public TypeReference(QName tagName, Type type, Annotation... annotations) {
11: if(tagName==null || type==null || annotations==null)
12: ...
13:
14: this.tagName = new QName(tagName.getNamespaceURI().intern(), tagName.getLocalPart().intern(), tagName.getPrefix());
View Full Code Here
1:
2: import ;
3:
4: ...
5: Type elemType = elem.getType();
6: QName elemName = elem.getName();
7:
8: ...
9: {
10: elemType.setName(new QName(elemName.getNamespaceURI(), elemName.getLocalPart() + "Type" + (i==0 ? "" : "" + i)));
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: log.info("echoQName: " + val.value);
6: QName qn = val.value;
7: ...
8: val.value = new QName(qn.getNamespaceURI(), qn.getLocalPart() + "Response", qn.getPrefix());
9: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: protected void common(String wsdl, QName portName, Class... jaxbClasses) throws Exception {
7: control = EasyMock.createNiceControl();
8: ...
9: new WSDLServiceFactory(bus, getClass().getResource(wsdl),
10: new QName(portName.getNamespaceURI(), "XMLService"));
View Full Code Here
1: package ;
2: import ;
3: import ;
4: ...
5: public abstract String getLocal(int i);
6: public abstract QName getForeign(int i);
7: public abstract String getNamespace(int i);
8: ...
9: case ITEM_FOREIGN:
10: return getForeign(i).getNamespaceURI();
11: case ITEM_NAMESPACE:
12: ...
13: case ITEM_FOREIGN:
14: return getForeign(i).getNamespaceURI();
View Full Code Here
View More Examples of getPrefix()
1:
2: import ;
3:
4: ...
5:
6: public final QName tagName;
7:
8: ...
9:
10: public TypeReference(QName tagName, Type type, Annotation... annotations) {
11: if(tagName==null || type==null || annotations==null)
12: ...
13:
14: this.tagName = new QName(tagName.getNamespaceURI().intern(), tagName.getLocalPart().intern(), tagName.getPrefix());
View Full Code Here
1:
2: public void appendFaultSubcode(QName subcode)
3: throws SOAPException
4: ...
5: {
6: if (subcode.getPrefix() == null ||
7: ...
8: "".equals(subcode.getPrefix()))
9: throw new SOAPException("Fault subcodes must have qualified names");
10: ...
11:
12: if (getNamespaceURI(subcode.getPrefix()) == null) {
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: public static Name toName( QName qname )
7: throws SOAPException
8: ...
9: return createName( qname.getLocalPart( ),
10: qname.getPrefix( ),
11: qname.getNamespaceURI( ) );
View Full Code Here
hashCode
public final int hashCode()
Returns a hash code value for this QName object. The hash code
is based on both the localPart and namespaceURI parts of the
QName. This method satisfies the general contract of the
Object.hashCode method.
- hashCode in interface Object
- a hash code value for this Qname object
View More Examples of hashCode()
1:
2: import ;
3:
4: ...
5: abstract class XmlItemProp extends Prop {
6: private final QName name;
7: private final JType type;
8: ...
9:
10: public XmlItemProp(QName name, JType valueType) {
11: this.name = name;
12: ...
13: public final int hashCode() {
14: return name.hashCode()*29 + type.hashCode();
View Full Code Here
1:
2: import ;
3:
4: ...
5: public String string;
6: public QName qname;
7: public Composite composite;
8: ...
9: int result;
10: result = (integer != null ? integer.hashCode() : 0);
11: ...
12: result = 29 * result + (dateTime != null ? dateTime.hashCode() : 0);
View Full Code Here
toString
public String toString()
Returns a string representation of this QName
- toString in interface Object
- a string representation of the QName
View More Examples of toString()
1:
2: import ;
3:
4: ...
5: final class GElementImpl extends GElement {
6: public final QName tagName;
7:
8: ...
9:
10: public GElementImpl(QName tagName, XSElementDecl decl) {
11: this.tagName = tagName;
12: ...
13: public String toString() {
14: return tagName.toString();
View Full Code Here
1:
2: import ;
3:
4: ...
5: protected final String getLookupKeyForMessage(MessageContext messageContext) throws Exception {
6: QName qName = resolveQName(messageContext);
7: ...
8: return qName != null ? qName.toString() : null;
9: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: protected String getLookupKeyForMessage(MessageContext messageContext) throws Exception {
6: QName qName = PayloadRootUtils
7: .getPayloadRootQName(messageContext.getRequest().getPayloadSource(), transformerFactory);
8: ...
9: return qName != null ? qName.toString() : null;
10: }
11: ...
12: }
13: return qname.toString();
View Full Code Here
valueOf
public static QName valueOf(String s)
Returns a QName holding the value of the specified String.
The string must be in the form returned by the QName.toString()
method, i.e. "{namespaceURI}localPart", with the "{namespaceURI}"
part being optional.
This method doesn't do a full validation of the resulting QName.
In particular, it doesn't check that the resulting namespace URI
is a legal URI (per RFC 2396 and RFC 2732), nor that the resulting
local part is a legal NCName per the XML Namespaces specification.
s - the string to be parsed
- QName corresponding to the given String
View More Examples of valueOf(String s)
1: package ;
2: import ;
3:
4: ...
5: String name, mode ="IN";
6: QName qname;
7: public parameterOperation(String Name, QName Qname, String Mode) {
8: ...
9: {
10: qname = QName.valueOf("{"+uri+"}"+Qname.substring(Qname.indexOf(":")+1));
11: }
12: ...
13: else qname = QName.valueOf("{"+uri+"}"+Qname);
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: String prefix ="", type ="", uri ="";
6: QName xmlType;
7: Mapping mapping = new Mapping();
8: ...
9: JAVATypes.addElement(long.class);
10: JAVATypes.addElement(javax.xml.namespace.QName.class);
11: JAVATypes.addElement(short.class);
12: ...
13: }
14: xmlType = QName.valueOf("{"+uri+"}"+type);
View Full Code Here