/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. * See the copyright.txt in the distribution for a * full listing of individual contributors. * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU Lesser General Public License, v. 2.1. * This program is distributed in the hope that it will be useful, but WITHOUT A * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License, * v.2.1 along with this distribution; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * (C) 2005-2006, * @author JBoss Inc. */ package com.jboss.transaction.wstf.webservices.sc007.sei; import com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor; import com.arjuna.webservices11.SoapFault11; import com.arjuna.webservices11.wsaddr.AddressingHelper; import org.jboss.ws.api.addressing.MAP; import org.xmlsoap.schemas.soap.envelope.Fault; import javax.xml.ws.Action; import javax.xml.ws.RequestWrapper; import javax.xml.ws.WebServiceContext; import javax.xml.ws.soap.Addressing; import javax.xml.ws.handler.MessageContext; import javax.annotation.Resource; /** * Implementor class for OASIS WS-Interop 1.1 Initiator Service */ import javax.jws.Oneway; import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.WebParam; import javax.jws.soap.SOAPBinding; /** * Implementation class for WSTX 1.1 AT Interop Test Initiator service */ @WebService(name = "InitiatorPortType", targetNamespace = "http://www.wstf.org/sc007", // wsdlLocation="/WEB-INF/wsdl/sc007.wsdl", portName = "sc007InitiatorPort", serviceName="sc007Service") @Addressing(required=true) public class InitiatorPortTypeImpl // implements InitiatorPortType, SoapFaultPortType { /** * injected resource providing access to WSA addressing properties */ @Resource private WebServiceContext webServiceCtx; /** * */ @WebMethod(operationName = "Response", action = "http://www.wstf.org/docs/scenarios/sc007/Response") @Oneway @Action(input="http://www.wstf.org/docs/scenarios/sc007/Response") @RequestWrapper(localName = "Response", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType") public void response() { MessageContext ctx = webServiceCtx.getMessageContext(); MAP inboundMap = AddressingHelper.inboundMap(ctx); InitiatorProcessor.getInitiator().handleResponse(inboundMap) ; } @WebMethod(operationName = "SoapFault", action = "http://www.wstf.org/docs/scenarios/sc007/SoapFault") @Oneway @Action(input="http://www.wstf.org/docs/scenarios/sc007/SoapFault") @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) public void soapFault( @WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) { MessageContext ctx = webServiceCtx.getMessageContext(); MAP inboundMap = AddressingHelper.inboundMap(ctx); SoapFault11 soapFaultInternal = SoapFault11.fromFault(fault); InitiatorProcessor.getInitiator().handleSoapFault(soapFaultInternal, inboundMap) ; } }