Originally posted by Nikhil Agrawal:
1. The generated stub here is just a class that imlements the end-point interface. The role of this stub will be to convert the java call into a soap message and viceversa. right? This stub is not like the stub which we get in RMI, I mean this stub will not open sockets etc. right?
2. The RMH says that the stub is generated at the deployment time. But if this stub is created by reading just the wsdl file. Why can't it be generated at the client side after the deployment.
3. Also the jax-rpc comiler generates the service interface and the container (jax-rpc runtime?) provides the implementation. Now when we deploy the end-point interface/implementation, we mention that what is the jndi-name for this service and the actual service interface. when the client does a lookup,the client is returned what? The stub for the implementation of this Service Interface? Is this stub like the RMI stub?
<service-ref>
<service-ref-element>service/BookQuoteService</service-ref-name>
<service-interface>com.jwsbook.jaxrpc.BookQuoteService</service-interfcae>
....
</service-ref>
Originally posted by Nikhil Agrawal:
Let's say I have J2SE client, I just want to write one independent program to access webservice. In this case I will just be knowing the wsdl file. Now what would be the steps to use this web serice?
Say if I have a J2EE client, I want to access the webserice from a servlet. Again I have not deployed the webservice (or the webserice is in some other J2EE container), the webservice is deployed by someone else at some location. Now to access this webserive I will have to follow the same steps as I will be following for J2SE client?
Now if I have a J2EE client and the webservice has been deployed by me (same J2EE container). Then what would be the steps?
why can't we just create a new Instance of the stub class using new operator. Instead of getting one from the Service class ( Service class is acting as a factory). but is there a need for this?
Factory methods, unlike constructors, have names. Factory methods, unlike constructors, are not required to create a new object each time they are invoked. Factory methods, unlike constructors, can return an object of any subtype of their return type.
*** There seems to be one exception. When you use dynamic proxies you can specify a <port-component-link> inside <port-component-ref>. The link points to the endpoint component in the same application. Apparently the application server will, in this case, dynamically create a proxy for local calls that bypasses the XML (un)marshalling improving performance significantly. However this optimization is not availble for static stubs or DII.
Now if I have a J2EE client and the webservice has been deployed by me (same J2EE container). Then what would be the steps?
Originally posted by Nikhil Agrawal:
Isn't the above is same as asked by me?
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|