X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=blobdiff_plain;f=saml%2Fsaml2%2Fbinding%2Fimpl%2FSAML2SOAPDecoder.cpp;h=702d96afce51da15305eeccdb8cfe157e408ff26;hp=8325d33c541b3458a9da6cfcc1f6b48c349e8e33;hb=1462057b3b9ae7e165d34d988e30b14c213672ca;hpb=96437360be3fa1f0c182bdd13b54e00110e45f11 diff --git a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp index 8325d33..702d96a 100644 --- a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp @@ -1,33 +1,41 @@ -/* - * Copyright 2001-2007 Internet2 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at +/** + * Licensed to the University Corporation for Advanced Internet + * Development, Inc. (UCAID) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for + * additional information regarding copyright ownership. + * + * UCAID licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the + * License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. */ /** * SAML2SOAPDecoder.cpp * - * SAML 2.0 SOAP binding message decoder + * SAML 2.0 SOAP binding message decoder. */ #include "internal.h" #include "exceptions.h" +#include "binding/SecurityPolicy.h" #include "saml2/binding/SAML2MessageDecoder.h" #include "saml2/core/Protocols.h" #include +#include +#include #include #include +#include #include using namespace opensaml::saml2p; @@ -72,7 +80,7 @@ XMLObject* SAML2SOAPDecoder::decode( #ifdef _DEBUG xmltooling::NDC ndc("decode"); #endif - Category& log = Category::getInstance(SAML_LOGCAT".MessageDecoder.SAML2SOAP"); + Category& log = Category::getInstance(SAML_LOGCAT ".MessageDecoder.SAML2SOAP"); log.debug("validating input"); string s = genericRequest.getContentType(); @@ -84,6 +92,7 @@ XMLObject* SAML2SOAPDecoder::decode( const char* data = genericRequest.getRequestBody(); if (!data) throw BindingException("SOAP message had an empty request body."); + log.debug("received message:\n%s", data); istringstream is(data); // Parse and bind the document into an XMLObject. @@ -97,8 +106,7 @@ XMLObject* SAML2SOAPDecoder::decode( if (!env) throw BindingException("Decoded message was not a SOAP 1.1 Envelope."); - if (!policy.getValidating()) - SchemaValidators.validate(env); + SchemaValidators.validate(env); Body* body = env->getBody(); if (body && body->hasChildren()) {