Package com.sun.xml.ws.security.opt.impl.message

Examples of com.sun.xml.ws.security.opt.impl.message.SOAPBody


                       
                    } else{
                        // replace SOAPBody with securityElement and add
                        // to targets
                        boolean contentOnly = signatureTarget.getContentOnly();
                        SOAPBody soapBody = (SOAPBody)body;
                        if(!contentOnly){
                            if(soapBody.getId() == null || "".equals(soapBody.getId()))
                                soapBody.setId(fpContext.generateID());
                            SignedMessagePart smp = new SignedMessagePart(soapBody, contentOnly);
                            secMessage.replaceBody(smp);
                            targets.add(smp);
                        } else{
                            String id = null;
                            if(soapBody.getBodyContentId() == null || "".equals(soapBody.getBodyContentId())){
                                id = fpContext.generateID();
                                soapBody.setBodyContentId(id);
                            }
                           
                            SignedMessagePart smp = new SignedMessagePart(soapBody, contentOnly);
                            SOAPBody newBody =  new SOAPBody(smp,fpContext.getSOAPVersion());
                            newBody.setId(soapBody.getId());
                            secMessage.replaceBody(newBody);
                            targets.add(smp);
                        }
                    }
                } else{
View Full Code Here


        SecurityHeaderElement she = secHeader.getChildElement(id);
        if(she != null)
            return she;
        Object body = secMessage.getBody();
        if(body instanceof SOAPBody){
            SOAPBody soapBody = (SOAPBody)body;
            if(id.equals(soapBody.getId()))
                return soapBody;
        } else if(body instanceof SecurityElement){
            SecurityElement se = (SecurityElement)body;
            if(id.equals(se.getId()))
                return se;
View Full Code Here

                    SecurityElement se = (SecurityElement) body;
                    if (uri.equals(se.getId())) {
                        return new JAXBDataImpl(se, context.getNamespaceContext(), false);
                    }
                } else if (body instanceof SOAPBody) {
                    SOAPBody soapBody = (SOAPBody) body;
                    if (uri.equals(soapBody.getId())) {
                        return new SSBData(soapBody, false, context.getNamespaceContext());
                    //write to streamwriter data and return
                    } else if (uri.equals(soapBody.getBodyContentId())) {
                        return new SSBData(soapBody, true, context.getNamespaceContext());
                    }
                }
            } catch (XWSSecurityException ex) {
                logger.log(Level.SEVERE, LogStringsMessages.WSS_1704_ERROR_RESOLVING_ID(uri), ex);
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.security.opt.impl.message.SOAPBody

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.