Package org.apache.axis.message

Examples of org.apache.axis.message.SOAPEnvelope.addBodyElement()


        // Create a SOAP body and set the XML element of the token request (a <RequestSecurityToken> element)
        // as its only child
        SOAPBodyElement sbe = new SOAPBodyElement(tokenRequest.getElement());

        // Add the body element to the SOAP envelope
        env.addBodyElement(sbe);

        System.out.println("\n============= Request ==============");
        System.out.println(XMLUtils.DocumentToString(env.getAsDocument()));
   
        // This is where we actually invoke the service, sending the request we've constructed
View Full Code Here


            {
               try
               {
                  SOAPEnvelope env = responseMsg.getSOAPEnvelope(  );
                  env.clearBody(  );
                  env.addBodyElement( new SOAPFault( (AxisFault) e ) );
               }
               catch ( AxisFault fault )
               {
                  // Should never reach here!
               }
View Full Code Here

                SOAPEnvelope responseEnvelope = responseMessage.getSOAPEnvelope();
                ServiceDesc serviceDescription = messageContext.getService().getServiceDescription();
                RPCElement responseBody = createResponseBody(requestBody, messageContext, operation, serviceDescription, object, responseEnvelope, getInOutParams());

                responseEnvelope.removeBody();
                responseEnvelope.addBodyElement(responseBody);
            } catch (Exception e) {
                throw new RuntimeException("Failed while creating response message body", e);
            }
        }
View Full Code Here

                axisFault = new AxisFault("Server", "Server Error", null, null);
            }

            SOAPFault fault = new SOAPFault(axisFault);
            SOAPEnvelope envelope = new SOAPEnvelope();
            envelope.addBodyElement(fault);
            Message message = new Message(envelope);
            message.setMessageType(Message.RESPONSE);
            messageContext.setResponseMessage(message);
        }
View Full Code Here

        data2.floatMember = new Float("4.56");
        data2.dataMember = null// "data;" for loop-test of multi-refs
*/
        RPCParam arg2 = new RPCParam("", "struct", tokenResponse);
        RPCElement body = new RPCElement("urn:myNamespace", "method1", new Object[]{arg1, arg2});
        msg.addBodyElement(body);

        try {
            Reader reader = null;

            if (args.length == 0) {
View Full Code Here

        // Create a SOAP body and set the XML element of the token request (a <RequestSecurityToken> element)
        // as its only child
        SOAPBodyElement sbe = new SOAPBodyElement(tokenRequest.getElement());

        // Add the body element to the SOAP envelope
        env.addBodyElement(sbe);

        System.out.println("\n============= Request ==============");
        System.out.println(XMLUtils.DocumentToString(env.getAsDocument()));
   
        // This is where we actually invoke the service, sending the request we've constructed
View Full Code Here

                SOAPEnvelope responseEnvelope = responseMessage.getSOAPEnvelope();
                ServiceDesc serviceDescription = messageContext.getService().getServiceDescription();
                RPCElement responseBody = createResponseBody(requestBody, messageContext, operation, serviceDescription, object, responseEnvelope, getInOutParams());

                responseEnvelope.removeBody();
                responseEnvelope.addBodyElement(responseBody);
            } catch (Exception e) {
                throw new RuntimeException("Failed while creating response message body", e);
            }
        }
View Full Code Here

                axisFault = new AxisFault("Server", "Server Error", null, null);
            }

            SOAPFault fault = new SOAPFault(axisFault);
            SOAPEnvelope envelope = new SOAPEnvelope();
            envelope.addBodyElement(fault);
            Message message = new Message(envelope);
            message.setMessageType(Message.RESPONSE);
            messageContext.setResponseMessage(message);
        }
View Full Code Here

            Call call = (Call) service.createCall();
            call.setTargetEndpointAddress(new java.net.URL(opts.getURL()));

            SOAPEnvelope env = new SOAPEnvelope();
            SOAPBodyElement sbe = new SOAPBodyElement(XMLUtils.StringToElement("http://localhost:8080/LogTestService", "testMethod", ""));
            env.addBodyElement(sbe);

            env = new SignedSOAPEnvelope(env, "http://xml-security");

            System.out.println("\n============= Request ==============");
            XMLUtils.PrettyElementToStream(env.getAsDOM(), System.out);
View Full Code Here

            {
               try
               {
                  SOAPEnvelope env = responseMsg.getSOAPEnvelope(  );
                  env.clearBody(  );
                  env.addBodyElement( new SOAPFault( (AxisFault) e ) );
               }
               catch ( AxisFault fault )
               {
                  // Should never reach here!
               }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.