Hi there, if you like me has to deal with a lot of service definition you'll be wise if you read how that WSDL actually works.
If you, like me, are to lazy to actually learn all that you may want to read this post.
So this post series (at least I hope to create a series out of this) will try to sum up the main thing one should know about how to read from a WSDL.
We will start by the main thing, at least for me, the ENTRY POINT.
So what to I mean by Entry Point.
For me it's just the Java class that will actually allow you to access all the operations defined in the service definition.
Where is this defined in a WSDL, easy just look for this tag:
<wsdl:service name="UserServiceImplService">
<wsdl:port binding="tns:UserServiceImplServiceSoapBinding" name="UserServiceImplPort">
<soap:address location="https://fake.service.provider.com/Some-path-dev/services/admin/UserService"/>
</wsdl:port>
</wsdl:service>
Now this portion of the WSDL will basically describe the entry point of some service.
Once you run your wsdl2java tool to generate the Java code, what class should I look for?
Well for starters I'll go with: UserServiceImplService
Which is the value of the name parameter in the wsdl:node service.
This class will allow you to access the proxy class (which is no other than the port), this proxy class will expose all the operations that are defined to be accessible for this service.
How do I find this port/proxy class?
Well..... try looking for: UserServiceImplPort
Which is no other than the value of the name parameter in the node: wsdl:port
This has worked out for me in the past I hope it helps you!
BTW do thank my good friend the Master of CXF Gustavo
Cheers
No hay comentarios:
Publicar un comentario