1 /* |
1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
29 import com.sun.xml.internal.ws.api.BindingID; |
29 import com.sun.xml.internal.ws.api.BindingID; |
30 import com.sun.xml.internal.ws.api.WSService; |
30 import com.sun.xml.internal.ws.api.WSService; |
31 import com.sun.xml.internal.ws.api.ServiceSharedFeatureMarker; |
31 import com.sun.xml.internal.ws.api.ServiceSharedFeatureMarker; |
32 import com.sun.xml.internal.ws.api.addressing.AddressingVersion; |
32 import com.sun.xml.internal.ws.api.addressing.AddressingVersion; |
33 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; |
33 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; |
|
34 import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; |
34 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; |
35 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; |
35 import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; |
36 import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; |
36 import com.sun.xml.internal.ws.api.server.BoundEndpoint; |
37 import com.sun.xml.internal.ws.api.server.BoundEndpoint; |
37 import com.sun.xml.internal.ws.api.server.Container; |
38 import com.sun.xml.internal.ws.api.server.Container; |
38 import com.sun.xml.internal.ws.api.server.ContainerResolver; |
39 import com.sun.xml.internal.ws.api.server.ContainerResolver; |
39 import com.sun.xml.internal.ws.api.server.Module; |
40 import com.sun.xml.internal.ws.api.server.Module; |
40 import com.sun.xml.internal.ws.api.server.WSEndpoint; |
41 import com.sun.xml.internal.ws.api.server.WSEndpoint; |
41 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; |
42 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; |
42 import com.sun.xml.internal.ws.client.WSServiceDelegate; |
43 import com.sun.xml.internal.ws.client.WSServiceDelegate; |
43 import com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference; |
44 import com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference; |
44 import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; |
|
45 import com.sun.xml.internal.ws.resources.ProviderApiMessages; |
45 import com.sun.xml.internal.ws.resources.ProviderApiMessages; |
46 import com.sun.xml.internal.ws.transport.http.server.EndpointImpl; |
46 import com.sun.xml.internal.ws.transport.http.server.EndpointImpl; |
47 import com.sun.xml.internal.ws.util.ServiceFinder; |
47 import com.sun.xml.internal.ws.util.ServiceFinder; |
48 import com.sun.xml.internal.ws.util.xml.XmlUtil; |
48 import com.sun.xml.internal.ws.util.xml.XmlUtil; |
49 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; |
49 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; |
|
50 |
50 import org.w3c.dom.Element; |
51 import org.w3c.dom.Element; |
51 import org.xml.sax.EntityResolver; |
52 import org.xml.sax.EntityResolver; |
52 |
53 |
53 import javax.xml.bind.JAXBContext; |
54 import javax.xml.bind.JAXBContext; |
54 import javax.xml.bind.JAXBException; |
55 import javax.xml.bind.JAXBException; |
63 import javax.xml.ws.WebServiceFeature; |
64 import javax.xml.ws.WebServiceFeature; |
64 import javax.xml.ws.spi.Provider; |
65 import javax.xml.ws.spi.Provider; |
65 import javax.xml.ws.spi.ServiceDelegate; |
66 import javax.xml.ws.spi.ServiceDelegate; |
66 import javax.xml.ws.spi.Invoker; |
67 import javax.xml.ws.spi.Invoker; |
67 import javax.xml.ws.wsaddressing.W3CEndpointReference; |
68 import javax.xml.ws.wsaddressing.W3CEndpointReference; |
|
69 |
68 import java.net.URL; |
70 import java.net.URL; |
69 import java.security.AccessController; |
71 import java.security.AccessController; |
70 import java.security.PrivilegedAction; |
72 import java.security.PrivilegedAction; |
71 import java.util.List; |
73 import java.util.List; |
72 import java.util.Map; |
74 import java.util.Map; |
215 if (wsdlDocumentLocation != null) { |
217 if (wsdlDocumentLocation != null) { |
216 try { |
218 try { |
217 EntityResolver er = XmlUtil.createDefaultCatalogResolver(); |
219 EntityResolver er = XmlUtil.createDefaultCatalogResolver(); |
218 |
220 |
219 URL wsdlLoc = new URL(wsdlDocumentLocation); |
221 URL wsdlLoc = new URL(wsdlDocumentLocation); |
220 WSDLModelImpl wsdlDoc = RuntimeWSDLParser.parse(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), er, |
222 WSDLModel wsdlDoc = RuntimeWSDLParser.parse(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), er, |
221 true, container, ServiceFinder.find(WSDLParserExtension.class).toArray()); |
223 true, container, ServiceFinder.find(WSDLParserExtension.class).toArray()); |
222 if (serviceName != null) { |
224 if (serviceName != null) { |
223 WSDLService wsdlService = wsdlDoc.getService(serviceName); |
225 WSDLService wsdlService = wsdlDoc.getService(serviceName); |
224 if (wsdlService == null) |
226 if (wsdlService == null) |
225 throw new IllegalStateException(ProviderApiMessages.NOTFOUND_SERVICE_IN_WSDL( |
227 throw new IllegalStateException(ProviderApiMessages.NOTFOUND_SERVICE_IN_WSDL( |