Not getting response from Client Proxy
Hi,
We are developing a scenario - File->PI->Proxy using ABAP Proxies.We are posting a file thru PI 7.0 to R/3 .In R/3 the server proxy(Inbound Asynchronous) will receive the message and BAPI will be called. The response from the BAPI will be reaching the server proxy and passed to the client proxy(Outbound Asynchronous).
Server Proxy(request) --> BAPI --> Server Proxy(response) --> Client Proxy(response)
The response from the client proxy has to be send to PI and a file will be generated as the output.
Can anyone provide me suggestions to call client proxy from a server proxy by passing the response message to client proxy???
Thanks in advance.
Regards,
Dibyajyoti
Hi,
I hope, you are done till the Implementation of Server Proxy, where you are calling a Bapi and passing the Input variables the Interface received and BAPI is giving a response back.
Now your question, how to send the response back Asynchronously.
I think, you have to do the same, what you do for a client proxy and at last call the method EXECUTE_ASYNCHRONOUS before the Final Commit Staement. I think this should work.
But using Synchronous Interface in such cases is always a handy and easier option.
Regards,
Subhendu
Similar Messages
-
Hi,
I am doing RFC to File. I could generate the FILE successfully. But I am not getting Response from RFC. I am getting empty payload. I am doing with out BPM. I did succesfully File-RFC-File. but here RFC is the sender. I have some doubts in defining Interface mapping and Message Mapping. Is this a Syscronous scenario by default ?
If I want to get the resonse of RFC to a file. How many Receivers and Senders do i need to create?
Regards,
Varun
Edited by: Varun on Sep 9, 2008 1:00 PMhi,
Map Rfc.response to the File; hence rfc sender adapter and file receiver adapter..one sender n 1 receiver.Remember:
1. In the report that makes the call to XI , make sure that you use call RFC in a background task.
2. Make sure you use Commit Work at the end of the report.
Follow:
Send RFC to SAP XI Asynchronous
Also pls visit
Re: RFC to FILE
for the same scenario.
Thanks,
Durga
Edited by: NagaDurga Nannapaneni on Sep 9, 2008 10:55 AM -
One socket and two ports, not getting response from the server
Hi everyone,
I am working on device which communicate through Tcp sockets, It has an IP address and one port for listening and another for sending the response.
Problem is that I am able to create a connection to Device ip+port, and i am trying to listen on the same port while the device is sending the response on other port. My problem is that i can't create another socket using this port and therefore not getting the response from the device.
Can you people tell me how to handle such socket communication in java ?
Thanks in advance.I am working on device which communicate through Tcp sockets, It has an IP address and one port for listening and another for sending the response.Are you sure? That's not usual. It would be usual for it to use the same port for listening, reading, and writing.
Problem is that I am able to create a connection to Device ip+port, and i am trying to listen on the same port while the device is sending the response on other port.I would try just reading from the same socket you are sending on. I suggest you have misunderstood how the device works. -
Socket Programming-Not getting response from server.
Hi,
I am trying to communicate with server using java socket programming, I am getting the response for first two times third time when I am trying to write some thing I am not getting any response from the server,
I am writing to migrate the vb code to Java the vb is using a c++ dll to communicate with the server and we tried accessing the dll from java using JNI then it is working fine, this dll is dependent on windows so we want to avoid the dependency with windows that is why we are going for socket programming, Please help on this.Hi,
I am writing the data in forms of string
like
Socket sockt = new Socket(ipAddress, portNo);
out= new DataOutputStream(sockt.getOutputStream());
in = new DataInputStream(sockt.getInputStream());
out.writeBytes("Serv");
out.writeBytes("Serv,32");
out.writeBytes("home,serv32,run.prg,sucess");
these are the strings to communicate with server.
I am trying to read the same
StringBuffer buf = new StringBuffer();
byte b = '\0';
try {
while ((b = in.readByte()) != '\0')
char ch = (char) b;
buf.append(ch);
} catch (Exception e) {
System.out.println(e.getStackTrace());
we are getting the response for the first two strings, but for the third string it is getting stucked for some time and returing some junk values like '???' we are sending the same string using JNI and it is working. -
Unable to interpret Response from client proxy
Hello SAP Guru's,<br><br>
I am working on trying to consume an external web service using a client (consumer) proxy.<br><br>
I've created the proxy using the WSDL file provided by the service (see below). I am able to actually call the proxy and execute the service, however, I cannot seem to properly handle the response coming back from the synchronous service call. When I use the WSNAVIGATOR to test the service I get the following message: <b>'Part 'processWorkOrderReturn' not found in response !'</b>.<br><br>
When I try to test it using SE80 and the Test function, I get the following error message: <b>"SOAP:1,023 SRT: Processing error in Internet Communication Framework: ("ICF Error when receiving the response: ICM_HTTP_CONNECTION_FAILED")"</b>.<br><br>
<U>Here is the WSDL (edited to protect IP addresses):</U><br><br>
<?xml version="1.0" encoding="UTF-8" ?><br>
- <wsdl:definitions targetNamespace="http://sapphire.aeroint.com/connect/services" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://sapphire.aeroint.com/connect/services" xmlns:intf="http://sapphire.aeroint.com/connect/services" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><br>
- <!-- <br>
WSDL created by Apache Axis version: 1.4<br>
Built on Apr 22, 2006 (06:55:48 PDT)<br>
--><br>
<wsdl:types><br>
<schema elementFormDefault="qualified" targetNamespace="http://sapphire.aeroint.com/connect/services" xmlns="http://www.w3.org/2001/XMLSchema"><br>
<complexType name="WorkOrderType"><br>
<sequence><br>
<element name="code" nillable="true" type="xsd:string" /><br>
<element name="description" nillable="true" type="xsd:string" /><br>
<element name="faultClassification" nillable="true" type="xsd:string" /><br>
<element name="malfunctionEffect" nillable="true" type="xsd:string" /><br>
<element name="name" nillable="true" type="xsd:string" /><br>
<element name="position" nillable="true" type="xsd:string" /><br>
<element name="status" nillable="true" type="xsd:string" /><br>
<element name="vehicleSerialNumber" nillable="true" type="xsd:string" /><br>
</sequence><br>
</complexType><br>
<element name="parameters" type="impl:WorkOrderType" /><br>
<complexType name="Return"><br>
<sequence><br>
<element name="return" nillable="true" type="xsd:string" /><br>
</sequence><br>
</complexType><br>
<element name="processWorkOrderReturn" type="impl:Return" /><br>
</schema><br>
</wsdl:types><br>
<wsdl:message name="processWorkOrderRequest"><br>
<wsdl:part element="impl:parameters" name="parameters" /><br>
</wsdl:message><br>
<wsdl:message name="processWorkOrderResponse"><br>
<wsdl:part element="impl:processWorkOrderReturn" name="processWorkOrderReturn" /><br>
</wsdl:message><br>
<wsdl:portType name="ConnectManager"><br>
<wsdl:operation name="processWorkOrder" parameterOrder="parameters"><br>
<wsdl:input message="impl:processWorkOrderRequest" name="processWorkOrderRequest" /><br>
<wsdl:output message="impl:processWorkOrderResponse" name="processWorkOrderResponse" /><br>
</wsdl:operation><br>
</wsdl:portType><br>
<wsdl:binding name="ConnectManagerSoapBinding" type="impl:ConnectManager"><br>
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /><br>
<wsdl:operation name="processWorkOrder"><br>
<wsdlsoap:operation soapAction="" /><br>
<wsdl:input name="processWorkOrderRequest"><br>
<wsdlsoap:body use="literal" /><br>
</wsdl:input><br>
<wsdl:output name="processWorkOrderResponse"><br>
<wsdlsoap:body use="literal" /><br>
</wsdl:output><br>
</wsdl:operation><br>
</wsdl:binding><br>
<wsdl:service name="ConnectManagerService"><br>
<wsdl:port binding="impl:ConnectManagerSoapBinding" name="ConnectManager"><br>
<wsdlsoap:address location="http://<em><IP Address:Port></em>/connect/services/ConnectManager" /><br>
</wsdl:port><br>
</wsdl:service><br>
</wsdl:definitions><br><br>
<U>Here is the actual test Request that is passed to the system:</U><br><br>
POST /connect/services/ConnectManager HTTP/1.1<br>
Host: <em><IP Address:Port></em><br>
Content-Type: text/xml; charset=UTF-8<br>
Connection: close<br>
SAP-PASSPORT: <some big long number><br>
Content-Length: 852<br>
SOAPAction: ""<br><br>
<?xml version="1.0" encoding="UTF-8" ?><br>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"><br>
<SOAP-ENV:Header><br>
<sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/"><br>
<enableSession>true</enableSession><br>
</sapsess:Session><br>
</SOAP-ENV:Header><br>
<SOAP-ENV:Body><br>
<pns:parameters xmlns:pns='http://sapphire.aeroint.com/connect/services'><br>
<pns:code>0200-1</pns:code><br>
<pns:description>XVY</pns:description><br>
<pns:faultClassification>TestA</pns:faultClassification><br>
<pns:malfunctionEffect>TestB</pns:malfunctionEffect><br>
<pns:name>WTZ</pns:name><br>
<pns:position>02:00</pns:position><br>
<pns:status>ACCEPTED</pns:status><br>
<pns:vehicleSerialNumber>05-12345</pns:VehicleSerialNumber><br>
</pns:parameters><br>
</SOAP-ENV:Body><br>
</SOAP-ENV:Envelope><br><br>
Please note, this actually does successfully reach out and call the service on the remote system.<br><br>
<U>Finally, here is the actual Response that is generated and submitted back to me:</U><br><br>
HTTP/1.1 200 OK<br>
Server: Apache-Coyote/1.1<br>
X-Powered-By: Servlet 2.4; JBoss-4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)/Tomcat-5.5<br>
Set-Cookie: <value is hidden><br>
Content-Type: text/xml;charset=utf-8<br>
Date: Tue, 27 Oct 2009 16:56:58 GMT<br>
Connection: close<br><br>
<?xml version="1.0" encoding="UTF-8"?><br>
<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"><br>
<soapenv:Body><br>
<processWorkOrderReturn xmlns=""><br>
<return>Arising Created in Sapphire</return><br>
</processWorkOrderReturn><br>
</soapenv:Body><br>
</soapenv:Envelope><br><br>
My Question is this, why isn't our system finding the response structure (or more to the point why isn't it successfully able to interpret the response?). The 'processWorkOrderReturn' element appears to be in the response and in fact appears to be correct. Am I missing something?<br><br>
Thanks,<br>
-Jon
Edited by: Jon ***** on Oct 27, 2009 8:04 PM
Edited by: Jon ***** on Oct 27, 2009 8:05 PM
Edited by: Jon ***** on Oct 27, 2009 8:13 PMHi Axel,
Yes, I was able to eventually solve the problem. The problem was caused by the raw data of the response coming back from the server. The raw response included an XML tag with no namespace xmlns="". The SAP system failed to interpret this tag and consequently was not able to process the rest of the message. I wish the error messages had been a little more clear, but I was able to actually (eventually) debug into the soap runtime engine and spotted that it was failing when attempting to intepret the specific tag ' processWorkOrderReturn xmlns="" '. From there it was just trial and error to figure out that it needed to have a namespace supplied that matched the definition in the WSDL file.
Hope your problem is as easy to solve as ours was.
-Jon
Edited by: Jon ***** on Nov 30, 2009 1:37 PM -
hello my name is leandro from months ago and am trying to connect with my apple id but informs me that it is wrong and I can not buy or upgrade my mac from the official website of apple can go with my ide but can not get response technical support'm from Argentina someone could help me
Apple ID security issues -
Call Apple Care and ask for the Account Security Team. They can assist you with your issue. -
Mail notifications are not getting sent from a Calendar client
Mail notifications are not getting sent from a Calendar client
<p>
On the client, after creating an event and electing to send a mail notification,
the following error appears in a pop up box:
"module:mailmsg.ctp,label 190, service error"
Also, in the /users/unison/log/cws.log file on the Calendar Server, there is an
error from the corresponding time that the client receives one:
DEXOTEK ERRCODE Ox132B0 -> CWTCP_RemoteSecurityModified: RNC_SecurityModified
-> Request 0x443 for NodeId 10002,
status set to CANTSERVICE
Solution:
If this is only happening for one user, then check for the presence of a dbv.log
file in the /users/unison/log directory. If present this implies db corruption
and the /users/unison/bin/unidbfix tool should be run.
Note: For details on "unidbfix", please read the man page and also the online
Calendar Administrators Guide.I am having the exact same problem sending through a comcast smtp server to a mac.com email address:
Reporting-MTA: dns; qmta11.emeryville.ca.mail.comcast.net
so some problem they are having in emeryville today? I too am waiting for it to clear up. -
How to get response from an asynchronous BPEL process in Java
I'm experimenting with BPEL and doesn't seem to be able to get response from an asynchronous BPEL process. Here's the deal:
I have a BPEL process that takes a string as input, and gives another string as output. This is a asyncronous process.
I want to initiate this BPEL process as a web service so I generate a Webservice Proxy in JDeveloper 10g (10.1.3.0.4). The function to call the process is now called "initiate" and takes three arguments: the input string, a "org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo" and a
"org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID".
HTTP-Analyzer shows that invoking the BPEL process with initiate("somestring", null, null) results in sending a SOAP message to the BPEL process, which returns a "202 Accepted". How do I get the response from the process? My intuition tells me that I have to use that second argument, that EnpointReferenceType thing. How do I use that?
Another question: If a asynchronous BPEL process does not exists (so the endpoint does not exist) the Java proxy does not throw an error when runned. It does not even sends a message. It exits with status 0! (This happens for example when deploying a new version of a process and when the "old" version is undeployed). Calling a non-existing synchronous BPEL process, the Java proxy DOES throw an error.Clemens,
That all sounds logical. But somehow it is still a mystery for me ... Somehow I don't see what should be done.
To call the async BPEL process I have the following procedure:
initiate(String input, org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo, org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID)
The first argument is the input for my BPEL process. The second is the address to a webservice that should handle the callback, right? The third is a messageID (makes sense, but why of the type AttributedURI?).
Here lies my problem. It is not clear to me how these EndpointReferenceType & AttributedURI work. I can't find anything on the net about it. The AXIS examples as where mentioned earlier use other types (namely the "org.xmlsoap.schemas.ws.addressing.MessageID" and "org.xmlsoap.schemas.ws.addressing.ReplyTo") which are completely different.
What I did so far:
- I created an webservice proxy that listens on the onResult endpoint of the BPEL process.
- I created an webservice proxy that calls the BPEL process through the initiate procedure, but it is not completely clear to me how to construct the EndPointreferenceType replyTo, and the MessageID. I did something like this:
EndpointReferenceType replyTo = new EndpointReferenceType();
// callback service running on local machine
// This URI class is the java.net's version
URI replyToURI = new URI("http://vaccinatie:8988/syncro-callback-context-root/stringconcatCallbackBindingPort");
// This AttributedURI is the org.xmlsoap.schemas.ws._2003._03.addressing's version
AttributedURI address = new AttributedURI();
// the only public methos that made sense to me:
address.set_value(replyToURI);
replyTo.setAddress(address);
// call the BPEL process
myPort.initiate("test123", replyTo, address);
But the above doesn't work (largely because I don't know what I'm doing here prob.:-) ) It does send the "test123" message, and the BPEL process does process it, but I don't seem to get the callback right.
I hope this makes my problems somewhat clearer. I hope someone can help me, because I'm just a beginner in this whole "web service area" and seems to do something terribly wrong here, because it should be very simple. Thx. -
Why im getting too long time in getting response from server in RMI???
I'm using RMI architecture. On my server side I put this method getRubricHierarchy() which returns the ArrayList of Test class objects. everything is working properly fine.
Im getting response properly, problem is its taking very long time in getting the response. method populate and create ArrayList in 0 second at server side but its taking more than 20 seconds to get response at client side.
My arraylist size is 30,000.
Any suggestions to reduce the time.
below you can see the code.
public List<Test> getRubricHierarchy(String strTree,String gblCombinedRepSectionID,String gblCompleteRepSectionID,String gblCompleteRepertoryID,Map authMap) {
Connection con=null;
ResultSet rs = null;
List<Test> l = new ArrayList<Test>();
List allList = new ArrayList();
con = createDBCon();
rs = con.createStatement().executeQuery("select * from rubric where sectionid='"+gblCombinedRepSectionID+"' order by orders");
Map parentMap = new HashMap();
while (rs.next()) {
Test rNode = new Test();
String rubrid = rs.getString("id");
final String desc = rs.getString("name");
rNode.setRubricName(desc);
rNode.setRubricID(rubrid);
rNode.setAuthor(rs.getString("repid"));
final int levlId = rs.getInt("levelid");
rNode.setRubLevel(levlId);
rNode.setCrossRef(rs.getString("CROSSREFERENCE"));
final String parentID = rs.getString("PARENTID");
rNode.setParentID(parentID);
rNode.setSectionID(rs.getString("sectionid"));
if (parentID.equals("0")) {
l.add(rNode);
allList.add(rNode);
List rmdyLst = (List) parentMap.get(parentID);
if (rmdyLst == null) {
rmdyLst = new ArrayList();
parentMap.put(parentID, rmdyLst);
rmdyLst.add(rNode);
rs.close();
for (Iterator iterator = allList.iterator(); iterator.hasNext();) {
Test rNodes = (Test) iterator.next();
List remdyLst = (List) parentMap.get(rNodes.getRubricID());
if (remdyLst != null) {
rNodes.setChildren(remdyLst);
for (Iterator iterator2 = remdyLst.iterator(); iterator2.hasNext();) {
Test rn = (Test) iterator2.next();
rn.setParent(rNodes);
}catch(Exception e){
e.printStackTrace();
return l;
}here is my Test Class
public class Test implements Serializable,Cloneable , MutableTreeNode{
private String strRubricID,strOldRubricID,strRubricName,strCrossRef,Author,strParentID,strSectionID;
private int rubLevel;
private List remedyList;
private List children = new ArrayList();
private Test parent;
private int order;
private String AuthorName="";
private String abbr;
private String treeType="";
private int noRem=-1;
private boolean isAddAsChild=false;
private String strRubricHie="";
private String user="";
public static final Enumeration<TreeNode> EMPTY_ENUMERATION = new Enumeration() {
public boolean hasMoreElements() {
return false;
public TreeNode nextElement() {
throw new NoSuchElementException("No more elements");
public Test(){
public void setUser(String user){
this.user = user;
public String getUser(){
return user;
public void setRubricHierarchy(String s){
this.strRubricHie=s;
public String getRubricHierarchy(){
return strRubricHie;
public Test(String treeType){
this.treeType = treeType;
public void setAddAsChild(boolean b){
this.isAddAsChild=b;
public boolean isAddAsChild(){
return isAddAsChild;
public Test getUserObject(){
return this;
public void setRubricID(String id){
this.strRubricID = id;
public String getRubricID(){
return strRubricID ;
public void setOldRubricID(String id){
this.strOldRubricID = id;
public String getOldRubricID(){
return strOldRubricID ;
public void setParent(Test r){
this.parent = r;
public Test getParent(){
return parent;
public void setParentID(String id){
this.strParentID = id;
public String getParentID(){
return strParentID;
public void setSectionID(String id){
this.strSectionID= id;
public String getSectionID(){
return strSectionID;
public void setRubricName(String name){
this.strRubricName = name;
public String getRubricName(){
return strRubricName;
public void setAuthorName(String name){
this.AuthorName = name;
public String getAuthorName(){
return AuthorName;
public void setAuthorAbbrivation(String a){
this.abbr = a;
public String getAuthorAbbrivation(){
return abbr;
public void setRubLevel(int rubLevel) {
this.rubLevel = rubLevel;
public int getRubLevel() {
return rubLevel;
public void setCrossRef(String strCrossRef) {
this.strCrossRef = strCrossRef;
public String getCrossRef() {
return strCrossRef ;
public void setRemedyList(List remedyList) {
this.remedyList = remedyList;
public List getRemedyList() {
return remedyList;
public void setAuthor(String Author) {
this.Author = Author;
public String getAuthor() {
return Author;
public void setChildren(List list) {
this.children = list;
public List getChildren() {
return children;
public void setOrder(int o){
this.order = o;
public int getOrder(){
return order;
public void setNumberOfRemedies(int no)
this.noRem = no;
public int getNumberOfRemedies()
return noRem;
public String toString() {
String value="";
value=strRubricName+ " ("+abbr+")";
return value;
public Object clone(){
Test rubric = new Test();
rubric.Author = Author;
rubric.children = children;
rubric.order = order;
rubric.parent = parent;
rubric.remedyList = remedyList;
rubric.rubLevel = rubLevel;
rubric.strCrossRef = strCrossRef;
rubric.strParentID = strParentID;
rubric.strRubricID = strRubricID;
rubric.strRubricName = strRubricName;
rubric.strSectionID = strSectionID;
return rubric;
@Override
public TreeNode getChildAt(int paramInt) {
if (this.children == null) {
throw new ArrayIndexOutOfBoundsException("node has no children");
final TreeNode node = (TreeNode) children.get(paramInt);
return node;
@Override
public int getChildCount() {
if (this.children == null) {
return 0;
return children.size();
@Override
public int getIndex(TreeNode paramTreeNode) {
// TODO Auto-generated method stub
return 0;
@Override
public boolean getAllowsChildren() {
return true;
@Override
public boolean isLeaf() {
return children.isEmpty();
@Override
public Enumeration children() {
if (this.children == null) {
return EMPTY_ENUMERATION;
Vector v = new Vector(this.children);
return v.elements();
@Override
public void insert(MutableTreeNode newChild, int paramInt) {
if (newChild == null) {
throw new IllegalArgumentException("new child is null");
MutableTreeNode oldParent = (MutableTreeNode) newChild.getParent();
if (oldParent != null) {
oldParent.remove(newChild);
newChild.setParent(this);
if (children == null) {
children = new ArrayList();
children.add(paramInt, newChild);
@Override
public void remove(int childIndex) {
MutableTreeNode child = (MutableTreeNode) getChildAt(childIndex);
children.remove(childIndex);
child.setParent(null);
@Override
public void remove(MutableTreeNode aChild) {
if (aChild == null) {
throw new IllegalArgumentException("argument is null");
if (!isNodeChild(aChild)) {
throw new IllegalArgumentException("argument is not a child");
remove(getIndex(aChild)); // linear search
public boolean isNodeChild(TreeNode aNode) {
boolean retval;
if (aNode == null) {
retval = false;
} else {
if (getChildCount() == 0) {
retval = false;
} else {
retval = (aNode.getParent() == this);
return retval;
@Override
public void setUserObject(Object paramObject) {
// TODO Auto-generated method stub
@Override
public void removeFromParent() {
MutableTreeNode parent = (MutableTreeNode) getParent();
if (parent != null) {
parent.remove(this);
@Override
public void setParent(MutableTreeNode paramMutableTreeNode) {
parent = (Test) paramMutableTreeNode;
* Returns the path from the root, to get to this node. The last element in
* the path is this node.
* @return an array of TreeNode objects giving the path, where the first
* element in the path is the root and the last element is this
* node.
public TreeNode[] getPath() {
return getPathToRoot(this, 0);
* Builds the parents of node up to and including the root node, where the
* original node is the last element in the returned array. The length of
* the returned array gives the node's depth in the tree.
* @param aNode
* the TreeNode to get the path for
* @param depth
* an int giving the number of steps already taken towards the
* root (on recursive calls), used to size the returned array
* @return an array of TreeNodes giving the path from the root to the
* specified node
protected TreeNode[] getPathToRoot(TreeNode aNode, int depth) {
TreeNode[] retNodes;
* Check for null, in case someone passed in a null node, or they passed
* in an element that isn't rooted at root.
if (aNode == null) {
if (depth == 0)
return null;
else
retNodes = new TreeNode[depth];
} else {
depth++;
retNodes = getPathToRoot(aNode.getParent(), depth);
retNodes[retNodes.length - depth] = aNode;
return retNodes;
}You have an O(N**2) algorithm at the end that is rather ill-considered. It seems to me at first glance that it could be combined int the previous loop.
-
RFC problem: could not get functionname from XML requst (sic)
I'm developing an interface that attempts to call a receiver RFC on an SAP 4.6c system. It's a very small simple interface, and it's all working until it tries to call the RFC. The error is
Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get functionname from XML requst: com.sap.aii.af.rfc.RfcAdapterException: failed to read funtionname from XML document: missing namespace declara
I've created an RFC channel, which is green in the adapter monitoring. The RFC imports without a problem, and appears in my interface mapping. My mapping program converts to the RFC message type (as evidenced in sxmb_moni. I have a receiver agreement referencing the interface mapping, which must be working as the mapping is called.
Could anyone point me to what else I could check? I saw a post about the same error message, where the respondent found something in the logs which helped them Could you expand on what you found, and in which log please? Any pointers as to which logging options I could switch on and check would be gratefully received.
Regards
Alan GrahamThanks for the responses.
I set up a communications channel of type RFC, which is
showing green in the adapter monitor. If I deliberately
break it, eg by changing the password, the adapter shows
as red in the monitor. I assume therefore that the
adaptor settings are correct.
The XML going to the adapter looks correct AFAIK. My problem is that I don't know enough about the requied XML to know if what I'm seeing in the logs is sufficient. In SXMB_MONI, in the 'call adapter' section of a failed message, the outbound binding includes
<SAP:ToInterfaceNamespace>urn:sap-com:document:sap:rfc:functions</SAP:ToInterfaceNamespace>/code]
Also, the interface determination SOAP header, in the MAIN section includes
[code]<SAP:Receiver>
<SAP:Party agency="" scheme="" />
<SAP:Service>D04</SAP:Service>
<SAP:Interface namespace="urn:sap-com:document:sap:rfc:functions">Z_MPU_3PSCE_FREIGHT_UPLOAD</SAP:Interface>
</SAP:Receiver>
These are the correct values for the RFC name and the namespace, AFAIK.
I'm using an interface mapping (which uses and ABAP class as the mapping program) which references the interface of the RFC. The logs tell me this works, ie, the class is called and the resulting XML appears in the payload of the response.
Alan -
Purchase Req & Standard PO - Price is not getting Defaulted from Price List
Dear All,
Hope you are doing good!!!
We are implementing R12.1 for one of our client. This query is pertaining to the Advance Pricing with Purchasing. Infact client wants to default the Purchase Requisition and Standard Purchase Order Price from Price List.
I have done entire setup and defined ASL for this reason. But still price is not getting defulted from Contract Purchase Ageerement.
What could be the reason. Its an standard fucntionality but still its not picking up.
I would really appreciate if someone could help me on this. Its URGENT.
Thanks in Advance.
Thanks & Regards,
AdityaLet us go through the steps involved in integrating Advanced Pricing with Purchasing so that we know if we have missed anything.
1. Create Price Lists in Advanced Pricing.
2. Setup Profile Options in System Administrator responsibility:
QP: Licensed for Product - at Application: Purchasing level = Purchasing.
QP: Pricing Transaction Entity - at Application: Purchasing level = Procurement
( Site level - ‘Order Fulfillment’ )
Profile option can be set at site, application, and user levels.
QP: Source System Code – at Application: Purchasing level = Oracle Purchasing
( Site level -- ‘Oracle Pricing’ )
Profile can be set at site and responsibility levels.
QP: Item Validation Organization - at Application: Purchasing level = null
( Site level -- specified in Financial Options )
Profile option can be set at site and responsibility levels.
3. Add item to the Price list Advanced Pricing ->Price Lists -> Price List Setup.
Enter the item/price/dates etc.
4. Create Contract Purchase Agreement.
5. Create Approved Suppliers List. In the Source Documents, select the Type as Contract and reference the Contract Agreement Number.
Create the Sourcing Rule and add the Rule to the Assignment Set.
6. Create the Standard Purchase Order referencing the Contract Purchase Agreement in the Reference Documents.
The Price listed should be defaulted from the Price Lists.
Cross-Check the following steps and let me know if it still fails and we can try to resolve from then on :) -
SRW2024 not getting IP from dhcp
Hi,
I'm have installed a SRW2024 switch in my home office. I've connected via hyperterminal and changed the ip address mode to "dhcp client". But i'm not getting an ip address from the dhcp server.
Is there something else I must do or setup on the switch? the DHCP server has been running without problem for some time now, all my other devices can get an ip without problems...
Thanks,
KoenKhan,
The problem of users not getting IP from the DHCP usually happens when 'spanning-tree portfast' is not enabled on access ports. PCs don't wait long enough for DHCP responses and time out.
Can you make sure all the access ports, to which the users are connected to, have spanning tree portfast enabled.
HTH,
Sundar -
Could not get IOR from Domino Server while provisioning Lotus Notes
Hi all,
There are two servers that have OIM installed, development server and test server. From development server, we can
provision to Lotus Notes just fine. But for test server everytime when
provision to Lotus Notes. There will be an exception
NotesException: Could not get IOR from Domino Server: http://10.3.100.61:63148/diiop_ior.txt
From test server
I can access the URL http://10.3.100.61:63148/diiop_ior.txt using Internet Explorer
I can telnet to 10.3.100.61 63148
I can use connector testing program and it work fine
All configuration and jar files are the same as development server
There is no firewall or antivirus running in both systems.
Both server is virtual server using VMWare.
OS: Windows2003R2 Enterprise
DB: Oracle 10gR2 10.2.0.2
AS: Oracle AS 10g 10.1.3.3.0
OIM 9.1.0
Lotus Notes Connector 9.0.4.2
Thank you.
Satit
The error is as below
=================================================
INFO,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LotusNotesProvision::init
INFO,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LotusNotesProvision::init
DEBUG,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LotusNotesProvision::init : Host 10.3.100.61
DEBUG,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LotusNotesProvision::init : Port 63148
DEBUG,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LotusNotesProvision::init : Admin Pongtape Ungkawanish/Telecom./Central Support/Fin./KK_Bangkok/TH
DEBUG,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LotusNotesProvision::init : Certifier OU
DEBUG,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LotusNotesProvision::init : Before session
08/11/11 11:24:26 Running setTimeoutParameters
08/11/11 11:24:26 Running Connect
INFO,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LNotesConnectionUtil::getSession
INFO,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LNotesConnectionUtil::getSession : ***Non-Secure Mode
ERROR,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],LNotesConnectionUtil::getSession : ***Connection refused to Lotus Notes......
NotesException: Could not get IOR from Domino Server: http://10.3.100.61:63148/diiop_ior.txt
at lotus.domino.NotesFactory.requestIORPlain(Unknown Source)
at lotus.domino.NotesFactory.requestIORUsingArgs(Unknown Source)
at lotus.domino.NotesFactory.getIOR(Unknown Source)
at lotus.domino.NotesFactory.createSessionUP(Unknown Source)
at lotus.domino.NotesFactory.createSession(Unknown Source)
at com.thortech.xl.Integration.HostAccess.LNotesConnectionUtil.getSession(Unknown Source)
at com.thortech.xl.Integration.HostAccess.LotusNotesProvision.connect(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpLNCREATEUSER.CONNECT(adpLNCREATEUSER.java:449)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpLNCREATEUSER.implementation(adpLNCREATEUSER.java:160)
at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.retryTasks(Unknown Source)
at com.thortech.xl.ejb.beans.tcProvisioningOperationsSession.retryTasks(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at tcProvisioningOperations_RemoteProxy_6ocop18.retryTasks(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:781)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:913)
... 45 more
INFO,11 Nov 2008 11:24:26,109,[ADAPTER.LOTUSNOTES],Unable to connect to the target. Attempting to reconnect after delay of 2000ms.......
INFO,11 Nov 2008 11:24:28,110,[ADAPTER.LOTUSNOTES],LNotesConnectionUtil::getSession
INFO,11 Nov 2008 11:24:28,110,[ADAPTER.LOTUSNOTES],LNotesConnectionUtil::getSession : ***Non-Secure Mode
ERROR,11 Nov 2008 11:24:28,110,[ADAPTER.LOTUSNOTES],LNotesConnectionUtil::getSession : ***Connection refused to Lotus Notes......
NotesException: Could not get IOR from Domino Server: http://10.3.100.61:63148/diiop_ior.txt
at lotus.domino.NotesFactory.requestIORPlain(Unknown Source)
at lotus.domino.NotesFactory.requestIORUsingArgs(Unknown Source)
at lotus.domino.NotesFactory.getIOR(Unknown Source)
at lotus.domino.NotesFactory.createSessionUP(Unknown Source)
at lotus.domino.NotesFactory.createSession(Unknown Source)
at com.thortech.xl.Integration.HostAccess.LNotesConnectionUtil.getSession(Unknown Source)
at com.thortech.xl.Integration.HostAccess.LNotesConnectionUtil.getSession(Unknown Source)
at com.thortech.xl.Integration.HostAccess.LotusNotesProvision.connect(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpLNCREATEUSER.CONNECT(adpLNCREATEUSER.java:449)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpLNCREATEUSER.implementation(adpLNCREATEUSER.java:160)
at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.retryTasks(Unknown Source)
at com.thortech.xl.ejb.beans.tcProvisioningOperationsSession.retryTasks(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at tcProvisioningOperations_RemoteProxy_6ocop18.retryTasks(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:781)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:913)
... 46 morecheck if DIIOP service is turned on at the Lotus Domino side...
Oleg. -
Issue: Not getting response when the document is having special chars
Please help following issue: Not getting response when the document is having special chars(Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
Error message:
System.FormatException: Invalid length for a Base-64 char array. at
System.Convert.FromBase64String(String s) at
Summarize.Summarizer.AccumulateBroadcast(String filedata, String givenWords) in
c:\DocumentSummarizer\App_Code\Summarizer.cs:line 66
Code:
File 1:
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Properties;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hwpf.*;
import org.apache.poi.hwpf.extractor.*;
import com.lowagie.text.Document;
import com.lowagie.text.pdf.PRTokeniser;
import com.lowagie.text.pdf.PdfReader;
public class DocumentSummarizerClient {
static Properties loadProperties() {
Properties prop = new Properties();
try {
prop.load(DocumentSummarizerClient.class.getClassLoader().getResourceAsStream("vep.properties"));
} catch (Exception ioe) {
ioe.printStackTrace();
return prop;
public String getSummary(String fileName,String noOfWordsOrPercentage ){
String summaryInputData ="";
String summarizedData="";
String summarizerURL = loadProperties().getProperty("Summarizer.serviceURL");
try {
String fileExtension=fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());
if (fileExtension.equalsIgnoreCase("doc")|| fileExtension.equalsIgnoreCase("txt")|| fileExtension.equalsIgnoreCase("pdf")) {
if (fileExtension.equalsIgnoreCase("txt")) {
BufferedReader bufferedReader = new BufferedReader(
new FileReader(fileName));
String line = null;
while ((line = bufferedReader.readLine()) != null) {
summaryInputData += line;
if(fileExtension.equalsIgnoreCase("doc")){
POIFSFileSystem fs = null;
fs = new POIFSFileSystem(new FileInputStream(fileName));
HWPFDocument doc = new HWPFDocument(fs);
WordExtractor we = new WordExtractor(doc);
String[] paragraphs = we.getParagraphText();
for( int i=0; i<paragraphs .length; i++ ) {
paragraphs[i] = paragraphs.replaceAll("\\cM?\r?\n","");
summaryInputData+= paragraphs[i];
if(fileExtension.equalsIgnoreCase("pdf")){
Document document = new Document();
document.open();
PdfReader reader = new PdfReader(fileName);
int pageCount =reader.getNumberOfPages();
for(int i=1;i<=pageCount;i++){
byte[] bytes = reader.getPageContent(i);
PRTokeniser tokenizer = new PRTokeniser(bytes);
StringBuffer buffer = new StringBuffer();
while (tokenizer.nextToken()) {
if (tokenizer.getTokenType() == PRTokeniser.TK_STRING) {
buffer.append(tokenizer.getStringValue());
summaryInputData += buffer.toString();
else{
System.out.println("This is Invalid document. Presntly we support only text,word and PDF documents ");
// String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
// encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
summarizedData= postRequest(parameters,summarizerURL);
String slength= "<string xmlns=\"http://tempuri.org/\">";
if(summarizedData.contains("</string>")){
summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
summarizedData = replaceVal(summarizedData);
//System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
// System.out.println("Summarized data "+summarizedData);
if(summarizedData.contains("Please enter the percentage")){
summarizedData="Data given cannot be summarized further";
else{
System.out.println("Data given cannot be summarized further");
summarizedData="";
} catch (FileNotFoundException e) {
return("The File is not found \n\n"+e.toString());
} catch (IOException e) {
return("The File is already in use \n\n"+e.toString());
} catch (Exception e) {
return(e.toString());
return summarizedData;
public static String postRequest(String parameters,String webServiceURL) throws Exception{
Properties systemSettings = System.getProperties();
systemSettings.put("http.proxyHost", loadProperties().getProperty("proxyHost"));
systemSettings.put("http.proxyPort", loadProperties().getProperty("proxyPort"));
System.setProperties(systemSettings);
String responseXML = "";
try {
URL url = new URL(webServiceURL);
URLConnection connection = url.openConnection();
HttpURLConnection httpConn = (HttpURLConnection) connection;
byte[] requestXML = parameters.getBytes();
httpConn.setRequestProperty("Content-Length", String
.valueOf(requestXML.length));
httpConn.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
httpConn.setRequestMethod("POST");
httpConn.setDoOutput(true);
httpConn.setDoInput(true);
OutputStream out = httpConn.getOutputStream();
out.write(requestXML, 0, requestXML.length);
out.close();
InputStreamReader isr = new InputStreamReader(httpConn
.getInputStream());
BufferedReader br = new BufferedReader(isr);
String temp;
String tempResponse = "";
while ((temp = br.readLine()) != null)
tempResponse = tempResponse + temp;
responseXML = tempResponse;
br.close();
isr.close();
} catch (java.net.MalformedURLException e) {
System.out
.println("Error in postRequest(): Secure Service Required");
} catch (Exception e) {
System.out.println("Error in postRequest(): " + e.getMessage());
return responseXML;
public String replaceVal(String value) {
if (value == null) {
value = "";
value = value.replace("<", "<");
value = value.replace(">", ">");
value = value.replace("&", "&");
return value;
public static void main(String[] args) {
DocumentSummarizerClient testdoc=new DocumentSummarizerClient();
System.out.println("hello");
testdoc.getSummary("C:\\working_folder\\vep\\UnitTestCases\\VEP1.0\\DocumentSummarizerTestData\\TestErrorFour.doc","100%");
Note: Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
File 2:
---------public class Base64Utils {
private static byte[] mBase64EncMap, mBase64DecMap;
* Class initializer. Initializes the Base64 alphabet (specified in RFC-2045).
static {
byte[] base64Map = {
(byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F',
(byte)'G', (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L',
(byte)'M', (byte)'N', (byte)'O', (byte)'P', (byte)'Q', (byte)'R',
(byte)'S', (byte)'T', (byte)'U', (byte)'V', (byte)'W', (byte)'X',
(byte)'Y', (byte)'Z',
(byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f',
(byte)'g', (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l',
(byte)'m', (byte)'n', (byte)'o', (byte)'p', (byte)'q', (byte)'r',
(byte)'s', (byte)'t', (byte)'u', (byte)'v', (byte)'w', (byte)'x',
(byte)'y', (byte)'z',
(byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5',
(byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'};
mBase64EncMap = base64Map;
mBase64DecMap = new byte[128];
for (int i=0; i<mBase64EncMap.length; i++)
mBase64DecMap[mBase64EncMap[i]] = (byte) i;
* This class isn't meant to be instantiated.
private Base64Utils() {
* Encodes the given byte[] using the Base64-encoding,
* as specified in RFC-2045 (Section 6.8).
* @param aData the data to be encoded
* @return the Base64-encoded <var>aData</var>
* @exception IllegalArgumentException if NULL or empty array is passed
public static String base64Encode(byte[] aData) {
if ((aData == null) || (aData.length == 0))
throw new IllegalArgumentException("Can not encode NULL or empty byte array.");
byte encodedBuf[] = new byte[((aData.length+2)/3)*4];
// 3-byte to 4-byte conversion
int srcIndex, destIndex;
for (srcIndex=0, destIndex=0; srcIndex < aData.length-2; srcIndex += 3) {
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
(aData[srcIndex] << 4) & 077];
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+2] >>> 6) & 003 |
(aData[srcIndex+1] << 2) & 077];
encodedBuf[destIndex++] = mBase64EncMap[aData[srcIndex+2] & 077];
// Convert the last 1 or 2 bytes
if (srcIndex < aData.length) {
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
if (srcIndex < aData.length-1) {
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
(aData[srcIndex] << 4) & 077];
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] << 2) & 077];
else {
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] << 4) & 077];
// Add padding to the end of encoded data
while (destIndex < encodedBuf.length) {
encodedBuf[destIndex] = (byte) '=';
destIndex++;
String result = new String(encodedBuf);
return result;
* Decodes the given Base64-encoded data,
* as specified in RFC-2045 (Section 6.8).
* @param aData the Base64-encoded aData.
* @return the decoded <var>aData</var>.
* @exception IllegalArgumentException if NULL or empty data is passed
public static byte[] base64Decode(String aData) {
if ((aData == null) || (aData.length() == 0))
throw new IllegalArgumentException("Can not decode NULL or empty string.");
byte[] data = aData.getBytes();
// Skip padding from the end of encoded data
int tail = data.length;
while (data[tail-1] == '=')
tail--;
byte decodedBuf[] = new byte[tail - data.length/4];
// ASCII-printable to 0-63 conversion
for (int i = 0; i < data.length; i++)
data[i] = mBase64DecMap[data[i]];
// 4-byte to 3-byte conversion
int srcIndex, destIndex;
for (srcIndex = 0, destIndex=0; destIndex < decodedBuf.length-2;
srcIndex += 4, destIndex += 3) {
decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
((data[srcIndex+1] >>> 4) & 003) );
decodedBuf[destIndex+1] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
((data[srcIndex+2] >>> 2) & 017) );
decodedBuf[destIndex+2] = (byte) ( ((data[srcIndex+2] << 6) & 255) |
(data[srcIndex+3] & 077) );
// Handle last 1 or 2 bytes
if (destIndex < decodedBuf.length)
decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
((data[srcIndex+1] >>> 4) & 003) );
if (++destIndex < decodedBuf.length)
decodedBuf[destIndex] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
((data[srcIndex+2] >>> 2) & 017) );
return decodedBuf;
issue 2: Exception when passing 2MB .txt file
Steps to reproduce:
Call getSummary() with 2MB .txt file
Actual:
The following exception has occured:
1. Error in postRequest(): Unexpected end of file from server
java.lang.NullPointerException
Please provide your precious feedback/suggestions.
Thanks in advance…..
Edited by: EJP on 15/03/2011 16:52: added code tags. Please use them. Code is unreadable otherwise.Thanks for your response….
This is enhancement project and some one develops long back.
Regarding point (b) You should be using the java.net.URLEncoder to encode URL parameters, not a base64 encoder.
DocumentSummarizerClient.java I am using base64
Ex:
// String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
// encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
summarizedData= postRequest(parameters,summarizerURL);
String slength= "<string xmlns=\"http://tempuri.org/\">";
if(summarizedData.contains("</string>")){
summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
summarizedData = replaceVal(summarizedData);
//System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
System.out.println("Summarized data "+summarizedData);
if(summarizedData.contains("Please enter the percentage")){
summarizedData="Data given cannot be summarized further";
Above specific please I need to modify to resolve above issue.
Could you please suggest me what changes I need to do.
Waiting for positive response. -
Standard PO workflow giving error due to Release coe is not getting passed from event
Hi Team,
I am getting the below error while processing the Standard workflow for PO.
I think its due to the Release code is not getting passed from Event to workflow.
Can you please sugest from where the release code is getting fetched before triggering the event.
Error processing following event linkage:
BUS2012 RELEASESTEPCREATED WS20000075
Following error occurred:
SWF_RUN 594
Message text:
Import container contains errors (are any obligatory elements missing?)
Event container appended as attachment.
Event linkage not changed.
Event stored temporarily.
Events can be redelivered via event queue
administration (transaction SWEQADM)Hi
Please check threads, response by Fernando Carames, ( Jul 19, 2007 2:37 PM): http://scn.sap.com/thread/483005
Or by Trevor Ticehurst on Oct 9, 2008 3:39 PM at: http://scn.sap.com/thread/1080411
OR
http://www.sapfans.com/forums/viewtopic.php?f=26&t=297786
All these mention certian notes which may be helpful.
However, it is important to first ensure that the release startegy is configured and working properly (check with your MM con)
regards,
Modak
Maybe you are looking for
-
Mass generation of sales orders from marketing projects
Hi, I am trying to create sales order from a campaign. I get an error message: Sales orders are only generated when products and quantities are assigned. I have added a quantity in the order template, but from the campaign the is no field available f
-
Is there a way to get an animated wallpaper on iphone 4s without jailbreak (ios 6.0.1)?
-
I need to load an application from a backup
Users:I have a database that is corrupt. I am getting a database that is offline I am trying to rebuild it. Can someone please tell me what files I need from the original database loaded into the new one i am creating. I know I need the .pag, .ind,.o
-
How to change function group in table maintenance
Hello experts, I am having a problem transporting a custom table. Now, what I want to do is to just create a new function group under the table maintenance option in se11. Now, I can't seem to change my custom table's function group. How do I do that
-
Publishing IWeb Created Website in AOL Space
Hi! I created a website using iWeb. It was very easy to do. However when I tried to publish it on my AOL webspace, it did not work. I uploaded the contents of the desktop folder to my AOL FTP space but when I went to the URL, neither the text not the