package com.sample.service;

import java.rmi.RemoteException;

import javax.xml.rpc.ServiceException;

import com.sample.bean.AddObject;
import com.sample.bean.GoodsInfoBean;

public class GoodsInfoProxyApp {

    public static void main(String[] args) throws ServiceException, RemoteException {

        AddObject ad =new AddObject();
        
        GoodsInfoBean gib = new GoodsInfoBean();
        gib.setRequestId(309);
        gib.setFilename("testFile.txt");
        
        GoodsInfoService myService = new GoodsInfoServiceLocator();
        GoodsInfo myInfo = myService.getGoodsInfoService();
        
        GoodsInfoBean giBean = new GoodsInfoBean();
        
        giBean = myInfo.getUnitPrice(gib);

        ad = (AddObject)giBean.getObject();
        System.out.println(giBean.getRequestId());
        System.out.println(giBean.getFilename());
        System.out.println(ad.getStr());
    }
}

