|
Axis 2 example source code file (SoapMessageContext.java)
The Axis 2 SoapMessageContext.java source code/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF 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 * * 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. */ package org.apache.axis2.jaxws.handler; import org.apache.axis2.jaxws.ExceptionFactory; import org.apache.axis2.jaxws.core.MessageContext; import org.apache.axis2.jaxws.i18n.Messages; import org.apache.axis2.jaxws.message.Block; import org.apache.axis2.jaxws.message.Message; import org.apache.axis2.jaxws.message.databinding.JAXBBlockContext; import org.apache.axis2.jaxws.message.factory.BlockFactory; import org.apache.axis2.jaxws.message.factory.JAXBBlockFactory; import org.apache.axis2.jaxws.message.factory.MessageFactory; import org.apache.axis2.jaxws.registry.FactoryRegistry; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.bind.JAXBContext; import javax.xml.namespace.QName; import javax.xml.soap.SOAPConstants; import javax.xml.soap.SOAPMessage; import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; /** * The SOAPMessageContext is the context handed to SOAP-based application handlers. It provides * access to the SOAP message that represents the request or response via SAAJ. It also allows * access to any properties that have been registered and set on the MessageContext. */ public class SoapMessageContext extends BaseMessageContext implements javax.xml.ws.handler.soap.SOAPMessageContext { private static final Log log = LogFactory.getLog(SoapMessageContext.class); public SoapMessageContext(MessageContext messageCtx) { super(messageCtx); } public Object[] getHeaders(QName qname, JAXBContext jaxbcontext, boolean flag) { if(log.isDebugEnabled()){ log.debug("Getting all Headers for Qname: "+qname); } if(qname == null){ if(log.isDebugEnabled()){ log.debug("Invalid QName, QName cannot be null"); } ExceptionFactory.makeWebServiceException(Messages.getMessage("")); } if(jaxbcontext == null){ if(log.isDebugEnabled()){ log.debug("Invalid JAXBContext, JAXBContext cannot be null"); } ExceptionFactory.makeWebServiceException(Messages.getMessage("SOAPMessageContextErr2")); } if(flag == false){ //TODO: Implement, In this case we need to only return headers targetted at roles // currently played by this SOAPNode. } List<Object> list = new ArrayList Other Axis 2 examples (source code examples)Here is a short list of links related to this Axis 2 SoapMessageContext.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.