You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/05/31 18:59:33 UTC
svn commit: r179237 - in /incubator/beehive/trunk:
system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
wsm/src/runtime/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java
Author: ekoneil
Date: Tue May 31 09:59:31 2005
New Revision: 179237
URL: http://svn.apache.org/viewcvs?rev=179237&view=rev
Log:
Fix JIRA 772 to close the WSDL InputStream.
Also, some cleanup in XmlBeanWSDLProcessor.
BB: self
DRT: Beehive / service control pass
Modified:
incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java
Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs?rev=179237&r1=179236&r2=179237&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs Tue May 31 09:59:31 2005
@@ -95,8 +95,7 @@
boolean initialized = false;
- public ServiceControlImpl() {
- }
+ public ServiceControlImpl() {}
/**
* @param method
@@ -105,29 +104,33 @@
*/
public Object invoke(Method method, Object[] args)
throws NoSuchMethodException, Exception {
- logger.debug("invoke method: " + method.getName());
+
+ assert method != null;
+
+ logger.debug("invoke method: " + method.getName());
initialize();
String operationName = method.getName();
String alternateOperationName = getAlternateOperationName(method);
if (null != alternateOperationName)
operationName = alternateOperationName;
- BeehiveWsMethodMetadata wmm = findMethodInOM(method, operationName);
+
+ BeehiveWsMethodMetadata wmm = findMethodInOM(method, operationName);
Call call = buildCallObject(method, wmm);
Object[] callArgs = prepareArgsForSend(method, wmm, args);
- // // Invoke the operation
+
Object res = call.invoke(callArgs);
fillHolders(method, wmm, call, args);
return res;
-
}
// create a new copy of the args where holders value have been extracted.
// ignore the out values
private Object[] prepareArgsForSend(Method method,
- BeehiveWsMethodMetadata wmm, Object[] args) {
+ BeehiveWsMethodMetadata wmm,
+ Object[] args) {
ArrayList argsList = new ArrayList();
Class[] methodParameterTypes = method.getParameterTypes();
@@ -139,8 +142,9 @@
BeehiveWsParameterMetadata nxtParamMetaData = it.next();
if (nxtParamMetaData.getWpMode() == WebParam.Mode.OUT)
continue; // don't send OUT parameters.
- if ((nxtParamMetaData.getWpMode() == WebParam.Mode.INOUT)
- && Holder.class.isAssignableFrom(javaTypeFromClass)) {
+
+ if ((nxtParamMetaData.getWpMode() == WebParam.Mode.INOUT)
+ && Holder.class.isAssignableFrom(javaTypeFromClass)) {
try {
Holder holder = (Holder) args[i];
Field valueField = holder.getClass().getField("value");
@@ -161,16 +165,19 @@
}
// fill the hodlers in the argument array with the result of the call
- private void fillHolders(Method method, BeehiveWsMethodMetadata wmm,
- Call call, Object[] args) {
+ private void fillHolders(Method method,
+ BeehiveWsMethodMetadata wmm,
+ Call call,
+ Object[] args) {
Map outParam = call.getOutputParams();
if (outParam.isEmpty())
return;
- for (Object nxtOutParamKey : outParam.keySet()) {
+
+ for (Object nxtOutParamKey : outParam.keySet()) {
logger.info("Got outparam: " + nxtOutParamKey + " value: "
- + outParam.get(nxtOutParamKey)
- + " Stuff this into the holders");
+ + outParam.get(nxtOutParamKey)
+ + " Stuff this into the holders");
}
Class[] methodParameterTypes = method.getParameterTypes();
@@ -179,12 +186,13 @@
for (int i = 0; i < methodParameterTypes.length; i++) {
Class javaTypeFromClass = methodParameterTypes[i];
BeehiveWsParameterMetadata nxtParamMetaData = it.next();
+
if ((nxtParamMetaData.getWpMode() == WebParam.Mode.INOUT || nxtParamMetaData
- .getWpMode() == WebParam.Mode.OUT)
- && Holder.class.isAssignableFrom(javaTypeFromClass)) {
- try {
- logger.info("Fill the holder object: "
- + nxtParamMetaData.getWpName());
+ .getWpMode() == WebParam.Mode.OUT)
+ && Holder.class.isAssignableFrom(javaTypeFromClass)) {
+
+ try {
+ logger.info("Fill the holder object: " + nxtParamMetaData.getWpName());
Holder holder = (Holder) args[i];
Object value = null; // find the value, only check for
// localpart of the name, as the
@@ -192,19 +200,18 @@
// may not be filled
boolean hasReturnValue = false;
for (Object nxtOutParamKey : outParam.keySet()) {
- if (((QName) nxtOutParamKey).getLocalPart().equals(
- nxtParamMetaData.getWpName())) {
+ if (((QName) nxtOutParamKey).getLocalPart().equals(nxtParamMetaData.getWpName())) {
value = outParam.get(nxtOutParamKey);
hasReturnValue = true;
break;
}
}
+
if (hasReturnValue)
stuffHolderValue(holder, value);
+
} catch (Exception e) {
- throw new RuntimeException(
- "failed in getting holder value for: "
- + nxtParamMetaData.getWpName());
+ throw new RuntimeException("Failed in getting holder value for: " + nxtParamMetaData.getWpName());
}
} else {
@@ -223,7 +230,6 @@
* @param wmm
* @return
* @throws ServiceException
- * @throws NoSuchMethodException
* @throws Exception
*/
private Call buildCallObject(Method method, BeehiveWsMethodMetadata wmm)
@@ -241,8 +247,9 @@
if (getPassword() != null) {
call.setProperty(Call.PASSWORD_PROPERTY, getPassword());
}
- call.setOperationName(new javax.xml.namespace.QName(mWSTM
- .getWsTargetNamespace(), wmm.getWmOperationName()));
+ call.setOperationName(
+ new javax.xml.namespace.QName(mWSTM.getWsTargetNamespace(), wmm.getWmOperationName()));
+
// The target endpoint
logger.debug("endpoint: " + getEndPoint().toExternalForm());
call.setTargetEndpointAddress(getEndPoint().toExternalForm());
@@ -266,11 +273,11 @@
style = "rpc";
else
throw new RuntimeException("Ivalid Binding style: " + omStyle);
+
logger.debug("Call style: " + style);
call.setProperty(Call.OPERATION_STYLE_PROPERTY, style);
- if ("rpc".equals(style)
- && SOAPBinding.Use.LITERAL == mWSTM.getSoapBinding().getUse()) {
+ if ("rpc".equals(style) && SOAPBinding.Use.LITERAL == mWSTM.getSoapBinding().getUse()) {
((org.apache.axis.client.Call) call).setOperationUse(Use.LITERAL);
}
// walk the argument meta data list, register type of parameters, add
@@ -315,7 +322,7 @@
QName registeredTypeQName;
if ((mode == ParameterMode.OUT || mode == ParameterMode.INOUT)
- && Holder.class.isAssignableFrom(javaTypeFromClass)) {
+ && Holder.class.isAssignableFrom(javaTypeFromClass)) {
javaTypeFromClass = TypeRegistrar.getHoldersValueClass(genericMethodParamTypes[i]);
}
@@ -329,18 +336,17 @@
// TODO: addParameterAsHeader is Axis specific, later abstract
// out Axis from this implementation
logger.debug("Argument: " + nxtArgMetaData.getWpName()
- + " in method: " + method.getName()
- + " is send as soap header");
+ + " in method: " + method.getName()
+ + " is send as soap header");
((org.apache.axis.client.Call) call).addParameterAsHeader(
- new QName(nxtArgMetaData.getWpTargetNamespace(),
- nxtArgMetaData.getWpName()),
- registeredTypeQName, javaTypeFromClass, mode, mode);
- } else {
- logger.debug("Argument: " + nxtArgMetaData.getWpName()
- + " in method: " + method.getName()
- + " is send in the soap body");
- call.addParameter(nxtArgMetaData.getWpName(),
- registeredTypeQName, javaTypeFromClass, mode);
+ new QName(nxtArgMetaData.getWpTargetNamespace(),
+ nxtArgMetaData.getWpName()),
+ registeredTypeQName, javaTypeFromClass, mode, mode);
+ } else {
+ logger.debug("Argument: " + nxtArgMetaData.getWpName()
+ + " in method: " + method.getName()
+ + " is send in the soap body");
+ call.addParameter(nxtArgMetaData.getWpName(), registeredTypeQName, javaTypeFromClass, mode);
}
}
// register the return type
@@ -412,25 +418,30 @@
if (initialized)
return;
- XmlBeanWSDLProcessor wsdlProcessor;
- ServiceControl.WSDL wsdl = (ServiceControl.WSDL) cbContext.getControlPropertySet(ServiceControl.WSDL.class);
+ XmlBeanWSDLProcessor wsdlProcessor = null;
+ ServiceControl.WSDL wsdl = (ServiceControl.WSDL)cbContext.getControlPropertySet(ServiceControl.WSDL.class);
- if (wsdl != null) {
- logger.debug("read wsdl from: " + wsdl.path());
- InputStream wsdlStream = getWSDLStream(wsdl.path());
+ if(wsdl == null)
+ throw new RuntimeException("No WSDL annotation found.");
- if (wsdlStream != null) {
- wsdlProcessor = new XmlBeanWSDLProcessor(wsdlStream);
- } else {
- throw new RuntimeException(
- "No WSDL found at the provided path: " + wsdl.path());
- }
- } else {
- throw new RuntimeException("No WSDL annotation found.");
- }
+ InputStream is = null;
+ try {
+ logger.debug("read wsdl from: " + wsdl.path());
+ is = getWSDLStream(wsdl.path());
+
+ if(is != null)
+ wsdlProcessor = new XmlBeanWSDLProcessor(is);
+ else throw new RuntimeException("No WSDL found at the provided path: " + wsdl.path());
+ }
+ finally {
+ if(is != null)
+ is.close();
+ }
- ServiceFactory factory = ServiceFactory.newInstance();
+ assert wsdlProcessor != null : "Did not find a valid WSDL processor";
+
+ ServiceFactory factory = ServiceFactory.newInstance();
service = factory.createService(wsdlProcessor.getServiceName());
@@ -439,15 +450,15 @@
TypeMapping tm = service.getTypeMappingRegistry().getDefaultTypeMapping();
lookupService = new SystemTypeLookupService();
- registrar = new AxisTypeRegistrar(
- (org.apache.axis.encoding.TypeMapping) tm,
- lookupService);
+ registrar = new AxisTypeRegistrar((org.apache.axis.encoding.TypeMapping)tm, lookupService);
configureEndPoint();
mWSTM = wsdlProcessor.getObjectModel(lookupService);
- portType = new QName(mWSTM.getWsTargetNamespace(), mWSTM.getWsName()); // porttype
+ // porttype
+ portType = new QName(mWSTM.getWsTargetNamespace(), mWSTM.getWsName());
+
// name
service.getHandlerRegistry().getHandlerChain(portType).add(hInfo);
@@ -466,8 +477,14 @@
return null;
}
- private InputStream getWSDLStream(String pathToWSDL) throws Exception {
- File f = null;
+ private InputStream getWSDLStream(String pathToWSDL)
+ throws Exception {
+
+ /* Note, due to the architectural arrangement of the service control, the caller *must* close
+ this InputStream. Otherwise, it will leak.
+ */
+
+ File f = null;
URL url = null;
try {
InputStream wsdlStream = null;
@@ -477,19 +494,7 @@
wsdlStream = url.openStream();
}
else { // it is a local file name
- wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
-
-// ServletContext servletContext = cbContext.getService(
-// ServletContext.class, null);
-// if (servletContext != null) {
-// wsdlStream = servletContext.getResourceAsStream(pathToWSDL);
-// } else {
-// }
-//
-// if (wsdlStream == null) {
-// wsdlStream = cbContext.getControlInterface()
-// .getResourceAsStream(pathToWSDL);
-// }
+ wsdlStream = cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
if (wsdlStream == null) {
logger.info("Failed to load the wsdl from context, will try classloader!");
@@ -521,7 +526,10 @@
(ServiceControl.Location)cbContext.getControlPropertySet(ServiceControl.Location.class);
if (location != null) {
- setEndPoint(new URL(location.urls()[0]));
+ assert location.urls() != null;
+ assert location.urls().length > 0;
+
+ setEndPoint(new URL(location.urls()[0]));
} else {
throw new RuntimeException("No Location annotation found.");
}
@@ -620,8 +628,7 @@
}
/**
- * @param wsdlPort
- * The wsdlPort to set.
+ * @param wsdlPort The wsdlPort to set.
*/
public void setWsdlPort(QName wsdlPort) {
this.wsdlPort = wsdlPort;
Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java?rev=179237&r1=179236&r2=179237&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java (original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/wsdl/XmlBeanWSDLProcessor.java Tue May 31 09:59:31 2005
@@ -22,24 +22,17 @@
import java.io.InputStream;
import java.io.IOException;
import java.lang.reflect.Array;
-import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import javax.jws.WebParam;
import javax.jws.soap.SOAPBinding;
import javax.xml.namespace.QName;
import org.apache.beehive.wsm.databinding.BindingLookupService;
-import org.apache.beehive.wsm.util.TypeMappingUtil;
-import org.apache.beehive.wsm.util.XmlBeanTypeMappingUtil;
-import org.apache.beehive.wsm.wsdl.WSDLProcessor;
-
import org.apache.beehive.wsm.model.BeehiveWsSOAPBindingInfo;
import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
@@ -49,9 +42,6 @@
import org.apache.beehive.wsm.model.jsr181.Jsr181TypeMetadataImpl;
import org.apache.beehive.wsm.model.jsr181.SOAPBindingInfo;
import org.apache.xmlbeans.SchemaType;
-import org.apache.xmlbeans.SchemaTypeLoader;
-import org.apache.xmlbeans.XmlBeans;
-import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
import org.xmlsoap.schemas.wsdl.DefinitionsDocument;
@@ -67,14 +57,12 @@
import org.xmlsoap.schemas.wsdl.TPortType;
import org.xmlsoap.schemas.wsdl.TService;
import org.xmlsoap.schemas.wsdl.TTypes;
-import org.xmlsoap.schemas.wsdl.soap.HeaderDocument;
import org.xmlsoap.schemas.wsdl.soap.TStyleChoice;
import org.xmlsoap.schemas.wsdl.soap.UseChoice;
import org.apache.xmlbeans.impl.xb.xsdschema.Element;
import org.apache.xmlbeans.impl.xb.xsdschema.Group;
import org.apache.xmlbeans.impl.xb.xsdschema.ComplexType;
-import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument.Schema;
/*******************************************************************************
@@ -88,12 +76,10 @@
private BindingLookupService lookupService;
DefinitionsDocument defDoc;
-
-
- public QName getServiceName() {
+ public QName getServiceName() {
TService[] services = defDoc.getDefinitions().getServiceArray();
return new QName(services[0].getName());
- }
+ }
public static final String TRANSPORT = "http://schemas.xmlsoap.org/soap/http";
@@ -105,7 +91,8 @@
public BeehiveWsTypeMetadata getObjectModel(BindingLookupService lookupService)
throws Exception {
- this.lookupService = lookupService;
+
+ this.lookupService = lookupService;
BeehiveWsTypeMetadata wsm = new Jsr181TypeMetadataImpl();
Map<String, BeehiveWsMethodMetadata> methodMap = new HashMap<String, BeehiveWsMethodMetadata>();
@@ -151,10 +138,12 @@
return wsm;
}
-
- private void processTOperation(TOperation op, BeehiveWsTypeMetadata wsm,
- Map<String, BeehiveWsMethodMetadata> methodMap,
- Map<String, TPart[]> messageMap, TBinding tBind, TTypes types) throws Exception {
+ private void processTOperation(TOperation op,
+ BeehiveWsTypeMetadata wsm,
+ Map<String, BeehiveWsMethodMetadata> methodMap,
+ Map<String, TPart[]> messageMap,
+ TBinding tBind, TTypes types)
+ throws Exception {
String opName = op.getName();
TParam outputParam = op.getOutput();
@@ -282,7 +271,6 @@
}
}
-
/*
* Collection<BeehiveWsParameterMetadata> params = wmm.getParams();
* System.out.println("adding method " + wmm.getWmOperationName() + "
@@ -293,11 +281,15 @@
* System.out.println(wpm.getWpName() + ':' + wpm.getJavaType()); }
*/
wsm.addMethod(wmm);
-
}
- private BeehiveWsParameterMetadata[] processParameters(String operationName, TPart[] messageParts, TBinding tBind,
- TTypes types, Map<String, TPart[]> messageMap, BeehiveWsTypeMetadata wsm, boolean isOutputParameters) {
+ private BeehiveWsParameterMetadata[] processParameters(String operationName,
+ TPart[] messageParts,
+ TBinding tBind,
+ TTypes types,
+ Map<String, TPart[]> messageMap,
+ BeehiveWsTypeMetadata wsm,
+ boolean isOutputParameters) {
// When you have parts of the message in the header, you would have multiple wsdl:part. In case of
// wrapped we would have JUST ONE part that has name="parameters"
@@ -435,11 +427,10 @@
}
-
-private Class findClassForQname(QName element) {
- //return new XmlBeanTypeMappingUtil().q2Class(element);
- return lookupService.qname2class(element);
-}
+ private Class findClassForQname(QName element) {
+ //return new XmlBeanTypeMappingUtil().q2Class(element);
+ return lookupService.qname2class(element);
+ }
// To detect the wrapped walk the message parts, if there is a part that has name="parameters"
// or if there is a part that its element name is the same as the operation name, return true.
@@ -447,7 +438,7 @@
// if a part is on the header or is a MIME. The header and MIME parts should not effect the wrapped
// determination.
// TODO: the logic here may not work with MIME types, verify later.
- private boolean isWrapped( String operationName, TPart[] messagePart, TBinding tBind,boolean isOutputParameters) {
+ private boolean isWrapped( String operationName, TPart[] messagePart, TBinding tBind, boolean isOutputParameters) {
for( TPart message : messagePart) {
if( !message.isSetElement()) return false; // RPC-Encoded
if( true == unwrapMessagePart(operationName, isOutputParameters, message)) return true;
@@ -467,12 +458,10 @@
return false;
}
/**
- * @param paramList
- * @param s
+ * @param targetNamespace
* @param el
*/
- private BeehiveWsParameterMetadata elementToParamMetaData(
- String targetNamespace, Element el) {
+ private BeehiveWsParameterMetadata elementToParamMetaData(String targetNamespace, Element el) {
BeehiveWsParameterMetadata wpm = new Jsr181ParameterMetadataImpl();
// FIXME
// jcolwell@bea.com
@@ -518,16 +507,7 @@
return wpm;
}
- /**
- * @param types
- */
- private void doUnknownTypes(TTypes types) {
- // sections.
-
- }
-
- private void processTBinding(TBinding tBind, BeehiveWsTypeMetadata wsm)
- throws IllegalAccessException, NoSuchFieldException {
+ private void processTBinding(TBinding tBind, BeehiveWsTypeMetadata wsm) {
org.xmlsoap.schemas.wsdl.soap.TBinding[] soapBinding = getSOAPBinding(tBind);
BeehiveWsSOAPBindingInfo soapInfo = new SOAPBindingInfo();
@@ -540,16 +520,15 @@
}
private void processTBindingOperation(TBinding tBind,
- BeehiveWsTypeMetadata wsm,
- Map<String, BeehiveWsMethodMetadata> methodMap)
- throws IllegalAccessException, NoSuchFieldException {
+ BeehiveWsTypeMetadata wsm,
+ Map<String, BeehiveWsMethodMetadata> methodMap)
+ throws IllegalAccessException, NoSuchFieldException {
TBindingOperation[] tBops = tBind.getOperationArray();
for (TBindingOperation tBop : tBops) {
BeehiveWsMethodMetadata wmm = methodMap.get(tBop.getName());
if (wmm == null)
- throw new RuntimeException("Invalid method name: "
- + tBop.getName());
+ throw new RuntimeException("Invalid method name: " + tBop.getName());
org.xmlsoap.schemas.wsdl.soap.TOperation[] soapOperations = getSOAPOperations(tBop);
if (soapOperations != null && soapOperations.length > 0) {
wmm.setWmAction(soapOperations[0].getSoapAction());
@@ -582,24 +561,18 @@
/**
* @param tbMsg
- * @throws IllegalAccessException
- * @throws NoSuchFieldException
*/
- private void setSoapHeaders(BeehiveWsMethodMetadata wmm,
- TBindingOperationMessage tbMsg) throws IllegalAccessException,
- NoSuchFieldException {
+ private void setSoapHeaders(BeehiveWsMethodMetadata wmm, TBindingOperationMessage tbMsg) {
if(null == tbMsg) return;
// get the header
org.xmlsoap.schemas.wsdl.soap.THeader[] soapHeaders = getSOAPHeader(tbMsg);
- if (soapHeaders != null && soapHeaders.length > 0) { // there are method arguments that are
- // in the header
+ if (soapHeaders != null && soapHeaders.length > 0) {
+ // there are method arguments that are in the header
for (org.xmlsoap.schemas.wsdl.soap.THeader nxtHeader : soapHeaders) {
String part = nxtHeader.getPart();
if (part == null)
- throw new RuntimeException(
- "Missing part attribute in soap:header method: "
- + tbMsg.getName());
+ throw new RuntimeException("Missing part attribute in soap:header method: " + tbMsg.getName());
BeehiveWsParameterMetadata argument = wmm.findParam(part);
if(argument == null) throw new RuntimeException ("Couldn't find part name: " + part + " in method " + wmm.getJavaMethodName());
argument.setWpHeader(true);
@@ -608,13 +581,6 @@
}
}
-
-
-// public BeehiveWsTypeMetadata loadWebServiceMetadataFromWSDL(String wsdlLocation)
-// throws Exception {
-// return toWebServiceMetadata(parseWSDL(wsdlLocation));
-// }
-
public static DefinitionsDocument parseWSDL(String wsdlLocation)
throws IOException, MalformedURLException, XmlException {
if (wsdlLocation.indexOf("://") > 2) {
@@ -629,8 +595,8 @@
return DefinitionsDocument.Factory.parse(wsdlFile);
}
- public static DefinitionsDocument parseWSDL(URL wsdlURL) throws IOException,
- MalformedURLException, XmlException {
+ public static DefinitionsDocument parseWSDL(URL wsdlURL)
+ throws IOException, MalformedURLException, XmlException {
return DefinitionsDocument.Factory.parse(wsdlURL);
}
@@ -639,15 +605,13 @@
return DefinitionsDocument.Factory.parse(wsdlStream);
}
- public static org.xmlsoap.schemas.wsdl.soap.TOperation[] getSOAPOperations(
- TBindingOperation bo) throws IllegalAccessException, NoSuchFieldException {
+ public static org.xmlsoap.schemas.wsdl.soap.TOperation[] getSOAPOperations(TBindingOperation bo)
+ throws IllegalAccessException, NoSuchFieldException {
return selectChildren(bo, org.xmlsoap.schemas.wsdl.soap.TOperation.class);
}
- public static org.xmlsoap.schemas.wsdl.soap.TBinding[] getSOAPBinding(
- TBinding b) throws IllegalAccessException, NoSuchFieldException {
- XmlObject[] kids = b.selectChildren(new QName(
- "http://schemas.xmlsoap.org/wsdl/soap/", "binding"));
+ public static org.xmlsoap.schemas.wsdl.soap.TBinding[] getSOAPBinding(TBinding b) {
+ XmlObject[] kids = b.selectChildren(new QName("http://schemas.xmlsoap.org/wsdl/soap/", "binding"));
org.xmlsoap.schemas.wsdl.soap.TBinding[] res = new org.xmlsoap.schemas.wsdl.soap.TBinding[kids.length];
for (int i = 0; i < kids.length; i++)
@@ -656,11 +620,8 @@
return res;
}
- public static org.xmlsoap.schemas.wsdl.soap.TBody[] getSOAPBody(
- TBindingOperationMessage bom) throws IllegalAccessException,
- NoSuchFieldException {
- XmlObject[] kids = bom.selectChildren(new QName(
- "http://schemas.xmlsoap.org/wsdl/soap/", "body"));
+ public static org.xmlsoap.schemas.wsdl.soap.TBody[] getSOAPBody(TBindingOperationMessage bom) {
+ XmlObject[] kids = bom.selectChildren(new QName("http://schemas.xmlsoap.org/wsdl/soap/", "body"));
org.xmlsoap.schemas.wsdl.soap.TBody[] res = new org.xmlsoap.schemas.wsdl.soap.TBody[kids.length];
for (int i = 0; i < kids.length; i++)
@@ -669,11 +630,8 @@
return res;
}
- public static org.xmlsoap.schemas.wsdl.soap.THeader[] getSOAPHeader(
- TBindingOperationMessage bom) throws IllegalAccessException,
- NoSuchFieldException {
- XmlObject[] kids = bom.selectChildren(new QName(
- "http://schemas.xmlsoap.org/wsdl/soap/", "header"));
+ public static org.xmlsoap.schemas.wsdl.soap.THeader[] getSOAPHeader(TBindingOperationMessage bom) {
+ XmlObject[] kids = bom.selectChildren(new QName("http://schemas.xmlsoap.org/wsdl/soap/", "header"));
org.xmlsoap.schemas.wsdl.soap.THeader[] res = new org.xmlsoap.schemas.wsdl.soap.THeader[kids.length];
for (int i = 0; i < kids.length; i++)