How to time a web service at back-end?
I implemented a web service using Axis. This service is to receive an upload file and process it. Since it is a long process, I want to know and log how much time was used for each service call at the server side.
The web service code is like:
public class CTSService implements ICTSService, ServiceLifecycle {
public String processUpload(byte[] zippedData, int zipSourceLength) {
In the service method processUpload(), it receives byte array zippedData, which can be hundred of MBs. I want to log the time processUpload() receives and processes zippedData. The problem is that, when processUpload() is invoked at the back-end, the server has already received the zippedData, so we can't correctly compute the time of upload of zippedData.
Does anyone have a good idea of how to time the web service call processUpload() at server side?
Thanks!
You can include below method in your code and call it.
private void UpdateConfig(string key, string value, string fileName)
var cFile = ConfigurationManager.OpenExeConfiguration(fileName);
cFile.AppSettings.Settings[key].Value = value;
cFile.Save();
Here fileName is the full path + application name (eg: c:\project\WinApp.exe)
Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)
Similar Messages
-
Want to find out how much data a Web Service is sending to client (JWSDP)
Well, the subject line didn't fit what I was intended to say, so if you don't get what I am saying in the subject line, I am sorry.
My question is... I have a Web Service client that uses stub classes generated by wscompile in JWSDP. I am wondering, it there a way to find out how much data the Web Service is sending back to my client.
The reason I asked is this, I used WebLogic 7.0 workshop to create a Web Service and also used JWSDP to create the same Web Service which deploys to Tomcat. The generated WSDL files from WebLogic workshop and JWSDP that expose the same functionalities have differences. The WSDL from WebLogic workshop is 1.5 times the size of the WSDL from JWSDP. When I tested both with client programs, calling the Web Service in Tomcat (which uses JWSDP to built) is much quicker than calling the Web Service in WebLogic.
For this reason, I would liked find out if the Web Service from WebLogic is sending more data than the one created with JWSDP.
Thanks.I've used the TcpTunnelGui utility to see the HTTP flowing up and down the wire, that might help you.
-
How to debug ABAP Web services from Microsoft Visual Studio
When developing .NET based Web services clients using Visual Studio that call Web services in SAP NetWeaver .NET developers would like to be able to debug inside SAP. In my blog <a href="/people/andre.fischer/blog/2007/02/07/how-to-debug-abap-web-services-from-microsoft-visual-studio to debug ABAP Web services from Microsoft Visual Studio</a> I would like to point .NET developers to the fact that SAP NetWeaver offers the option of external debugging to perform this task. Though the steps that have to be performed are described in the SAP Online Help I am sure that this option is not well known amongst the .NET developer community.
Hello WilliamIV,
>>How can I "configure" Visual Studio debugger to allow validation to work?
Since I do not have a VS2012 environment, according to your provided link, I created a test demo with VS2013, however, both ways catch the validation error:
If possible, you could have a try with VS2013 to see if it works or run the example on other machine with VS2012 to see if this is caused by the VS environment, in my side, I do not change any configuration, all are default.
If I misunderstood this issue, please feel free to let me know.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How do i enable web services on 8600
how do i enable web services on 8600
Are you using a router that has you connected to the printer through Ethernet or wireless? If so, there should be an icon in the top left corner of the the printer display screen that resembles a piece of paper with a blue target behind that. Tap that button to enable web services and then accept the terms and conditions. That should enable web services and then offer to print an info page that will have the printer code and the setup instructions.
Otherwise, if you are getting a failure to connect to web services error, please write me back with an exact error message and we can proceed from there.
I am a former employee of HP...
How do I give Kudos?| How do I mark a post as Solved? -
How to consume a web service provided by third party system from SAP system
Hi Friends,
Could any of you provide me a clear picture on how to consume a web service from SAP system and is provided by a third party system?
Do we get an URL to create a client proxy for consuming the web service?
Thanx in advance,
RamHi Ram,
of course you cannot supply the WSDL URL. Inside the WSDL (just view it in your browser) you find (usually but not necessary) towards the end something like
<soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/>
which is the actual adress of the service.
An example service can be found here:
<a href="http://www.weather.gov/xml/">National Digital Forecast Database</a>
containing the WSDL URL at
<a href="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">this address</a>.
You might also want to browse for the amazon webservices which allow you to embed queries against amazon into your application.
have fun,
anton -
How to access .asmx Web Service using JAVA? Newbie
Hello Experts,
Currently, I have a project where in I have to access a ,NET web service. It is made of C#. I just want to ask how will I start the accessing process? I made this simple equation on how my project is.
Java Project + C#.Net Web Service = Integration
1. Do i need to create a Web Service too for the Java Project? If yes, What are the necessary tools needed for the creation of this Java Web Service?
2. The .NET Web Service is available online. (It is made by other people).
3. Based on the equation, what is the equivalent technology for the + sign?
4. Can you site a concrete example for accessing a web service?
5. I'm new here. Totally I have no idea where to start.
6. Thank you experts.
Edited by: Benedict.Aluan on 05 30, 08 1:38 PM
Edited by: Benedict.Aluan on 05 30, 08 1:39 PMHello
Thanks a lot for your help ...
I am developing simple J2EE based web service client using IBM WSAD 5.1. I have used the following code to call .asmx web service in Java
String url = "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl";
String namespace = "http://tempuri.org/";
name = request.getParameter("txtName");
try
System.out.println("In Internet Service");
ServiceFactory factory = ServiceFactory.newInstance();
Service serv = factory.createService(new URL(url),new QName(namespace,"TempConvert"));
System.out.println("Got Service......");
Call obj = (Call)serv.createCall();
System.out.println("Got Call......");
obj.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
obj.setProperty(Call.OPERATION_STYLE_PROPERTY,"wrapped");
obj.setTargetEndpointAddress(url);
obj.setPortTypeName(new QName(namespace,"TempConvertSoap"));
obj.setOperationName(new QName(namespace,"FahrenheitToCelsius"));
obj.addParameter("param1",XMLType.XSD_STRING,String.class,ParameterMode.IN);
obj.setReturnType(XMLType.XSD_STRING);
System.out.println("Parameters Set.....");
Object[] params = new Object[]{name};
k = (String)obj.invoke(params);
System.out.println("Result: "+k);
catch(Exception e)
System.out.println("Exception is : "+e);
}But this code is throwing exception that
Invalid Address "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"I have also tried this URL with Java Proxy. But it showing the same error.
Plz can u tell me how to access .asmx web service ?
Waiting 4 reply. -
How to access a web service(.wsdl) from portal component.
Hi ,
Is there any document/tutorial available on how to access a webservice from portal component ?
I have found this linkhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/g-i/how to access a web service.htm...
but the urls in the link are not working...
i want to know the steps to access webs service and sample code if some body has already done that..
Thanks for the help.
LakshmiHi Lakshmi,
See the links below:
http://help.sap.com/saphelp_nw04/helpdata/en/f0/581140d72dc442e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/a3/918340d990ce62e10000000a155106/content.htm
Hope this helps.
Regards,
Pooja. -
How To Access HTTPS Web Service in Application Module
I need to know how to access HTTPS web service in application module.
If you can provide the tutorial or guidance to achieve this really appreciate.
Thanks
SameeraUse the Web Service Proxy wizard in JDeveloper to create a class that calls your Web service, and then call this class from code in your AM.
http://docs.oracle.com/cd/E16340_01/web.1111/b31974/web_services.htm#CJAHGIEF -
How to access a web service from a XLet
Hello,
I am new in software development to ITV and I dint find too many usefull information teaching how to access a web service from a XLet running in a STB. Are there anybody who can give me some help, maybe sample or tutorial?
Gratefull
Davidhi,
you can "borrow" the source code from [Yambo a free soft open source presentation engine (AKA XML microbrowser Xlet )|http://www.cineca.tv/labs/mhplab/index-en.html] both local and on a http remote connection.
hope it helps..
bye
andrea -
Hi everyone,
I followed the instructions of the following link to create a web service using jDeveloper 10.1.3.1.0 on Oracle Application Server 10.1.2.0.2. [http://st-curriculum.oracle.com/obe/jdev/obe1013jdev/10131/devdepandmanagingws/devdepandmanagingws.htm#t1]
The web service created was deployed & used with no errors on the standalone OC4J instance.
But my goal is to deploy my web service on Oracle Application Server 10.1.2.0.2.
So after several attempts, I was able to deploy it on the Oracle Application Server 10.1.2.0.2 but unfortunately I didn't know the URL needed to use the web service.
I tried the following link (http://192.168.0.91:18100/JavaWebService-GetDates-context-root/GetDatesWSSoapHttpPort) but also didn't work :(
I also tried converting to J2EE 1.3 and still not knowing how to access the web service.
Please advice with a solution.
Thanks in advance.
LanaThanks everyone for your help :)
The problem turned out to be that Oracle application server 10.1.2 is unlike the others servers, it uses 2 ports:
- port (19100) is dedicated for the console.
- port (7779) is to view your applications.
So the URL needed turned out to be "http://acteos-109.beirut.acteos:7779/beanTest" instead of "http://acteos-109.beirut.acteos:18100/beanTest"
Hope this info is useful
Lana -
How Can I install Web Service on Oracle 11g r1?
How Can I install Web Service on Oracle 11g r1?
Hi,
Is necesary install XDB?
Because i have executed;
select * from dba_registry
where COMP_ID = 'XDB'
Oracle XML Database
Regards -
How to call a web Service from Oracle Applications?
Hi friends,
I've posted this question on OA Framework forum , but may be it's more appropiated put it here. Sorry for do it again:
It's about how to call a web service from a Form or a .sql (via Request) in Oracle Applications:
Could you please explain here the detailed steps (with code example if it's possible) to invoke a webservice from Oracle Applications?.. how did yo do it...?
I've read differents posts here and the 33097.1 metalink note (by the way, the first recommended link in this note is broken...), but there are lots of theorical concepts and no real examples to see how/from where invoke the WS
I'll have to call one webservice (I suppose the customer will give me the interface implementation)...but I've never did it with Applications so that's why I ask you for all the detailed steps...
I work with Forms 6i, Apps 11.5.10.2 and DB 9.2.0.7.
Thanks a lot.
Jose.Hello Jose,
I did using java program to call BPEL web services in 11.5.10.
I pasted below the metalink note for your reference (Note:250964.1)
The idea is first write a java program to call the webservice (in my case it is calling an BPEL web service, so this may not help directly), test it.
Then port the java program as specified in the note, so that you could call your web service through concurrent manager scheduler.
Is this ok?
Thanks
Arun.
======================================================
Checked for relevance on 25-Apr-2007
Application Install - Version: 11.5.8 to 11.5.10
Goal
====
How to register and create a Java concurrent program for Oracle Applications
Release 11i
Solution
========
1. Create your Java Concurrent Program (JCP) , using a text editor.
/*===========================================================================+
| Concurrent Processing Sample Code |
| |
| FILENAME |
| Hello.java |
| |
| DESCRIPTION |
| Sample Java concurrent program |
| About the simplest possible program, just writes a message to the |
| logfile and output file. |
| |
| HISTORY |
| $Log$ |
| |
+===========================================================================*/
package oracle.apps.fnd.cp.sample;
import oracle.apps.fnd.cp.request.*;
public class Hello implements JavaConcurrentProgram {
public static final String RCS_ID = "$Header$";
public void runProgram(CpContext ctx) {
ctx.getLogFile().writeln("-- Hello World! --", 0);
ctx.getOutFile().writeln("-- Hello World! --");
ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
=======================================
End Sample
=======================================
2. Create a sample directory under $JAVA_TOP:
$ mkdir $JAVA_TOPoracle/apps/fnd/cp/sample
3. Copy Hello.java into $JAVA_TOP/oracle/apps/fnd/cp/sample:
$ cp $HOME/Hello.java $JAVA_TOP/oracle/apps/fnd/cp/sample
4. Compile your java program:
javac $JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java
5. Test at the command line with following syntax:
jre -Ddbcfile=$FND_TOP/secure/your_dbc_file.dbc \
-Drequest.outfile=./outfile \
oracle.apps.fnd.cp.request.Run \
oracle.apps.fnd.cp.sample.Hello
6. Register your custom java concurrent program with Oracle Applications.
a. Navigate: Concurrent > Program > Executable
b. Enter details into the form
Executable: JCPHELLO
Shortname: JCPHELLO
Application: Application Object Library
Execution Method: Java Concurrent Program
Execution File Name: Hello (Insert a name that does not contain space or period)
Execution File Path: oracle.apps.fnd.cp.sample
c. Save the details
d. Navigate: Concurrent > Program > Define
e. Enter details into the form
Program Name: JCPHELLO
Program Shortname: JCPHELLO
Application: Application Object Library
Executable: Choose JCPHELLO from LOV
Executable Options :
f. Save the details
7. Add this new concurrent request to your responsibility request group.
a. Navigate > Security > Responsiblity > Request
b. Query System Administrator
c. Add new row and choose TestJava
d. Save the changes.
8. Run your new Hello Java Concurrent Program
Navigate: Request > Run
References
~~~~~~~~~~~
Oracle Applications Developers Manual for Release 11i A75545-01
==================================================== -
How to test swaref web service method
My simple web service method:
@WebMethod
@XmlAttachmentRef
public DataHandler getFile() {
FileDataSource file = new FileDataSource("c:\\1.gif");
DataHandler handler = new DataHandler(file);
return handler;
the generated wsdl codes:
*<xs:complexType name="getFileResponse">*
*<xs:sequence>*
*<xs:element minOccurs="0" name="file" type="swaRef:swaRef" />*
*</xs:sequence>*
*</xs:complexType>*
I always use Eclipse web service explorer to test web service, but it doesn't support swaref web service method.
Then I use axis WSDL2JAVA to generate web service client, but the generated "getFile" return type is not "DataHandler", but "org.apache.axis.types.URI".
How to test swaref web service method?
Thanks
Edited by: tomsonxu on Jan 8, 2008 7:40 AM
Edited by: tomsonxu on Jan 8, 2008 7:41 AMHello..
How did u develop the webservice?
I mean did u develop the Webservice using Enter prise Java Bean....
Wrap EJB in ear and deploy to the Server and now u can test the EJB method
whether it is working fine or not
Try these -
http://help.sap.com/saphelp_nw04s/helpdata/de/f7/af60f2e04d0848888675a800623a81/frameset.htm
Inorder to use the webservice in the Webdynpro, normally we will use the WSDL of webservice
and Import the model using any one of them
After importing as model we can use the EJB methods!
Try it !!
Thanks
Shravan -
How to wrap a Web Service around an EJB ?
Hi all!
I need to generate a WSDL file for my EJB because I need to expose them as service on the Enterprise Service Bus.
Does anybody know how to wrap a Web Service on an EJB so that I have a WSDL file for the EJB ?
Hoep I was clear
Thanks
Francesco>>Please can someone suggest if an empty SOAP request can be processed
When you are creating your Message interface,you would be using Input/Output Messages.
These are either Message Types which you would have defined or you would have got WSDL from sender system,right.
Now in these message type or WSDL if you have described your elements as occurence from 0-unbounded,it will let you pass an empty payload,but if any of the field is mandatory,it will throw an error.
Yu can not leave Input/Output Message type empty when creating Message Interface,there should be some message structure there,could be a dummy one
Thanks
Aamir -
How to create A web services step by step and their uses
How to create A web services step by step and their uses with their T-Codes
pls dont send any links
thank you
Regards,
Jagrut Bharatkumar ShuklaHi
Use the Tcode <b>WFWS</b> to create the Web service
enter the Transaction to whih you wants create the web service and save
Regards
Anji
Maybe you are looking for
-
LE 8 Master Level Doesn't Work
Hi. Can anyone tell me how to get my master level slider on the Transport Bar to work? Clicking the Dim button works, but moving the slider has no effect on the Master Level channel strip in the mixer and of course doesn't change the audio level. Nei
-
Is it Possible to connect oracle 10g with oracle forms 11g?
Hi, I have installed Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 and Oracle 11g forms and reports.... My question is Whether i can develop application using oracle forms 11g and using oracle 10g as backend connection...... If Possibl
-
Help, I just gave iTunes the assignment to update my iPhone5 to iOS7 and now it gives an unknown error (6). The iPhone is still hooked to my laptop, and shows the black screen and bright Apple with the horizontal bar, telling it's in the middle of so
-
Adjust Volume Envelopes of Multiple Clips at Once? Is this Possible?
I really need to be able to reset all my volume envlopes back to zero, but can't figure out how to do this. Is it possible? If not, I definitely want to request this feature. I brought my levels info from FCP and no longer want it. The only way I
-
Opening Ports for Filemaker Server Advanced 8.0 (Leopard Only)
Having trouble opening FileMaker Server Advanced on Leopard (works on Tiger). I've spent hours on the phone with FileMaker and Apple tech support. FileMaker tech support has indiated that I need to allow FileMaker to see ports 5003 to 5006, and 50003