Package org.servicemix.components.jaxws

Source Code of org.servicemix.components.jaxws.JAXWSOutTest

/**
*
* Copyright 2005 LogicBlaze, Inc. http://www.logicblaze.com
*
* Licensed 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.servicemix.components.jaxws;

import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamResult;

import java.io.ByteArrayOutputStream;

import org.servicemix.TestSupport;
import org.servicemix.jbi.jaxp.ResourceSource;
import org.servicemix.jbi.jaxp.SourceTransformer;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.w3c.dom.Node;
import org.xbean.spring.context.ClassPathXmlApplicationContext;

/**
* @version $Revision: 680 $
*/
public class JAXWSOutTest extends TestSupport {

    protected String quote = "SUNW";

    public void testJAXWSService() throws Exception {
        QName serviceName = new QName("http://jaxws.components.servicemix.org/", "AddNumbersService");
        String file = "request.xml";

        Object answer = requestServiceWithFileRequest(serviceName, file);
        assertTrue("Shoud return a DOM Node: " + answer, answer instanceof Node);
        Node node = (Node) answer;
        System.out.println(transformer.toString(node));

        /*
        String text = textValueOfXPath(node, "//Result").trim();

        System.out.println("Found price: " + text);

        assertTrue("price text should not be empty", text.length() > 0);
        */

    }

    protected AbstractXmlApplicationContext createBeanFactory() {
        return new ClassPathXmlApplicationContext("org/servicemix/components/jaxws/jaxws-out.xml");
    }
}
TOP

Related Classes of org.servicemix.components.jaxws.JAXWSOutTest

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.