axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Marc.Horv...@Emerson.com>
Subject RE: Please help - Embedded web service
Date Wed, 13 Aug 2008 14:57:41 GMT
At
http://ws.apache.org/axis/java/install.html#AdvancedInstallationAddingAx
isToYourOwnWebapp

 

Item 4 states: Run the Axis AdminClient against your own webapp, instead
of Axis, by changing the URL you invoke it with.

 

One thing that confuses me is how this url compares to the one used with
the -l option of the Java2Wsdl command.

Modifying the example you sent me to represent embedded Axis, would the
Java2Wsdl -l look like this:
http://localhost:8080/MyWebApp/services/WidgetPrice

and then what would the AdminClient command look like,
http://localhost:8080/MyWebApp/services or
http://localhost:8080/MyWebApp ? I tried both and got errors both times
such as: "bad envelope exception: html" 

 

Marc

 

 

________________________________

From: Horvath, Marc [CLIMATE/RS/ATL] 
Sent: Wednesday, August 13, 2008 10:30 AM
To: 'Martin Gainty'
Subject: RE: Please help - Embedded web service

 

Maritn,

 

Thanks for the response. I'll look into those tutorials.

However, at first glance it looks like your examples are based on Axis
running seperately from a web app and I have already got that to work
without a problem

What I need is to have Axis embedded in my web app. The urls you
provided, http://localhost:8080/axis/services, indicate axis is running
indpendently. I want to deploy Axis and my web services bundled/embedded
in another web app. I've managed to embedd axis ok but am having
problems with the web services. That's why I asked for a detailed
example of deploying a web service with axis embedd in a web app.

 

Thanks again,

Marc

 

 

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Tuesday, August 12, 2008 6:17 PM
To: Horvath, Marc [CLIMATE/RS/ATL]
Subject: RE: Please help - Embedded web service

 

Hey Marc-
in other words take this project offline in a controlled environment ..I
hope you have a home office!!!

a good WSDL2Java tutorial is located at
http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSke
letonsAndDataTypesFromWSDL
where the command to produce the required classes would be 
java org.apache.axis.wsdl.WSDL2Java (WSDL-file-URL)
which will produce

*	WidgetPriceSoapBindingImpl.java : Java file containing the
default server implementation of the WidgetPrice web service.
	You will need to modify the *SoapBindingImpl file to add your
implementation (see
samples/userguide/example6/WidgetPriceSoapBindingImpl.java
<http://cvs.apache.org/viewcvs.cgi/ws-axis/java/samples/userguide/exampl
e6/WidgetPriceSoapBindingImpl.java?amp;rev=1.3&view=log> ). 
*	WidgetPrice.java: New interface file that contains the
appropriate java.rmi.Remote usages. 
*	WidgetPriceService.java: Java file containing the client side
service interface. 
*	WidgetPriceServiceLocator.java: Java file containing the client
side service implementation class. 
*	WidgetPriceSoapBindingSkeleton.java: Server side skeleton. 
*	WidgetPriceSoapBindingStub.java: Client side stub. 
*	deploy.wsdd: Deployment descriptor 
*	undeploy.wsdd: Undeployment descriptor 
	build.xml (script to run) 
	
	Notice the build.xml  contains this generate.service client
	<target name="generate.service" depends="init">
	
	Notice the build.xml contains generate.client target
	<target name="generate.client" depends="init">
	now run the ant generate.service to compile the service classes
and produce the required war or aar
	
	now run ant generate.client to compile the client stub

Java2WSDL tutorial is located at
http://ws.apache.org/axis/java/user-guide.html#Java2WSDLBuildingWSDLFrom
Java

*	-o indicates the name of the output WSDL file 
*	-l indicates thelocation of the service 
*	-n is the target namespace of the WSDL file 
*	-p indicates a mapping from the package to a namespace. There
may be multiple mappings. 
*	the class specified contains the interface of the webservice. 

java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl
-l"http://localhost:8080/axis/services/WidgetPrice"
-n "urn:Example6" -p"samples.userguide.example6" "urn:Example6"
samples.userguide.example6.WidgetPrice AdminClient is invoked by
deploying the Server's deployment descriptor as in this example using
the previously
generated deploy.wsdd

java org.apache.axis.client.AdminClient deploy.wsdd

<Admin>Done processing</Admin>

now run the client app ..
java samples.userguide.example3.Client
-lhttp://localhost:8080/axis/services/MyService "test me!" 

we are here to help you thru this..
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission. 

________________________________

Subject: Please help - Embedded web service
Date: Tue, 12 Aug 2008 14:55:57 -0500
From: Marc.Horvath@Emerson.com
To: axis-user@ws.apache.org

I've successfully embedded Axis in my web app and bring up happyaxis.jsp
without a problem.

My test web service code is in the following pkg:
com.cpcus.jaru.webservices.calc3.

This package contains the CalcIF interface and implemented code
CalcImpl.

I'm assuming the wsdl2java script will generate code in
com.cpcus.jaru.webservices.calc3.ws.

The url for my web app is: http://localhost:8080/Jaru/

 

Can someone PLEASE provide me a very detailed example of the Java2WSDL,
WSDL2Java, and AdminClient (for deployment) commands?

Use whatever namespace you want.

Call the wsdl whatever you want.

Assume the scope is session.

 

I am new at developing web services. I've been able to develop, deploy
and test one when Axis was not embedded in my webapp.

However I can't get things other than happyaxis.jsp to work with Axis
embedded in the web app.

I'm pretty sure I'm not using/settng the parameters right somewhere
along the way but just can't figure out what I'm doing wrong.

I've spent days on this and am at my wits end not to mention my boss is
losing his patience.

Your help is greatly appreciated!

 

Thanks,

Marc

 

________________________________

Get more from your digital life. Find out how.
<http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home2_082008>



Mime
View raw message