Hello. My name is Rafal Malinowski. I am working at Poznan Supercomputing and Networing Center.
One of my task it to write a SSOS web-service client for SAML2 protocol. It is described by simple wsdl file and some complex xsd files. I've used axis2-1.4 to generate stub, it was not properly java file and it has about 170 000 lines of code. I've decided that I don't need the whole message structure (now it is only 300 lines of code) so I've removed xsd files from wsdl and now I'm getting just a OMElement structure. The problem is that I'am unable to serialize it ot string. It just ommits about 90% of the message. The wsdl file (xds files are cut off): </message> <message name="SSOSoapResponse"> <part name="parameters" element="samlp2:Response"/> </message> <portType name="SSOSPortType"> <operation name="SingleSignOn"> <input message="ssos:SSOSoapRequest" wsaw:Action="urn:liberty:ssos:2006-08:AuthnRequest"/> <output message="ssos:SSOSoapResponse" wsaw:Action="urn:liberty:ssos:2006-08:Response"/> </operation> </portType> <binding name="SSOSSoapBinding" type="ssos:SSOSPortType"> <S:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="SingleSignOn"> <input> <S:body use="literal"/> </input> <output> <S:body use="literal"/> </output> </operation> </binding> <service name="SSOService"> <port name="SSOSPortType" binding="ssos:SSOSSoapBinding"> <S:address location="http://example.com/idmapping"/> </port> </service> </definitions> The calling code: OMElement response = ((SSOServiceStub) _stub) .SingleSignOn(authnRequest); The serialization code: StringWriter stringWriter = new StringWriter(); response.serialize(stringWriter); return stringWriter.toString(); The tcpdump SOAP response: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsse2="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ams="http://tempuri.org/ams.xsd" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:ssos="urn:liberty:ssos:2006-08:SingleSignOn"> <SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body><samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="c61f62257d149cec89f8a873d6ffc94a" InResponseTo="b0dc2f1efcdbec830bcabbc86ace5c59" Version="2.0" IssueInstant="2008-06-25T20:08:30Z"><saml:Issuer>*********</saml:Issuer> <samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Version="2.0" ID="e779cea471db7da9214434fd1792af26" IssueInstant="2008-06-25T20:08:30Z"><saml:Issuer>***********</saml:Issuer><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI="#e779cea471db7da9214434fd1792af26"><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>TuwDkMZ3qQ3dLSpgbC8oXV7fmU8=</DigestValue></Reference></SignedInfo><SignatureValue> [lot of base64]</X509Certificate> </X509Data></KeyInfo></Signature> <saml:Subject><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">rafal</saml:NameID> <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"/> </saml:Subject> <saml:Conditions NotBefore="2008-06-25T20:08:30Z" NotOnOrAfter="2008-06-25T21:09:27Z"><saml:AudienceRestriction><saml:Audience>127.0.0.1:8800</saml:Audience> </saml:AudienceRestriction> </saml:Conditions> <saml:AuthnStatement AuthnInstant="2008-06-25T20:08:30Z" SessionIndex="e779cea471db7da9214434fd1792af26"><saml:AuthnContext> <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef> </saml:AuthnContext> </saml:AuthnStatement></saml:Assertion> </samlp:Response></SOAP-ENV:Body></SOAP-ENV:Envelope> The serialization result looks like this: <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="c61f62257d149cec89f8a873d6ffc94a" InResponseTo="b0dc2f1efcdbec830bcabbc86ace5c59" Version="2.0" IssueInstant="2008-06-25T20:08:30Z"><saml:Issuer>idp.man.poznan.pl</saml:Issuer> </samlp:Response> Can anyone tell me what happend with rest of my soap response? The second problem is the oryginal java stub does not set SAOPAction header, I had to add it manualy (the server requires it to be set to proper value). How can I change the wsdl so the stub will set SOAPAction? I hope someone know how to fix these problems or at least point me at something that I didn't notice... Best regards Rafal Malinowski ---------------------------------------------------- Angelina Jolie i Morgan Freeman w rewelacyjnym filmie akcji "Wanted. Ścigani" - w kinach od 27 czerwca. http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fscigani.html&sid=397 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]