Java源码示例:com.sun.xml.internal.ws.api.policy.PolicyResolverFactory
示例1
@Override
public void start(final WSDLGenExtnContext context) {
LOGGER.entering();
try {
this.seiModel = context.getModel();
final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
for (int i = 0; i < policyMapConfigurators.length; i++) {
extenders[i] = PolicyMapExtender.createPolicyMapExtender();
}
// Read policy config file
policyMap = PolicyResolverFactory.create().resolve(
new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
if (policyMap == null) {
LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
}
final WSBinding binding = context.getBinding();
try {
final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
for (int i = 0; i < policyMapConfigurators.length; i++) {
policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
extenders[i].disconnect();
}
PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
} catch (PolicyException e) {
throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
}
final TypedXmlWriter root = context.getRoot();
root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
} finally {
LOGGER.exiting();
}
}
示例2
public PolicyMap createPolicyMap() {
PolicyMap map;
if(portModel != null) {
map = portModel.getOwner().getParent().getPolicyMap();
} else {
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
}
//still map is null, create a empty map
if(map == null)
map = PolicyMap.createPolicyMap(null);
return map;
}
示例3
@Override
public void start(final WSDLGenExtnContext context) {
LOGGER.entering();
try {
this.seiModel = context.getModel();
final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
for (int i = 0; i < policyMapConfigurators.length; i++) {
extenders[i] = PolicyMapExtender.createPolicyMapExtender();
}
// Read policy config file
policyMap = PolicyResolverFactory.create().resolve(
new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
if (policyMap == null) {
LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
}
final WSBinding binding = context.getBinding();
try {
final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
for (int i = 0; i < policyMapConfigurators.length; i++) {
policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
extenders[i].disconnect();
}
PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
} catch (PolicyException e) {
throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
}
final TypedXmlWriter root = context.getRoot();
root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
} finally {
LOGGER.exiting();
}
}
示例4
public PolicyMap createPolicyMap() {
PolicyMap map;
if(portModel != null) {
map = portModel.getOwner().getParent().getPolicyMap();
} else {
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
}
//still map is null, create a empty map
if(map == null)
map = PolicyMap.createPolicyMap(null);
return map;
}
示例5
@Override
public void start(final WSDLGenExtnContext context) {
LOGGER.entering();
try {
this.seiModel = context.getModel();
final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
for (int i = 0; i < policyMapConfigurators.length; i++) {
extenders[i] = PolicyMapExtender.createPolicyMapExtender();
}
// Read policy config file
policyMap = PolicyResolverFactory.create().resolve(
new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
if (policyMap == null) {
LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
}
final WSBinding binding = context.getBinding();
try {
final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
for (int i = 0; i < policyMapConfigurators.length; i++) {
policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
extenders[i].disconnect();
}
PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
} catch (PolicyException e) {
throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
}
final TypedXmlWriter root = context.getRoot();
root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
} finally {
LOGGER.exiting();
}
}
示例6
public PolicyMap createPolicyMap() {
PolicyMap map;
if(portModel != null) {
map = portModel.getOwner().getParent().getPolicyMap();
} else {
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
}
//still map is null, create a empty map
if(map == null)
map = PolicyMap.createPolicyMap(null);
return map;
}
示例7
@Override
public void start(final WSDLGenExtnContext context) {
LOGGER.entering();
try {
this.seiModel = context.getModel();
final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
for (int i = 0; i < policyMapConfigurators.length; i++) {
extenders[i] = PolicyMapExtender.createPolicyMapExtender();
}
// Read policy config file
policyMap = PolicyResolverFactory.create().resolve(
new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
if (policyMap == null) {
LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
}
final WSBinding binding = context.getBinding();
try {
final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
for (int i = 0; i < policyMapConfigurators.length; i++) {
policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
extenders[i].disconnect();
}
PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
} catch (PolicyException e) {
throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
}
final TypedXmlWriter root = context.getRoot();
root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
} finally {
LOGGER.exiting();
}
}
示例8
public PolicyMap createPolicyMap() {
PolicyMap map;
if(portModel != null) {
map = portModel.getOwner().getParent().getPolicyMap();
} else {
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
}
//still map is null, create a empty map
if(map == null)
map = PolicyMap.createPolicyMap(null);
return map;
}
示例9
@Override
public void start(final WSDLGenExtnContext context) {
LOGGER.entering();
try {
this.seiModel = context.getModel();
final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
for (int i = 0; i < policyMapConfigurators.length; i++) {
extenders[i] = PolicyMapExtender.createPolicyMapExtender();
}
// Read policy config file
policyMap = PolicyResolverFactory.create().resolve(
new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
if (policyMap == null) {
LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
}
final WSBinding binding = context.getBinding();
try {
final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
for (int i = 0; i < policyMapConfigurators.length; i++) {
policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
extenders[i].disconnect();
}
PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
} catch (PolicyException e) {
throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
}
final TypedXmlWriter root = context.getRoot();
root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
} finally {
LOGGER.exiting();
}
}
示例10
public PolicyMap createPolicyMap() {
PolicyMap map;
if(portModel != null) {
map = portModel.getOwner().getParent().getPolicyMap();
} else {
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
}
//still map is null, create a empty map
if(map == null)
map = PolicyMap.createPolicyMap(null);
return map;
}
示例11
@Override
public void start(final WSDLGenExtnContext context) {
LOGGER.entering();
try {
this.seiModel = context.getModel();
final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
for (int i = 0; i < policyMapConfigurators.length; i++) {
extenders[i] = PolicyMapExtender.createPolicyMapExtender();
}
// Read policy config file
policyMap = PolicyResolverFactory.create().resolve(
new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
if (policyMap == null) {
LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
}
final WSBinding binding = context.getBinding();
try {
final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
for (int i = 0; i < policyMapConfigurators.length; i++) {
policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
extenders[i].disconnect();
}
PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
} catch (PolicyException e) {
throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
}
final TypedXmlWriter root = context.getRoot();
root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
} finally {
LOGGER.exiting();
}
}
示例12
public PolicyMap createPolicyMap() {
PolicyMap map;
if(portModel != null) {
map = portModel.getOwner().getParent().getPolicyMap();
} else {
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
}
//still map is null, create a empty map
if(map == null)
map = PolicyMap.createPolicyMap(null);
return map;
}
示例13
@Override
public void start(final WSDLGenExtnContext context) {
LOGGER.entering();
try {
this.seiModel = context.getModel();
final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
for (int i = 0; i < policyMapConfigurators.length; i++) {
extenders[i] = PolicyMapExtender.createPolicyMapExtender();
}
// Read policy config file
policyMap = PolicyResolverFactory.create().resolve(
new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
if (policyMap == null) {
LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
}
final WSBinding binding = context.getBinding();
try {
final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
for (int i = 0; i < policyMapConfigurators.length; i++) {
policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
extenders[i].disconnect();
}
PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
} catch (PolicyException e) {
throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
}
final TypedXmlWriter root = context.getRoot();
root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
} finally {
LOGGER.exiting();
}
}
示例14
public PolicyMap createPolicyMap() {
PolicyMap map;
if(portModel != null) {
map = portModel.getOwner().getParent().getPolicyMap();
} else {
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
}
//still map is null, create a empty map
if(map == null)
map = PolicyMap.createPolicyMap(null);
return map;
}
示例15
@Override
public void start(final WSDLGenExtnContext context) {
LOGGER.entering();
try {
this.seiModel = context.getModel();
final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
for (int i = 0; i < policyMapConfigurators.length; i++) {
extenders[i] = PolicyMapExtender.createPolicyMapExtender();
}
// Read policy config file
policyMap = PolicyResolverFactory.create().resolve(
new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
if (policyMap == null) {
LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
}
final WSBinding binding = context.getBinding();
try {
final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
for (int i = 0; i < policyMapConfigurators.length; i++) {
policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
extenders[i].disconnect();
}
PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
} catch (PolicyException e) {
throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
}
final TypedXmlWriter root = context.getRoot();
root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
} finally {
LOGGER.exiting();
}
}
示例16
public PolicyMap createPolicyMap() {
PolicyMap map;
if(portModel != null) {
map = portModel.getOwner().getParent().getPolicyMap();
} else {
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
}
//still map is null, create a empty map
if(map == null)
map = PolicyMap.createPolicyMap(null);
return map;
}
示例17
/**
* Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
*
* @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
* @param resolver {@link XMLEntityResolver}, works at XML infoset level
* @param isClientSide true - its invoked on the client, false means its invoked on the server
* @param container - container in which the parser is run
* @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
* @return A {@link WSDLModel} built from the given wsdlLocation}
* @throws java.io.IOException
* @throws javax.xml.stream.XMLStreamException
* @throws org.xml.sax.SAXException
*/
public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlEntityParser, resolver, isClientSide, container, PolicyResolverFactory.create(),extensions);
}
示例18
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or <tt>wsdl</tt> parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, PolicyResolverFactory.create(),extensions);
}
示例19
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or <tt>wsdl</tt> parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container, Class serviceClass,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, serviceClass, PolicyResolverFactory.create(),extensions);
}
示例20
/**
* Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
*
* @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
* @param resolver {@link XMLEntityResolver}, works at XML infoset level
* @param isClientSide true - its invoked on the client, false means its invoked on the server
* @param container - container in which the parser is run
* @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
* @return A {@link WSDLModel} built from the given wsdlLocation}
* @throws java.io.IOException
* @throws javax.xml.stream.XMLStreamException
* @throws org.xml.sax.SAXException
*/
public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlEntityParser, resolver, isClientSide, container, PolicyResolverFactory.create(),extensions);
}
示例21
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or <tt>wsdl</tt> parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, PolicyResolverFactory.create(),extensions);
}
示例22
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or <tt>wsdl</tt> parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container, Class serviceClass,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, serviceClass, PolicyResolverFactory.create(),extensions);
}
示例23
/**
* Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
*
* @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
* @param resolver {@link XMLEntityResolver}, works at XML infoset level
* @param isClientSide true - its invoked on the client, false means its invoked on the server
* @param container - container in which the parser is run
* @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
* @return A {@link WSDLModel} built from the given wsdlLocation}
* @throws java.io.IOException
* @throws javax.xml.stream.XMLStreamException
* @throws org.xml.sax.SAXException
*/
public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlEntityParser, resolver, isClientSide, container, PolicyResolverFactory.create(),extensions);
}
示例24
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or <tt>wsdl</tt> parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, PolicyResolverFactory.create(),extensions);
}
示例25
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or <tt>wsdl</tt> parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container, Class serviceClass,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, serviceClass, PolicyResolverFactory.create(),extensions);
}
示例26
/**
* Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
*
* @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
* @param resolver {@link XMLEntityResolver}, works at XML infoset level
* @param isClientSide true - its invoked on the client, false means its invoked on the server
* @param container - container in which the parser is run
* @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
* @return A {@link WSDLModel} built from the given wsdlLocation}
* @throws java.io.IOException
* @throws javax.xml.stream.XMLStreamException
* @throws org.xml.sax.SAXException
*/
public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlEntityParser, resolver, isClientSide, container, PolicyResolverFactory.create(),extensions);
}
示例27
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or <tt>wsdl</tt> parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, PolicyResolverFactory.create(),extensions);
}
示例28
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or <tt>wsdl</tt> parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container, Class serviceClass,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, serviceClass, PolicyResolverFactory.create(),extensions);
}
示例29
/**
* Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
*
* @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
* @param resolver {@link XMLEntityResolver}, works at XML infoset level
* @param isClientSide true - its invoked on the client, false means its invoked on the server
* @param container - container in which the parser is run
* @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
* @return A {@link WSDLModel} built from the given wsdlLocation}
* @throws java.io.IOException
* @throws javax.xml.stream.XMLStreamException
* @throws org.xml.sax.SAXException
*/
public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlEntityParser, resolver, isClientSide, container, PolicyResolverFactory.create(),extensions);
}
示例30
/**
* Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
* document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
* then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
*
* @param wsdlLoc
* Either this or {@code wsdl} parameter must be given.
* Null location means the system won't be able to resolve relative references in the WSDL,
*/
public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
boolean isClientSide, Container container,
WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, PolicyResolverFactory.create(),extensions);
}