作者ppkkykei (人生就像RPG)
看板java
标题Re: [问题] Web Service SOAP 之SOAPMessage解读问题
时间Tue Jun 16 01:11:56 2009
< 前文恕删 >
: //以下是回应时的SOAPMessage
: <?xml version="1.0" ?>
: <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
: <S:Body>
: <ns2:sayHelloResponse xmlns:ns2="http://myself.idv.tw/">
: <return>Hello!!!!</return>
: </ns2:sayHelloResponse>
: </S:Body>
: </S:Envelope>
: //=====================================================================================
Client端:
org.blah.blah.HelloService service = new org.blah.blah.HelloService Hello();
org.blah.blah.Hello port = service.getsayHelloPort();
String result = port.sayHello();
System.out.println("result=" + result); //印出Hello!!!
不晓得你指的是不是这个?
(上面这只是大概写法, 一定有错^^" 详细请见NetBeans文件)
有Step by Step的解说:
Getting Started with JAX-WS Web Services
http://www.netbeans.org/kb/60/websvc/jax-ws.html
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.47.46.80