How to access HttpRequest Object from Axis web service?
Hi all,
I have Axis web service named shoppingcartService,
and i have ShoppingCartImpl as implemention class which
implements passfamily() method
When client access my web service, ShoppingCartImpl's passFamily method is executed.
I have one more servlet under my axis web application which implements business logic.
problem is that i want to call/invoke this servlet from passfamily method of ShopingCartImpl class.
So how can i call/invoke servlet from passFamily method of ShoppingCartImpl class ?
(All stuff is under Axis web application under Tomcat).
hi
the following link may helpful to you
http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
Regards
Prasanna Yalam
Similar Messages
-
How to access HTTP Header from within Web service?
Hello,
Is there a way to access HTTP header variables like CONTENT_TYPE, CONTENT_LENGTH from within Web Logic web service.
I was able to get the HTTP header variable from within Apache AXIS services by calling context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST
How can i do this from weblogic web service.
I need this to verify the client SSL_CLIENT_DN
In access I can get the header as follows.
HttpServletRequest req = (HttpServletRequest) context
.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
clientID = req.getHeader("SSL_CLIENT_S_DN_Email");
Thanks
--Arunhi
the following link may helpful to you
http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
Regards
Prasanna Yalam -
How to retrieve the HttpSession from Axis Web Service
hello,
How can I get the HttpSession in Web Service ???
EricHi,
I have generated the java classes from a WSDL using WSDL2Java using the following command line options.
java -classpath .;%AXISCLASSPATH%;%CLASSPATH% org.apache.axis.wsdl.WSDL2Java -s -S true -d Session -Nhttp://localhost:
7001/axis=samples.grapha -a samples\grapha\grapha.wsdl
I need to retrieve HTTPSession in the generated GraphASOAPBindingImpl class. Can you help me?
Thanks,
vc -
How to access application state from stateless web service?
I have a beginner J2EE question. After reading through J2EE tutorial, I still don't know how to create an application that would run on J2EE server, and which would have a web service interface to other world, and which would have several threads running, which would connect to other enterprise applications via TCP? Because if I understand it correctly, web service requires a stateless session bean, which means that it can't access any stateleful session bean (except always create one and remove it instantly). So there seems to be no way to store application state and have running threads.
I'm asking this because .NET seems to have a very simple Application dictionary, which can save all application objects, including threads, and it is very easy to access this Application state from a stateless web service. Isn't there any similar functionality in J2EE? And if not, how it should be done in Java world then?
I guess that the Connector architecture could be the solution, but it is not documented in the tutorial.There's nothing in the J2EE spec that says that you have to use Web Services. Web Services by definition are stateless.
If your requirements are that you have to use a session bean along with a Web Service, then the architecture needs to be rethought, because it doesn't seem to me that Web Services are what you want.
That said, you can use a hybrid. You can expose some of the functionality of your application as Web Services while the remaining is implemented in a classic J2EE type framework that is stateful.
I would also think that you could store your application state via entity beans. You could save and load them when the web service is accessed. An entity bean doesn't require a database... just some form of persistence (could be an XML file for instance).
You need to decide which components of J2EE make sense when and where. -
Access file object from flex web app
Hi all,
I want to access file object from flex web app. What should i do?
I have to take array from my XML. In XML there will be only dir path. So for taking file name from dir i have to access it and have to perform for loop on that dir.
What should I do?
Any Ideas?
Thanks,
-CKHi Michael
My question is that I dont want to give name of images in XML file.
In XML file there will be only path of image directory. So I need to find all image name from that image directory.
Thats why I want to access file object.
Any ideas? -
Is it possible to return an array of objects from a web service?
I have been trying to do this for a while now, and I have come to the conclusion that it may be impossible. To demonstate what I want to do I enclose a simple java file [1]. I have deployed this with Axis 2 and I enclose the responce [2], it is obciously not wat I want.
Is it porrible to do this? If so, how?
Thanks for any help,
[1]
package org.impress;
public class SampleObject {
public SampleElement[] noParameters(){
SampleElement[] retArray = new SampleElement[2];
retArray[0] = new SampleElement();
retArray[0].name = "one";
retArray[0].value = "alpha";
retArray[1] = new SampleElement();
retArray[1].name = "two";
retArray[1].value = "beta";
return retArray;
public class SampleElement {
public String name;
public String value;
}[2]
<ns:noParametersResponse>
<ns:return type="org.impress.SampleObject$SampleElement"/>
<ns:return type="org.impress.SampleObject$SampleElement"/>
</ns:noParametersResponse>Hi
Can anybody help me with the code of how to return a resultset from a web service. i have put the resultset data's in an object array and tried to return it, but in the client side no data comes ,,, i mean it is printed as null.... and plz tell me where to specify the return type of a object in the wsdl file....
thanks.. -
How to access COM+ Objects From JSP
Friends,
We have a requirement to access COM+ objects from JSP. Please guide me on this.
Thanks in advance.
TaraniSanyam wrote:
if there is any .dll extension file, how can we read that file in labview?
You can use Call Library Function node to call that dll file and use it in LabVIEW. Read the help and you will get more details. -
How to access Captivate Objects From Widget
Using the widget factory, is there a way to access a specific property such as a button or textbox in a captivate movie from an widget?
The button in captviate does have an instance name called button_mc. In my widget, I do have
myRoot = MovieClip(root);
mainMov = MovieClip(myRoot.parent.root);
Also, how can you get the slide properties such as total frames?
Can't seem to find out how or I am just missing something
ThanksHi Ukie,
Here's an article on how to access objects on the Captivate slide with WidgetFactory: http://www.infosemantics.com.au/widgetking/2010/10/slip-sliding-away/
In short, pass in the instance name of the button into the getSlideObjectByName() method:
var myButton:Sprite = getSlideObjectByName("button_mc");
Also, WidgetFactory has a property widgetSlide wich gives you access to the slide that the Captivate Author placed the widget on. This is a MovieClip, so if you wanted to read its total frames, you'd write:
widgetSlide.totalFrames;
Hope that answers your questions. -
How to get the cookie from a web service using Axis
I used the AXIS wizard to consume a WSDL and create a bunch of boiler plate code. It works great in that I can talk to the web service and submit requests.
The problem is that I need to retrieve the cookie from the login request and use it when making subsequent requests. I have been unable to find the cookie and would appreciate a point in the right direction.
Currently I'm trying something like this
String cookie = (String)((Stub)service)._getCall().getMessageContext().getProperty(HTTPConstants.HEADER_COOKIE);
Thanks in advance.Answered on my own:
Just have to use
x_result = http_client->response->get_data( ).
instead of
x_result = http_client->response->to_xstring( ).
Just don't knwo why the filesize is wrong also - but I can work with this image! -
How to access servlet objects from OA page controller class
Hi everybody!
I need to put some value into servlet attribute in OA page controller class to read it from ordinary servlet later.
How can i do it? Is it possible to get HttpServletRequest and HttpServletResponse objects from page controller?
Thank you.I have a servlet which receives uploaded files with special attributes (something like tags for file) using POST request.
This attributes created when user open page in standard OAF page via page controller.
On client side I have an applet which uploads user selected file to my servlet and passes this file attributes.
Now this attributes passes as plain text. I want to encrypt this attributes to hide attribute details from user. To do this I need to share some information between OAF page and my servlet.
I know that OAF supports URL encryption, but to decrypt it I should use standard pageContext object.
But in ordinary servlet I can't use it. -
How to access form objects from different class?
Hello, I am new to java and i started with netbeans 6 beta,
when i create java form application from template i get 2 classes one ends with APP and one with VIEW,
i put for example jTextField1 with the form designer to the form and i can manipulate it's contents easily from within it's class (let's say it is MyAppView).
Question>
How can i access jTextField1 value from different class that i created in the same project?
please help. and sorry for such newbie question.
Thanks Mikehmm now it says
non static variable jTree1 can not be referenced from static context
My code in ClasWithFormObjects is
public static void setTreeModel (DefaultMutableTreeNode treemodel){
jTree1.setModel(new DefaultTreeModel(treemodel));
and in Class2 it is
ClasWithFormObjects.setTreeModel(model); -
How to use generated code from "Import Web Services" with Cairngorm Framework
I recently downloaded Flex Builder 3 beta 2 and tried out the
wizard that lets you import web services. The code that is
auto-generated makes if fairly straight forward to consume web
services using the object types defined in the WSDL. No longer does
the developer need to decode the XML payload! The only problem I am
having is how does you integrate the auto- generated code with the
Cairngorm framework? This seems like a huge question for anyone who
might want to leverage Cairngorm and the auto-generated proxy code
in the same project (like me).
Here are the problems that I see so far.
1) How do you configure the generated service class to work
with the Cairngorm service locator? The service constructor only
accepts a “LCDS destination string” which implies that
you must use Lifecycle data services. Unfortunately, the project I
am trying to retrofit currently uses a WebService and does not use
data services. All I really need to do is change the endpoint URL
(ie from local to a development server). This issue is noted in the
bug https://bugs.adobe.com/jira/browse/FB-8456. What I think is
needed is a way to set the endpointURI in the Services.mxml file.
2) Even if I come up with a hack around #1, I do not receive
a callback to my IResponder even though I register it immediately
after the method call. I can register and listener function within
my business delegate and receive the callback, but my Command
object, which implements IResponder, does not receive the call back
even though it is registered. From what I read in the ASDocs it
should but it doesn’t for me!
These are the issues I have observed in 3 hours of messing
with this. I hope this makes sense. I would love to integrate
auto-generated web service proxies into Cairngorm but I don’t
see a straight forward way without re-architecting Cairngorm. Has
any one else run across this issue? If so, do you have any insights
on how to proceed? Any help is appreciated.Since I posted this question, I have abandoned the notion of
auto-generated web services and embraced the good old FDS concept
where the RemoteObject meta-tag does all the conversion work for
me. We are now using the Granite DS package and it is working well
for us. I would love to consume web services, but it just isn't
worth the hassle when all you have to do with Granite (and FDS) is
cast your return objects to the proper object type.
BTW, since this posting, I have investigated competing Flex
app frameworks. After my research, I checked out the PureMVC
framework. Wow!! Cairngorm always left me with an uneasy feeling
and I guess I am not alone. Apparently, Cliff Hall felt the same
way. That is why he started the project. I like his approach alot
more than Cairngorm especially since it includes notifications
which allow me to broadcast my own app level events independent
from the AS Event framework. Check out PureMVC. For what it is
worth, it has my humble endorsement. Cliff was even gracious enough
to acknowledge the other Adobe Consulting guys for their work. Good
for you Cliff, I respect that. Check out a better way at
http://www.puremvc.org/ -
How to add "Prepare Data" from a web service to the form
Hello,
Can any one please advise on how to add the "Prepare Data" process from the existing web service and have the form to pre-populate the data from this "Prepare Data" process instead of using schema xsd. I heard that this is an alternative or may be a better way to pre-populate data in ES2/ES3 to avoiding creating a data source in Form Designer. I try to find a sample on Adobe site but could not find one, most of them are using schema.
Any guidance or URL to the sample would be helpful.
Thanks,
HDThanks
-
Deserialize an array of objects from a web service
Hi, I'm calling a webservice method which returns an array of
objects (let's
say classes called MyClass).
I now want to define a class in actionscript called MyClass
which matches
the properties of the class defined in the web service
(written in .NET),
call the webservice method, and then deserialize the result
in actionscript
into an array of type MyClass.
The code I have so far is:
import mx.services.WebService;
import mx.services.Log;
var mylog:Log = new Log(Log.DEBUG);
myLog.onLog = function(txt) {
trace(txt);
var ws:WebService = new WebService(wsc.WSDLURL);
ws.onLoad = function(wsdl) {
MyPendingCallObject =
ws.CallTheWebServiceMethodWhichReturnsAnArrayOfMyClasses();
MyPendingCallObject.onResult = function(result)
trace(result);
// HOW CAN I DESERIALIZE the result parameter into an Array
of
MyClass ???
MyPendingCallObject.onFault = function(fault)
trace('FAULT! ' + fault.faultCode + "," +
fault.faultstring);
// If the WSDL fails to load the onFault event is fired.
ws.onFault = function(fault) {
trace(fault.faultstring);
TIAHi,
I posted a similar problem some time ago :
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=294&threadid =1221565&enterthread=y
Do you find any solution to your problem ?
Fabrice -
Accessing JAXR registry from within web service
Hi I'm having trouble accessing the registry from within a web service running in the tomcat server.
The service should register with the registry at startup, but in the logs from the tomcat server I can see that a JAXRException is thrown:
javax.xml.registry.JAXRException: Unable to create ConnectionFactory: Provider com.sun.xml.registry.common.ConnectionFactoryImpl not found
at javax.xml.registry.ConnectionFactory.newInstance(Unknown Source)
If I run the program from outside the tomcat server as a standalone program, it registers perfectly.
I believe the problem is that it is missing one or more jars.
I have tried to put the jaxr-jars under shared/libs but that hasn't solved the problem.
Has anyone an idea of what I'm doing wrong?
Help is greatly appreciated!
/ BoHi swatdba
I know that the build file states alle the packages that I need, and as I said, if I run my program like the regular JAXR examples, it works fine.
The thing is, the JAXR examples are not web services on their own. They are merely Java programs that access the registry.
In my case I am building a web service that should run in the tomcat server. When it initialises, it should register with the register, and also be able to search for other web services.
I thought this would be possible per default, ie. the jars that the web service needs should already be available in the tomcat server, but it doesn't work. I have tried to put the jars that I've found in the build script in the folder C:\jwsdp-1.3\shared\lib, which according to the tomcat manual should be used to put jars that you want to share between your web services.
Maybe you are looking for
-
I have hundreds of photos on my computer but when I click on the photo all that comes up is a gray screen with with an exclamation mark. These are the last photos ever taken of my husband and I need to know how to recover them properly.
-
Error occurs while starting the console in browser in wlportal4.0
I am also getting the same problem for [wlserver6.1 with SP1, wlportal4.0,ebcc4.0, Windows NT4.0] the server has been started successfully, but if i try to start the console in the browser using(http://localhost:7501/console/index.jsp) am getting cla
-
EDI invoice idoc error "Enter a tax code in item 000001"
Hello, I am trying ot post the EDI invoice but the idoc getting failed by giving error "Enter a tax code in item 000001". Even i entered the tax code in my idoc, system not taking and also as i have maintained the table OBCD & OBCE but system not co
-
The amount of possible songs lowered
well yah the thing is i plugged my ipod into another computer with about 774 songs (somewhere there) and i had like 100 mb left in my 4 gig. then when i plugged it in my own computer it erased all the songs (why does it do that anyway?) i tried to re
-
IPod Touch 8GB (4th Gen), upgraded to iOS 5.0.1 now not syncing
I upgraded both my iPod touch and my iTunes software to the latest. I realised I was not able to sync so I restored the device and wiped it clead using the restore option. Restarted and renamed the device and set it up as a new device in iTunes but I