on 08-06-2014 2:28 PM
Hello Experts,
i am working on SOAP to Proxy scenario, i need to pull XML data from URL using AXIS message protocol.
i have developed the scenario and in rwb channel show active with out error and its not pulling XML data from URL.
when i open the URL in browser i can see the XML data?
wer i came wrong as its not evening showing error, all are active and working but not pulling data.
Please help.
regards,
chinna
Hi China,
Check your task class you have written adaper instead of adapter.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To use the task com.sap.aii.adapter.axis.ra.transport.http.HTTPGetter you should check if your PI is in the corresponding patch pointed out in this note 1448849 - Axis adapter fixes/improvement 2010-01
You can ask this feature to your basis team.
Regards.
Hello Exerts,
is there any way to test that can we pull the data from web page, i want to test can we pull the data from web page or not?/
regards,
chinna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
pls use this code.
* Created on May 16, 2014
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package XXXXX;
import java.util.HashMap;
import com.sap.aii.mapping.api.AbstractTrace;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationConstants;
import com.sap.aii.mapping.api.StreamTransformationException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.*;
import java.io.*;
import java.net.*;
/**
* @author Srinu. Peram
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class XXXXX implements StreamTransformation {
private Map param = null;
private AbstractTrace trace = null;
/* (non-Javadoc)
* @see com.sap.aii.mapping.api.StreamTransformation#setParameter(java.util.Map)
*/
public void setParameter(Map param)
{
// TODO Auto-generated method stub
this.param = param;
if (param == null)
{
this.param = new HashMap();
}
}
/* (non-Javadoc)
* @see com.sap.aii.mapping.api.StreamTransformation#execute(java.io.InputStream, java.io.OutputStream)
*/
public void execute(InputStream inputstream, OutputStream outputstream)
throws StreamTransformationException {
// TODO Auto-generated method stub
try
{
trace =(AbstractTrace) param.get(StreamTransformationConstants.MAPPING_TRACE);
URL url = new URL("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
trace.addInfo("******Srinu PI developer******");
URLConnection URLconnection = url.openConnection();
InputStream inputStream = URLconnection.getInputStream();
int available = inputStream.available();
trace.addInfo("Input Stream Available => " + available );
trace.addInfo("Trying to get txt file from URL => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ");
/*BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String str;
while ((str = in.readLine()) != null)
{
trace.addInfo("Inside While loop");
trace.addInfo(str);
}
in.close();*/
}
catch (Exception e)
{
trace.addInfo("Exception Occured => " + e.getMessage()) ;
trace.addInfo("Exception Occured => " + e.getStackTrace()) ;
}
}
}
Regards
srinivas
Hello Experts,
your inputs on this issue...
regards,
chinna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.