开发者

java webservice multiple value return

开发者 https://www.devze.com 2023-03-07 11:33 出处:网络
Can i help me solve this prob开发者_JAVA技巧lem ? I have to develop a web service in java. That have to return a xml below.

Can i help me solve this prob开发者_JAVA技巧lem ? I have to develop a web service in java. That have to return a xml below. I dont know how to return multiple value like that in java

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Response xmlns="http://tempuri.org/">
      <Result>int</Result>
      <strReturn>string</strReturn>
    </Response>
  </soap:Body>
</soap:Envelope>


I am not sure how much you know about web service. The XML you posted is a XML web service (soap web service). See here for introduction: http://download.oracle.com/javaee/6/tutorial/doc/gijti.html

As stated in the tutorial, you can use the Java API for XML Web Services (JAX-WS) to develop the web service.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号