Can't get response from Soap WSDL

287 views
Skip to first unread message

Javier Hinmel

unread,
Oct 25, 2013, 12:13:42 PM10/25/13
to ksoap2-...@googlegroups.com
Hi,

I have the following WSDL structure:

<WL5G3N0:definitions xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/"


  <WL5G3N0:portType name="SiWebService_ptt">
    <WL5G3N0:operation name="RegionList">
    <WL5G3N0:input message="WL5G3N32:args_in_msg"/>
    <WL5G3N0:output message="WL5G3N32:args_out_msg"/>
    </WL5G3N0:operation>
  </WL5G3N0:portType>


  <WL5G3N0:binding name="SiWebServiceBinding" type="WL5G3N40:SiKWebService_ptt">
    <WL5G3N0:operation name="RegionList">
      <WL5G3N41:operation soapAction="http://www.company.com/srv/si/SiKWebService/RegionList"/>
      <WL5G3N0:input>
      <WL5G3N41:body use="literal"/>
      </WL5G3N0:input>
      <WL5G3N0:output>
      <WL5G3N41:body use="literal"/>
      </WL5G3N0:output>
    </WL5G3N0:operation>
  </WL5G3N0:binding>
  <WL5G3N0:service name="SiKWebServiceBindingQSService">
    <WL5G3N0:port binding="WL5G3N40:SiKWebServiceBinding" name="SiKWebServiceBindingQSPort">
       <WL5G3N41:address location="http://company/os/SiKWebService"/>
    </WL5G3N0:port>
  </WL5G3N0:service>
</WL5G3N0:definitions>

SoapUI tool generates the following request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
   <soapenv:Header/>
   <soapenv:Body>
      <lis:InputParameters/>
   </soapenv:Body>
</soapenv:Envelope>

And the following response:

   <Body>
         <P_TB_PROVINCIAS>
            <P_TB_PROVINCIAS_ITEM>
               <CODIGO>1</CODIGO>
               <DESCRIPCION>CAPITAL FEDERAL</DESCRIPCION>
               <MARCA_AUX xsi:nil="true"/>
            </P_TB_PROVINCIAS_ITEM>
            <P_TB_PROVINCIAS_ITEM>
               <CODIGO>2</CODIGO>
               <DESCRIPCION>BUENOS AIRES</DESCRIPCION>
               <MARCA_AUX xsi:nil="true"/>
            </P_TB_PROVINCIAS_ITEM>
            <P_TB_PROVINCIAS_ITEM>
               <CODIGO>3</CODIGO>
               <DESCRIPCION>CATAMARCA</DESCRIPCION>
               <MARCA_AUX xsi:nil="true"/>
            </P_TB_PROVINCIAS_ITEM>
         </P_TB_PROVINCIAS>
         <P_COD_ERROR>success</P_COD_ERROR>
         <P_MSG_ERROR xsi:nil="true"/>
      </OutputParameters>
   </Body>
</Envelope>

My Android code:

I created a class called InputParameters:

public class InputParameters implements KvmSerializable {

@Override
public Object getProperty(int index) {
return null;
}

@Override
public int getPropertyCount() {
return 0;
}

@Override
public void getPropertyInfo(int index, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo info) {
}

@Override
public void setProperty(int index, Object value) {
}
}

After, I'm using InputParameters as Complex type:

InputParameters param = new InputParameters();
PropertyInfo inputPropertyInfo = new PropertyInfo();
inputPropertyInfo.setName("InputParameters");
inputPropertyInfo.setValue(param);
inputPropertyInfo.setNamespace("lis");
inputPropertyInfo.setType(param.getClass());
request.addProperty(inputPropertyInfo);
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);           
soapEnvelope.setOutputSoapObject(request);
soapEnvelope.implicitTypes = true;
soapEnvelope.addMapping("http://xmlns.oracle.com/pcbpel/adapter/db/Company/WS/", "InputParameters", new InputParameters().getClass());
         
HttpTransportSE _ht = new HttpTransportSE(this.url);
_ht.debug = true;
_ht.reset();
OutputParameters output = soapEnvelope.getResponse();

But, output = null, and soapEnvelope.bodyIn = null. I'm not sure if it is correct to think that I need to pass to request a complexType or not. Nor, do I know how to access the OutputParameters from soapEnvelope.bodyIn or soapEnvelope.getResponse()


I will be grateful for any help you can provide
Regards


 



Reply all
Reply to author
Forward
0 new messages