public class WSDLHelper extends Object
Created on: Jun 3, 2003
Constructor and Description |
---|
WSDLHelper(String url)
Default constructor takes a string URL
|
WSDLHelper(String url,
AuthManager auth) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildDocument()
Method is used internally to parse the InputStream and build the document
using javax.xml.parser API.
|
protected void |
close()
We try to close the connection to make sure it doesn't hang around.
|
protected void |
connect()
Method is used internally to connect to the URL.
|
String |
getBinding()
Returns the binding point for the webservice.
|
String |
getBindingHost()
Return the host in the WSDL binding address
|
String |
getBindingPath()
Return the path in the WSDL for the binding address
|
int |
getBindingPort()
Return the port for the binding address
|
Object[] |
getOperations()
Look at the bindings with soap operations and get the soap operations.
|
String |
getProtocol()
Return the protocol from the URL. this is needed, so that HTTPS works
as expected.
|
String |
getSoapAction(String key)
Return the soap action matching the operation name.
|
String |
getSoapActionName(String soapAction)
return the "wsdl method name" from a soap action
|
Object[] |
getSOAPBindings()
Method will look at the binding nodes and see if the first child is a
soap:binding.
|
URL |
getURL()
Returns the URL
|
String[] |
getWebMethods()
Get a list of the web methods as a string array.
|
Document |
getWSDLDocument()
Get the wsdl document.
|
static void |
main(String[] args)
Simple test for the class uses bidbuy.wsdl from Apache's soap driver
examples.
|
void |
parse()
Call this method to retrieve the WSDL.
|
public WSDLHelper(String url) throws MalformedURLException
url
- url to the wsdlMalformedURLException
- if url
is malformedpublic WSDLHelper(String url, AuthManager auth) throws MalformedURLException
url
- url to the wsdlauth
- AuthManager
to useMalformedURLException
- if url
is malformedpublic URL getURL()
public String getProtocol()
public String getBindingHost()
public String getBindingPath()
public int getBindingPort()
public String getBinding()
protected void connect() throws IOException
IOException
- when I/O error occursprotected void close()
protected void buildDocument() throws ParserConfigurationException, IOException, SAXException
ParserConfigurationException
- When building DocumentBuilder
failsIOException
- when reading the document failsSAXException
- when parsing the document failspublic void parse() throws WSDLException
WSDLException
- when parsing failspublic String[] getWebMethods()
public String getSoapAction(String key)
key
- name of the operationpublic Document getWSDLDocument()
public Object[] getSOAPBindings()
public Object[] getOperations()
public String getSoapActionName(String soapAction)
soapAction
- the soap actionpublic static void main(String[] args)
args
- standard arguments for a main class (not used here)Copyright © 1998-2017 Apache Software Foundation. All Rights Reserved.