Hi Vicente,
If the type field is mandatory I don't think it is possible to pass this value in the input.
Given below is a sample code that could be used in the case when you want to get the output based on an input.
function processRequestData(message) {
//Import statements
importPackage(com.sap.gateway.ip.core.customdev.logging);
importPackage(com.sap.gateway.ip.core.customdev.util);
importPackage(org.apache.olingo.odata2.api.uri);
importPackage(java.util);
importPackage(com.sap.gateway.core.ip.component.commons);
importPackage(com.sap.gateway.ip.core.customdev.api);
child = new LinkedHashMap();
child.put("key:City", "california");
message.setBody(child);
//Logger
importPackage (com.sap.gateway.ip.core.customdev.logging);
log.logErrors(LogMessage.TechnicalError, "This is first log"+message.getBody().toString());
return message;
}
The above code is used in the below case.
To debug you have to look at the smp logs. Search the log that starts with "This is first log". The xml being created should be same as the soap input. i.e
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webservicex.net/">
<soapenv:Header/>
<soapenv:Body>
<web:GetSupplierByCity>
<!--Optional:-->
<web:City>califronia</web:City>
</web:GetSupplierByCity>
</soapenv:Body>
</soapenv:Envelope>
Regards, Midhun
SAP Technology RIG
