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 SAML assertion in WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "SAML assertion in WSDL" Watch "SAML assertion in WSDL" New topic
Author

SAML assertion in WSDL

Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Hello,

I want to create a wsdl that contains a header with a SAML assertion.

I have tried to create a web service in NetBeans based on this wsdl.

When I added the following schema elements below, the wsdl cannot be parsed:

<xsd:schema>
<xsd:import namespace="urnasis:names:tc:SAML:2.0:assertion" schemaLocation="saml-schema-assertion-2.0.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urnasis:names:tc:SAML:2.0:protocol" schemaLocation="saml-schema-protocol-2.0.xsd"/>
</xsd:schema>

Are the above schema elements valid? Has anyone been able to put a SAML assertion in a header in a wsdl...if so can you give an example or say why this wsdl doesn't parse.

Thank you so much.

Ravi


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-749-SNAPSHOT. -->
<definitions targetNamespace="http://service/" name="GatewayLoginService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://service/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext" xmlns:samla="urnasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urnasis:names:tc:SAML:2.0:protocol">
<types>
<xsd:schema>
<xsd:import namespace="http://service/" schemaLocation="GatewayLoginService_schema1.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" schemaLocation="GatewayLoginService_schema3.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" schemaLocation="GatewayLoginService_schema4.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urnasis:names:tc:SAML:2.0:assertion" schemaLocation="saml-schema-assertion-2.0.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urnasis:names:tc:SAML:2.0:protocol" schemaLocation="saml-schema-protocol-2.0.xsd"/>
</xsd:schema>

</types>
<message name="login">
<part name="parameters" element="tns:login"/>
<part name="header" element="samla:assertion" xmlns:samla="urnasis:names:tc:SAML:2.0:assertion" />
</message>
<message name="loginResponse">
<part name="result" element="tns:loginResponse"/>
</message>
<portType name="GatewayLogin">
<operation name="login" parameterOrder="parameters header">
<input message="tns:login"/>
<output message="tns:loginResponse"/>
</operation>
</portType>
<binding name="GatewayLoginPortBinding" type="tns:GatewayLogin">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="login">
<soapperation soapAction=""/>
<input>
<soap:body use="literal" parts="parameters"/>
<soap:header message="tns:login" part="header" use="literal"/>
</input>
<output>
<soap:body use="literal" parts="result"/>
</output>
</operation>
</binding>
<service name="GatewayLoginService">
<port name="GatewayLoginPort" binding="tns:GatewayLoginPortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you seen the following SAML tutorial?
http://www.netbeans.org/kb/samples/wss-SAML.html
Best wishes!
Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Thanks, Ivan. I will read this. Thanks for the help.

-Ravi
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SAML assertion in WSDL
 
Similar Threads
How do i add vendor namespaces using CXF frame work to the SOAP Envvelope
CXF, WSDL, and SecurityPolicy problems with "None of the policy alternatives can be satisfied."
MTOM example
JAX-WS wsgen using Maven2
WSSE Security in SOAP HEADER