synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asan...@apache.org
Subject svn commit: r573184 - in /webservices/synapse/trunk/java/modules/samples: services/MTOMSwASampleService/src/samples/services/ src/main/java/samples/common/ src/main/java/samples/userguide/ src/test/java/org/apache/synapse/samples/n2n/
Date Thu, 06 Sep 2007 08:56:55 GMT
Author: asankha
Date: Thu Sep  6 01:56:54 2007
New Revision: 573184

URL: http://svn.apache.org/viewvc?rev=573184&view=rev
Log:
change namespace used in samples from http://www.apache-synapse.org/test to http://services.samples/xsd
as axis2 1.3 forced us to make this correction for RPC sample services

Modified:
    webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/src/samples/services/MTOMSwASampleService.java
    webservices/synapse/trunk/java/modules/samples/src/main/java/samples/common/StockQuoteHandler.java
    webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java
    webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/AbstractAutomationTestCase.java

Modified: webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/src/samples/services/MTOMSwASampleService.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/src/samples/services/MTOMSwASampleService.java?rev=573184&r1=573183&r2=573184&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/src/samples/services/MTOMSwASampleService.java
(original)
+++ webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/src/samples/services/MTOMSwASampleService.java
Thu Sep  6 01:56:54 2007
@@ -38,8 +38,8 @@
     public OMElement uploadFileUsingMTOM(OMElement request) throws Exception {
 
         OMText binaryNode = (OMText) request.
-            getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "request")).
-            getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "image")).
+            getFirstChildWithName(new QName("http://services.samples/xsd", "request")).
+            getFirstChildWithName(new QName("http://services.samples/xsd", "image")).
             getFirstOMChild();
         DataHandler dataHandler = (DataHandler) binaryNode.getDataHandler();
         InputStream is = dataHandler.getInputStream();
@@ -59,7 +59,7 @@
         System.out.println("Wrote MTOM content to temp file : " + tempFile.getAbsolutePath());
 
         OMFactory factory = request.getOMFactory();
-        OMNamespace ns = factory.createOMNamespace("http://www.apache-synapse.org/test",
"m0");
+        OMNamespace ns = factory.createOMNamespace("http://services.samples/xsd", "m0");
         OMElement payload  = factory.createOMElement("uploadFileUsingMTOMResponse", ns);
         OMElement response = factory.createOMElement("response", ns);
         OMElement image    = factory.createOMElement("image", ns);
@@ -83,8 +83,8 @@
     public OMElement uploadFileUsingSwA(OMElement request) throws Exception {
 
         String imageContentId = request.
-            getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "request")).
-            getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "imageId")).
+            getFirstChildWithName(new QName("http://services.samples/xsd", "request")).
+            getFirstChildWithName(new QName("http://services.samples/xsd", "imageId")).
             getText();
 
         MessageContext msgCtx   = MessageContext.getCurrentMessageContext();
@@ -104,7 +104,7 @@
             org.apache.axis2.Constants.VALUE_TRUE);
 
         OMFactory factory = request.getOMFactory();
-        OMNamespace ns = factory.createOMNamespace("http://www.apache-synapse.org/test",
"m0");
+        OMNamespace ns = factory.createOMNamespace("http://services.samples/xsd", "m0");
         OMElement payload  = factory.createOMElement("uploadFileUsingSwAResponse", ns);
         OMElement response = factory.createOMElement("response", ns);
         OMElement imageId  = factory.createOMElement("imageId", ns);

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/common/StockQuoteHandler.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/common/StockQuoteHandler.java?rev=573184&r1=573183&r2=573184&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/common/StockQuoteHandler.java
(original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/common/StockQuoteHandler.java
Thu Sep  6 01:56:54 2007
@@ -39,7 +39,7 @@
 
     /**
      * Create a new custom quote request with a body as follows
-     * <m0:CheckPriceRequest xmlns:m0="http://www.apache-synapse.org/test">
+     * <m0:CheckPriceRequest xmlns:m0="http://services.samples/xsd">
      *   <m0:Code>symbol</m0:Code>
      * </m0:CheckPriceRequest>
      * @param symbol the stock symbol
@@ -48,7 +48,7 @@
     public static OMElement createCustomQuoteRequest(String symbol) {
         OMFactory factory   = OMAbstractFactory.getOMFactory();
         OMNamespace ns      = factory.createOMNamespace(
-            "http://www.apache-synapse.org/test", "m0");
+            "http://services.samples/xsd", "m0");
         OMElement chkPrice  = factory.createOMElement("CheckPriceRequest", ns);
         OMElement code      = factory.createOMElement("Code", ns);
         chkPrice.addChild(code);
@@ -329,7 +329,7 @@
     public static String parseCustomQuoteResponse(OMElement result) throws Exception {
 
         AXIOMXPath xPath = new AXIOMXPath("//ns:Price");
-        xPath.addNamespace("ns","http://www.apache-synapse.org/test");
+        xPath.addNamespace("ns","http://services.samples/xsd");
         OMElement price = (OMElement) xPath.selectSingleNode(result);        
         if (price != null) {
             return price.getText();

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java?rev=573184&r1=573183&r2=573184&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java
(original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java
Thu Sep  6 01:56:54 2007
@@ -87,7 +87,7 @@
 
         SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
         SOAPEnvelope env = factory.getDefaultEnvelope();
-        OMNamespace ns = factory.createOMNamespace("http://www.apache-synapse.org/test",
"m0");
+        OMNamespace ns = factory.createOMNamespace("http://services.samples/xsd", "m0");
         OMElement payload = factory.createOMElement("uploadFileUsingSwA", ns);
         OMElement request = factory.createOMElement("request", ns);
         OMElement imageId = factory.createOMElement("imageId", ns);
@@ -103,9 +103,9 @@
 
         SOAPBody body = response.getEnvelope().getBody();
         String imageContentId = body.
-                getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "uploadFileUsingSwAResponse")).
-                getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "response")).
-                getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "imageId")).
+                getFirstChildWithName(new QName("http://services.samples/xsd", "uploadFileUsingSwAResponse")).
+                getFirstChildWithName(new QName("http://services.samples/xsd", "response")).
+                getFirstChildWithName(new QName("http://services.samples/xsd", "imageId")).
                 getText();
 
         Attachments attachment = response.getAttachmentMap();
@@ -123,7 +123,7 @@
 
     public static OMElement sendUsingMTOM(String fileName, String targetEPR) throws IOException
{
         OMFactory factory = OMAbstractFactory.getOMFactory();
-        OMNamespace ns = factory.createOMNamespace("http://www.apache-synapse.org/test",
"m0");
+        OMNamespace ns = factory.createOMNamespace("http://services.samples/xsd", "m0");
         OMElement payload = factory.createOMElement("uploadFileUsingMTOM", ns);
         OMElement request = factory.createOMElement("request", ns);
         OMElement image = factory.createOMElement("image", ns);
@@ -146,8 +146,8 @@
         OMElement response = serviceClient.sendReceive(payload);
 
         OMText binaryNode = (OMText) response.
-                getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "response")).
-                getFirstChildWithName(new QName("http://www.apache-synapse.org/test", "image")).
+                getFirstChildWithName(new QName("http://services.samples/xsd", "response")).
+                getFirstChildWithName(new QName("http://services.samples/xsd", "image")).
                 getFirstOMChild();
         dataHandler = (DataHandler) binaryNode.getDataHandler();
         InputStream is = dataHandler.getInputStream();

Modified: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/AbstractAutomationTestCase.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/AbstractAutomationTestCase.java?rev=573184&r1=573183&r2=573184&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/AbstractAutomationTestCase.java
(original)
+++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/AbstractAutomationTestCase.java
Thu Sep  6 01:56:54 2007
@@ -58,7 +58,7 @@
 
     protected void setUpNSContext() {
         Map m = new HashMap();
-        m.put("ms", "http://www.apache-synapse.org/test");
+        m.put("ms", "http://services.samples/xsd");
         m.put("ns", "http://services.samples/xsd");
         NamespaceContext nsCtx = new SimpleNamespaceContext(m);
         XMLUnit.setXpathNamespaceContext(nsCtx);



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message