Package org.jboss.ws.core.soap

Examples of org.jboss.ws.core.soap.SOAPBodyImpl


         // Report a MustUnderstand fault
         if (opMetaData == null)
         {
            String faultString;

            SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
            SOAPBodyElement soapBodyElement = soapBody.getBodyElement();
            if (soapBodyElement != null)
            {
               Name soapName = soapBodyElement.getElementName();
               faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for: " + soapName;
            }
View Full Code Here


   {
      Source source = null;
      if (message instanceof SOAPMessage)
      {
         SOAPMessage soapMessage = (SOAPMessage)message;
         SOAPBodyImpl soapBody = getSOAPBody(soapMessage);
         SOAPElement bodyElement = getBodyElement(soapBody);

         if (style == Style.RPC)
         {
            source = new DOMSource(bodyElement);
View Full Code Here

   public void setPayload(Source source)
   {
      if (message instanceof SOAPMessage)
      {
         SOAPMessage soapMessage = (SOAPMessage)message;
         SOAPBodyImpl soapBody = getSOAPBody(soapMessage);
         SOAPElement bodyElement = getBodyElement(soapBody);
         try
         {
            if (style == Style.RPC)
            {
               try
               {
                  soapBody.removeContents();
                  EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), EnvelopeBuilderDOM.class.getName());
                  envBuilder.setStyle(style);
                  Element domBodyElement = DOMUtils.sourceToElement(source);
                  envBuilder.buildBodyElementRpc(soapBody, domBodyElement);
               }
View Full Code Here

   {
      Object payload = null;
      if (message instanceof SOAPMessage)
      {
         SOAPMessage soapMessage = (SOAPMessage)message;
         SOAPBodyImpl soapBody = getSOAPBody(soapMessage);

         SOAPContentElement bodyElement = (SOAPContentElement)getBodyElement(soapBody);
         if (bodyElement != null)
         {
            payload = bodyElement.getObjectValue();
View Full Code Here

   public void setPayload(Object payload, JAXBContext jaxbContext)
   {
      if (message instanceof SOAPMessage)
      {
         SOAPMessage soapMessage = (SOAPMessage)message;
         SOAPBodyImpl soapBody = getSOAPBody(soapMessage);

         SOAPContentElement bodyElement = (SOAPContentElement)getBodyElement(soapBody);
         if (bodyElement != null)
         {
            bodyElement.setObjectValue(payload);
View Full Code Here

      return bodyElement;
   }

   private SOAPBodyImpl getSOAPBody(SOAPMessage soapMessage)
   {
      SOAPBodyImpl soapBody = null;
      try
      {
         soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
      }
      catch (SOAPException ex)
View Full Code Here

         // Report a MustUnderstand fault
         if (opMetaData == null)
         {
            String faultString;

            SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
            SOAPBodyElement soapBodyElement = soapBody.getBodyElement();
            if (soapBodyElement != null)
            {
               Name soapName = soapBodyElement.getElementName();
               faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for: " + soapName;
            }
View Full Code Here

         // Disable MTOM for rpc/encoded
         if (opMetaData.isRPCEncoded())
            msgContext.put(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);

         SOAPHeader soapHeader = soapEnvelope.getHeader();
         SOAPBodyImpl soapBody = (SOAPBodyImpl)soapEnvelope.getBody();
         SOAPBodyElement soapBodyElement = soapBody.getBodyElement();

         // Translate the SOAPFault to an exception and throw it
         if (soapBodyElement instanceof SOAPFaultImpl)
            throwFaultException((SOAPFaultImpl)soapBodyElement);
View Full Code Here

         ParameterMetaData paramMetaData = opMetaData.getParameters().get(0);
         QName xmlName = paramMetaData.getXmlName();

         SOAPMessage reqMessage = (SOAPMessage)payload;
         SOAPBodyImpl body = (SOAPBodyImpl)reqMessage.getSOAPBody();
        
         SOAPContentElement bodyElement = (SOAPContentElement)body.getBodyElement();
         Source source = bodyElement.getXMLFragment().getSource();
         if (source == null)
            throw new IllegalStateException("Payload cannot be null");

         epInv.setRequestParamValue(xmlName, source);
View Full Code Here

         SOAPMessageImpl resMessage = (SOAPMessageImpl)factory.createMessage();
         msgContext.setSOAPMessage(resMessage);

         ParameterMetaData retParameter = opMetaData.getReturnParameter();
         QName xmlName = retParameter.getXmlName();
         SOAPBodyImpl soapBody = (SOAPBodyImpl)resMessage.getSOAPBody();
         SOAPContentElement bodyElement = new SOAPBodyElementDoc(xmlName);
         bodyElement = (SOAPContentElement)soapBody.addChildElement(bodyElement);

         Source payload = (Source)epInv.getReturnValue();
         bodyElement.setXMLFragment(new XMLFragment(payload));

         return resMessage;
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.soap.SOAPBodyImpl

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.