[Openbus-cvs-commits] Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inonly SoapBind
Status: Alpha
Brought to you by:
esancho
|
From: Diego E. <er...@us...> - 2005-07-17 21:19:37
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inonly In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26340/src/test/org/openbus/jbi/messaging/examples/inonly Modified Files: SoapBinding.java Added Files: SoapBindingDefinition.wsdl Removed Files: SoapBindingDefinition.xml Log Message: changed WSDL xml file extension to wsdl Index: SoapBinding.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inonly/SoapBinding.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SoapBinding.java 10 Jul 2005 18:31:50 -0000 1.6 --- SoapBinding.java 17 Jul 2005 21:19:28 -0000 1.7 *************** *** 1,6 **** package org.openbus.jbi.messaging.examples.inonly; - import java.io.FileNotFoundException; - import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; --- 1,4 ---- *************** *** 16,28 **** import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; - import javax.xml.transform.Result; - import javax.xml.transform.Source; - import javax.xml.transform.Transformer; - import javax.xml.transform.TransformerConfigurationException; - import javax.xml.transform.TransformerException; - import javax.xml.transform.TransformerFactory; - import javax.xml.transform.TransformerFactoryConfigurationError; - import javax.xml.transform.dom.DOMSource; - import javax.xml.transform.stream.StreamResult; import junit.framework.Assert; --- 14,17 ---- *************** *** 183,187 **** InputStream is = getClass().getResourceAsStream( ! "SoapBindingDefinition.xml"); DOMParser parser = new DOMParser(); try { --- 172,176 ---- InputStream is = getClass().getResourceAsStream( ! "SoapBindingDefinition.wsdl"); DOMParser parser = new DOMParser(); try { *************** *** 222,253 **** } ! public void writeDocument(Document doc, String filename) { ! Source source = new DOMSource(doc); ! // Prepare the output file ! // File file = new File("output.xml"); ! // System.out.println("File exists " + file.exists()); ! Result rs = null; ! try { ! rs = new StreamResult(new FileOutputStream(filename)); ! } catch (FileNotFoundException e1) { ! // TODO Auto-generated catch block ! e1.printStackTrace(); ! } ! // Write the DOM document to the file ! Transformer xformer; ! ! try { ! xformer = TransformerFactory.newInstance().newTransformer(); ! xformer.transform(source, rs); ! } catch (TransformerConfigurationException e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } catch (TransformerFactoryConfigurationError e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } catch (TransformerException e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } ! } } --- 211,242 ---- } ! // public void writeDocument(Document doc, String filename) { ! // Source source = new DOMSource(doc); ! // // Prepare the output file ! // // File file = new File("output.xml"); ! // // System.out.println("File exists " + file.exists()); ! // Result rs = null; ! // try { ! // rs = new StreamResult(new FileOutputStream(filename)); ! // } catch (FileNotFoundException e1) { ! // // TODO Auto-generated catch block ! // e1.printStackTrace(); ! // } ! // // Write the DOM document to the file ! // Transformer xformer; ! // ! // try { ! // xformer = TransformerFactory.newInstance().newTransformer(); ! // xformer.transform(source, rs); ! // } catch (TransformerConfigurationException e) { ! // // TODO Auto-generated catch block ! // e.printStackTrace(); ! // } catch (TransformerFactoryConfigurationError e) { ! // // TODO Auto-generated catch block ! // e.printStackTrace(); ! // } catch (TransformerException e) { ! // // TODO Auto-generated catch block ! // e.printStackTrace(); ! // } ! // } } --- NEW FILE: SoapBindingDefinition.wsdl --- <?xml version="1.0"?> <definitions name="service1" targetNamespace="http://abc.com/services" xmlns:tns="http://abc.com/services" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <message name="getQuoteInput"> <part name="symbol" type="xsd:string"/> </message> <message name="getQuoteOutput"> <part name="quote" type="xsd:float"/> </message> <portType name="GetQuote"> <operation name="updateStatus"> <input message="tns:getQuoteInput"/> <output message="tns:getQuoteOutput"/> </operation> </portType> <binding name="GetQuoteSoapBinding" type="tns:GetQuote"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="updateStatus"> <soap:operation soapAction=""/> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:xmltoday-delayed-quotes"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:xmltoday-delayed-quotes"/> </output> </operation> </binding> <service name="service1"> <port name="StockQuotePort" binding="tns:GetQuoteSoapBinding"> <soap:address location="http://www.fremantle.org/soap/servlet/rpcrouter"/> </port> </service> </definitions> --- SoapBindingDefinition.xml DELETED --- |