<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FWeb_Services_SOA%2FWSDL</id>
		<title>Java/Web Services SOA/WSDL - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FWeb_Services_SOA%2FWSDL"/>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/Web_Services_SOA/WSDL&amp;action=history"/>
		<updated>2026-04-15T00:16:13Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://jexp.ru/index.php?title=Java/Web_Services_SOA/WSDL&amp;diff=9235&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/Web_Services_SOA/WSDL&amp;diff=9235&amp;oldid=prev"/>
				<updated>2010-06-01T07:27:48Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 07:27, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://jexp.ru/index.php?title=Java/Web_Services_SOA/WSDL&amp;diff=9234&amp;oldid=prev</id>
		<title> в 18:01, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/Web_Services_SOA/WSDL&amp;diff=9234&amp;oldid=prev"/>
				<updated>2010-05-31T18:01:50Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== WSDL Helper ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
/**&lt;br /&gt;
 * Licensed to the Apache Software Foundation (ASF) under one&lt;br /&gt;
 * or more contributor license agreements. See the NOTICE file&lt;br /&gt;
 * distributed with this work for additional information&lt;br /&gt;
 * regarding copyright ownership. The ASF licenses this file&lt;br /&gt;
 * to you under the Apache License, Version 2.0 (the&lt;br /&gt;
 * &amp;quot;License&amp;quot;); you may not use this file except in compliance&lt;br /&gt;
 * with the License. You may obtain a copy of the License at&lt;br /&gt;
 *&lt;br /&gt;
 * http://www.apache.org/licenses/LICENSE-2.0&lt;br /&gt;
 *&lt;br /&gt;
 * Unless required by applicable law or agreed to in writing,&lt;br /&gt;
 * software distributed under the License is distributed on an&lt;br /&gt;
 * &amp;quot;AS IS&amp;quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY&lt;br /&gt;
 * KIND, either express or implied. See the License for the&lt;br /&gt;
 * specific language governing permissions and limitations&lt;br /&gt;
 * under the License.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import java.io.File;&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Iterator;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
import javax.wsdl.Binding;&lt;br /&gt;
import javax.wsdl.BindingOperation;&lt;br /&gt;
import javax.wsdl.Definition;&lt;br /&gt;
import javax.wsdl.Input;&lt;br /&gt;
import javax.wsdl.Message;&lt;br /&gt;
import javax.wsdl.Operation;&lt;br /&gt;
import javax.wsdl.Output;&lt;br /&gt;
import javax.wsdl.Part;&lt;br /&gt;
import javax.wsdl.PortType;&lt;br /&gt;
import javax.wsdl.factory.WSDLFactory;&lt;br /&gt;
import javax.wsdl.xml.WSDLReader;&lt;br /&gt;
public class WSDLHelper {&lt;br /&gt;
    public BindingOperation getBindingOperation(Definition def, String operationName) {&lt;br /&gt;
        if (operationName == null) {&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        Iterator ite = def.getBindings().values().iterator();&lt;br /&gt;
        while (ite.hasNext()) {&lt;br /&gt;
            Binding binding = (Binding)ite.next();&lt;br /&gt;
            Iterator ite1 = binding.getBindingOperations().iterator();&lt;br /&gt;
            while (ite1.hasNext()) {&lt;br /&gt;
                BindingOperation bop = (BindingOperation)ite1.next();&lt;br /&gt;
                if (bop.getName().equals(operationName)) {&lt;br /&gt;
                    return bop;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return null;&lt;br /&gt;
    }&lt;br /&gt;
    public BindingOperation getBindingOperation(Binding binding, String operationName) {&lt;br /&gt;
        if (operationName == null) {&lt;br /&gt;
            return null;&lt;br /&gt;
        }&lt;br /&gt;
        List bindingOperations = binding.getBindingOperations();&lt;br /&gt;
        for (Iterator iter = bindingOperations.iterator(); iter.hasNext();) {&lt;br /&gt;
            BindingOperation bindingOperation = (BindingOperation)iter.next();&lt;br /&gt;
            if (operationName.equals(bindingOperation.getName())) {&lt;br /&gt;
                return bindingOperation;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return null;&lt;br /&gt;
    }&lt;br /&gt;
    public Map getParts(Operation operation, boolean out) {&lt;br /&gt;
        Message message = null;&lt;br /&gt;
        if (out) {&lt;br /&gt;
            Output output = operation.getOutput();&lt;br /&gt;
            message = output.getMessage();&lt;br /&gt;
        } else {&lt;br /&gt;
            Input input = operation.getInput();&lt;br /&gt;
            message = input.getMessage();&lt;br /&gt;
        }&lt;br /&gt;
        return message.getParts() == null ? new HashMap() : message.getParts();&lt;br /&gt;
    }&lt;br /&gt;
    public List&amp;lt;PortType&amp;gt; getPortTypes(Definition def) {&lt;br /&gt;
        List&amp;lt;PortType&amp;gt; portTypes = new ArrayList&amp;lt;PortType&amp;gt;();&lt;br /&gt;
        Iterator ite = def.getPortTypes().values().iterator();&lt;br /&gt;
        while (ite.hasNext()) {&lt;br /&gt;
            PortType portType = (PortType)ite.next();&lt;br /&gt;
            portTypes.add(portType);&lt;br /&gt;
        }&lt;br /&gt;
        return portTypes;&lt;br /&gt;
    }&lt;br /&gt;
    public List&amp;lt;Part&amp;gt; getInMessageParts(Operation operation) {&lt;br /&gt;
        Input input = operation.getInput();&lt;br /&gt;
        List&amp;lt;Part&amp;gt; partsList = new ArrayList&amp;lt;Part&amp;gt;();&lt;br /&gt;
        if (input != null) {&lt;br /&gt;
            Iterator ite = input.getMessage().getParts().values().iterator();&lt;br /&gt;
            while (ite.hasNext()) {&lt;br /&gt;
                partsList.add((Part)ite.next());&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return partsList;&lt;br /&gt;
    }&lt;br /&gt;
    public List&amp;lt;Part&amp;gt; getOutMessageParts(Operation operation) {&lt;br /&gt;
        Output output = operation.getOutput();&lt;br /&gt;
        List&amp;lt;Part&amp;gt; partsList = new ArrayList&amp;lt;Part&amp;gt;();&lt;br /&gt;
        if (output != null) {&lt;br /&gt;
            Iterator ite = output.getMessage().getParts().values().iterator();&lt;br /&gt;
            while (ite.hasNext()) {&lt;br /&gt;
                partsList.add((Part)ite.next());&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return partsList;&lt;br /&gt;
    }&lt;br /&gt;
    public Binding getBinding(BindingOperation bop, Definition def) {&lt;br /&gt;
        Iterator ite = def.getBindings().values().iterator();&lt;br /&gt;
        while (ite.hasNext()) {&lt;br /&gt;
            Binding binding = (Binding)ite.next();&lt;br /&gt;
            for (Iterator ite2 = binding.getBindingOperations().iterator(); ite2.hasNext();) {&lt;br /&gt;
                BindingOperation bindingOperation = (BindingOperation)ite2.next();&lt;br /&gt;
                if (bindingOperation.getName().equals(bop.getName())) {&lt;br /&gt;
                    return binding;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return null;&lt;br /&gt;
    }&lt;br /&gt;
    public Definition getDefinition(File wsdlFile) throws Exception {&lt;br /&gt;
        WSDLFactory wsdlFactory = WSDLFactory.newInstance();&lt;br /&gt;
        WSDLReader reader = wsdlFactory.newWSDLReader();&lt;br /&gt;
        reader.setFeature(&amp;quot;javax.wsdl.verbose&amp;quot;, false);&lt;br /&gt;
        return reader.readWSDL(wsdlFile.toURI().toURL().toString());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>