Problem while calling servlet from java bean
I am trying to call a servlet from java bean in cep.
My java bean:
package com.bea.wlevs.example.algotrading;
import com.bea.wlevs.ede.api.StreamSink;
import com.bea.wlevs.example.algotrading.event.MarketEvent;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
public class MarketEventBean implements StreamSink {
String s=null;
public void onInsertEvent(Object event) {
if (event instanceof MarketEvent) {
MarketEvent marketEvent = (MarketEvent) event;
try {
JAXBContext cxt = JAXBContext.newInstance(MarketEvent.class);
Unmarshaller unmarsh = cxt.createUnmarshaller();
StringReader strReader = new StringReader(marketEvent.getString_1());
MarketEvent obj = (MarketEvent) unmarsh.unmarshal(strReader);
s=obj.getSymbol();
System.out.println("data: " + s);
} catch(Exception e) {
e.printStackTrace();
try {
System.out.println("test1");
URL url = new URL("http://172.18.21.94:7001/AppServletrecv-Model-context-root/ReceiveServlet");
URLConnection conn = url.openConnection();
System.out.println("test2");
conn.setDoOutput(true);
System.out.println("test3");
BufferedWriter out =
new BufferedWriter( new OutputStreamWriter( conn.getOutputStream() ) );
out.write("symbol="+s);
System.out.println("test4");
out.flush();
System.out.println("test5");
out.close();
System.out.println("test6");
BufferedReader in =
new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
System.out.println("test7");
String response;
while ( (response = in.readLine()) != null ) {
System.out.println( response );
in.close();
catch ( MalformedURLException ex ) {
// a real program would need to handle this exception
catch ( IOException ex ) {
// a real program would need to handle this exception
My servlet code:
package model;
import javax.servlet.http.HttpServlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class ReceiveServlet extends HttpServlet {
private final static String _SYMBOL = "symbol";
public void doPost(HttpServletRequest request, HttpServletResponse response) {
* Get the value of form parameter
// private final static String USERNAME = "username";
String symbol = request.getParameter( _SYMBOL );
* Set the content type(MIME Type) of the response.
response.setContentType("text/html");
* Write the HTML to the response
try {
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title> A very simple servlet example</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Hello " + symbol +"</h1>");
out.println("</body>");
out.println("</html>");
out.close();
} catch (IOException e) {
Web.xml:
<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
<servlet>
<servlet-name>ReceiveServlet</servlet-name>
<servlet-class>model.ReceiveServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ReceiveServlet</servlet-name>
<url-pattern>/ReceiveServlet</url-pattern>
</servlet-mapping>
</web-app>
My servlet is running in weblogic server.
But when I am running this program in weblogic server side there is no log.
Edited by: 856272 on Jun 23, 2011 6:43 AM
I would run both sides in a debugger and see what code is getting invoked
Similar Messages
-
Calling servlet from java page flow
Hi,
I need to call servelt class from the <netui:anchor ..> tag of my jpf.
i have mapped this servlet class in the web.xml.
please tell us how to invoke servlet from the netui:anchor tag from the jpf action
method.
thanks
shashiI am calling a Servlet from JAVA Class as I am using IDE: Eclipse. The Problem is below
URL url = new URL(ServletPath);
URLConnection connet = url.openConnection();Why should the Servlet running in different Runtime print on your Eclipse Runtime. Please be more clear about the question. -
Calling Servlet from Java Class in eclipse
Hi ,
I am calling a Servlet from JAVA Class as I am using IDE: Eclipse. The Problem is below
URL url = new URL(ServletPath);
URLConnection connet = url.openConnection();
I am using the above code in JAVA to Connect to Servlet I have given Print statement in Servlet such that whenever it calls it prints on Console but when I try to run the code the Statement is not printed in the Console of eclipse I think URL connection is not able to establish any connection ..... if any has solution for this please reply
Thanks & Regards,
ArvindI am calling a Servlet from JAVA Class as I am using IDE: Eclipse. The Problem is below
URL url = new URL(ServletPath);
URLConnection connet = url.openConnection();Why should the Servlet running in different Runtime print on your Eclipse Runtime. Please be more clear about the question. -
Hello!
I need to send XML file to servlet from Java. I generate XML in general java class.
Is there any way how to call servlet directly from Java without using a page with form? I need to send it by post method. I need some java alternative to Microsoft.XMLHTTP object.
ThanksTry this part of the Networking tutorial:
http://java.sun.com/docs/books/tutorial/networking/urls/index.html
It might be the answer to your question. -
Exception while calling BPEL from Java Class
Hi All,
I am trying to call BPEL from my Java Code. but i am getting following exception.
java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DomainManagerBean not found
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218)
at com.oracle.bpel.client.Locator.getDomainAuth(Locator.java:975)
at com.oracle.bpel.client.Locator.<init>(Locator.java:73)
at callbpel.CallBPEL.main(CallBPEL.java:40)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)
at com.oracle.bpel.client.Locator.getDomainAuth(Locator.java:975)
at com.oracle.bpel.client.Locator.<init>(Locator.java:73)
at callbpel.CallBPEL.main(CallBPEL.java:40)
Process exited with exit code 0.
Following is my java code.
package callbpel;
import com.collaxa.cube.util.GUIDGenerator;
import com.collaxa.xml.XMLHelper;
import com.oracle.bpel.client.Locator;
import com.oracle.bpel.client.NormalizedMessage;
import com.oracle.bpel.client.delivery.IDeliveryService;
import java.util.Hashtable;
import java.util.Map;
import com.oracle.bpel.client.ServerException;
import java.rmi.RemoteException;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.w3c.dom.Element;
public class CallBPEL {
public CallBPEL() {
public static void main(String[] args) {
CallBPEL callBPEL = new CallBPEL();
Hashtable env;
try {
env = callBPEL.getInitialContext();
String xml = "<ssn xmlns=\"http://services.otn.com\">" + "1234" + "</ssn>";
Locator locator = new Locator("default",env);
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService
(IDeliveryService.SERVICE_NAME );
NormalizedMessage nm = new NormalizedMessage();
nm.addPart("payload", xml);
try {
deliveryService.post("JavaCallingBPEL", "initiate", nm);
System.out.println("BPELProcess HelloWorld executed!<br>");
} catch (ServerException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (NamingException e) {
e.printStackTrace();
} catch (ServerException e) {
e.printStackTrace();
private static Hashtable getInitialContext() throws NamingException {
Hashtable env = new Hashtable();
env.put("orabpel.platform","ias_10g");
env.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
env.put("java.naming.provider.url","opmn:ormi://localhost:6004:oc4j_soa/orabpel");
env.put("java.naming.security.principal","oc4jadmin");
env.put("java.naming.security.credentials","welcome1");
return env;
I am breaking my head since last two days. i dont know whats the problem. i have included almost all the jars in class path.
Can anybody help me in this.
any help is appreciated.
Thanks,
NimishaHi all,
I have solved above problem but run into some other exception below
Dec 22, 2008 12:51:34 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
WARNING: Exception returned by remote server: {0}
com.evermind.server.rmi.RMIConnectionException: Disconnected: com.oracle.bpel.client.AbstractIdentifier; local class incompatible: stream classdesc serialVersionUID = 3174123903773674079, local class serialVersionUID = -4389351842028223514
at com.evermind.server.rmi.RmiCallQueue.notifyQueuedThreads(RmiCallQueue.java:70)
at com.evermind.server.rmi.RMIClientConnection.notifyQueuedThreads(RMIClientConnection.java:154)
at com.evermind.server.rmi.RMIClientConnection.resetState(RMIClientConnection.java:128)
at com.evermind.server.rmi.RMIConnection.receiveDisconnect(RMIConnection.java:233)
at com.evermind.server.rmi.RMIClientConnection.receiveDisconnect(RMIClientConnection.java:140)
at com.evermind.server.rmi.RMIConnection.handleOrmiCommand(RMIConnection.java:208)
at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:222)
at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)
at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
at java.lang.Thread.run(Thread.java:595)
Any Idea?
Thanks,
Nimisha
Edited by: user649974 on Jan 6, 2009 10:50 AM -
Problem while invoking popup from backing bean
I am invoking a popup from backing bean method.
The same backing bean method has the business logic which depends on the data collected from popup(user enters some data on popup).
So I need the business logic to be executed after popup comes up.
The popup is coming after the execution of return statement in backing bean method . How do i make popup trigger at earlier point in the method.
<af:commandToolbarButton text="#{corePostupgradeuiBundle.SIGN_OFF_MIG}"
id="socb52"
partialSubmit="true"
actionListener="#{viewScope.signoffBean.signOffAgents}"
partialTriggers="t3"/>
public void signOffAgents(ActionEvent event) throws SQLException {
DCBindingContainer bc =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding summaryIter =
bc.findIteratorBinding("Signoff1Iterator");
showPopup("credentials"); //will get credential details from user and store in credential Bean
//Following logic uses the data collected from popup
EMCredentialReference credRef= credentialBean.getCredReference();
submitJOb(credRef);
public static void showPopup(String popupId) {
FacesContext context = FacesContext.getCurrentInstance();
StringBuilder script = new StringBuilder();
script.append("AdfPage.PAGE.findComponent(\"").append(popupId).append("\").show();");
ExtendedRenderKitService erks =
Service.getService(context.getRenderKit(),
ExtendedRenderKitService.class);
erks.addScript(context, script.toString());
UIComponent component = context.getViewRoot().findComponent(popupId);
RequestContext.getCurrentInstance().addPartialTarget(component);
}Well, your work flow is wrong.
What you try to accomplish should work out of the box as
1) user hit toolbar button
2) this opens a popup "credentials" which have listeners for ok and cancel
3) use fills in data in popup and hit ok or cancel
4) one of the listeners gets fired
5a) if OK listener you do your business logic
5b) if cancel you do something else
So all you have to do is the use a af:af:showPopupBehavioron the toolbar button, add a popup canel listener (if you need to act on canel) dependign on your popup design (dialog or simple button) add the appropriate listeners and in the listener method so your business logic.
Timo -
UIX Problem: How call a nonstatic java bean?
Now with a better subject! It's the same Problem like my post:
How can I call a nonstatic class
Hello All,
I've wrote a simple bean for my testcase that count a value (e.g. site access):
public class Bean1 {
private int accessCount = 1;
public int getAccessCount() {
return (accessCount++);
If I call the bean with a jsp-site, it works fine with different scope. e.g. session and application.
With session scope different browser count different. With application scope different bowser count together. Thats the normal attitude.
My jsp code:
<jsp:useBean id="counter" class="ml.view.Bean1" scope="session" />
<jsp:getProperty name="counter" property="accessCount" />
This don't work with a static bean (normal too), but I can only call a static class in my UIX site.
I call the bean from uix with the invoke element. Is that correct? How can I call a nonstatic class with a special scope? Which other solution ist possible?
My uix code:
<invoke method="getAccessCount" result="${uix.eventResult.getAccessCount}" instance="${sessionScope.Bean1.getAccessCount}" exception="${uix.eventResult.error}" javaType="ml.view.Bean1"/>
Thank you for any solution!
The error messages are:
java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java)
at oracle.cabo.servlet.event.InvokeEventHandler._invoke(Unknown Source)
at
and so forth...Hello,
try right clicking on the bean and select Create Data Control.
The bean will then appear on your data control pallet and you can drag the field onto your UIX page.
you may be able to acheive this using EL in your example, but i am not sure how to do this. I know the above solution works. You can also use the binding container in any struts action to get hold of your bean and perform any actions on it.
regards,
Brenden -
C:import tag - Query string while calling servlet from JSP
Hi,
From my JSP I am calling a servlet to write back to the response stream of the JSP. From the JSP i am trying to pass some values into the query string as follows
<%
String strGetParameters = "/servlet/MyServlet?path=" + strPath;
%>
<pre><c:import url="<%=strGetParameters%>" /></pre>In the servlet I try to get the path from the query string by using
request.getParameter("path")But in the servlet the query string doesnt have the "path" parameter that I added in the strGetParameters string (in the JSP).
Am i missing something? Do i have to use something else or do something else?
Any help is appreciated.I've taken some time to do a simple test and it just works.
Here is the test code, it was tested in Java EE 5 + JSTL 1.2 + Tomcat 6.
JSP<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<html>
<head>
<title>Test</title>
</head>
<body>
<pre>
<c:import url="myServlet?param1=foo¶m2=bar">
<c:param name="param3" value="meep" />
<c:param name="param4" value="waah" />
</c:import>
</pre>
</body>
</html>MyServlet (mapped on "/myServlet")package mypackage;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class MyServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
String param1 = request.getParameter("param1");
String param2 = request.getParameter("param2");
String param3 = request.getParameter("param3");
String param4 = request.getParameter("param4");
String output = param1 + ", " + param2 + ", " + param3 + ", " + param4;
response.getOutputStream().write(output.getBytes());
}All parameters gets printed. -
Calling Servlet from Java-Class
Hi,
I have a normal java-class that is working with request/response Objects. From within this class I want to call a local servlet, let it do some work with the request and the response and then return it to the class.
I guess the RequestDispatcher can only be called from within a Servlet, but my class is not a servlet.
The getServlet()-method is not working any more.
Maybe somebody has an idea.
Thanks a lot,
MatthiasHi,
I have a normal java-class that is working with
request/response Objects. From within this class I
want to call a local servlet, let it do some work with
the request and the response and then return it to the
class.
I guess the RequestDispatcher can only be called from
within a Servlet, but my class is not a servlet.
The getServlet()-method is not working any more.
Maybe somebody has an idea.
Thanks a lot,
MatthiasThis is not very pretty, so I think you should redessign, but you can open a URLConnection from your class pointing to the URL of the servlet. As far as I know you can't invoke a servlet directly, because you can't get a reference to it, it can only be invoked by the container... -
Problem while calling RFC in java
hi,
I writed a java program calling a batch input RFC. The RFC return an internal table which storing the system messages of the batch input process. My problem is:
When i debug the java program,the RFC excecuted and return the correct internal table to me.
But when i executed it not in debug mode, there is no batch input messages return to me.
My code is:
package com.hongta.com.z_delivery_bdc;
import com.sap.mw.jco.IFunctionTemplate;
import com.sap.mw.jco.JCO;
import com.sap.mw.jco.JCO.ParameterList;
@author Administrator
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
public class ConnectRFC extends Object {
JCO.Client mConnection;
JCO.Repository mRepository;
String filePath;
String BDCLOG;
JCO.Function function;
public void Connect1() {
filePath =
"C:
Documents and Settings
Administrator.3939200975DB4C5
desktop
cigaXY2008-12-15.xml";
function = null;
try {
// Change the logon information to your own system/user
mConnection = JCO.createClient("610", // SAP client
"xxxxxx", // userid
"xxxxxx", // password
null, // language
"10.96.0.53", // application server host name
"01"); // system number
// mConnection.setAbapDebug(true);
mConnection.connect();
mRepository = new JCO.Repository("ARBsoft", mConnection);
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("jco connect failed");
mConnection.disconnect();
System.exit(1);
//JCO.Table codes = null;
try {
function = this.createFunction("Z_BAPI_CONTRACT_BDC");
if (function == null) {
System.out.println(
"Z_BAPI_contract_bdc" + " not found in SAP.");
if ( mConnection != null && mConnection.isAlive()) {
mConnection.disconnect();
System.exit(1);
//function.getImportParameterList().setValue(filePath, "FILEPATH");
//function.getImportParameterList().setValue(BDCLOG, "BDCLOG");
mConnection.execute(function);
catch (Exception ex) {
//System.out.println(ex.toString());
ex.printStackTrace();
System.out.println("execute failed");
mConnection.disconnect();
System.exit(1);
JCO.Table codes = null;
codes =
function.getTableParameterList().getTable("MESSAGE");
try {
codes.firstRow();
for (int i = 0; i < codes.getNumRows(); i++, codes.nextRow()) {
System.out.println(codes.getString("CON")" "codes.getString("MESG"));
catch(Exception ex1){
ex1.printStackTrace();
System.out.println("codes");
if ( mConnection != null && mConnection.isAlive()) {
mConnection.disconnect();
System.out.println("chenggong");
public JCO.Function createFunction(String name) throws Exception {
try {
IFunctionTemplate ft =
mRepository.getFunctionTemplate(name.toUpperCase());
if (ft == null){
return null;
return ft.getFunction();
} catch (Exception ex) {
throw new Exception("Problem retrieving JCO.Function object.");
public static void main(String[] args) {
ConnectRFC app = new ConnectRFC();
app.Connect1();
Regards,
taowenbo.hi,
i had resolved my problem in other way.I don't upload my data using ws_upload now,but upload with table.
here is my code.Maybe helpful to somebody:
JCO.Table C_XYORDERTable;
JCO.Table C_XYORDPR_FINALTable;
public void getXyordprFinalElement(Element e) {
try {
for (Iterator i = e.getChildren().iterator(); i.hasNext();) {
Element child = (Element) i.next();
if (child.getName().equals("ORDER_ID"))
C_XYORDPR_FINALTable.setValue(child.getText(), "ORDER_ID");
else if (child.getName().equals("ID"))
C_XYORDPR_FINALTable.setValue(child.getText(), "ID");
else if (child.getName().equals("PRODUCT_ID"))
C_XYORDPR_FINALTable.setValue(
child.getText(),
"PRODUCT_ID");
else if (child.getName().equals("MATNR"))
C_XYORDPR_FINALTable.setValue(child.getText(), "MATNR");
else if (child.getName().equals("QUANTITY"))
C_XYORDPR_FINALTable.setValue(child.getText(), "QUANTITY");
C_XYORDPR_FINALTable.nextRow();
} catch (Exception ex) {
ex.printStackTrace(); -
Authentication failure message while calling UMWebService from Java
Hi All:
I am trying to consume UMWebService published in EP. The URL for this webservice is:
"http://<server>:<port>/irj/servlet/prt/soap/UMWebService?Wsdl".
I ceated a web reference to this WebService in my WebDynproJAVA project. But when I called one of the methods(getMapping()) on this webservice, a SOAP Exception has occured with the following message: "The User Authentification is not correct to access to the Portal Service UMWebService or the service was not found."
How would I solve this problem to provide the Authentication for the webservice.
Thanks in advance,
Munna_SAPHi Munna,
if your WAS requires user authentication you should do this:
1. set-up security options of Logical Port in you WS Model (Security tab > set HTTP Authentication)
2. before WS executing set user name and password:
wdContext.currentRequest_UMWebService_getMappingElement().modelObject()._setUser("user");
wdContext.currentRequest_UMWebService_getMappingElement().modelObject()._setPassword("pwd");
Let me know if this help,
regards
Pavel -
Bad Request while calling servlet from MIDlet
Hi All,
I am trying to call a servlet(running on Tomcat) thru my MIDP application using HttpConnection. But I am getting "Bad Request" error 400. The code is as given below:
package myTests;
import java.io.*;
import javax.microedition.io.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Hello extends MIDlet implements CommandListener {
private Display display;
private Form props;
private StringBuffer propbuf;
private Command exitCommand = new Command("Exit", Command.EXIT, 1);
* Construct a new HelloObject.
public Hello() {
display = Display.getDisplay(this);
public void startApp() {
propbuf = new StringBuffer(50);
props = new Form("System Properties");
HttpConnection c = null;
InputStream is = null;
StringBuffer b = new StringBuffer();
try {
c = (HttpConnection)Connector.open("http://127.0.0.1:8080/gsf/servlet/HelloServlet", Connector.READ);
c.setRequestMethod(HttpConnection.GET);
c.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0");
c.setRequestProperty("Content-Language", "en-US");
is = c.openInputStream();
props.append(c.getResponseMessage());
props.append(c.getURL());
props.append(c.getRequestMethod());
props.append((new Long(c.getLength())).toString());
catch( Exception e)
props.append(e.getMessage());
props.addCommand(exitCommand);
props.setCommandListener(this);
display.setCurrent(props);
public void commandAction(Command c, Displayable s) {
if (c == exitCommand) {
destroyApp(false);
notifyDestroyed();
public void pauseApp() {
display.setCurrent(null);
propbuf = null;
props = null;
* Destroy must cleanup everything.
public void destroyApp(boolean unconditional) {
ANY HELP ON THIS WOULD BE APPRECIATED.
Thanks,
NeelHi GaRRy,
Thanks for responding.
1) Yes, I want to use the GET method. If I type the url that I've put to Connector.open() in the browser, it gives the following output:
Servlet invoked!
Mon Sep 24 12:45:44 EDT 2001
But when I run the emulator it gives the following output
OK
http://127.0.0.1:8080/gsf/servlet/HelloServlet
GET -1
2) I don't know why, but the error log does not show any error for this request on the http server. (I am using Tomcat.). Also I am sure that the doGet method of the servlet gets called as it prints the debug message.
Thanks,
Neel -
Problem with calling Webservice from Java Webdynpro
Hi,
I have a scenario where I need to call a Webservice through my Webdynpro application. I need to pass few parameters(of type string) and the Webservice is suppose to retrun a few records based on the input values.
When I run the webservice directly using the browser, the output is in XML format.
When I create a model for the webservice in webdynpro, the return value is a Node element of type java.lang.Object. From webdynpro, I am successfully able to make a call to the Webservice (as there is no exception with model execute command), but the return value is always null. I am not sure if the webservice is not returning any data or if I am not reading the correct context element. There is no documentation available for the webservice either.
Can anyone tell me what is that I am missing. Is it not possible for Webdynpro to call a webservice which can return only XML data?
Any help on this issue would be greatly appreciated.
Thanks,
SudheerHi Sudheer,
You can refer to wiki link (& other links available at the end in this)
https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/faq-Models-AdaptiveWebService
Kind Regards,
Nitin -
Problem while calling webservice from a plsql stored procedure
Hi everybody,
I need to call a webservice from a plsql stored procedure.
I was following documentation published in the otn at the following link.
"http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html"
I am encountering the following error on my sql prompt-
SQL> exec dbms_output.put_line(time_service.get_local_time('94065'));
BEGIN dbms_output.put_line(time_service.get_local_time('94065')); END;
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at "APPS.DEMO_SOAP", line 65
ORA-06512: at "APPS.TIME_SERVICE", line 13
ORA-06512: at line 1
Has anybody worked on the same example. Please direct me.
Thanks & Regards
Kiran KumarKiran, were you able to solve this?
I am facing the same error.
Oracle Server is Unix and webservice is .NET.
I am able to connect to Java web service. -
Problem while calling concsub from shell script
Hi All,
I am facing problem when I am trying to run CONCSUB utility from shell script.The same works well when I try it from command line.The only prob I am facing from shell script is assigning values to temporary variables.
This is how my script looks
#!/bin/bash
export PARM5="$5"
export PARM6="$6"
export PARM7="$7"
echo "INTPARM5=\"$PARM5\""
echo "INTPARM6=\"$PARM6\""
echo "INTPARM7=\"$PARM7\""
echo $FND_TOP/bin/CONCSUB $1 ONT 'Order Management Super User, Vision Operations (USA)' $3 WAIT=Y CONCURRENT ONT $PROGRAM "$INTPARM5" "$INTPARM6" "$INTPARM7"When I try to run the above shell based concurrent program it doesn't pass the parameters as expected and it errors out saying "Wrong number of arguments to call the procedure"
I tried my luck from some of the previous posts ({thread:id=2360776} ),but to vain
If anyone has any ideas,please suggest!!
Thanks in advance!!
Edited by: sandy on May 4, 2013 12:54 PMHere are your proofs
Proocedure
PROCEDURE abc(--p_errbuf OUT VARCHAR2,
--p_errcode OUT VARCHAR2,
p_order_no IN NUMBER DEFAULT NULL,
p_customer_id IN NUMBER DEFAULT NULL,
p_name IN VARCHAR2 DEFAULT NULL
IS
v_cname VARCHAR2(200);
v_ordered_date DATE;
v_order_number NUMBER;
v_order_type VARCHAR2(200);
BEGIN
fnd_file.put_line(fnd_file.output, 'Begin Execution');
SELECT DISTINCT ac.customer_name,
d.ordered_date ordered_date,
d.order_number order_number,
x.NAME order_type
INTO v_cname
,v_ordered_date
,v_order_number
,v_order_type
FROM oe_order_headers_all d,
oe_transaction_types_tl x,
wsh_delivery_details b,
wsh_delivery_assignments c
,ar_customers ac
WHERE 1 = 1
AND ac.customer_id = b.customer_id
AND d.order_type_id = x.transaction_type_id
AND x.LANGUAGE = 'US'
AND b.released_status = 'B'
AND b.source_header_id = d.header_id
AND c.delivery_detail_id = b.delivery_detail_id
AND d.order_number=NVL(p_order_no,d.order_number)
AND ac.customer_id = NVL(p_customer_id,ac.customer_id)
AND x.name=NVL(p_name,x.name)
AND NOT EXISTS (SELECT 1
FROM wsh_delivery_details b
WHERE 1 = 1
AND b.released_status != 'B'
AND b.source_header_id = d.header_id)
--BETWEEN ('1213794') and ('1213797'))
AND rownum<2;
INSERT INTO xxc_temp(customer_name,ordered_date,order_number,order_type) VALUES(v_cname,v_ordered_date,v_order_number,v_order_type);
COMMIT;
fnd_file.put_line(fnd_file.output, 'Order Number is' || v_order_number);
fnd_file.put_line(fnd_file.output, 'Order Type is' || v_order_type);
END;Script
#!/bin/bash
set -x
export PARM5="$5"
export PARM6="$6"
export PARM7="$7"
sqlplus -s $1 <<EOF
set head off feed off serverout on size 1000000
exec abc('$PARM5','$PARM6','$PARM7');
exit
EOFNow when I run the 'XX Order Detail CSV Report' I get the below log and no Output
+---------------------------------------------------------------------------+
Application Object Library: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
XXKES_PDF_TRANSFER module: XX Order Detail CSV Report
+---------------------------------------------------------------------------+
Current system time is 06-MAY-2013 05:05:56
+---------------------------------------------------------------------------+
+ export PARM5=66432
+ PARM5=66432
+ export PARM6=
+ PARM6=
+ export PARM7=Mixed
+ PARM7=Mixed
+ sqlplus -s APPS/APPS
+---------------------------------------------------------------------------+
Executing request completion options...
Output file size:
0
+------------- 1) PRINT -------------+
Disabling requested Output Post Processing. Nothing to process. The output of the request is zero byte.
+--------------------------------------+
Finished executing request completion options.
+---------------------------------------------------------------------------+
Concurrent request completed successfully
Current system time is 06-MAY-2013 05:05:56
+---------------------------------------------------------------------------+After the concurrent program executed I queried the table xxc_temp and here you see the data
SQL> select * from xxc_temp;
CUSTOMER_NAME
ORDERED_D ORDER_NUMBER ORDER_TYPE
A. C. Networks
18-FEB-13 66432 MixedMy procedure fetches the data fro given set of i/p parameters but it doesn't give o/p coz it's a host based conc program.Please advise if there's a way to get the o/p in a host based conc program
Thanks!!
Maybe you are looking for
-
How to use a bind variable in an IN clause
I am trying to use a bind variable in an IN clause where the column is a varchar2 type. Something like: select * from test where test_column in (:bindVariable)I have tried assigning the bind variable comma separated strings (eg. test,test,test) and c
-
My green audio bars went invisible and I can't seem to get them to reappear
Hello, I use After Effects CS6 with a pretty new i5 desktop computer with Win8. My green audio bars (not sure of the technical name) just starting being invisible for the first time, so I can't edit/move them around anymore, as shown in this screen c
-
All I really want to do is import a QT film from final cut pro to imovie so I can burn a DVD. Imovie informs me that the project is too long to import (6minutes????) and that I have to go to quicktime pro to do something that will (compress it???) or
-
Make to Order Repetitve Manufacturing Restrictions
Dear All, Does anybody know that the reasons behind the restrictions of Make to Order Repetitive Mfg in SAP? Restrictions like : 1- Impossibility of reporting point backflushing despite of MTS Rep Mfg 2- Impossibility of c
-
Sync iPad with an internal network via WIFI and file exchange?
Hi all, Our architects firm is currently trying to cut down on its paper waste. One sollution we are exploring is a system by which Ipad's can be synced with our internal file network (via wifi), we can download onto an Ipad PDF files which can be vi