You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jo...@raytheon.co.uk on 2009/01/15 16:37:11 UTC

NullPointerException thrown from org.apache.axis2.client.OperationClient.execute(true)

Hi,

I have a very basic web service that is just throwing a null pointer 
exception when I test it.

There is no logic in it, it is just the bare bones skeleton, returning 
nulls, this is not related to the NullPointerException
as I also have system.out's which are getting through to the console.

I am using axis2 1.4.1and the xml beans implementation.

This is my skeleton,

 package com.tb.th.agency.mind.nomtdsltd;
 
 public class NOMTDSLTDSkeleton implements NOMTDSLTDSkeletonInterface{
 
        public NOMTDSLTDSkeleton(){

        }
 
        public DetailsResponseDocument Details(DetailsDocument details){
                System.out.println("................................. 
details");
                return null;
        }
 
        public SearchResponseDocument Search(SearchDocument search){
                System.out.println("................................. 
search");
                return null;
        }
 
        private boolean checkDatabase(String DIN, String 
CountryOfRegistration,
            String TypeOfDocument, int NbRecord) {

                return false;
        }
 
}


This is my wsdl,

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="
http://microsoft.com/wsdl/mime/textMatching/" xmlns:tns="
http://tb.com/th/agency/mind/NOMTDSLTD" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" targetNamespace="
http://tb.com/th/agency/mind/NOMTDSLTD">
        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Test </wsdl:documentation>
        <wsdl:types>
 
                <s:schema elementFormDefault="qualified" targetNamespace="
http://tb.com/th/agency/mind/NOMTDSLTD">
                        <s:element name="Search">
                                <s:complexType>
                                        <s:sequence>
                                                <s:element maxOccurs="1" 
minOccurs="0" name="DIN" type="s:string"/>
                                                <s:element maxOccurs="1" 
minOccurs="0" name="CountryOfRegistration" type="s:string"/>
                                                <s:element maxOccurs="1" 
minOccurs="0" name="TypeOfDocument" type="s:string"/>
                                                <s:element maxOccurs="1" 
minOccurs="1" name="NbRecord" type="s:int"/>
                                        </s:sequence>
                                </s:complexType>
                        </s:element>
                        <s:element name="SearchResponse">
                                <s:complexType>
                                        <s:sequence>
                                                <s:element maxOccurs="1" 
minOccurs="0" name="SearchResult" type="tns:Answer"/>
                                        </s:sequence>
                                </s:complexType>
                        </s:element>
                        <s:complexType name="Answer">
                                <s:sequence>
                                        <s:element maxOccurs="1" minOccurs
="1" name="resultCode" type="tns:Result"/>
                                        <s:element maxOccurs="1" minOccurs
="1" name="resultOtherCode" type="s:int"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="requestId" type="s:string"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="referenceInCountry" type="s:string"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="data" type="s:string"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="binaryFile" type="tns:ArrayOfFile"/>
                                </s:sequence>
                        </s:complexType>
                        <s:simpleType name="Result">
                                <s:restriction base="s:string">
                                        <s:enumeration value="NO_ERROR"/>
                                        <s:enumeration value="NO_ANSWER"/>
                                        <s:enumeration value=
"INVALID_SEARCH_ERROR"/>
                                        <s:enumeration value=
"UNEXPECTED_ERROR"/>
                                        <s:enumeration value=
"TOO_MANY_ANSWERS"/>
                                        <s:enumeration value=
"ACCESS_DENIED"/>
                                        <s:enumeration value=
"OTHER_ERROR_CODE"/>
                                        <s:enumeration value="TIME_OUT"/>
                                </s:restriction>
                        </s:simpleType>
                        <s:complexType name="ArrayOfFile">
                                <s:sequence>
                                        <s:element maxOccurs="unbounded" 
minOccurs="0" name="File" nillable="true" type="tns:File"/>
                                </s:sequence>
                        </s:complexType>
                        <s:complexType name="File">
                                <s:sequence>
                                        <s:element maxOccurs="1" minOccurs
="0" name="type" type="s:string"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="fileName" type="s:string"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="binData" type="s:base64Binary"/>
                                </s:sequence>
                        </s:complexType>
                        <s:element name="UserInformation" type=
"tns:UserInformation"/>
                        <s:complexType name="UserInformation">
                                <s:sequence>
                                        <s:element maxOccurs="1" minOccurs
="0" name="UserName" type="s:string"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="ReferenceInCountry" type="s:string"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="Type" type="s:string"/>
                                </s:sequence>
                                <s:anyAttribute/>
                        </s:complexType>
                        <s:element name="Details">
                                <s:complexType>
                                        <s:sequence>
                                                <s:element maxOccurs="1" 
minOccurs="0" name="Id" type="s:string"/>
                                        </s:sequence>
                                </s:complexType>
                        </s:element>
                        <s:element name="DetailsResponse">
                                <s:complexType>
                                        <s:sequence>
                                                <s:element maxOccurs="1" 
minOccurs="0" name="DetailsResult" type="tns:Answer"/>
                                        </s:sequence>
                                </s:complexType>
                        </s:element>
                        <s:element name="UsernameToken" type=
"tns:UsernameToken"/>
                        <s:complexType name="UsernameToken">
                                <s:sequence>
                                        <s:element maxOccurs="1" minOccurs
="0" name="Username" type="s:string"/>
                                        <s:element maxOccurs="1" minOccurs
="0" name="Password" type="s:string"/>
                                </s:sequence>
                                <s:attribute name="Version" type=
"s:string"/>
                        </s:complexType>
                        <s:element name="Answer" nillable="true" type=
"tns:Answer"/>
                </s:schema>
        </wsdl:types>
        <wsdl:message name="SearchSoapIn">
                <wsdl:part name="parameters" element="tns:Search"/>
        </wsdl:message>
        <wsdl:message name="SearchSoapOut">
                <wsdl:part name="parameters" element="tns:SearchResponse"
/>
        </wsdl:message>
        <wsdl:message name="SearchUserInformation">
                <wsdl:part name="UserInformation" element=
"tns:UserInformation"/>
        </wsdl:message>
        <wsdl:message name="DetailsSoapIn">
                <wsdl:part name="parameters" element="tns:Details"/>
        </wsdl:message>
        <wsdl:message name="DetailsSoapOut">
                <wsdl:part name="parameters" element="tns:DetailsResponse"
/>
        </wsdl:message>
        <wsdl:message name="DetailsUserInformation">
                <wsdl:part name="UserInformation" element=
"tns:UserInformation"/>
        </wsdl:message>
        <wsdl:message name="SecurityUsernameToken">
                <wsdl:part name="UsernameToken" element=
"tns:UsernameToken"/>
        </wsdl:message>
        <wsdl:portType name="NOMTDSLTDSoap">
                <wsdl:operation name="Search">
                        <wsdl:documentation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
Search a stolen document on a basis of one or more criteria   </
wsdl:documentation>
                        <wsdl:input message="tns:SearchSoapIn"/>
                        <wsdl:output message="tns:SearchSoapOut"/>
                </wsdl:operation>
                <wsdl:operation name="Details">
                        <wsdl:documentation xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
Return details for a stolen document from his unique id   </
wsdl:documentation>
                        <wsdl:input message="tns:DetailsSoapIn"/>
                        <wsdl:output message="tns:DetailsSoapOut"/>
                </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="NOMTDSLTDSoap" type="tns:NOMTDSLTDSoap">
                <soap:binding transport="
http://schemas.xmlsoap.org/soap/http"/>
                <wsdl:operation name="Search">
                        <soap:operation soapAction="
http://tb.com/th/agency/mind/NOMTDSLTD/Search" style="document"/>
                        <wsdl:input>
                                <soap:body use="literal"/>
                                <soap:header message=
"tns:SearchUserInformation" part="UserInformation" use="literal"/>
                                <soap:header message=
"tns:SecurityUsernameToken" part="UsernameToken" use="literal"/>
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal"/>
                        </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name="Details">
                        <soap:operation soapAction="
http://tb.com/th/agency/mind/NOMTDSLTD/Details" style="document"/>
                        <wsdl:input>
                                <soap:body use="literal"/>
                                <soap:header message=
"tns:DetailsUserInformation" part="UserInformation" use="literal"/>
                                <soap:header message=
"tns:SecurityUsernameToken" part="UsernameToken" use="literal"/>
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal"/>
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="NOMTDSLTD">
                <wsdl:port name="NOMTDSLTDSoap" binding=
"tns:NOMTDSLTDSoap">
                        <soap:address location="
http://tb.com/th/agency/mind/NOMTDSLTD"/>
                </wsdl:port>
        </wsdl:service>
</wsdl:definitions>

I have built other services just fine, I'm guessing it may be down to this 
wsdl,

any help on this issue would be appreciated,

Thank You,

John.