Examples of SourceTransformer


Examples of org.apache.servicemix.jbi.jaxp.SourceTransformer

        me.setService(new QName("http://test", "MyProviderService"));
        me.getInMessage().setContent(new StringSource("<echo xmlns='http://test'><echoin0>world</echoin0></echo>"));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getFault() != null) {
                fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
            } else if (me.getError() != null) {
                throw me.getError();
            } else {
                fail("Received ERROR status");
            }
        } else {
            logger.info(new SourceTransformer().toString(me.getOutMessage().getContent()));
        }
    }
View Full Code Here

Examples of org.apache.torque.generator.source.transform.SourceTransformer

                    + " Could not link class " + className
                    + " : " + e.getMessage());
            throw e;
        }

        SourceTransformer result;
        try
        {
            Constructor<?> constructor
                    = transformerClass.getConstructor();
            result = (SourceTransformer) constructor.newInstance();
View Full Code Here

Examples of org.servicemix.jbi.jaxp.SourceTransformer

                            "). WSDL description may be unusable.");
            }
           
            // put service description
            try {
                SourceTransformer st = new SourceTransformer();
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                component.getXFire().generateWSDL(svc.getName(), baos);
                Node node = st.toDOMNode(new StreamSource(new ByteArrayInputStream(baos.toByteArray())));
                Definition d = WSDLFactory.newInstance().newWSDLReader().readWSDL(null, (Document) node);
                javax.wsdl.Service service = d.getService(serviceName);
                if (service != null) {
                    if (service.getPorts().values().size() == 1) {
                        endpointName = ((Port) service.getPorts().values().iterator().next()).getName();
                        // Check if this is the same as defined in endpoint spec
                        if (es.getEndpointName() == null) {
                            es.setEndpointName(endpointName);
                        } else if (!es.getEndpointName().equals(endpointName)) {
                            logger.warn("The endpoint name defined in the wsdl (" + endpointName +
                                    ") does not match the endpoint name defined in the endpoint spec (" + es.getEndpointName() +
                            "). WSDL description may be unusable.");
                        }
                    }
                }
                if (es.getEndpointName() == null) {
                    throw new IllegalArgumentException("endpointName should be provided on the endpointSpec");
                }
                component.setServiceDescription(es.getServiceName(), es.getEndpointName(), (Document) node);
                if (logger.isDebugEnabled()) {
                    logger.debug("WSDL: " + st.toString(node));
                }
            } catch (Exception e) {
                logger.warn("Could not set endpoint description", e);
            }
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.