首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

使用axis调用webservice,String[]参数如何传

2012-01-30 
使用axis调用webservice,String[]参数怎么传使用axis调用webservice,String[]参数怎么传,对方是.net的webs

使用axis调用webservice,String[]参数怎么传
使用axis调用webservice,String[]参数怎么传,对方是.net的webservicle接口。这个参数的类型如何确定,请帮忙啊!

[解决办法]
String[]


[解决办法]

Java code
public class Test {      public static void main(String[] args1) throws AxisFault {            RPCServiceClient serviceClient = new RPCServiceClient();            Options options = serviceClient.getOptions();            EndpointReference targetEPR = new EndpointReference(                    "http://127.0.0.1:8080/axis2/services/MyService");            options.setTo(targetEPR);            // /////////////////////////////////////////////////////////////////////            /*             * Creates an Entry and stores it in the AddressBook.             */            // QName of the target method             QName opAddEntry = new QName("http://webservice.rp.mid.com/xsd", "createResourceTemplate");            /*             * Constructing a new Entry             */            AddResourceTemplateRequestMsg entry = new AddResourceTemplateRequestMsg();            entry.setResourceTemplateID("testtttt") ;            entry.setTransactionId("testaaaaa") ;            // 此处可换成String数组传入即可。            Object[] opAddEntryArgs = new Object[] { entry };            Class[] returns = new Class[]{AddResourceTemplateResponseMsg.class} ;            // Invoking the method            Object[] obj = serviceClient.invokeBlocking(opAddEntry, opAddEntryArgs, returns) ;            ////////////////////////////////////////////////////////////////////////                    }} 

热点排行