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 "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2007/06/11 19:45:26 UTC
[jira] Updated: (AXIS2-2279) java.lang.NullPointerException at
org.apache.axis2.description.ClientUtils.inferInTransport
(ClientUtils.java:85)
[ https://issues.apache.org/jira/browse/AXIS2-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Chinthaka Suriarachchi updated AXIS2-2279:
------------------------------------------------
Priority: Blocker (was: Major)
> java.lang.NullPointerException at org.apache.axis2.description.ClientUtils.inferInTransport (ClientUtils.java:85)
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-2279
> URL: https://issues.apache.org/jira/browse/AXIS2-2279
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.1.1
> Environment: Windows XP, Eclipse 3.2 , jre 1.5.0_06, Axis2 1.1.1
> Reporter: oliv g
> Assignee: Deepal Jayasinghe
> Priority: Blocker
> Attachments: testEDD.java
>
>
> java.lang.NullPointerException
> at org.apache.axis2.description.ClientUtils.inferInTransport(ClientUtils.java:85)
> at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:163)
> at fr.acme.www.myapp_v1.AskForPricingStub.AskForPricingOperation(AskForPricingStub.java:150)
> at fr.acme.www.myapp_v1.Client.go(Client.java:51)
> which is not a clear error message.
> Server and client are generated automaticly from the wsdl with Axis2 code generator and xmlbeans databinding within Eclipse
> (same result using wsdl2java.bat)
> Here is the null pointer exception (transportOut is null) at org.apache.axis2.description.ClientUtils.inferInTransport (ClientUtils.java:85) received when launching my client code trying to invoque the available service.
>
> } else {
> //assume listener transport as sender transport
> --> listenerTransportProtocol = msgCtxt.getTransportOut().getName().getLocalPart();
> }
> }
> Here is the wsdl :
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:val="http://www.acme.fr/myapp_V1"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="AskForPricing"
> targetNamespace="http://www.acme.fr/myapp_V1">
> <wsdl:types>
> <xsd:schema elementFormDefault="qualified"
> targetNamespace="http://www.acme.fr/myapp_V1">
> <xsd:include schemaLocation="myappCommonTypes.xsd" />
> <xsd:element name="Instruments">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> name="Instrument" type="val:InstrumentType" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="AskForPricingOperationResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="result" type="xsd:string" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="HeaderNCB" type="val:HeaderNCBToFRType" />
> <xsd:element name="AskForPricingOperation_fault">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="AskForPricingOperation_fault"
> type="xsd:string">
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="AskForPricingOperationRequest">
> <wsdl:part element="val:Instruments" name="ListOfInstruments" />
> </wsdl:message>
> <wsdl:message name="AskForPricingOperationRequestHeader">
> <wsdl:part element="val:HeaderNCB" name="RequestHeader" />
> </wsdl:message>
> <wsdl:message name="AskForPricingOperationResponse">
> <wsdl:part element="val:AskForPricingOperationResponse"
> name="Response" />
> </wsdl:message>
> <wsdl:message name="AskForPricingOperation_faultMsg">
> <wsdl:part element="val:AskForPricingOperation_fault"
> name="parameters" />
> </wsdl:message>
> <wsdl:portType name="AskForPricing">
> <wsdl:operation name="AskForPricingOperation">
> <wsdl:input message="val:AskForPricingOperationRequest" />
> <wsdl:output message="val:AskForPricingOperationResponse" />
> <!-- <wsdl:fault message="val:AskForPricingOperation_faultMsg" name="fault"/> -->
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="AskForPricingSOAP" type="val:AskForPricing">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
> <wsdl:operation name="AskForPricingOperation">
> <soap:operation
> soapAction="http://www.acme.fr/myapp_V1/NewOperation" />
> <wsdl:input>
> <soap:header
> message="val:AskForPricingOperationRequestHeader"
> part="RequestHeader" use="literal" />
> <soap:body parts="ListOfInstruments" use="literal" />
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal" />
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="AskForPricing">
> <wsdl:port binding="val:AskForPricingSOAP"
> name="AskForPricingSOAP">
> <soap:address
> location="http://localhost:8080/myappWEB/services/AskForPricingSOAP" />
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> and the referenced xsd :
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns="http://www.acme.fr/myapp_V1"
> attributeFormDefault="unqualified" elementFormDefault="qualified"
> targetNamespace="http://www.acme.fr/myapp_V1" version="1.0">
> <xs:simpleType name="NCBCountryCode">
> <xs:restriction base="xs:string">
> <xs:enumeration value="AT" />
> <xs:enumeration value="BE" />
> <xs:enumeration value="DE" />
> <xs:enumeration value="ES" />
> <xs:enumeration value="FI" />
> <xs:enumeration value="FR" />
> <xs:enumeration value="GR" />
> <xs:enumeration value="IE" />
> <xs:enumeration value="IT" />
> <xs:enumeration value="LU" />
> <xs:enumeration value="NL" />
> <xs:enumeration value="PT" />
> <xs:enumeration value="DK" />
> <xs:enumeration value="GB" />
> <xs:enumeration value="LI" />
> <xs:enumeration value="NO" />
> <xs:enumeration value="IS" />
> <xs:enumeration value="SE" />
> </xs:restriction>
> </xs:simpleType>
> <xs:complexType name="HeaderNCBType">
> <xs:sequence>
> <xs:element name="senderNCB" type="NCBCountryCode" />
> <xs:element name="receiverNCB" type="NCBCountryCode" />
> <xs:element name="SubmissionDate" type="xs:dateTime" />
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="HeaderNCBFromFRType">
> <xs:complexContent>
> <xs:restriction base="HeaderNCBType">
> <xs:sequence>
> <xs:element name="senderNCB" type="NCBCountryCode"
> fixed="FR" />
> <xs:element name="receiverNCB"
> type="NCBCountryCode" />
> <xs:element name="SubmissionDate"
> type="xs:dateTime" />
> </xs:sequence>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> <xs:complexType name="HeaderNCBToFRType">
> <xs:complexContent>
> <xs:restriction base="HeaderNCBType">
> <xs:sequence>
> <xs:element name="senderNCB" type="NCBCountryCode" />
> <xs:element name="receiverNCB" type="NCBCountryCode"
> fixed="FR" />
> <xs:element name="SubmissionDate"
> type="xs:dateTime" />
> </xs:sequence>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> <xs:simpleType name="InstrumentTypeType">
> <xs:restriction base="xs:string">
> <xs:enumeration value="ABS" />
> </xs:restriction>
> </xs:simpleType>
> <xs:simpleType name="ISINType">
> <xs:restriction base="xs:string">
> <xs:minLength value="12"></xs:minLength>
> <xs:maxLength value="12"></xs:maxLength>
> <xs:pattern value="[A-Z]{2}[0-9A-Z]{9}\d{1}" />
> </xs:restriction>
> </xs:simpleType>
> <xs:simpleType name="PricingErrorCodeType">
> <xs:restriction base="xs:string">
> <xs:enumeration value="PriceAvailable" />
> <xs:enumeration value="PricingImpossible" />
> <xs:enumeration value="SeekingForAPricingMethod" />
> <xs:enumeration value="EquityNotEligible" />
> <xs:enumeration value="ExpiredEquity" />
> <xs:enumeration value="EquityNotPriceable" />
> </xs:restriction>
> </xs:simpleType>
> <xs:complexType name="InstrumentType">
> <xs:sequence>
> <xs:element name="ISIN" type="ISINType" />
> </xs:sequence>
> <xs:attribute name="type" type="InstrumentTypeType" />
> </xs:complexType>
> <xs:complexType name="PricedInstrumentType">
> <xs:complexContent>
> <xs:extension base="InstrumentType">
> <xs:sequence>
> <xs:element name="ErrorCode"
> type="PricingErrorCodeType" />
> <xs:element minOccurs="0" name="CleanPrice"
> type="xs:integer" />
> <xs:element minOccurs="0" name="PricingDate"
> type="xs:dateTime" />
> <xs:element minOccurs="0" name="AccruedInterest"
> type="xs:float" />
> <xs:element minOccurs="0" name="PoolFactor"
> type="xs:float" />
> </xs:sequence>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> </xs:schema>
> Here is the full client code :
> AskForPricingStub stub=new AskForPricingStub();
>
> InstrumentsDocument doc=InstrumentsDocument.Factory.newInstance();
>
> fr.acme.www.myapp_v1.InstrumentsDocument.Instruments
> instruments=InstrumentsDocument.Instruments.Factory.newInstance();
>
> InstrumentType instru1=InstrumentType.Factory.newInstance();
> instru1.setISIN("FR0123456789");
>
>
> instru1.setType(InstrumentTypeType.ABS);
>
> instruments.setInstrumentArray(new InstrumentType[] { instru1});
> doc.setInstruments(instruments);
>
> //HEADER
> HeaderNCBDocument header=HeaderNCBDocument.Factory.newInstance();
> HeaderNCBToFRType headerNCBToFRType=HeaderNCBToFRType.Factory.newInstance();
>
> Calendar submissionDate=Calendar.getInstance();
> headerNCBToFRType.setSubmissionDate(submissionDate);
>
>
> fr.acme.www.myapp_v1.NCBCountryCode.Enum sender=NCBCountryCode.AT;
> fr.acme.www.myapp_v1.NCBCountryCode.Enum receiver=NCBCountryCode.FR;
>
>
> headerNCBToFRType.setSenderNCB( sender);
> headerNCBToFRType.setReceiverNCB(receiver);
>
> header.setHeaderNCB(headerNCBToFRType );
> //here is fr.acme.www.myapp_v1.Client.go(Client.java:51)
> stub.AskForPricingOperation(doc,header );
--
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