axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Pyhalov <...@rsu.ru>
Subject Maaping qname not found for the package
Date Tue, 24 Nov 2009 14:08:51 GMT
Hello.
I'm trying to write web service which returns ArrayList of objects
(Argument), using axis2 1.5.1. 

The WS code is the following:

package ru.sfedu.pyhalov.DISGO.RAProcessors;

import java.util.logging.Level;
import java.util.logging.Logger;
import ru.sfedu.pyhalov.DISGO.DBConnectors.DBActioner;

public class QueryServer {
    DBActioner dba;
  
    public boolean executeQuery(String q) {
        try {
            dba=RAProcessor.processQuery(q);
            return true;
        } catch (Exception ex) {

Logger.getLogger(QueryServer.class.getName()).log(Level.SEVERE, null,
ex);
            return false;
        }
    }
    public Object [] fetchNext()
    {
        try {
            if(dba!=null)
            {
                ArrayList <Argument> result=dba.fetchNext();
                
                return result.toArray();
            }
        } catch (Exception ex) {

Logger.getLogger(QueryServer.class.getName()).log(Level.SEVERE, null,
ex);

        }
        return null;
    }

}

When the WS is deployed, it shows the following WSDL:

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://org.apache.axis2/xsd"
xmlns:ns="http://RAProcessors.DISGO.pyhalov.sfedu.ru"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
targetNamespace="http://RAProcessors.DISGO.pyhalov.sfedu.ru">
    <wsdl:documentation>QueryServer</wsdl:documentation>
    <wsdl:types>
        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://RAProcessors.DISGO.pyhalov.sfedu.ru">
            <xs:element name="fetchNextResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true"
type="xs:anyType"/>
 </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="executeQuery">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="q" nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
 </xs:element>
            <xs:element name="executeQueryResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
 </wsdl:types>
    <wsdl:message name="fetchNextRequest"/>
    <wsdl:message name="fetchNextResponse">
        <wsdl:part name="parameters" element="ns:fetchNextResponse"/>
    </wsdl:message>
    <wsdl:message name="executeQueryRequest">
        <wsdl:part name="parameters" element="ns:executeQuery"/>
    </wsdl:message>
    <wsdl:message name="executeQueryResponse">
 <wsdl:part name="parameters" element="ns:executeQueryResponse"/>
    </wsdl:message>
    <wsdl:portType name="QueryServerPortType">
        <wsdl:operation name="fetchNext">
            <wsdl:input message="ns:fetchNextRequest" wsaw:Action="urn:fetchNext"/>
            <wsdl:output message="ns:fetchNextResponse" wsaw:Action="urn:fetchNextResponse"/>
        </wsdl:operation>
        <wsdl:operation name="executeQuery">
            <wsdl:input message="ns:executeQueryRequest" wsaw:Action="urn:executeQuery"/>
 <wsdl:output message="ns:executeQueryResponse" wsaw:Action="urn:executeQueryResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="QueryServerSoap11Binding" type="ns:QueryServerPortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="fetchNext">
            <soap:operation soapAction="urn:fetchNext" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
 </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="executeQuery">
            <soap:operation soapAction="urn:executeQuery" 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="QueryServerSoap12Binding" type="ns:QueryServerPortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="fetchNext">
 <soap12:operation soapAction="urn:fetchNext" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="executeQuery">
 <soap12:operation soapAction="urn:executeQuery" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
 <wsdl:binding name="QueryServerHttpBinding" type="ns:QueryServerPortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="fetchNext">
            <http:operation location="QueryServer/fetchNext"/>
            <wsdl:input>
                <mime:content type="text/xml" part="fetchNext"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml" part="fetchNext"/>
 </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="executeQuery">
            <http:operation location="QueryServer/executeQuery"/>
            <wsdl:input>
                <mime:content type="text/xml" part="executeQuery"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml" part="executeQuery"/>
 </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="QueryServer">
        <wsdl:port name="QueryServerHttpSoap11Endpoint" binding="ns:QueryServerSoap11Binding">
            <soap:address location="http://195.208.252.212:8080/axis2/services/QueryServer.QueryServerHttpSoap11Endpoint/"/>
        </wsdl:port>
        <wsdl:port name="QueryServerHttpSoap12Endpoint" binding="ns:QueryServerSoap12Binding">
            <soap12:address location="http://195.208.252.212:8080/axis2/services/QueryServer.QueryServerHttpSoap12Endpoint/"/>
 </wsdl:port>
        <wsdl:port name="QueryServerHttpEndpoint" binding="ns:QueryServerHttpBinding">
            <http:address location="http://195.208.252.212:8080/axis2/services/QueryServer.QueryServerHttpEndpoint/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


When I try to access the WS, I get  the following server error:

org.apache.axis2.AxisFault: Mapping qname not found for the package: ru.sfedu.pyhalov.DISGO.query


It's strange, because I don't use any classes from this package in WS interfaces...

Client code is the following (it uses classes generated by wsimport):

package ru.sfedu.pyhalov.DISGO.RAProcessors.Client;

import java.io.IOException;
import java.util.ArrayList;
import javax.xml.ws.BindingProvider;
import ru.sfedu.pyhalov.DISGO.query.Argument;
import ru.sfedu.pyhalov.DISGO.utils.BasicUtils;

public class QueryClient {
    public static void main (String args[]) throws IOException
    {
        QueryServer qs;
        QueryServerPortType qspt;
        FetchNextResponse response=null;
        Argument [] result;

        qs=new QueryServer();
        qspt=qs.getQueryServerHttpSoap11Endpoint();
        ((BindingProvider)qspt).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,true);
        System.out.println(qspt.executeQuery(BasicUtils.readFile("samples/query.2case")));


        while((response=qspt.fetchNext()) !=null)
        {
            System.out.println("aaa");
            System.out.println("response.getReturn:"+response.getReturn());
            break;
        }
        if(response==null)
          System.out.println("response=null");
        System.out.println("End of program");

    }
}

Exception javax.xml.ws.soap.SOAPFaultException occurs at first call to qspt.fetchNext()...

Are there any suggestions? What can lead to this server error?

-- 
Best regards, 
Alexander Pyhalov, 
system administrator of Computer Center of South Federal University


Mime
View raw message