-
1. Re: Desgin Patterns - Web Service
acxjbertr Aug 3, 2006 2:47 PM (in response to g_nagesh)Web Services almost always communicate using HTTP. HTTP is the transfer protocol.
Web Services can either be SOAP based XML or just plain XML. In the former case, SOAP is the content protocol.
Web Services using SOAP is the industry standard right now so I would recommend you go that route. There are lots of tools out there to generates stubs, etc., including JBoss' wstools. -
2. Re: Desgin Patterns - Web Service
g_nagesh Aug 3, 2006 2:52 PM (in response to g_nagesh)Thanks for the answer. But My question is regarding posting data over HTTP using URLCOnnection or using generated stubs.
I am having another problem now, please see the below proble.
I have to accept the data in xml format and it is working fine if i make call to web service using client like below.
IdentityService service = new IdentityServiceProviderLocator).getIdentityPort();
System.out.println(service.retrieveUsersByAccountId(xmlInputFile));
But was getting issues with the below client
Call call = (Call)service.createCall();
call.setTargetEndpointAddress( endpoint );
SOAPEnvelope env = new SOAPEnvelope(new java.io.ByteArrayInputStream(xmlInputFile.getBytes()));
//System.out.println(" env---"+env);
call.invoke(env);
SOAPEnvelope elems = (SOAPEnvelope)call.invoke(env);
System.out.println("elemss----"+elems);
It says no operation "xyz.." found . -
3. Re: Desgin Patterns - Web Service
lightenex Aug 5, 2006 11:29 AM (in response to g_nagesh)yeah, in my opinion, the best way to performing SOAP client operations would be using generated client instead of DII, DII seems got its own trouble in many ways, and the code written by DII is not easy to maintain. You can choose any independent stub generatation tools to generate those stubs. moreover, you can create a facade layer for web service access, if the service point has changed, you can limit your change in the facade layer, and that's really helpful for you to address short term change and make things happen.