Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:web="http://webservice.abc.com/">
- <soapenv:Header/>
- <soapenv:Body>
- <web:gwOperation>
- <Input>
- <username>?</username>
- <password>?</password>
- <wscode>?</wscode>
- <!--Zero or more repetitions:-->
- <param name="?" value="?"/>
- <!--Optional:-->
- <rawData>?</rawData>
- </Input>
- </web:gwOperation>
- </soapenv:Body>
- </soapenv:Envelope>
- public class GatewayRequest implements KvmSerializable {
- String username;
- String password;
- String wscode;
- String rawData;
- @Override
- public Object getProperty(int arg0) {
- switch (arg0) {
- case 0:
- return username;
- case 1:
- return password;
- case 2:
- return wscode;
- case 3:
- return rawData;
- default:
- return null;
- }
- }
- @Override
- public int getPropertyCount() {
- return 4;
- }
- @Override
- public void setProperty(int i, Object o) {
- switch (i) {
- case 0:
- username = (String) o;
- break;
- case 1:
- password = (String) o;
- break;
- case 2:
- wscode = (String) o;
- break;
- case 3:
- rawData = (String) o;
- break;
- default:
- break;
- }
- }
- @Override
- public void getPropertyInfo(int i, Hashtable hashtable, PropertyInfo propertyInfo) {
- switch (i) {
- case 0:
- propertyInfo.type = PropertyInfo.STRING_CLASS;
- propertyInfo.name = "username";
- break;
- case 1:
- propertyInfo.type = PropertyInfo.STRING_CLASS;
- propertyInfo.name = "password";
- break;
- case 2:
- propertyInfo.type = PropertyInfo.STRING_CLASS;
- propertyInfo.name = "wscode";
- break;
- case 3:
- propertyInfo.type = PropertyInfo.STRING_CLASS;
- propertyInfo.name = "rawData";
- default:
- break;
- }
- }
- KvmSerializable val = new GatewayRequest();
- val.setProperty(0, ServerPath.username);
- val.setProperty(1, ServerPath.password);
- val.setProperty(2, ServerPath.wscode);
- val.setProperty(3,signature);
- val.setProperty(4,isoRequest.getProcessCode());
- val.setProperty(5,data);
- val.setProperty(6,null);
- pi = new PropertyInfo();
- pi.setName("Input");
- pi.setValue(val);
- pi.setType(GatewayRequest.class);
- request.addProperty(pi);
- SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
- envelope.setOutputSoapObject(request);
- Marshal floatMarshal = new MarshalFloat();
- envelope.addMapping(ServerPath.GW_NAMESPACE, GatewayRequest.class.getSimpleName(), GatewayRequest.class);
- floatMarshal.register(envelope);
- HttpTransportSE androidHttpTransport = new HttpTransportSE(ServerPath.URL);
- androidHttpTransport.debug = true;
- SSLConnection.allowAllSSL();
- androidHttpTransport.call(soapAction, envelope);
- Log.d(TAG, "aht requestDump is: " + androidHttpTransport.requestDump);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement