axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dror yaffe (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-3293) NPE in AxisEngine when trying to use TCP transport
Date Mon, 22 Oct 2007 14:14:50 GMT
NPE in AxisEngine when trying to use TCP transport
--------------------------------------------------

                 Key: AXIS2-3293
                 URL: https://issues.apache.org/jira/browse/AXIS2-3293
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: client-api
    Affects Versions: 1.3
            Reporter: dror yaffe


Here is the excpetion:

java.lang.NullPointerException
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
	at org.tempuri.KongServerHttpEndpointStub.Send(KongServerHttpEndpointStub.java:184)
	at org.tempuri.Main.doWork(Main.java:45)
	at org.tempuri.Main.main(Main.java:57)

client code:
 public void doWork() throws Exception{
         String TARGET_END_POINT="tcp://127.0.0.1:8080/KongServerWebApplication/KongServerHttpEndpoint.asmx";
	 
         KongServerHttpEndpointStub stub = new KongServerHttpEndpointStub(TARGET_END_POINT);
         EndpointReference target = new EndpointReference(TARGET_END_POINT);
        Options options = new Options();
        options.setTo(target);          
        options.setSenderTransport(Constants.TRANSPORT_TCP, cfg);        
        options.setTransportInProtocol(Constants.TRANSPORT_TCP);
        TransportOutDescription x = new TransportOutDescription(Constants.TRANSPORT_TCP);
        options.setTransportOut(x);
        stub._getServiceClient().setOptions(options);
      
        
        Send send = new Send();
		KongMessage msg= new KongMessage();       
        send.setMessage(msg);
        SendResponse res = stub.Send(send);
        System.out.println("got res = "+res.getSendResult());
     
	}

I used AXIS2 eclipse plugin code generator, here is the KongServerHttpEndpoint.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://tempuri.org/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://tempuri.org/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="Send">
        <s:complexType>
          <s:sequence>
            <s:element maxOccurs="1" minOccurs="0" name="message" type="tns:KongMessage"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="KongMessage">
        <s:sequence>
          <s:element maxOccurs="1" minOccurs="0" name="OnBehalfOf" type="s:string"/>
        </s:sequence>
      </s:complexType>
      <s:element name="SendResponse">
        <s:complexType>
          <s:sequence>
            <s:element maxOccurs="1" minOccurs="1" name="SendResult" type="s:boolean"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Write">
        <s:complexType/>
      </s:element>
      <s:element name="WriteResponse">
        <s:complexType>
          <s:sequence>
            <s:element maxOccurs="1" minOccurs="1" name="WriteResult" type="s:boolean"/>
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="WriteSoapOut">
    <wsdl:part name="parameters" element="tns:WriteResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="WriteSoapIn">
    <wsdl:part name="parameters" element="tns:Write">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="SendSoapIn">
    <wsdl:part name="parameters" element="tns:Send">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="SendSoapOut">
    <wsdl:part name="parameters" element="tns:SendResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="KongServerHttpEndpointSoap">
    <wsdl:operation name="Send">
      <wsdl:input message="tns:SendSoapIn">
    </wsdl:input>
      <wsdl:output message="tns:SendSoapOut">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Write">
      <wsdl:input message="tns:WriteSoapIn">
    </wsdl:input>
      <wsdl:output message="tns:WriteSoapOut">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="KongServerHttpEndpointSoap" type="tns:KongServerHttpEndpointSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="Send">
      <soap:operation soapAction="http://tempuri.org/Send" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Write">
      <soap:operation soapAction="http://tempuri.org/Write" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="KongServerHttpEndpointSoap12" type="tns:KongServerHttpEndpointSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="Send">
      <soap12:operation soapAction="http://tempuri.org/Send" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Write">
      <soap12:operation soapAction="http://tempuri.org/Write" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="KongServerHttpEndpoint">
    <wsdl:port name="KongServerHttpEndpointSoap12" binding="tns:KongServerHttpEndpointSoap12">
      <soap12:address location="http://localhost/KongServerWebApplication/KongServerHttpEndpoint.asmx"/>
    </wsdl:port>
    <wsdl:port name="KongServerHttpEndpointSoap" binding="tns:KongServerHttpEndpointSoap">
      <soap:address location="http://localhost/KongServerWebApplication/KongServerHttpEndpoint.asmx"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>



-- 
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


Mime
View raw message