Skip to main content
summaryrefslogtreecommitdiffstats
blob: 64611e86892535517b88ebee9fe5f92d1845b27a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*******************************************************************************
 * Copyright (c) 2000, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.jst.ws.internal.consumption.datamodel.wsdlmodel;

import org.eclipse.wst.ws.internal.datamodel.Model;

public class StubbedWSDLModel
{

  // Copyright
  public static final String copyright = "(c) Copyright IBM Corporation 2000, 2002.";


  protected Model fModel;
  public StubbedWSDLModel()
  {
    WSDLElement wsdlElement = new WSDLElement("WSDLFiles");
    fModel = wsdlElement.getModel();   
  }

  public Model getWSDLModel()
  {
    return fModel;
  }

  public void buildModel()
  {
    DefinitionElement def1 = new DefinitionElement((WSDLElement)fModel.getRootElement(),"StockQuote"); 
    ServiceElement ser1 = new ServiceElement(def1,"getQuote");
    ServiceElement ser2 = new ServiceElement(def1,"setQuote");
    PortElement port1 = new PortElement(ser1,"port1");
    PortElement port2 = new PortElement(ser1,"port2");
    PortElement port3 = new PortElement(ser2,"port1");
    PortElement port4 = new PortElement(ser2,"port2");
    BindingElement bind1 = new BindingElement(port1,"bind1");
    BindingElement bind2 = new BindingElement(port2,"bind1");
    BindingElement bind3 = new BindingElement(port3,"bind1");
    BindingElement bind4 = new BindingElement(port4,"bind1");
    OperationElement op1 = new OperationElement(bind1,"op1");
    new OperationElement(bind2,"op1");
    new OperationElement(bind3,"op1");
    new OperationElement(bind4,"op1");
    MessageElement me1 = new MessageElement(op1,"me1");
    MessageElement me2 = new MessageElement(op1,"me2");
    new PartElement(me1,"pe1");
    new PartElement(me2,"pe2");

    DefinitionElement def2 = new DefinitionElement((WSDLElement)fModel.getRootElement(),"TempConversion"); 
    ServiceElement ser3 = new ServiceElement(def2,"getTemp");
    ServiceElement ser4 = new ServiceElement(def2,"setTemp");
    PortElement port5 = new PortElement(ser3,"port1");
    PortElement port6 = new PortElement(ser4,"port1");
    BindingElement bind5 = new BindingElement(port5,"bind1");
    BindingElement bind6 = new BindingElement(port6,"bind1");
    new OperationElement(bind5,"op1");
    new OperationElement(bind6,"op1");

  }
}

Back to the top