File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Share MTOM and security info with client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Share MTOM and security info with client" Watch "Share MTOM and security info with client" New topic
Author

Share MTOM and security info with client

Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
We are using contract first approach to create webservices. First we create the WSDL and share it with the clients. From this WSDL they are able to find out which operations to call and what parameters to pass.

But there are certain things which are not there in WSDL. Example, the client need to send username and password in SOAP header is not there in WSDL. Also, for content transfer MTOM is being used is also not there is in WSDL.
In practice, how is this information shared with the clients?
Is there a way to add it to wsdl?

Thank you
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
WS-Policy (http://en.wikipedia.org/wiki/Ws-policy) is what you are looking for, I believe.
Best wishes!
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
MTOM doesn't add any element in WSDL. For security headers you have to use WS-Policy which I pointed in your earlier post as well.


SCJP 1.5(97%) My Blog
Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
shivendra tripathi wrote:MTOM doesn't add any element in WSDL. For security headers you have to use WS-Policy which I pointed in your earlier post as well.


Thank you.

If MTOM does not add anything to the WSDL then how can it be intimated to the client that MTOM is enabled at the server side and they can transfer content using MTOM.

Thank you
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
You are correct to intimate the client it's necessary to have MTOM policy in WSDL. You can have look to following links for more details.

http://blogs.sun.com/sujit/entry/mtom_soap_with_attachment_in
http://www.w3.org/TR/soap12-mtom-policy/
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Share MTOM and security info with client