java - Reading a SOAP message from a TCP socket's stream using SAAJ -


i send , receive soap message using saaj api between tcp server , client. can write tcp socket using soapmessage class using method writeto writing stream how read soap message tcp stream? class/method might useful?

you can use javax.xml.ws.endpoint, here example

@webserviceprovider @servicemode(mode.message) public class soapserver implements provider<soapmessage> {      public soapmessage invoke(soapmessage request) {         ... process request , create response          return response;     }      public static void main(string[] args) throws exception {         endpoint.publish("http://localhost:1111/test",  new soapserver());     } } 

send request

... url endpoint = new url("http://localhost:1111/test"); soapmessage response = connection.call(message, endpoint); ... 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -