/** * Get the SOAP address location for the specified port. * * @param p * A WSDL Port instance. * @return The SOAP address URI. */ protected static String getSOAPAddress( Port p ) { ExtensibilityElement e = findExtensibilityElement( p, SOAP_PORT_ADDRESS_NAME ); if ( e instanceof SOAP12Address ) { return ( (SOAP12Address) e ).getLocationURI(); } else if ( e instanceof SOAPAddress ) { return ( (SOAPAddress) e ).getLocationURI(); } return null; }
/** * Get the Soap Action URI from the operation's soap:operation extensiblity element. * * @param operation * A WSDL Operation. * @return Soap action URI as string, null if not defined. */ protected static String getSOAPAction( BindingOperation operation ) { ExtensibilityElement e = findExtensibilityElement( operation, SOAP_OPERATION_ELEMENT_NAME ); if ( e != null ) { if ( e instanceof SOAP12Operation ) { return ( (SOAP12Operation) e ).getSoapActionURI(); } else { return ( (SOAPOperation) e ).getSoapActionURI(); } } return null; }
/** * Get the SOAPBinding style for the specified WSDL Port. * * @param binding * A WSDL Binding instance. * @return String either 'document' or 'rpc', if not found in WSDL defaults to 'document'. */ protected static String getSOAPBindingStyle( Binding binding ) throws KettleException { String style = SOAP_BINDING_DEFAULT; ExtensibilityElement soapBindingElem = findExtensibilityElement( binding, SOAP_BINDING_ELEMENT_NAME ); if ( soapBindingElem != null ) { if ( soapBindingElem instanceof SOAP12Binding ) { style = ( (SOAP12Binding) soapBindingElem ).getStyle(); } else if ( soapBindingElem instanceof SOAPBinding ) { style = ( (SOAPBinding) soapBindingElem ).getStyle(); } else { throw new KettleException( "Binding type " + soapBindingElem + " encountered. The Web Service Lookup step only supports SOAP Bindings!" ); } } return style; }
soapHeader.getMessage(), def, pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_PART, soapHeader.getPart(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_USE, soapHeader.getUse(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_ENCODING_STYLE, soapHeader.getEncodingStyle(), pw); DOMUtils.printAttribute(Constants.ATTR_NAMESPACE, soapHeader.getNamespaceURI(), pw); Boolean required = soapHeader.getRequired(); printSoapHeaderFaults(soapHeader.getSOAP12HeaderFaults(), def, pw);
soapBinding.setTransportURI(transportURI); soapBinding.setStyle(style); soapBinding.setRequired(new Boolean(requiredStr));
Boolean soapActionRequired = soapOperation.getSoapActionRequired(); String soapActionRequiredString = soapActionRequired == null ? null : soapActionRequired.toString(); soapOperation.getSoapActionURI(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_SOAP_ACTION_REQUIRED, pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_STYLE, soapOperation.getStyle(), pw); Boolean required = soapOperation.getRequired();
soapFault.setName(name); soapFault.setUse(use); soapFault.setEncodingStyle(encStyleStr); soapFault.setNamespaceURI(namespaceURI); soapFault.setRequired(new Boolean(requiredStr));
StringUtils.getNMTokens(soapBody.getParts()), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_USE, soapBody.getUse(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_ENCODING_STYLE, soapBody.getEncodingStyle(), pw); DOMUtils.printAttribute(Constants.ATTR_NAMESPACE, soapBody.getNamespaceURI(), pw); Boolean required = soapBody.getRequired();
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { SOAP12Address soapAddress = (SOAP12Address)extension; if (soapAddress != null) { String tagName = DOMUtils.getQualifiedValue(SOAP12Constants.NS_URI_SOAP12, "address", def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_LOCATION, soapAddress.getLocationURI(), pw); Boolean required = soapAddress.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
soapBinding.getStyle(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_TRANSPORT, soapBinding.getTransportURI(), pw); Boolean required = soapBinding.getRequired();
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { SOAP12Address soapAddress = (SOAP12Address)extReg.createExtension(parentType, elementType); String locationURI = DOMUtils.getAttribute(el, Constants.ATTR_LOCATION); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (locationURI != null) { soapAddress.setLocationURI(locationURI); } if (requiredStr != null) { soapAddress.setRequired(new Boolean(requiredStr)); } return soapAddress; } }
soapBody.setParts(StringUtils.parseNMTokens(partsStr)); soapBody.setUse(use); soapBody.setEncodingStyle(encStyleStr); soapBody.setNamespaceURI(namespaceURI); soapBody.setRequired(new Boolean(requiredStr));
if (soapActionURI != null) soapOperation.setSoapActionURI(soapActionURI); soapOperation.setSoapActionRequired(soapActionRequired); soapOperation.setStyle(style); soapOperation.setRequired(new Boolean(requiredStr));
soapHeader.setMessage(message); soapHeader.setPart(part); soapHeader.setUse(use); soapHeader.setEncodingStyle(encStyleStr); soapHeader.setNamespaceURI(namespaceURI); soapHeader.setRequired(new Boolean(requiredStr)); soapHeader.addSOAP12HeaderFault( parseSoapHeaderFault(SOAP12Header.class, SOAP12Constants.Q_ELEM_SOAP_HEADER_FAULT,
DOMUtils.printAttribute(Constants.ATTR_NAME, soapFault.getName(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_USE, soapFault.getUse(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_ENCODING_STYLE, soapFault.getEncodingStyle(), pw); DOMUtils.printAttribute(Constants.ATTR_NAMESPACE, soapFault.getNamespaceURI(), pw); Boolean required = soapFault.getRequired();
soapHeaderFault.setMessage(message); soapHeaderFault.setPart(part); soapHeaderFault.setUse(use); soapHeaderFault.setEncodingStyle(encStyleStr); soapHeaderFault.setNamespaceURI(namespaceURI); soapHeaderFault.setRequired(new Boolean(requiredStr));
soapHeaderFault.getMessage(), def, pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_PART, soapHeaderFault.getPart(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_USE, soapHeaderFault.getUse(), pw); DOMUtils.printAttribute(SOAP12Constants.ATTR_ENCODING_STYLE, soapHeaderFault.getEncodingStyle(), pw); DOMUtils.printAttribute(Constants.ATTR_NAMESPACE, soapHeaderFault.getNamespaceURI(), pw); Boolean required = soapHeaderFault.getRequired();
/** * Called after the {@link javax.wsdl.extensions.soap.SOAPBody} has been created. * * <p>Default implementation sets the use style to {@code "literal"}. Subclasses can override this behavior. * * @param soapBody the WSDL4J {@code SOAPBody} * @throws javax.wsdl.WSDLException in case of errors * @see javax.wsdl.extensions.soap.SOAPBody#setUse(String) */ protected void populateSoapBody(SOAP12Body soapBody) throws WSDLException { soapBody.setUse("literal"); }
for ( ExtensibilityElement element : headers ) { if ( element instanceof SOAP12Header ) { headerSet.add( ( (SOAP12Header) element ).getPart() ); } else { headerSet.add( ( (SOAPHeader) element ).getPart() );
address = ((AddressType)e).getLocation(); } else if (e instanceof SOAP12Address) { address = ((SOAP12Address)e).getLocationURI(); } else if (e instanceof SOAPAddress) { address = ((SOAPAddress)e).getLocationURI();