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 Bartolomeo Nicolotti <bn...@siapcn.it> on 2011/03/29 14:35:13 UTC

axis2 client with RPC encoded axis server side

Hello,

I've the attached wsld that's for an RPC encoded service generated with
axis (not2):

I generated the client with this command:

wsdl2java.sh -uri WsUtiPratica.wsdl --noBuildXML -s -d xmlbeans -sp
-o . 

then in java I've this code:

			WsUtiPraticaServiceStub wsutipratica = new
WsUtiPraticaServiceStub(uri_WsUti);
			CalcolaBolloDocument calcolaBolloDoc =
CalcolaBolloDocument.Factory.newInstance();
			CalcolaBollo calcBollo = calcolaBolloDoc.addNewCalcolaBollo();
			StructCalcolaBolloIn scbi = calcBollo.addNewStructCalcolaBolloIn();

			scbi.setCodSocieta(codsoc);
			scbi.setMastroCli(contoCli.getMastroTrim());
			scbi.setGruppoCli(contoCli.getGruppoTrim());
			scbi.setContoCli(contoCli.getContoTrim());
			scbi.setSottocontoCli(contoCli.getSottocontoTrim());
			scbi.setAnnoStagioneProdotto(annoStagioneProdotto);
			scbi.setStagioneProdotto(stagioneProdotto);
			scbi.setCodiceProdotto(codiceProdotto);
			scbi.setFlagAtlanteTropico("T");//tropico
			scbi.setDataRegistrazione(FrmData.formatDateClassic(nowYYYYMMDD));
			scbi.setTotalePratica(prezzo_tot_lordo_msg);
			
			CalcolaBolloResponseDocument cbrs =
wsutipratica.calcolaBollo( calcolaBolloDoc );


I've debugged the call with these values in calcolaBolloDoc:

<calcolaBollo xmlns="http://Servizi.Pratica.APWebServices">
  <structCalcolaBolloIn xmlns="">
    <annoStagioneProdotto>11</annoStagioneProdotto>
    <codSocieta>AZ</codSocieta>
    <codiceProdotto>HTLCEE</codiceProdotto>
    <contoCli>1</contoCli>
    <dataRegistrazione>29/03/2011</dataRegistrazione>
    <flagAtlanteTropico>T</flagAtlanteTropico>
    <gruppoCli>1</gruppoCli>
    <mastroCli>20</mastroCli>
    <sottocontoCli>359851</sottocontoCli>
    <stagioneProdotto>U</stagioneProdotto>
    <totalePratica>303.31</totalePratica>
  </structCalcolaBolloIn>
</calcolaBollo>

I've sniffed the network traffic with a sniffer getting:

POST /standard-atlante-plus/services/WsUtiPratica HTTP/1.1 
Content-Type: text/xml; charset=UTF-8 
SOAPAction: "" 
User-Agent: Axis2 
Host: 192.168.0.104:8080 
Content-Length: 680 

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ser:calcolaBollo xmlns:ser="http://Servizi.Pratica.APWebServices"><structCalcolaBolloIn><annoStagioneProdotto>11</annoStagioneProdotto><codSocieta>AZ</codSocieta><codiceProdotto>HTLCEE</codiceProdotto><contoCli>1</contoCli><dataRegistrazione>29/03/2011</dataRegistrazione><flagAtlanteTropico>T</flagAtlanteTropico><gruppoCli>1</gruppoCli><mastroCli>20</mastroCli><sottocontoCli>359851</sottocontoCli><stagioneProdotto>U</stagioneProdotto><totalePratica>303.31</totalePratica></structCalcolaBolloIn></ser:calcolaBollo></soapenv:Body></soapenv:Envelope>

HTTP/1.1 200 OK 
Server: Apache-Coyote/1.1 
Content-Type: text/xml;charset=utf-8 
Transfer-Encoding: chunked 
Date: Tue, 29 Mar 2011 12:19:04 GMT 

388 
<?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><ns1:calcolaBolloResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://Servizi.Pratica.APWebServices"><calcolaBolloReturn href="#id0"/></ns1:calcolaBolloResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:StructCalcolaBolloOut" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://Strutture.Pratica.APWebServices"><codErrore xsi:type="xsd:string"></codErrore><importoBollo xsi:type="xsd:double">0.0</importoBollo><messaggio xsi:type="xsd:string"></messaggio><stato xsi:type="xsd:string">OK</stato></multiRef></soapenv:Body></soapenv:Envelope> 
0

but then in java code I've only:

<ns1:calcolaBolloResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://Servizi.Pratica.APWebServices"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <calcolaBolloReturn href="#id0"/>
</ns1:calcolaBolloResponse>

Could you please help me?

Many thanks

Best regards

Bartolomeo