// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package org.myorg;

import com.ptc.jws.client.handler.Credentials;
import com.ptc.jws.service.org.myorg.mathservice.*;
import java.io.PrintStream;
import java.util.*;

public class MathClient
{

    public MathClient()
    {
    }

    public static void main(String args[])
        throws Exception
    {
        Credentials.setUsername("wcadmin");
        Credentials.setPassword("wcadmin");
        String s = args[0];
        MathServiceImplService mathserviceimplservice = new MathServiceImplService();
        MathServiceImpl mathserviceimpl = mathserviceimplservice.getMathServiceImplPort();
        ArrayList arraylist = new ArrayList();
        ArrayList arraylist1 = new ArrayList();
        arraylist.add("number");
        arraylist.add("name");
        arraylist.add("state.state");
        arraylist.add("versionInfo.identifier.versionId");
        arraylist.add("versionInfo.identifier.versionLevel");
        List list = mathserviceimpl.queryParts("wt.part.WTPart", (new StringBuilder()).append("number=").append(s).toString(), "OR:wt.pdmlink.PDMLinkProduct:50455", arraylist);
        System.out.printf((new StringBuilder()).append("tstparts.size(): ").append(list.size()).append("\n").toString(), new Object[0]);
        int i = 0;
        for(Iterator iterator = list.iterator(); iterator.hasNext();)
        {
            GenericBusinessObject genericbusinessobject = (GenericBusinessObject)iterator.next();
            System.out.printf("\n++++++++++++\n", new Object[0]);
            List list1 = genericbusinessobject.getProperties();
            int j = 0;
            for(Iterator iterator1 = list1.iterator(); iterator1.hasNext();)
            {
                Property property = (Property)iterator1.next();
                System.out.printf((new StringBuilder()).append(property.getName().toString()).append(" = ").append(property.getValue().toString()).append("\n").toString(), new Object[0]);
                j++;
            }

            i++;
        }

    }
}
