public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException { final String prefix = namespaceContext.getPrefix(namespaceURI); if (prefix == null) { // TODO throw new XMLStreamException(); } writeAttribute(prefix, namespaceURI, localName, value); }
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException { // Inline-wsdl writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.QNAME_DEFINITIONS.getLocalPart(), WSDLConstants.NS_WSDL); writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL); writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.QNAME_IMPORT.getLocalPart(), WSDLConstants.NS_WSDL); writer.writeAttribute("namespace", service.getNamespaceURI()); writer.writeAttribute("location", wsdlAddress); writer.writeEndElement(); writer.writeEndElement(); }
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException { // Inline-wsdl writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.QNAME_DEFINITIONS.getLocalPart(), WSDLConstants.NS_WSDL); writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL); writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.QNAME_IMPORT.getLocalPart(), WSDLConstants.NS_WSDL); writer.writeAttribute("namespace", service.getNamespaceURI()); writer.writeAttribute("location", wsdlAddress); writer.writeEndElement(); writer.writeEndElement(); }
private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException { // Inline-wsdl writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.QNAME_DEFINITIONS.getLocalPart(), WSDLConstants.NS_WSDL); writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL); writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.QNAME_IMPORT.getLocalPart(), WSDLConstants.NS_WSDL); writer.writeAttribute("namespace", service.getNamespaceURI()); writer.writeAttribute("location", wsdlAddress); writer.writeEndElement(); writer.writeEndElement(); }
/** * @param writer the writer should be at the start of element. * @param service Namespace URI of servcie is used as targetNamespace of wsdl if wsdlTargetNamespace is not null * @param wsdlAddress wsdl location * @param wsdlTargetNamespace targetnamespace of wsdl to be put in wsdliLocation * */ private static void writeWsdliLocation(StreamWriterBufferCreator writer, QName service,String wsdlAddress,String wsdlTargetNamespace) throws XMLStreamException { String wsdliLocation = ""; if(wsdlTargetNamespace != null) { wsdliLocation = wsdlTargetNamespace + " "; } else if (service != null) { wsdliLocation = service.getNamespaceURI() + " "; } else { throw new WebServiceException("WSDL target Namespace cannot be resolved"); } wsdliLocation += wsdlAddress; writer.writeNamespace(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_PREFIX, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE); writer.writeAttribute(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_PREFIX, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_LOCALNAME, wsdliLocation); } private static void writeMSMetaData(StreamWriterBufferCreator writer,
/** * @param writer the writer should be at the start of element. * @param service Namespace URI of servcie is used as targetNamespace of wsdl if wsdlTargetNamespace is not null * @param wsdlAddress wsdl location * @param wsdlTargetNamespace targetnamespace of wsdl to be put in wsdliLocation * */ private static void writeWsdliLocation(StreamWriterBufferCreator writer, QName service,String wsdlAddress,String wsdlTargetNamespace) throws XMLStreamException { String wsdliLocation = ""; if(wsdlTargetNamespace != null) { wsdliLocation = wsdlTargetNamespace + " "; } else if (service != null) { wsdliLocation = service.getNamespaceURI() + " "; } else { throw new WebServiceException("WSDL target Namespace cannot be resolved"); } wsdliLocation += wsdlAddress; writer.writeNamespace(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_PREFIX, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE); writer.writeAttribute(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_PREFIX, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_LOCALNAME, wsdliLocation); } private static void writeMSMetaData(StreamWriterBufferCreator writer,
/** * @param writer the writer should be at the start of element. * @param service Namespace URI of servcie is used as targetNamespace of wsdl if wsdlTargetNamespace is not null * @param wsdlAddress wsdl location * @param wsdlTargetNamespace targetnamespace of wsdl to be put in wsdliLocation * */ private static void writeWsdliLocation(StreamWriterBufferCreator writer, QName service,String wsdlAddress,String wsdlTargetNamespace) throws XMLStreamException { String wsdliLocation = ""; if(wsdlTargetNamespace != null) { wsdliLocation = wsdlTargetNamespace + " "; } else if (service != null) { wsdliLocation = service.getNamespaceURI() + " "; } else { throw new WebServiceException("WSDL target Namespace cannot be resolved"); } wsdliLocation += wsdlAddress; writer.writeNamespace(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_PREFIX, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE); writer.writeAttribute(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_PREFIX, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE, W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_LOCALNAME, wsdliLocation); } private static void writeMSMetaData(StreamWriterBufferCreator writer,
writer.writeAttribute(AddressingVersion.MEMBER.eprType.portName, port.getLocalPart());
writer.writeAttribute(AddressingVersion.MEMBER.eprType.portName, port.getLocalPart());
writer.writeAttribute(AddressingVersion.MEMBER.eprType.portName, port.getLocalPart());
for (Map.Entry<QName, String> entry : attributes.entrySet()) { QName qname = entry.getKey(); writer.writeAttribute(qname.getPrefix(), qname.getNamespaceURI(), qname.getLocalPart(), entry.getValue()); MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getLocalPart(), MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getNamespaceURI()); writer.writeAttribute(MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_ATTRIBUTE, MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_VALUE);
for (Map.Entry<QName, String> entry : attributes.entrySet()) { QName qname = entry.getKey(); writer.writeAttribute(qname.getPrefix(), qname.getNamespaceURI(), qname.getLocalPart(), entry.getValue()); MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getLocalPart(), MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getNamespaceURI()); writer.writeAttribute(MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_ATTRIBUTE, MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_VALUE);
for (Map.Entry<QName, String> entry : attributes.entrySet()) { QName qname = entry.getKey(); writer.writeAttribute(qname.getPrefix(), qname.getNamespaceURI(), qname.getLocalPart(), entry.getValue()); MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getLocalPart(), MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getNamespaceURI()); writer.writeAttribute(MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_ATTRIBUTE, MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_VALUE);
writer.writeAttribute(AddressingVersion.W3C.eprType.portName, port.getLocalPart());
writer.writeAttribute(AddressingVersion.W3C.eprType.portName, port.getLocalPart());
writer.writeAttribute(AddressingVersion.W3C.eprType.portName, port.getLocalPart());