You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Andrew J. Leer (JIRA)" <ji...@apache.org> on 2007/02/20 06:08:05 UTC

[jira] Created: (AXIS2-2222) When

When 
-----

                 Key: AXIS2-2222
                 URL: https://issues.apache.org/jira/browse/AXIS2-2222
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.1.1
         Environment: WindowsXP Service Pack 2, Maven2, Java 1.5, Duo Core Processor
            Reporter: Andrew J. Leer


    The Error wrote:
    org.apache.axis2.AxisFault: Transport out has not been set
            at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:662)
            at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
            at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
            at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
            at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
            at com.mooo.mv.demo.ws.AppTest.testServiceClient(AppTest.java:111)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at junit.framework.TestCase.runTest(TestCase.java:154)
            at junit.framework.TestCase.runBare(TestCase.java:127)
            at junit.framework.TestResult$1.protect(TestResult.java:106)
            at junit.framework.TestResult.runProtected(TestResult.java:124)
            at junit.framework.TestResult.run(TestResult.java:109)
            at junit.framework.TestCase.run(TestCase.java:118)
            at junit.framework.TestSuite.runTest(TestSuite.java:208)
            at junit.framework.TestSuite.run(TestSuite.java:203)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    package com.mooo.mv.demo.ws;

    import java.io.PrintStream;
    import java.io.StringReader;

    import javax.xml.namespace.QName;
    import javax.xml.stream.XMLInputFactory;
    import javax.xml.stream.XMLStreamReader;

    import org.apache.axiom.om.OMAbstractFactory;
    import org.apache.axiom.om.OMElement;
    import org.apache.axiom.om.OMFactory;
    import org.apache.axiom.om.OMNamespace;
    import org.apache.axiom.om.impl.builder.StAXOMBuilder;
    import org.apache.axis2.Constants;
    import org.apache.axis2.addressing.AddressingConstants;
    import org.apache.axis2.addressing.EndpointReference;
    import org.apache.axis2.client.Options;
    import org.apache.axis2.client.ServiceClient;
    import org.apache.axis2.description.TransportOutDescription;
    import org.apache.axis2.transport.http.HTTPConstants;

    import junit.framework.Test;
    import junit.framework.TestCase;
    import junit.framework.TestSuite;

    /**
     * Unit test for simple App.
     */
    public class AppTest
        extends TestCase
    {
        /**
         * Create the test case
         *
         * @param testName name of the test case
         */
        public AppTest( String testName )
        {
            super( testName );
        }

        /**
         * @return the suite of tests being tested
         */
        public static Test suite()
        {
            return new TestSuite( AppTest.class );
        }

        public static OMElement getPayload()
        {
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMNamespace omNs = fac.createOMNamespace("http://bible.sumerano.com/", "tns");

            OMElement method = fac.createOMElement("GetTranslations", omNs);


    //        OMElement method = fac.createOMElement("getPrice", omNs);
    //        OMElement value = fac.createOMElement("symbol", omNs);
    //        value.addChild(fac.createOMText(value, symbol));
    //        method.addChild(value);
            return method;
        }

        public void testServiceClient() throws Exception
        {
        OMElement xmlPayload = getPayload();

        PrintStream ps = System.out;
        xmlPayload.serialize(ps);

        Options options = new Options();
        options.setTo(new EndpointReference("http://bible.sumerano.com/bible.asmx?WSDL"));
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

        ServiceClient sender = new ServiceClient();
        sender.setOptions(options);

        options.setUseSeparateListener(false);
        OMElement result = sender.sendReceive(xmlPayload);

        result.serialize(ps);

        }
    }

Now I understand that I've already set the "in" transport protocol.  But I really do not know how to set the "out" transport protocol or why I have to do it.  The client example in the Axis2 documentation (http://ws.apache.org/axis2/1_1_1/quickstartguide.html) does not require this:

    Client Example from quick start guide wrote:
    package samples.quickstart.clients;

    import org.apache.axiom.om.OMAbstractFactory;
    import org.apache.axiom.om.OMElement;
    import org.apache.axiom.om.OMFactory;
    import org.apache.axiom.om.OMNamespace;
    import org.apache.axis2.Constants;
    import org.apache.axis2.addressing.EndpointReference;
    import org.apache.axis2.client.Options;
    import org.apache.axis2.client.ServiceClient;

    public class AXIOMClient {

        private static EndpointReference targetEPR =
            new EndpointReference("http://localhost:8080/axis2/services/StockQuoteService");

        public static OMElement getPricePayload(String symbol) {
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");

            OMElement method = fac.createOMElement("getPrice", omNs);
            OMElement value = fac.createOMElement("symbol", omNs);
            value.addChild(fac.createOMText(value, symbol));
            method.addChild(value);
            return method;
        }

        public static OMElement updatePayload(String symbol, double price) {
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");

            OMElement method = fac.createOMElement("update", omNs);

            OMElement value1 = fac.createOMElement("symbol", omNs);
            value1.addChild(fac.createOMText(value1, symbol));
            method.addChild(value1);`q

            OMElement value2 = fac.createOMElement("price", omNs);
            value2.addChild(fac.createOMText(value2,
                                             Double.toString(price)));
            method.addChild(value2);
            return method;
        }

        public static void main(String[] args) {
            try {
                OMElement getPricePayload = getPricePayload("WSO");
                OMElement updatePayload = updatePayload("WSO", 123.42);
                Options options = new Options();
                options.setTo(targetEPR);
                options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

                ServiceClient sender = new ServiceClient();
                sender.setOptions(options);

                sender.fireAndForget(updatePayload);
                System.err.println("done");
                OMElement result = sender.sendReceive(getPricePayload);

                String response = result.getFirstElement().getText();
                System.err.println("Current price of WSO: " + response);

            } catch (Exception e) {
                e.printStackTrace();
            }
        }
       
    }

Is this something that hasn't been updated in the tutorial or is there something that I'm missing here?

Thank you,
   Andrew J. Leer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (AXIS2-2222) When

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-2222:
----------------------------------------

    Assignee: Deepal Jayasinghe

> When 
> -----
>
>                 Key: AXIS2-2222
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2222
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>         Environment: WindowsXP Service Pack 2, Maven2, Java 1.5, Duo Core Processor
>            Reporter: Andrew J. Leer
>         Assigned To: Deepal Jayasinghe
>         Attachments: wsaxis2demoBug.zip
>
>
>     The Error wrote:
>     org.apache.axis2.AxisFault: Transport out has not been set
>             at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:662)
>             at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
>             at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>             at com.mooo.mv.demo.ws.AppTest.testServiceClient(AppTest.java:111)
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>             at java.lang.reflect.Method.invoke(Method.java:585)
>             at junit.framework.TestCase.runTest(TestCase.java:154)
>             at junit.framework.TestCase.runBare(TestCase.java:127)
>             at junit.framework.TestResult$1.protect(TestResult.java:106)
>             at junit.framework.TestResult.runProtected(TestResult.java:124)
>             at junit.framework.TestResult.run(TestResult.java:109)
>             at junit.framework.TestCase.run(TestCase.java:118)
>             at junit.framework.TestSuite.runTest(TestSuite.java:208)
>             at junit.framework.TestSuite.run(TestSuite.java:203)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>     package com.mooo.mv.demo.ws;
>     import java.io.PrintStream;
>     import java.io.StringReader;
>     import javax.xml.namespace.QName;
>     import javax.xml.stream.XMLInputFactory;
>     import javax.xml.stream.XMLStreamReader;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.AddressingConstants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     import org.apache.axis2.description.TransportOutDescription;
>     import org.apache.axis2.transport.http.HTTPConstants;
>     import junit.framework.Test;
>     import junit.framework.TestCase;
>     import junit.framework.TestSuite;
>     /**
>      * Unit test for simple App.
>      */
>     public class AppTest
>         extends TestCase
>     {
>         /**
>          * Create the test case
>          *
>          * @param testName name of the test case
>          */
>         public AppTest( String testName )
>         {
>             super( testName );
>         }
>         /**
>          * @return the suite of tests being tested
>          */
>         public static Test suite()
>         {
>             return new TestSuite( AppTest.class );
>         }
>         public static OMElement getPayload()
>         {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://bible.sumerano.com/", "tns");
>             OMElement method = fac.createOMElement("GetTranslations", omNs);
>     //        OMElement method = fac.createOMElement("getPrice", omNs);
>     //        OMElement value = fac.createOMElement("symbol", omNs);
>     //        value.addChild(fac.createOMText(value, symbol));
>     //        method.addChild(value);
>             return method;
>         }
>         public void testServiceClient() throws Exception
>         {
>         OMElement xmlPayload = getPayload();
>         PrintStream ps = System.out;
>         xmlPayload.serialize(ps);
>         Options options = new Options();
>         options.setTo(new EndpointReference("http://bible.sumerano.com/bible.asmx?WSDL"));
>         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>         ServiceClient sender = new ServiceClient();
>         sender.setOptions(options);
>         options.setUseSeparateListener(false);
>         OMElement result = sender.sendReceive(xmlPayload);
>         result.serialize(ps);
>         }
>     }
> Now I understand that I've already set the "in" transport protocol.  But I really do not know how to set the "out" transport protocol or why I have to do it.  The client example in the Axis2 documentation (http://ws.apache.org/axis2/1_1_1/quickstartguide.html) does not require this:
>     Client Example from quick start guide wrote:
>     package samples.quickstart.clients;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     public class AXIOMClient {
>         private static EndpointReference targetEPR =
>             new EndpointReference("http://localhost:8080/axis2/services/StockQuoteService");
>         public static OMElement getPricePayload(String symbol) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("getPrice", omNs);
>             OMElement value = fac.createOMElement("symbol", omNs);
>             value.addChild(fac.createOMText(value, symbol));
>             method.addChild(value);
>             return method;
>         }
>         public static OMElement updatePayload(String symbol, double price) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("update", omNs);
>             OMElement value1 = fac.createOMElement("symbol", omNs);
>             value1.addChild(fac.createOMText(value1, symbol));
>             method.addChild(value1);`q
>             OMElement value2 = fac.createOMElement("price", omNs);
>             value2.addChild(fac.createOMText(value2,
>                                              Double.toString(price)));
>             method.addChild(value2);
>             return method;
>         }
>         public static void main(String[] args) {
>             try {
>                 OMElement getPricePayload = getPricePayload("WSO");
>                 OMElement updatePayload = updatePayload("WSO", 123.42);
>                 Options options = new Options();
>                 options.setTo(targetEPR);
>                 options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                 ServiceClient sender = new ServiceClient();
>                 sender.setOptions(options);
>                 sender.fireAndForget(updatePayload);
>                 System.err.println("done");
>                 OMElement result = sender.sendReceive(getPricePayload);
>                 String response = result.getFirstElement().getText();
>                 System.err.println("Current price of WSO: " + response);
>             } catch (Exception e) {
>                 e.printStackTrace();
>             }
>         }
>        
>     }
> Is this something that hasn't been updated in the tutorial or is there something that I'm missing here?
> Thank you,
>    Andrew J. Leer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-2222) When

Posted by "Andrew J. Leer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew J. Leer updated AXIS2-2222:
----------------------------------

    Attachment: wsaxis2demoBug.zip

Deepal, 

   Here are the files that caused this bug to occur.  I have placed them in a zip file for you.

> When 
> -----
>
>                 Key: AXIS2-2222
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2222
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>         Environment: WindowsXP Service Pack 2, Maven2, Java 1.5, Duo Core Processor
>            Reporter: Andrew J. Leer
>         Attachments: wsaxis2demoBug.zip
>
>
>     The Error wrote:
>     org.apache.axis2.AxisFault: Transport out has not been set
>             at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:662)
>             at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
>             at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>             at com.mooo.mv.demo.ws.AppTest.testServiceClient(AppTest.java:111)
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>             at java.lang.reflect.Method.invoke(Method.java:585)
>             at junit.framework.TestCase.runTest(TestCase.java:154)
>             at junit.framework.TestCase.runBare(TestCase.java:127)
>             at junit.framework.TestResult$1.protect(TestResult.java:106)
>             at junit.framework.TestResult.runProtected(TestResult.java:124)
>             at junit.framework.TestResult.run(TestResult.java:109)
>             at junit.framework.TestCase.run(TestCase.java:118)
>             at junit.framework.TestSuite.runTest(TestSuite.java:208)
>             at junit.framework.TestSuite.run(TestSuite.java:203)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>     package com.mooo.mv.demo.ws;
>     import java.io.PrintStream;
>     import java.io.StringReader;
>     import javax.xml.namespace.QName;
>     import javax.xml.stream.XMLInputFactory;
>     import javax.xml.stream.XMLStreamReader;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.AddressingConstants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     import org.apache.axis2.description.TransportOutDescription;
>     import org.apache.axis2.transport.http.HTTPConstants;
>     import junit.framework.Test;
>     import junit.framework.TestCase;
>     import junit.framework.TestSuite;
>     /**
>      * Unit test for simple App.
>      */
>     public class AppTest
>         extends TestCase
>     {
>         /**
>          * Create the test case
>          *
>          * @param testName name of the test case
>          */
>         public AppTest( String testName )
>         {
>             super( testName );
>         }
>         /**
>          * @return the suite of tests being tested
>          */
>         public static Test suite()
>         {
>             return new TestSuite( AppTest.class );
>         }
>         public static OMElement getPayload()
>         {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://bible.sumerano.com/", "tns");
>             OMElement method = fac.createOMElement("GetTranslations", omNs);
>     //        OMElement method = fac.createOMElement("getPrice", omNs);
>     //        OMElement value = fac.createOMElement("symbol", omNs);
>     //        value.addChild(fac.createOMText(value, symbol));
>     //        method.addChild(value);
>             return method;
>         }
>         public void testServiceClient() throws Exception
>         {
>         OMElement xmlPayload = getPayload();
>         PrintStream ps = System.out;
>         xmlPayload.serialize(ps);
>         Options options = new Options();
>         options.setTo(new EndpointReference("http://bible.sumerano.com/bible.asmx?WSDL"));
>         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>         ServiceClient sender = new ServiceClient();
>         sender.setOptions(options);
>         options.setUseSeparateListener(false);
>         OMElement result = sender.sendReceive(xmlPayload);
>         result.serialize(ps);
>         }
>     }
> Now I understand that I've already set the "in" transport protocol.  But I really do not know how to set the "out" transport protocol or why I have to do it.  The client example in the Axis2 documentation (http://ws.apache.org/axis2/1_1_1/quickstartguide.html) does not require this:
>     Client Example from quick start guide wrote:
>     package samples.quickstart.clients;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     public class AXIOMClient {
>         private static EndpointReference targetEPR =
>             new EndpointReference("http://localhost:8080/axis2/services/StockQuoteService");
>         public static OMElement getPricePayload(String symbol) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("getPrice", omNs);
>             OMElement value = fac.createOMElement("symbol", omNs);
>             value.addChild(fac.createOMText(value, symbol));
>             method.addChild(value);
>             return method;
>         }
>         public static OMElement updatePayload(String symbol, double price) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("update", omNs);
>             OMElement value1 = fac.createOMElement("symbol", omNs);
>             value1.addChild(fac.createOMText(value1, symbol));
>             method.addChild(value1);`q
>             OMElement value2 = fac.createOMElement("price", omNs);
>             value2.addChild(fac.createOMText(value2,
>                                              Double.toString(price)));
>             method.addChild(value2);
>             return method;
>         }
>         public static void main(String[] args) {
>             try {
>                 OMElement getPricePayload = getPricePayload("WSO");
>                 OMElement updatePayload = updatePayload("WSO", 123.42);
>                 Options options = new Options();
>                 options.setTo(targetEPR);
>                 options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                 ServiceClient sender = new ServiceClient();
>                 sender.setOptions(options);
>                 sender.fireAndForget(updatePayload);
>                 System.err.println("done");
>                 OMElement result = sender.sendReceive(getPricePayload);
>                 String response = result.getFirstElement().getText();
>                 System.err.println("Current price of WSO: " + response);
>             } catch (Exception e) {
>                 e.printStackTrace();
>             }
>         }
>        
>     }
> Is this something that hasn't been updated in the tutorial or is there something that I'm missing here?
> Thank you,
>    Andrew J. Leer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-2222) When

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509004 ] 

Davanum Srinivas commented on AXIS2-2222:
-----------------------------------------

key here was commons-httpclient. we display better messages now.

thanks,
dims

> When 
> -----
>
>                 Key: AXIS2-2222
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2222
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>         Environment: WindowsXP Service Pack 2, Maven2, Java 1.5, Duo Core Processor
>            Reporter: Andrew J. Leer
>            Assignee: Deepal Jayasinghe
>         Attachments: wsaxis2demoBug.zip
>
>
>     The Error wrote:
>     org.apache.axis2.AxisFault: Transport out has not been set
>             at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:662)
>             at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
>             at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>             at com.mooo.mv.demo.ws.AppTest.testServiceClient(AppTest.java:111)
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>             at java.lang.reflect.Method.invoke(Method.java:585)
>             at junit.framework.TestCase.runTest(TestCase.java:154)
>             at junit.framework.TestCase.runBare(TestCase.java:127)
>             at junit.framework.TestResult$1.protect(TestResult.java:106)
>             at junit.framework.TestResult.runProtected(TestResult.java:124)
>             at junit.framework.TestResult.run(TestResult.java:109)
>             at junit.framework.TestCase.run(TestCase.java:118)
>             at junit.framework.TestSuite.runTest(TestSuite.java:208)
>             at junit.framework.TestSuite.run(TestSuite.java:203)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>     package com.mooo.mv.demo.ws;
>     import java.io.PrintStream;
>     import java.io.StringReader;
>     import javax.xml.namespace.QName;
>     import javax.xml.stream.XMLInputFactory;
>     import javax.xml.stream.XMLStreamReader;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.AddressingConstants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     import org.apache.axis2.description.TransportOutDescription;
>     import org.apache.axis2.transport.http.HTTPConstants;
>     import junit.framework.Test;
>     import junit.framework.TestCase;
>     import junit.framework.TestSuite;
>     /**
>      * Unit test for simple App.
>      */
>     public class AppTest
>         extends TestCase
>     {
>         /**
>          * Create the test case
>          *
>          * @param testName name of the test case
>          */
>         public AppTest( String testName )
>         {
>             super( testName );
>         }
>         /**
>          * @return the suite of tests being tested
>          */
>         public static Test suite()
>         {
>             return new TestSuite( AppTest.class );
>         }
>         public static OMElement getPayload()
>         {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://bible.sumerano.com/", "tns");
>             OMElement method = fac.createOMElement("GetTranslations", omNs);
>     //        OMElement method = fac.createOMElement("getPrice", omNs);
>     //        OMElement value = fac.createOMElement("symbol", omNs);
>     //        value.addChild(fac.createOMText(value, symbol));
>     //        method.addChild(value);
>             return method;
>         }
>         public void testServiceClient() throws Exception
>         {
>         OMElement xmlPayload = getPayload();
>         PrintStream ps = System.out;
>         xmlPayload.serialize(ps);
>         Options options = new Options();
>         options.setTo(new EndpointReference("http://bible.sumerano.com/bible.asmx?WSDL"));
>         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>         ServiceClient sender = new ServiceClient();
>         sender.setOptions(options);
>         options.setUseSeparateListener(false);
>         OMElement result = sender.sendReceive(xmlPayload);
>         result.serialize(ps);
>         }
>     }
> Now I understand that I've already set the "in" transport protocol.  But I really do not know how to set the "out" transport protocol or why I have to do it.  The client example in the Axis2 documentation (http://ws.apache.org/axis2/1_1_1/quickstartguide.html) does not require this:
>     Client Example from quick start guide wrote:
>     package samples.quickstart.clients;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     public class AXIOMClient {
>         private static EndpointReference targetEPR =
>             new EndpointReference("http://localhost:8080/axis2/services/StockQuoteService");
>         public static OMElement getPricePayload(String symbol) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("getPrice", omNs);
>             OMElement value = fac.createOMElement("symbol", omNs);
>             value.addChild(fac.createOMText(value, symbol));
>             method.addChild(value);
>             return method;
>         }
>         public static OMElement updatePayload(String symbol, double price) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("update", omNs);
>             OMElement value1 = fac.createOMElement("symbol", omNs);
>             value1.addChild(fac.createOMText(value1, symbol));
>             method.addChild(value1);`q
>             OMElement value2 = fac.createOMElement("price", omNs);
>             value2.addChild(fac.createOMText(value2,
>                                              Double.toString(price)));
>             method.addChild(value2);
>             return method;
>         }
>         public static void main(String[] args) {
>             try {
>                 OMElement getPricePayload = getPricePayload("WSO");
>                 OMElement updatePayload = updatePayload("WSO", 123.42);
>                 Options options = new Options();
>                 options.setTo(targetEPR);
>                 options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                 ServiceClient sender = new ServiceClient();
>                 sender.setOptions(options);
>                 sender.fireAndForget(updatePayload);
>                 System.err.println("done");
>                 OMElement result = sender.sendReceive(getPricePayload);
>                 String response = result.getFirstElement().getText();
>                 System.err.println("Current price of WSO: " + response);
>             } catch (Exception e) {
>                 e.printStackTrace();
>             }
>         }
>        
>     }
> Is this something that hasn't been updated in the tutorial or is there something that I'm missing here?
> Thank you,
>    Andrew J. Leer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-2222) When

Posted by "Esteve (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499757 ] 

Esteve commented on AXIS2-2222:
-------------------------------

Hi,
I have been experimenting this problem and I've solved it by including all required dependencies in the classpath. The message is not clear at all.
	<!-- Axis2 -->
		<dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2</artifactId>
			<version>${version.axis2}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
		    <groupId>org.apache.ws.commons.axiom</groupId>
		    <artifactId>axiom-api</artifactId>
		    <version>${version.axiom}</version>
		    <scope>compile</scope>
		</dependency>
		<dependency>
		    <groupId>org.apache.ws.commons.axiom</groupId>
		    <artifactId>axiom-impl</artifactId>
		    <version>${version.axiom}</version>
 		    <scope>compile</scope>
		</dependency>
		<dependency>
		    <groupId>stax</groupId>
		    <artifactId>stax</artifactId>
		    <version>${version.stax}</version>
 		    <scope>compile</scope>
		</dependency>
		<dependency>
		    <groupId>wsdl4j</groupId>
		    <artifactId>wsdl4j</artifactId>
		    <version>${version.wsdl4j}</version>
 		    <scope>compile</scope>
		</dependency>
		<dependency>
		    <groupId>org.apache.ws.commons.schema</groupId>
		    <artifactId>XmlSchema</artifactId>
		    <version>${version.XmlSchema}</version>
 		    <scope>compile</scope>
		</dependency>
      <dependency>
          <groupId>commons-fileupload</groupId>
          <artifactId>commons-fileupload</artifactId>
          <version>${version.commons.fileupload}</version>
          <type>jar</type>
          <scope>compile</scope>
      </dependency>
        <dependency>
            <groupId>jdom</groupId>
            <artifactId>jdom</artifactId>
            <version>1.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>oro</groupId>
            <artifactId>oro</artifactId>
            <version>2.0.8</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.0</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.0.4</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>annogen</groupId>
            <artifactId>annogen</artifactId>
            <version>0.1.0</version>
            <scope>compile</scope>
        </dependency>

        <version.log4j>1.2.14</version.log4j>
        <version.axis2>1.2</version.axis2>
        <version.axiom>1.2.4</version.axiom>
        <version.stax>1.2.0</version.stax>
        <version.staxutils>20040917</version.staxutils>
        <version.wsdl4j>1.6.2</version.wsdl4j>
        <version.XmlSchema>1.3.1</version.XmlSchema>
        <version.commons.fileupload>1.2</version.commons.fileupload>

> When 
> -----
>
>                 Key: AXIS2-2222
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2222
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>         Environment: WindowsXP Service Pack 2, Maven2, Java 1.5, Duo Core Processor
>            Reporter: Andrew J. Leer
>            Assignee: Deepal Jayasinghe
>         Attachments: wsaxis2demoBug.zip
>
>
>     The Error wrote:
>     org.apache.axis2.AxisFault: Transport out has not been set
>             at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:662)
>             at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
>             at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>             at com.mooo.mv.demo.ws.AppTest.testServiceClient(AppTest.java:111)
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>             at java.lang.reflect.Method.invoke(Method.java:585)
>             at junit.framework.TestCase.runTest(TestCase.java:154)
>             at junit.framework.TestCase.runBare(TestCase.java:127)
>             at junit.framework.TestResult$1.protect(TestResult.java:106)
>             at junit.framework.TestResult.runProtected(TestResult.java:124)
>             at junit.framework.TestResult.run(TestResult.java:109)
>             at junit.framework.TestCase.run(TestCase.java:118)
>             at junit.framework.TestSuite.runTest(TestSuite.java:208)
>             at junit.framework.TestSuite.run(TestSuite.java:203)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>     package com.mooo.mv.demo.ws;
>     import java.io.PrintStream;
>     import java.io.StringReader;
>     import javax.xml.namespace.QName;
>     import javax.xml.stream.XMLInputFactory;
>     import javax.xml.stream.XMLStreamReader;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.AddressingConstants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     import org.apache.axis2.description.TransportOutDescription;
>     import org.apache.axis2.transport.http.HTTPConstants;
>     import junit.framework.Test;
>     import junit.framework.TestCase;
>     import junit.framework.TestSuite;
>     /**
>      * Unit test for simple App.
>      */
>     public class AppTest
>         extends TestCase
>     {
>         /**
>          * Create the test case
>          *
>          * @param testName name of the test case
>          */
>         public AppTest( String testName )
>         {
>             super( testName );
>         }
>         /**
>          * @return the suite of tests being tested
>          */
>         public static Test suite()
>         {
>             return new TestSuite( AppTest.class );
>         }
>         public static OMElement getPayload()
>         {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://bible.sumerano.com/", "tns");
>             OMElement method = fac.createOMElement("GetTranslations", omNs);
>     //        OMElement method = fac.createOMElement("getPrice", omNs);
>     //        OMElement value = fac.createOMElement("symbol", omNs);
>     //        value.addChild(fac.createOMText(value, symbol));
>     //        method.addChild(value);
>             return method;
>         }
>         public void testServiceClient() throws Exception
>         {
>         OMElement xmlPayload = getPayload();
>         PrintStream ps = System.out;
>         xmlPayload.serialize(ps);
>         Options options = new Options();
>         options.setTo(new EndpointReference("http://bible.sumerano.com/bible.asmx?WSDL"));
>         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>         ServiceClient sender = new ServiceClient();
>         sender.setOptions(options);
>         options.setUseSeparateListener(false);
>         OMElement result = sender.sendReceive(xmlPayload);
>         result.serialize(ps);
>         }
>     }
> Now I understand that I've already set the "in" transport protocol.  But I really do not know how to set the "out" transport protocol or why I have to do it.  The client example in the Axis2 documentation (http://ws.apache.org/axis2/1_1_1/quickstartguide.html) does not require this:
>     Client Example from quick start guide wrote:
>     package samples.quickstart.clients;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     public class AXIOMClient {
>         private static EndpointReference targetEPR =
>             new EndpointReference("http://localhost:8080/axis2/services/StockQuoteService");
>         public static OMElement getPricePayload(String symbol) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("getPrice", omNs);
>             OMElement value = fac.createOMElement("symbol", omNs);
>             value.addChild(fac.createOMText(value, symbol));
>             method.addChild(value);
>             return method;
>         }
>         public static OMElement updatePayload(String symbol, double price) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("update", omNs);
>             OMElement value1 = fac.createOMElement("symbol", omNs);
>             value1.addChild(fac.createOMText(value1, symbol));
>             method.addChild(value1);`q
>             OMElement value2 = fac.createOMElement("price", omNs);
>             value2.addChild(fac.createOMText(value2,
>                                              Double.toString(price)));
>             method.addChild(value2);
>             return method;
>         }
>         public static void main(String[] args) {
>             try {
>                 OMElement getPricePayload = getPricePayload("WSO");
>                 OMElement updatePayload = updatePayload("WSO", 123.42);
>                 Options options = new Options();
>                 options.setTo(targetEPR);
>                 options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                 ServiceClient sender = new ServiceClient();
>                 sender.setOptions(options);
>                 sender.fireAndForget(updatePayload);
>                 System.err.println("done");
>                 OMElement result = sender.sendReceive(getPricePayload);
>                 String response = result.getFirstElement().getText();
>                 System.err.println("Current price of WSO: " + response);
>             } catch (Exception e) {
>                 e.printStackTrace();
>             }
>         }
>        
>     }
> Is this something that hasn't been updated in the tutorial or is there something that I'm missing here?
> Thank you,
>    Andrew J. Leer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-2222) When

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477214 ] 

Deepal Jayasinghe commented on AXIS2-2222:
------------------------------------------

Hi with only one modification I got the follwoing result , seems like it is working;

<GetTranslationsResponse xmlns="http://bible.sumerano.com/">
    <GetTranslationsResult>
        <BibleTranslation>
            <BibleNo>1</BibleNo>
            <BibleAbbr>ASV</BibleAbbr>
            <BibleName>American Standard 1901</BibleName>
        </BibleTranslation>
        <BibleTranslation>
            <BibleNo>2</BibleNo>
            <BibleAbbr>BBE</BibleAbbr>
            <BibleName>Basic Bible in English</BibleName>
        </BibleTranslation>
        <BibleTranslation>
            <BibleNo>3</BibleNo>
            <BibleAbbr>KJV</BibleAbbr>
            <BibleName>King James Version</BibleName>
        </BibleTranslation>
        <BibleTranslation>
            <BibleNo>4</BibleNo>
            <BibleAbbr>WEBSTER</BibleAbbr>
            <BibleName>Webster's Bible</BibleName>
        </BibleTranslation>
        <BibleTranslation>
            <BibleNo>5</BibleNo>
            <BibleAbbr>WEB</BibleAbbr>
            <BibleName>World English Bible</BibleName>
        </BibleTranslation>
    </GetTranslationsResult>
</GetTranslationsResponse>



Modification ;
Options options = new Options();
options.setAction("http://bible.sumerano.com/GetTranslations");
 options.setTo(new EndpointReference("http://bible.sumerano.com/bible.asmx?WSDL"));

> When 
> -----
>
>                 Key: AXIS2-2222
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2222
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>         Environment: WindowsXP Service Pack 2, Maven2, Java 1.5, Duo Core Processor
>            Reporter: Andrew J. Leer
>         Assigned To: Deepal Jayasinghe
>         Attachments: wsaxis2demoBug.zip
>
>
>     The Error wrote:
>     org.apache.axis2.AxisFault: Transport out has not been set
>             at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:662)
>             at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
>             at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>             at com.mooo.mv.demo.ws.AppTest.testServiceClient(AppTest.java:111)
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>             at java.lang.reflect.Method.invoke(Method.java:585)
>             at junit.framework.TestCase.runTest(TestCase.java:154)
>             at junit.framework.TestCase.runBare(TestCase.java:127)
>             at junit.framework.TestResult$1.protect(TestResult.java:106)
>             at junit.framework.TestResult.runProtected(TestResult.java:124)
>             at junit.framework.TestResult.run(TestResult.java:109)
>             at junit.framework.TestCase.run(TestCase.java:118)
>             at junit.framework.TestSuite.runTest(TestSuite.java:208)
>             at junit.framework.TestSuite.run(TestSuite.java:203)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>     package com.mooo.mv.demo.ws;
>     import java.io.PrintStream;
>     import java.io.StringReader;
>     import javax.xml.namespace.QName;
>     import javax.xml.stream.XMLInputFactory;
>     import javax.xml.stream.XMLStreamReader;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.AddressingConstants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     import org.apache.axis2.description.TransportOutDescription;
>     import org.apache.axis2.transport.http.HTTPConstants;
>     import junit.framework.Test;
>     import junit.framework.TestCase;
>     import junit.framework.TestSuite;
>     /**
>      * Unit test for simple App.
>      */
>     public class AppTest
>         extends TestCase
>     {
>         /**
>          * Create the test case
>          *
>          * @param testName name of the test case
>          */
>         public AppTest( String testName )
>         {
>             super( testName );
>         }
>         /**
>          * @return the suite of tests being tested
>          */
>         public static Test suite()
>         {
>             return new TestSuite( AppTest.class );
>         }
>         public static OMElement getPayload()
>         {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://bible.sumerano.com/", "tns");
>             OMElement method = fac.createOMElement("GetTranslations", omNs);
>     //        OMElement method = fac.createOMElement("getPrice", omNs);
>     //        OMElement value = fac.createOMElement("symbol", omNs);
>     //        value.addChild(fac.createOMText(value, symbol));
>     //        method.addChild(value);
>             return method;
>         }
>         public void testServiceClient() throws Exception
>         {
>         OMElement xmlPayload = getPayload();
>         PrintStream ps = System.out;
>         xmlPayload.serialize(ps);
>         Options options = new Options();
>         options.setTo(new EndpointReference("http://bible.sumerano.com/bible.asmx?WSDL"));
>         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>         ServiceClient sender = new ServiceClient();
>         sender.setOptions(options);
>         options.setUseSeparateListener(false);
>         OMElement result = sender.sendReceive(xmlPayload);
>         result.serialize(ps);
>         }
>     }
> Now I understand that I've already set the "in" transport protocol.  But I really do not know how to set the "out" transport protocol or why I have to do it.  The client example in the Axis2 documentation (http://ws.apache.org/axis2/1_1_1/quickstartguide.html) does not require this:
>     Client Example from quick start guide wrote:
>     package samples.quickstart.clients;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     public class AXIOMClient {
>         private static EndpointReference targetEPR =
>             new EndpointReference("http://localhost:8080/axis2/services/StockQuoteService");
>         public static OMElement getPricePayload(String symbol) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("getPrice", omNs);
>             OMElement value = fac.createOMElement("symbol", omNs);
>             value.addChild(fac.createOMText(value, symbol));
>             method.addChild(value);
>             return method;
>         }
>         public static OMElement updatePayload(String symbol, double price) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("update", omNs);
>             OMElement value1 = fac.createOMElement("symbol", omNs);
>             value1.addChild(fac.createOMText(value1, symbol));
>             method.addChild(value1);`q
>             OMElement value2 = fac.createOMElement("price", omNs);
>             value2.addChild(fac.createOMText(value2,
>                                              Double.toString(price)));
>             method.addChild(value2);
>             return method;
>         }
>         public static void main(String[] args) {
>             try {
>                 OMElement getPricePayload = getPricePayload("WSO");
>                 OMElement updatePayload = updatePayload("WSO", 123.42);
>                 Options options = new Options();
>                 options.setTo(targetEPR);
>                 options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                 ServiceClient sender = new ServiceClient();
>                 sender.setOptions(options);
>                 sender.fireAndForget(updatePayload);
>                 System.err.println("done");
>                 OMElement result = sender.sendReceive(getPricePayload);
>                 String response = result.getFirstElement().getText();
>                 System.err.println("Current price of WSO: " + response);
>             } catch (Exception e) {
>                 e.printStackTrace();
>             }
>         }
>        
>     }
> Is this something that hasn't been updated in the tutorial or is there something that I'm missing here?
> Thank you,
>    Andrew J. Leer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-2222) When

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas resolved AXIS2-2222.
-------------------------------------

    Resolution: Fixed

> When 
> -----
>
>                 Key: AXIS2-2222
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2222
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>         Environment: WindowsXP Service Pack 2, Maven2, Java 1.5, Duo Core Processor
>            Reporter: Andrew J. Leer
>            Assignee: Deepal Jayasinghe
>         Attachments: wsaxis2demoBug.zip
>
>
>     The Error wrote:
>     org.apache.axis2.AxisFault: Transport out has not been set
>             at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:662)
>             at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
>             at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
>             at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>             at com.mooo.mv.demo.ws.AppTest.testServiceClient(AppTest.java:111)
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>             at java.lang.reflect.Method.invoke(Method.java:585)
>             at junit.framework.TestCase.runTest(TestCase.java:154)
>             at junit.framework.TestCase.runBare(TestCase.java:127)
>             at junit.framework.TestResult$1.protect(TestResult.java:106)
>             at junit.framework.TestResult.runProtected(TestResult.java:124)
>             at junit.framework.TestResult.run(TestResult.java:109)
>             at junit.framework.TestCase.run(TestCase.java:118)
>             at junit.framework.TestSuite.runTest(TestSuite.java:208)
>             at junit.framework.TestSuite.run(TestSuite.java:203)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>     package com.mooo.mv.demo.ws;
>     import java.io.PrintStream;
>     import java.io.StringReader;
>     import javax.xml.namespace.QName;
>     import javax.xml.stream.XMLInputFactory;
>     import javax.xml.stream.XMLStreamReader;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.AddressingConstants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     import org.apache.axis2.description.TransportOutDescription;
>     import org.apache.axis2.transport.http.HTTPConstants;
>     import junit.framework.Test;
>     import junit.framework.TestCase;
>     import junit.framework.TestSuite;
>     /**
>      * Unit test for simple App.
>      */
>     public class AppTest
>         extends TestCase
>     {
>         /**
>          * Create the test case
>          *
>          * @param testName name of the test case
>          */
>         public AppTest( String testName )
>         {
>             super( testName );
>         }
>         /**
>          * @return the suite of tests being tested
>          */
>         public static Test suite()
>         {
>             return new TestSuite( AppTest.class );
>         }
>         public static OMElement getPayload()
>         {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://bible.sumerano.com/", "tns");
>             OMElement method = fac.createOMElement("GetTranslations", omNs);
>     //        OMElement method = fac.createOMElement("getPrice", omNs);
>     //        OMElement value = fac.createOMElement("symbol", omNs);
>     //        value.addChild(fac.createOMText(value, symbol));
>     //        method.addChild(value);
>             return method;
>         }
>         public void testServiceClient() throws Exception
>         {
>         OMElement xmlPayload = getPayload();
>         PrintStream ps = System.out;
>         xmlPayload.serialize(ps);
>         Options options = new Options();
>         options.setTo(new EndpointReference("http://bible.sumerano.com/bible.asmx?WSDL"));
>         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>         ServiceClient sender = new ServiceClient();
>         sender.setOptions(options);
>         options.setUseSeparateListener(false);
>         OMElement result = sender.sendReceive(xmlPayload);
>         result.serialize(ps);
>         }
>     }
> Now I understand that I've already set the "in" transport protocol.  But I really do not know how to set the "out" transport protocol or why I have to do it.  The client example in the Axis2 documentation (http://ws.apache.org/axis2/1_1_1/quickstartguide.html) does not require this:
>     Client Example from quick start guide wrote:
>     package samples.quickstart.clients;
>     import org.apache.axiom.om.OMAbstractFactory;
>     import org.apache.axiom.om.OMElement;
>     import org.apache.axiom.om.OMFactory;
>     import org.apache.axiom.om.OMNamespace;
>     import org.apache.axis2.Constants;
>     import org.apache.axis2.addressing.EndpointReference;
>     import org.apache.axis2.client.Options;
>     import org.apache.axis2.client.ServiceClient;
>     public class AXIOMClient {
>         private static EndpointReference targetEPR =
>             new EndpointReference("http://localhost:8080/axis2/services/StockQuoteService");
>         public static OMElement getPricePayload(String symbol) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("getPrice", omNs);
>             OMElement value = fac.createOMElement("symbol", omNs);
>             value.addChild(fac.createOMText(value, symbol));
>             method.addChild(value);
>             return method;
>         }
>         public static OMElement updatePayload(String symbol, double price) {
>             OMFactory fac = OMAbstractFactory.getOMFactory();
>             OMNamespace omNs = fac.createOMNamespace("http://axiom.service.quickstart.samples/xsd", "tns");
>             OMElement method = fac.createOMElement("update", omNs);
>             OMElement value1 = fac.createOMElement("symbol", omNs);
>             value1.addChild(fac.createOMText(value1, symbol));
>             method.addChild(value1);`q
>             OMElement value2 = fac.createOMElement("price", omNs);
>             value2.addChild(fac.createOMText(value2,
>                                              Double.toString(price)));
>             method.addChild(value2);
>             return method;
>         }
>         public static void main(String[] args) {
>             try {
>                 OMElement getPricePayload = getPricePayload("WSO");
>                 OMElement updatePayload = updatePayload("WSO", 123.42);
>                 Options options = new Options();
>                 options.setTo(targetEPR);
>                 options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>                 ServiceClient sender = new ServiceClient();
>                 sender.setOptions(options);
>                 sender.fireAndForget(updatePayload);
>                 System.err.println("done");
>                 OMElement result = sender.sendReceive(getPricePayload);
>                 String response = result.getFirstElement().getText();
>                 System.err.println("Current price of WSO: " + response);
>             } catch (Exception e) {
>                 e.printStackTrace();
>             }
>         }
>        
>     }
> Is this something that hasn't been updated in the tutorial or is there something that I'm missing here?
> Thank you,
>    Andrew J. Leer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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