Package org.apache.axis.server

Examples of org.apache.axis.server.AxisServer


    public void testDataWithHrefs () throws Exception {
        doTestData(true);
    }       

    public void doTestData (boolean multiref) throws Exception {
        MessageContext msgContext = new MessageContext(new AxisServer());
        SOAPEnvelope msg = new SOAPEnvelope();
        RPCParam arg1 = new RPCParam("urn:myNamespace", "testParam", "this is a string");
       
        Data data = new Data();
        data.stringMember = "String member";
View Full Code Here


    }

    protected void setUp() throws Exception {
        try {
            SimpleProvider provider = new SimpleProvider();
            server = new AxisServer(provider);
            transport = new LocalTransport(server);

            SOAPService service = new SOAPService(new RPCProvider());
            ServiceDesc desc = service.getInitializedServiceDesc(null);
            desc.setDefaultNamespace(SERVICE_NAME);
View Full Code Here

        // register the service with the engine
        SOAPService target = new SOAPService(new RPCProvider());
        provider.deployService(new QName(null,namespace), target);

        // setup
        AxisEngine engine = new AxisServer(provider);
        engine.init();

        // create a message in context
        MessageContext msgContext = new MessageContext(engine);
        Message message = new Message(request);
        message.setMessageContext(msgContext);
View Full Code Here

     * @todo add catch for not being able to cast the context attr to an
     * engine and reinit the engine if so.
     */
    public static AxisServer getEngine(HttpServlet servlet) throws AxisFault
    {
        AxisServer engine = null;
        if (isDebug)
            log.debug("Enter: getEngine()");

        ServletContext context = servlet.getServletContext();
        synchronized (context) {
View Full Code Here


    public TestDeser(String name) {
        super(name);

        server = new AxisServer();

        TypeMappingRegistry tmr = server.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) tmr.createTypeMapping();
        tm.setSupportedEncodings(new String[] {Constants.URI_SOAP12_ENC});
        tmr.register(Constants.URI_SOAP12_ENC, tm);
View Full Code Here

    public static final String FAULTNODE = "node";

    public void testFault() throws Exception
    {
        // Serialize
        MessageContext msgContext = new MessageContext(new AxisServer());
        msgContext.setSOAPConstants(SOAPConstants.SOAP12_CONSTANTS);
        msgContext.setProperty(Constants.MC_NO_OPERATION_OK, Boolean.TRUE);
       
        SOAPEnvelope msg = new SOAPEnvelope(SOAPConstants.SOAP12_CONSTANTS);

        SOAPFault fault = new SOAPFault(new AxisFault(FAULTCODE, FAULTSUBCODE,
                                                      FAULTREASON, FAULTROLE,
                                                      FAULTNODE, null));

        msg.addBodyElement(fault);
        Writer stringWriter = new StringWriter();
        SerializationContext context =
                new SerializationContextImpl(stringWriter, msgContext);
        context.setDoMultiRefs(false);
        msg.output(context);
        String msgString = stringWriter.toString();

        // Deserialize and check
        AxisServer server = new AxisServer();
        Message message = new Message(msgString);
        message.setMessageContext(new MessageContext(server));

        SOAPEnvelope envelope = message.getSOAPEnvelope();
        assertNotNull("envelope should not be null", envelope);
View Full Code Here

        AxisEngine engine;
        if ( args[0].equals("client") )
            engine = new AxisClient();
        else
            engine = new AxisServer();
        engine.setShouldSaveConfig(true);
        engine.init();
        MessageContext msgContext = new MessageContext(engine);

        try {
View Full Code Here

    public void testDataWithHrefs () throws Exception {
        doTestData(true);
    }

    public void doTestData (boolean multiref) throws Exception {
        MessageContext msgContext = new MessageContext(new AxisServer());
        SOAPEnvelope msg = new SOAPEnvelope();
        RPCParam arg1 = new RPCParam("urn:myNamespace", "testParam", "this is a string");

        Data data = new Data();
        data.stringMember = "String member";
View Full Code Here

                     val.floatMember.floatValue(), 0.00001F);
    }
   
    public void testAttributeQNames() throws Exception {
        String NS1 = "urn:foo";
        MessageContext context = new MessageContext(new AxisServer());
        StringWriter writer = new StringWriter();
        SerializationContextImpl ser = new SerializationContextImpl(writer);
        ser.registerPrefixForURI("", NS1);
        ser.startElement(new QName(NS1, "e1"), null);
        String foo = ser.attributeQName2String(new QName(NS1, "attr"));
View Full Code Here

        // If there was no exception, we succeeded in serializing it.
    }

    public void testEmptyXMLNS() throws Exception
    {
        MessageContext msgContext = new MessageContext(new AxisServer());
        String req =
                "<xsd1:A xmlns:xsd1=\"urn:myNamespace\">"
                + "<xsd1:B>"
                + "<xsd1:C>foo bar</xsd1:C>"
                + "</xsd1:B>"
View Full Code Here

TOP

Related Classes of org.apache.axis.server.AxisServer

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.