axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Mirad <mmi...@gmail.com>
Subject Cannot restore parameter on server ...
Date Fri, 16 Dec 2005 15:46:21 GMT
Hi, me again.  I'm trying to invoke a method defined in my WSDL file that
requires four parameters.  When the request message arrives on the server
one of those parameter  called 'params' is empty.  This parameter is some
kind of Vector implementation.  I'm tracing the messages with a TCPMonitor
and the request message seems to be ok.  The response I get from the server
is a SoapFaultException.

mainTest.cpp
===========
int main()
{
        xsd__string user = "GTC_WinDesa";
        xsd__string password = "wingtc";
        // Message to invoke
        xsd__string trxName = "merlin.ValidarTelefono";
        xsd__string key = "numero";
        xsd__string param = "1554009016";
        KeyValuePair values[1];
        values[0].setkey(key);
        values[0].setvalue(param);
        KeyValuePair_Array array;
        array.m_Array = &values[0];
        array.m_Size = 1;

        xsd__string  response = gestorSoapPort-> test(user, password,
trxName, array);
        ....
}
==========================================================

Request Message :
============
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:test xmlns:ns1="http://bsg.com.ar/gestor/wsdl/">
<user xsi:type="xsd:string">GTC_WinDesa</user>
<password xsi:type="xsd:string">wingtc</password>
<trxName xsi:type="xsd:string">merlin.ValidarTelefono</trxName>
<paramArray xmlns:enc="http://www.w3.org/2001/06/soap-encoding" xmlns:ns2="
http://bsg.com.ar" enc:arrayType="ns2:param[1]">
<KeyValuePair><key xsi:type="xsd:string">numero</key>
<value xsi:type="xsd:string">1554009016</value>
</KeyValuePair></paramArray>
</ns1:test>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
============

Response Message
============
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:Server.userException</faultcode>
   <faultstring>java.lang.NullPointerException</faultstring>
   <detail/>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>
============

WSDL file:
============
<?xml version="1.0" encoding="UTF-8"?>
<definitions    name="Gestor"
                targetNamespace="http://bsg.com.ar/gestor/wsdl/"
                xmlns:wsdlns="http://bsg.com.ar/gestor/wsdl/"
                xmlns:typens="http://bsg.com.ar"
                xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                xmlns:stk="
http://schemas.microsoft.com/soap-toolkit/wsdl-extension"
                xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/
'
                xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
                xmlns:content='
http://schemas.xmlsoap.org/ws/2002/04/content-type/'
                xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
                xmlns='http://schemas.xmlsoap.org/wsdl/'>


<!--***********************************************************************************************************-->
    <!--
TYPES                                                      -->

<!--***********************************************************************************************************-->
    <types>
        <schema    targetNamespace="http://bsg.com.ar"
                xmlns="http://www.w3.org/2001/XMLSchema"
                xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
                xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                elementFormDefault="qualified">

            <!-- KeyValuePair -->
            <xsd:complexType name="KeyValuePair">
                <xsd:sequence>
                    <xsd:element name='key' type='xsd:string'/>
                    <xsd:element name='value' type='xsd:string'/>
                </xsd:sequence>
            </xsd:complexType>

            <!-- Params array -->
            <xsd:complexType name="params">
                <complexContent>
                    <restriction base="SOAP-ENC:Array">
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded"
                                     minOccurs="0"
                                     name="item"
                                     type="typens:KeyValuePair"/>
                        </xsd:sequence>
                        <attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="typens:KeyValuePair[]"/>
                    </restriction>
                </complexContent>
            </xsd:complexType>
        </schema>
    </types>


<!--***********************************************************************************************************-->
    <!--
MESSAGES                                                   -->

<!--***********************************************************************************************************-->
    <message name="Gestor.test">
        <part name="user" type="xsd:string"/>
        <part name="password" type="xsd:string"/>
        <part name="trxName" type="xsd:string"/>
        <part name="param" type="typens:params"/>
    </message>

    <message name="Gestor.testResponse">
        <part name="return" type="xsd:string"/>
    </message>


<!--***********************************************************************************************************-->
    <!--
OPERATIONS                                                 -->

<!--***********************************************************************************************************-->
    <portType name="GestorSoapPortType">
        <!--test-->
        <operation name="test" parameterOrder="user password trxName param">
            <input message="wsdlns:Gestor.test"/>
            <output message="wsdlns:Gestor.testResponse"/>
        </operation>
    </portType>


<!--***********************************************************************************************************-->
    <!--
BINDINGS                                                   -->

<!--***********************************************************************************************************-->
    <binding name="GestorBinding" type="wsdlns:GestorSoapPortType">
        <stk:binding preferredEncoding="UTF-8"/>
        <soap:binding style="rpc" transport="
http://schemas.xmlsoap.org/soap/http"/<http://schemas.xmlsoap.org/soap/http%22/>
>
        <!-- test -->
        <operation name="test">
            <soap:operation soapAction="urn:ServiceRequestHandler"/>
            <input>
                <soap:body    use="encoded"
                            namespace="urn:ServiceRequestHandler"
                            encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
                            parts="user password trxName params"/>
            </input>
            <output>
                <soap:body    use="encoded"
                            namespace="urn:ServiceRequestHandler"
                            encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
                            parts='return'/>
            </output>
        </operation>
    </binding>


<!--***********************************************************************************************************-->
    <!--
SERVICE                                                    -->

<!--***********************************************************************************************************-->
    <service name="Gestor">
        <port name="GestorSoapPort" binding="wsdlns:GestorBinding">
            <soap:address location="@@SOAPDeploymentURL@@"/>
        </port>
    </service>
</definitions>
============

Is there a problem is server side deserialization of the 'params" parameter
???

Thanks,
__
Martin Mirad
Ingeniero en Inform´┐Żtica
mmirad@gmail.com
Mime
View raw message