invoking .Net web service From Axis 1.2 RC web service, How to save SOAP message

2007-10-22 Thread sh_santosh

Hi,

   i want to save a SOAP message in DataBase. I am invoking .Net web service
to send the Response xml from my Axis 1.2RC web service. When i am invoking
.Net web service then i am passing a bean object to .Net web service Stub.

So, after invoking or before invoking the . net web services, can we save
the SOAP message. bcz after invoking the web service SOAP message is sent to
other end. is it possible ???

Give some idea.



Santosh Kumar Sharma
-- 
View this message in context: 
http://www.nabble.com/invoking-.Net-web-service-From-Axis-1.2-RC-web-service%2C-How-to-save-SOAP-message-tf4675517.html#a13358339
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axis2/Java - Trouble building Axis2/Java from source

2007-10-22 Thread David Illsley
Keith, because the mar plugin pom get included in the 'overall pom'
for the build, I suspect that when it can't be found, for some reason
the custom repository on ws.zones isn't included.That or there was an
intermittent problem with ws.zones!
David

On 23/10/2007, keith chapman <[EMAIL PROTECTED]> wrote:
> The error you got when installing WSDL4J can be mitigated by going into
> modules/tools/axis2-mar-maven-plugin and doing mvn install
>
> I wonder why maven could not download wsdl4j in the first place though.
>
> Thanks,
> Keith.
>
>
> On 10/22/07, Michael Mole <[EMAIL PROTECTED]> wrote:
> >
> > I'm having trouble building Axis2/Java from source.  Can anyone tell me if
> I'm doing something wrong?
> >
> > When I try to build Axis2 from source, it tells me this:
> > ( I use this command: %mvn install )
> > 2) wsdl4j:wsdl4j:jar:1.6.2
> >
> >   Try downloading the file manually from the project website.
> >
> >   Then, install it using the command:
> >   mvn install:install-file -DgroupId=wsdl4j -DartifactId=wsdl4j \
> >   -Dversion=1.6.2 -Dpackaging=jar -Dfile=/path/to/file
> > Alternatively, if you host your own repository you can deploy the file
> there:   mvn deploy:deploy-file -Dg
> > roupId=wsdl4j -DartifactId=wsdl4j \
> >   -Dversion=1.6.2 -Dpackaging=jar -Dfile=/path/to/file \
> >-Durl=[url] -DrepositoryId=[id]
> >
> >   Path to dependency:
> > 1) org.apache.axis2:axis2-kernel:jar:1.3
> > 2) wsdl4j:wsdl4j:jar:1.6.2
> >
> >
> > However, I get another error when I try to manually install wsdl4j, using
> this command:
> > C:\axis2java-1.3-src>mvn install:install-file
> -Dfile="C:\WSDL4J\wsdl4j-1_6_2\lib\wsdl4j.jar"
> -DgroupId=wsdl4j
> > -DartifactId=wsdl4j -Dversion=1.6.2 -Dpackaging=jar
> >
> > [INFO] Scanning for projects...
> > [INFO] Reactor build order:
> > [INFO]   Apache Axis 2.0 - Parent
> > [INFO]   Apache Axis 2.0 - Data Binding
> > [INFO]   Apache Axis 2.0 - Kernel
> > [INFO]   Apache Axis 2.0 - Code Generation
> > [INFO]   Apache Axis 2.0 - ADB Codegen
> > [INFO]   Apache Axis 2.0 - tool - MAR Maven Plugin
> > [INFO]   Apache Axis 2.0 - Addressing
> > [INFO]   Apache Axis 2.0 - Java2WSDL
> > [INFO]   Apache Axis 2.0 - Fast Infoset
> > [INFO]   Apache Axis 2.0 - MTOM Policy
> > [INFO]   Apache Axis 2.0 - SAAJ API
> > [INFO]   Apache Axis 2.0 - SAAJ
> > [INFO]   Apache Axis 2.0 - JAXWS API
> > [INFO]   Apache Axis 2.0 - JWS API
> > [INFO]   Apache Axis 2.0 - Metadata
> > [INFO]   Apache Axis 2.0 - JSON
> > [INFO]   Apache Axis 2.0 - Clustering
> > [INFO]   Apache Axis 2.0 - JAXWS
> > [INFO]   Apache Axis 2.0 - Scripting
> > [INFO]   Apache Axis 2.0 - JAXB-RI Data Binding
> > [INFO]   Apache Axis 2.0 - JiBX Data Binding
> > [INFO]   Apache Axis 2.0 - spring
> > [INFO]   Apache Axis 2.0 - XMLBeans Data Binding
> > [INFO]   Apache Axis 2.0 - Integration
> > [INFO]   Apache Axis 2.0 - MEX
> > [INFO]   Apache Axis 2.0 - MEX-Module
> > [INFO]   Apache Axis 2.0 - Ping
> > [INFO]   Apache Axis 2.0 - tool - AAR Maven Plugin
> > [INFO]   Apache Axis 2.0 - Version Service
> > [INFO]   Apache Axis 2.0 - SOAP Monitor
> > [INFO]   Apache Axis 2.0 - tool - Ant Plugin
> > [INFO]   Apache Axis 2.0 - Root
> > [INFO]   Apache Axis 2.0 - tool - Eclipse Codegen Plugin
> > [INFO]   Apache Axis 2.0 - tool - Eclipse service Plugin
> > [INFO]   Apache Axis 2.0 - tool - Intellij IDEA Plugin
> > [INFO]   Apache Axis 2.0 - tool - Java2WSDL Maven Plugin
> > [INFO]   Apache Axis 2.0 - tool - WSDL2Code Maven Plugin
> > [INFO]   Apache Axis 2.0 - Web Application module
> > [INFO]   Apache Axis 2.0 - Samples
> > [INFO] Searching repository for plugin with prefix: 'install'.
> > Downloading:
> http://ws.zones.apache.org/repository2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-ma
> > ven-plugin-1.6.2.pom
> > Downloading:
> http://repo1.maven.org/maven2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plugi
> > n-1.6.2.pom
> > Downloading:
> http://ws.zones.apache.org/repository2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-ma
> > ven-plugin-1.6.2.pom
> > Downloading:
> http://tomcat.apache.org/dev/dist/m2-repository/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axi
> > s2-mar-maven-plugin-1.6.2.pom
> > Downloading:
> http://people.apache.org/repo/m2-incubating-repository/org/apache/axis2/axis2-mar-maven-plugin/1.
> > 6.2/axis2-mar-maven-plugin-1.6.2.pom
> > Downloading:
> http://repo1.maven.org/eclipse/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plug
> > in-1.6.2.pom
> > Downloading:
> http://jibx.sourceforge.net/maven/org.apache.axis2/poms/axis2-mar-maven-plugin-1.6.2.pom
> > Downloading:
> http://download.java.net/maven/1//org.apache.axis2/poms/axis2-mar-maven-plugin-1.6.2.pom
> > Downloading:
> http://repo1.maven.org/maven2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plugi
> > n-1.6.2.pom
> > [INFO]
> 
> > [ERROR] BUILD ERROR
> > 

JBoss and Apache Axis compatibility

2007-10-22 Thread Arun Sivaraman


I'm in the midst of integrating two components, one runs in JBoss and other
components exposes some web services deployed in Axis. When i integrate
them, there will be a communication between component deployed in JBOSS and
Web services exposed via Axis.

If i understand correctly, AXIS by default uses RPC service style and JBOSS
uses document/literal encoding format. So there is a notion of soap-wsdl
encoding format change required here.

All i wanted to know is that,
1.Is there any compatibility issues (if any) between JBOSS and Axis ?
2.JBOSS-Axis interaction with respect to the soap encoding format ?
3.Some explanation on SOAP encodingStyle ?

Expecting ur favorable reply

Regards
Arun
Email :[EMAIL PROTECTED]
-- 
View this message in context: 
http://www.nabble.com/JBoss-and-Apache-Axis-compatibility-tf4675459.html#a13358175
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.apache.axis2.databinding.ADBException: Property cannot be null!

2007-10-22 Thread Amila Suriarachchi
this means your object structure do not have loaded the required fault
elements.

see you schema there should be an element named fault without minOccurs=0 or
nillable=ture.
So ADB gives an exception because of this.

if you want to remove this use -Eosv when genrating the code.

Amia.


On 10/23/07, Huitang Li <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I created a web service code based on a wsdl, and it is run in resin
> 3.1.3, and I have the soapmonitor activated.  When a web service client
> sent a soap message to it, it threw the following exception:
>
> java.lang.RuntimeException: Can not serialize OM Element Envelope
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java
> :916)
> at
> org.apache.axis2.handlers.soapmonitor.SOAPMonitorHandler.invoke(
> SOAPMonitorHandler.java:101)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
> at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:442)
> at
> org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java
> :403)
> at
> org.apache.axis2.transport.http.AxisServlet.processAxisFault(
> AxisServlet.java:366)
> at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:154)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:153)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:91)
> at
> com.caucho.server.dispatch.ServletFilterChain.doFilter(
> ServletFilterChain.java:103)
> at
> com.caucho.server.security.SecurityFilterChain.doFilter(
> SecurityFilterChain.java:134)
> at
> com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java
> :178)
> at
> com.caucho.server.dispatch.ServletInvocation.service(
> ServletInvocation.java:241)
> at
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
> at com.caucho.server.port.TcpConnection.run(TcpConnection.java:586)
> at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:690)
> at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:612)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.axis2.databinding.ADBException: Property cannot be
> null!
> at test.Fault.serialize(Fault.java:95)
> at test.Fault$1.serialize(Fault.java:80)
> at
> org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java
> :82)
> at
>
> org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume
> (OMSourcedElementImpl.java:599)
> at
> org.apache.axiom.soap.impl.llom.SOAPFaultDetailImpl.internalSerialize(
> SOAPFaultDetailImpl.java:86)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
> OMElementImpl.java:756)
> at
> org.apache.axiom.soap.impl.llom.SOAPFaultImpl.internalSerialize(
> SOAPFaultImpl.java:192)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
> OMElementImpl.java:756)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
> OMElementImpl.java:772)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
> OMElementImpl.java:756)
> at
> org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(
> SOAPEnvelopeImpl.java:210)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
> OMElementImpl.java:756)
> at
> org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:345)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java
> :913)
> ... 18 more
>
> This exception will not be shown when all elements in the requesting
> soap message are filled with non-empty (no-blankspace) values.
>
> I notice that the exception is thrown from the following axis2-generated
> code:
>
>
>public void serialize(final javax.xml.namespace.QName parentQName,
> final org.apache.axiom.om.OMFactory factory,
>
> org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter
> xmlWriter)
> throws javax.xml.stream.XMLStreamException,
> org.apache.axis2.databinding.ADBException {
> //We can safely assume an element has only one type associated
> with it
> if (localFault == null) {
> throw new org.apache.axis2.databinding.ADBException(
> "Property cannot be null!");
> <  the line where the exception is thrown.
> }
>
> localFault.serialize(MY_QNAME, factory, xmlWriter);
> }
>
>
> My question is: In the line where the exception is thrown, why is the
> parameter localFault null? How to make it as a non-null value?
>
> Thanks.
>
>
>
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.


Re: axis2: create database connection by services in web server(not axis2 server)

2007-10-22 Thread Qil . Wong
Hi, Lahiru,

I have the lib directory in my service archive, and all my third party
jars are in that directory.

But only this can not run my service correctly, so as Antonio said
previously I put my db drivers in axis2/lib, and put my .arr into
axis2/repository/services, it works fine when I run the axis2 server. But if
I deploy axis2-1.3.war to tomcat6, and copy the db drivers into
axis2/web-info/lib, and my service .arr into axis2/web-info/services, while
I start tomcat to run axis2 service, the error disapears: no suitable
drivers.



2007/10/23, Lahiru Sandakith <[EMAIL PROTECTED]>:
>
> Hi,
>
> This is related to Axis2 and tomcat web container configurations mixing
> class loading with the archives. See for the tomcat class loading
> http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html and Axis2
> is being default child first at the deployment time.  So my idea is place
> the db driver in the service archive lib directory (please create lib
> directory if you do not have it already) and you will be able to get it
> through for that service.
>
> Thanks
> Lahiru
>
> On 10/23/07, Qil. Wong <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > Yesterdy I asked Antonio about the db connection creation in a
> > service. The answer was: Put the db driver .jar in /axis2/WEB-INF/lib, all
> > jars what you want to use must go here. I followed that and did it, but with
> > a little change(because I didn't have a web server then), I put the db
> > drivers into axis2/lib and run with axis2server, everything was OK, so I
> > think it would be right in a web server(tomcat, eg.).
> >
> >Today I have installed a tomcat(6.0), and unzip axis2-1.3.war into
> > tomcat6/webapp, put my service into tomcat6/webapp/aixs2/services, and put
> > the drivers into tomcat6/webapp//axis2/WEB-INF/lib, but it does NOT work,
> > it still popups an error when creating a connection: no suitable drivers
> > .
> >
> > Could anyone explain it?
> >
> > Thanks!
> >
> > Qil
> >
> >
> > Question yesterday:
> > >>Hi,
> >
> > >>I  have one javase application and now I need to change it into
> > axis2 webservice and publish it.
> >
> > >>While it was javase application, it run fine(certanlly, it could
> > db connections). But after I change it into axis2 service, when the
> > >>application tries to create database connection, there will be an
> > exception : no suitable driver. Actually, all the jdbc libs needed are in
> > >>classpath.
> >
> >  >>   My method to get connection is from a common database pool(with
> > apache libs:common-dbcp.jar,common-pool.jar), the database >>is
> > sqlserver2000. If I get the connection directly by using: 
> > Class.forName(...),
> > Connection conn = >>DriverManager.getConnection(url,name,psw), I could
> > get the connection successfully.
> >
> >  >>   Could anyone tell me how to solve it by using database connection
> > pool?
>
>
>
>
> --
> Thanks
> Lahiru Sandakith
>
> http://sandakith.wordpress.com/
> GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC  1AB1 FE5E 7464 1F01 9A0F


Re: unexpected subelement

2007-10-22 Thread Amila Suriarachchi
On 10/19/07, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
>
> Your other alternative is to define the "value" element as "xs:anyType":
>
> name="value" type="xs:anyType">


if you put  xs:anyType as the type isn't it required to set the type of the
element
using the xsi:type attribute? without this how to determine the type of the
element?

eg.
myValue


Amila.

Anne
>
> On 10/19/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > On 10/18/07, Kahler, Jason J (US SSA) <[EMAIL PROTECTED]>
> wrote:
> > > I have a wsdl that uses an xsd:any in a complexType.
> > > When I submit request via SoapUI I get Unexpected subelement value. I
> am
> > > using adb as my databinding.
> > >
> > > Here is my WSDL snippet.
> > >
> > >
> > > 
> > > 
> > >  > minOccurs="1"
> > > name="ParameterName" type="xsd:string"/>
> > >  > minOccurs="1"
> > > name="queryOperator" type="tns:queryOperatorType"/>
> > >  > minOccurs="1"
> > > name="value" type="tns:queryValueType">
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > >
> > >
> > >
> > > Soap Request:
> > >
> > >  > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> > > xmlns:wfnp=" http://wfnp";>
> > >   
> > >
> > > 
> > >  
> > >
> > anyOldPAram
> > > =
> > > myValue
> >
> > this is an  invalid xml. since type is any then you should have a vail
> xml
> > inside value element
> > try this
> >  
> > >  
> > >   
> > >
> > > 
> > >
> > >
> > > Soap Response:
> > >
> > >  > > xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/";>
> > >
> > >   
> > >  soapenv:Server
> > >
> > org.apache.axis2.databinding.ADBException :
> > > Unexpected subelement value
> > >  
> > >   
> > >
> > > 
> > >
> > > I saw some posts about bugs, but I am using a new version of axis2.
> > > Also I use an xsd:any in another service with no issues?
> > >
> > >
> > >
> > -
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.


Getting teh following error trying to set the transport properties dynamically

2007-10-22 Thread Ajeet Phansalkar
Hi,

 

I have created a Stubs using ADB binding from .NET webservice wsdl.When
running the  client to access the webservice 

I got the error on "Unknown host exception".It looked like the client was
unable to go through the proxy to the webservice.The web service is outside
my client's network,hence using the proxy.

To resolve this problem I assumed that the stubs would be using the
axis2.xml file ,so I set the configurations in transport sender there. But
still the problem persisted as my java client is a standalone and not in a
J2EE app server. So I am trying to set the transport sender properties
dynamically in code. But now I get the following error:

 

og4j:WARN No appenders could be found for logger
(org.apache.axis2.description.AxisService).

log4j:WARN Please initialize the log4j system properly.

org.apache.axis2.AxisFault: Transport out has not been set

  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:383)

  at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
n.java:374)

  at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
peration.java:211)

  at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

  at
com.choicepoint.bixg.axis2.webservice.SearchAPI1Stub.CustomSearch(SearchAPI1
Stub.java:764)

  at com.choicepoint.bixg.axis2.client.Client.doInOnly(Client.java:64)

  at com.choicepoint.bixg.axis2.client.Client.main(Client.java:20)

 

 

Following is the  piece of code in stub which I am trying to set the
properties

 

public SearchAPI1Stub(org.apache.axis2.context.ConfigurationContext
configurationContext,

java.lang.String targetEndpoint, boolean useSeparateListener)

throws org.apache.axis2.AxisFault {

 //To populate AxisService

 populateAxisService();

 populateFaults();

 

_serviceClient = new
org.apache.axis2.client.ServiceClient(configurationContext,_service);





configurationContext =
_serviceClient.getServiceContext().getConfigurationContext();

 

_serviceClient.getOptions().setTo(new
org.apache.axis2.addressing.EndpointReference(

targetEndpoint));

 
_serviceClient.getOptions().setUseSeparateListener(useSeparateListener);



//Set the soap version

 
_serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP12Co
nstants.SOAP_ENVELOPE_NAMESPACE_URI);



//_serviceClient.getOptions().setSenderTransport(new
TransportOutDescription(new QName(Constants.TRANSPORT_HTTP)));

 
_serviceClient.getOptions().setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,
HTTPConstants.HEADER_PROTOCOL_11);

 

HttpTransportProperties.ProxyProperties proxyProperties = new
HttpTransportProperties.ProxyProperties();

proxyProperties.setProxyName("proxyname");

proxyProperties.setProxyPort(proxyport);

proxyProperties.setDomain("domain name");

HttpTransportProperties.Authenticator

auth = new HttpTransportProperties.Authenticator();

auth.setUsername("username");

auth.setPassword("password"); 

//  set if realm or domain is known

 
_serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTP
Constants.AUTHENTICATE, auth);

 
_serviceClient.getOptions().setProperty(HTTPConstants.PROXY,proxyProperties)
;



}

Request help in figuring out this issue.

 

Thanks & Regards,

Ajeet Phansalkar


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_


Re: axis2: create database connection by services in web server(not axis2 server)

2007-10-22 Thread Lahiru Sandakith
Hi,

This is related to Axis2 and tomcat web container configurations mixing
class loading with the archives. See for the tomcat class loading
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html and Axis2 is
being default child first at the deployment time.  So my idea is place the
db driver in the service archive lib directory (please create lib directory
if you do not have it already) and you will be able to get it through for
that service.

Thanks
Lahiru

On 10/23/07, Qil. Wong <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Yesterdy I asked Antonio about the db connection creation in a
> service. The answer was: Put the db driver .jar in /axis2/WEB-INF/lib, all
> jars what you want to use must go here. I followed that and did it, but with
> a little change(because I didn't have a web server then), I put the db
> drivers into axis2/lib and run with axis2server, everything was OK, so I
> think it would be right in a web server(tomcat, eg.).
>
>Today I have installed a tomcat(6.0), and unzip axis2-1.3.war into
> tomcat6/webapp, put my service into tomcat6/webapp/aixs2/services, and put
> the drivers into tomcat6/webapp//axis2/WEB-INF/lib, but it does NOT work,
> it still popups an error when creating a connection: no suitable drivers.
>
> Could anyone explain it?
>
> Thanks!
>
> Qil
>
>
> Question yesterday:
> >>Hi,
>
> >>I  have one javase application and now I need to change it into
> axis2 webservice and publish it.
>
> >>While it was javase application, it run fine(certanlly, it could db
> connections). But after I change it into axis2 service, when the
> >>application tries to create database connection, there will be an
> exception : no suitable driver. Actually, all the jdbc libs needed are in
> >>classpath.
>
>  >>   My method to get connection is from a common database pool(with
> apache libs:common-dbcp.jar,common-pool.jar), the database >>is
> sqlserver2000. If I get the connection directly by using: Class.forName(...),
> Connection conn = >>DriverManager.getConnection(url,name,psw), I could get
> the connection successfully.
>
>  >>   Could anyone tell me how to solve it by using database connection
> pool?




-- 
Thanks
Lahiru Sandakith

http://sandakith.wordpress.com/
GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC  1AB1 FE5E 7464 1F01 9A0F


Re: Question about merlin

2007-10-22 Thread Nandana Mihindukulasooriya
Hi Massimiliano,
   As this is a possible situation, I think it is reasonable to add
an optional
parameter to specify alias for certificate to sign when it is different from
the
user name of the UsernameToken. So I created the JIRA,

https://issues.apache.org/jira/browse/RAMPART-99

will a send a patch soon.

Regards,
Nandana


On 10/22/07, Massimiliano Masi <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Quoting Massimiliano Masi <[EMAIL PROTECTED]>:
>
> > Yes. I used the same name and everything was working, but now I cannot.
> > I should sign the message with the key of the service itself, but
> > I need to authenticate another user.
> >
>
> I found the following in BindingBuilder.java:
>
>
>protected WSSecUsernameToken addUsernameToken(RampartMessageData
> rmd) throws RampartException {
>
>  log.debug("Adding a UsernameToken");
>
>  RampartPolicyData rpd = rmd.getPolicyData();
>
>  //Get the user
>  //First try options
>  Options options = rmd.getMsgContext().getOptions();
>  String user = options.getUserName();
>  if(user == null || user.length() == 0) {
>  //Then try RampartConfig
>  if(rpd.getRampartConfig() != null) {
>  user = rpd.getRampartConfig().getUser();
>  }
>  }
>
>
> So, it means that to achieve my result I have to put options in the
> RampartMessageData messageContext. But How can I do this?
>
> Thanks,
>
>
>  Massimiliano
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


axis2: create database connection by services in web server(not axis2 server)

2007-10-22 Thread Qil . Wong
Hi,

Yesterdy I asked Antonio about the db connection creation in a service.
The answer was: Put the db driver .jar in /axis2/WEB-INF/lib, all jars what
you want to use must go here. I followed that and did it, but with a little
change(because I didn't have a web server then), I put the db drivers into
axis2/lib and run with axis2server, everything was OK, so I think it would
be right in a web server(tomcat, eg.).

   Today I have installed a tomcat(6.0), and unzip axis2-1.3.war into
tomcat6/webapp, put my service into tomcat6/webapp/aixs2/services, and put
the drivers into tomcat6/webapp//axis2/WEB-INF/lib, but it does NOT work, it
still popups an error when creating a connection: no suitable drivers.

Could anyone explain it?

Thanks!

Qil


Question yesterday:
>>Hi,

>>I  have one javase application and now I need to change it into axis2
webservice and publish it.

>>While it was javase application, it run fine(certanlly, it could db
connections). But after I change it into axis2 service, when the
>>application tries to create database connection, there will be an
exception : no suitable driver. Actually, all the jdbc libs needed are in
>>classpath.

 >>   My method to get connection is from a common database pool(with apache
libs:common-dbcp.jar,common-pool.jar), the database >>is sqlserver2000. If I
get the connection directly by using: Class.forName(...), Connection conn =
>>DriverManager.getConnection(url,name,psw), I could get the connection
successfully.

 >>   Could anyone tell me how to solve it by using database connection
pool?


Re: [Axis2] WS Client - Modify SOAPBody before transport

2007-10-22 Thread keith chapman
Yes using a handler is the way to do it. I presume wheat your trying to do
here is add something before the message is sent and process it before its
received. So you dont need to replace the whole SOAP message you can get the
soap message from the msgContext  and add what ever you want to it. Same
goes on the receiver. (The msgContaxt is available to the handler so you can
modify the SOAP message there.)

Thanks,
Keith.

On 10/23/07, ghodgins <[EMAIL PROTECTED]> wrote:
>
>
> Hi, I'm an Axis2 newbie and have a question about the best way to do
> something.
>
> I've generated a synchronous WS client for a .NET WS that works perfectly.
>
> My problem is that I now need to to modify the SOAPBody before it is sent.
>
> I also need to modify the body of the incoming response before it is
> processed.
>
> Is the best way to do this by using a handler? If so, what is the best way
> to modify the SOAPBody? Or, how can I replace the existing SOAPBody with a
> modified one?
>
> I've read the articles on custom modules:
> http://ws.apache.org/axis2/1_3/modules.html
> http://ws.apache.org/axis2/1_3/migration.html#custom_deployment
>
> But I have no idea how to best modify the SOAPBody before it is sent or
> before axis2 naturally processes the WS response from the service.
>
> Thanks for any help!
>
> Grant
> --
> View this message in context:
> http://www.nabble.com/-Axis2--WS-Client---Modify-SOAPBody-before-transport-tf4673909.html#a13353351
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


Re: Axis2/Java - Trouble building Axis2/Java from source

2007-10-22 Thread keith chapman
The error you got when installing WSDL4J can be mitigated by going into
modules/tools/axis2-mar-maven-plugin and doing mvn install

I wonder why maven could not download wsdl4j in the first place though.

Thanks,
Keith.

On 10/22/07, Michael Mole <[EMAIL PROTECTED]> wrote:
>
>
> I'm having trouble building Axis2/Java from source.  Can anyone tell me if
> I'm doing something wrong?
>
> When I try to build Axis2 from source, it tells me this:
> ( I use this command: %mvn install )
> *2) wsdl4j:wsdl4j:jar:1.6.2*
>
> *  Try downloading the file manually from the project website.*
>
> *  Then, install it using the command:*
> *  mvn install:install-file -DgroupId=wsdl4j -DartifactId=wsdl4j \*
> *  -Dversion=1.6.2 -Dpackaging=jar -Dfile=/path/to/file*
> *Alternatively, if you host your own repository you can deploy the file
> there:   mvn deploy:deploy-file -Dg*
> *roupId=wsdl4j -DartifactId=wsdl4j \*
> *  -Dversion=1.6.2 -Dpackaging=jar -Dfile=/path/to/file \*
> *   -Durl=[url] -DrepositoryId=[id]*
>
> *  Path to dependency:*
> *1) org.apache.axis2:axis2-kernel:jar:1.3*
> *2) wsdl4j:wsdl4j:jar:1.6.2*
>
>
> However, I get another error when I try to manually install wsdl4j, using
> this command:
> C:\axis2java-1.3-src>mvn install:install-file
> -Dfile="C:\WSDL4J\wsdl4j-1_6_2\lib\wsdl4j.jar" -DgroupId=wsdl4j
> -DartifactId=wsdl4j -Dversion=1.6.2 -Dpackaging=jar
>
> *[INFO] Scanning for projects...*
> *[INFO] Reactor build order:*
> *[INFO]   Apache Axis 2.0 - Parent*
> *[INFO]   Apache Axis 2.0 - Data Binding*
> *[INFO]   Apache Axis 2.0 - Kernel*
> *[INFO]   Apache Axis 2.0 - Code Generation*
> *[INFO]   Apache Axis 2.0 - ADB Codegen*
> *[INFO]   Apache Axis 2.0 - tool - MAR Maven Plugin*
> *[INFO]   Apache Axis 2.0 - Addressing*
> *[INFO]   Apache Axis 2.0 - Java2WSDL*
> *[INFO]   Apache Axis 2.0 - Fast Infoset*
> *[INFO]   Apache Axis 2.0 - MTOM Policy*
> *[INFO]   Apache Axis 2.0 - SAAJ API*
> *[INFO]   Apache Axis 2.0 - SAAJ*
> *[INFO]   Apache Axis 2.0 - JAXWS API*
> *[INFO]   Apache Axis 2.0 - JWS API*
> *[INFO]   Apache Axis 2.0 - Metadata*
> *[INFO]   Apache Axis 2.0 - JSON*
> *[INFO]   Apache Axis 2.0 - Clustering*
> *[INFO]   Apache Axis 2.0 - JAXWS*
> *[INFO]   Apache Axis 2.0 - Scripting*
> *[INFO]   Apache Axis 2.0 - JAXB-RI Data Binding*
> *[INFO]   Apache Axis 2.0 - JiBX Data Binding*
> *[INFO]   Apache Axis 2.0 - spring*
> *[INFO]   Apache Axis 2.0 - XMLBeans Data Binding*
> *[INFO]   Apache Axis 2.0 - Integration*
> *[INFO]   Apache Axis 2.0 - MEX*
> *[INFO]   Apache Axis 2.0 - MEX-Module*
> *[INFO]   Apache Axis 2.0 - Ping*
> *[INFO]   Apache Axis 2.0 - tool - AAR Maven Plugin*
> *[INFO]   Apache Axis 2.0 - Version Service*
> *[INFO]   Apache Axis 2.0 - SOAP Monitor*
> *[INFO]   Apache Axis 2.0 - tool - Ant Plugin*
> *[INFO]   Apache Axis 2.0 - Root*
> *[INFO]   Apache Axis 2.0 - tool - Eclipse Codegen Plugin*
> *[INFO]   Apache Axis 2.0 - tool - Eclipse service Plugin*
> *[INFO]   Apache Axis 2.0 - tool - Intellij IDEA Plugin*
> *[INFO]   Apache Axis 2.0 - tool - Java2WSDL Maven Plugin*
> *[INFO]   Apache Axis 2.0 - tool - WSDL2Code Maven Plugin*
> *[INFO]   Apache Axis 2.0 - Web Application module*
> *[INFO]   Apache Axis 2.0 - Samples*
> *[INFO] Searching repository for plugin with prefix: 'install'.*
> *Downloading:
> http://ws.zones.apache.org/repository2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-ma
> *
> *ven-plugin-1.6.2.pom*
> *Downloading:
> http://repo1.maven.org/maven2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plugi
> *
> *n-1.6.2.pom*
> *Downloading:
> http://ws.zones.apache.org/repository2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-ma
> *
> *ven-plugin-1.6.2.pom*
> *Downloading:
> http://tomcat.apache.org/dev/dist/m2-repository/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axi
> *
> *s2-mar-maven-plugin-1.6.2.pom*
> *Downloading:
> http://people.apache.org/repo/m2-incubating-repository/org/apache/axis2/axis2-mar-maven-plugin/1
> .*
> *6.2/axis2-mar-maven-plugin-1.6.2.pom*
> *Downloading:
> http://repo1.maven.org/eclipse/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plug
> *
> *in-1.6.2.pom*
> *Downloading:
> http://jibx.sourceforge.net/maven/org.apache.axis2/poms/axis2-mar-maven-plugin-1.6.2.pom
> *
> *Downloading:
> http://download.java.net/maven/1//org.apache.axis2/poms/axis2-mar-maven-plugin-1.6.2.pom
> *
> *Downloading:
> http://repo1.maven.org/maven2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plugi
> *
> *n-1.6.2.pom*
> *[INFO]
> *
> *[ERROR] BUILD ERROR*
> *[INFO]
> *
> *[INFO] Error building POM (may not be this project's POM).*
>
>
> *Project ID: org.apache.axis2:axis2-mar-maven-plugin*
>
> *Reason: POM 'org.apache.axis2:axis2-mar-maven-plugin' not found in
> repository: Unable to download the artifact*
>

Re: error creating message from generated client

2007-10-22 Thread keith chapman
I presume this error occurs when you receive the response. Can you check the
messages using TCP Monitor please and post it here.

Thanks,
Keith.

On 10/22/07, Kimberly Nicholls <[EMAIL PROTECTED]> wrote:
>
>  I am having trouble creating a SOAP message from a generated client when
> the message includes attachments -- the client throws "
> org.apache.axiom.soap.SOAPProcessingException: First Element must contain
> the local name, Envelope , but found html."  I am using axis2 1.3, and I
> can make requests to other methods (without attachments) in the same service
> with no problems.
>
> Here's what I did:
>
> - set enableMTOM to true in axis2.xml
> - created method in my POJO service: public long createAttachment(long
> messageID, DataHandler attData)
> - generated client stub via wsdl2java
> - added these lines to client stub:
> _serviceClient.getOptions().setProperty(
> Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE
> );
>  _serviceClient.getOptions().setTimeOutInMilliSeconds(1);
> - created client that runs the method like this:
> DataHandler attData = new DataHandler(new
> FileDataSource(filename));
> long attachmentID = stub.createAttachment(messageID, attData);
>
> When I run the client, I get
>
> [INFO] OMException in getSOAPBuilder
> org.apache.axiom.soap.SOAPProcessingException: First Element must contain
> the local name, Envelope , but found html
> at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(
> StAXSOAPModelBuilder.java:219)
> at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(
> StAXSOAPModelBuilder.java:177)
> at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(
> StAXOMBuilder.java:163)
> at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(
> StAXSOAPModelBuilder.java:161)
> at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.(
> StAXSOAPModelBuilder.java:110)
> at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(
> BuilderUtil.java:609)
> at org.apache.axis2.transport.TransportUtils.createDocumentElement
> (TransportUtils.java:178)
> at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:111)
> at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:87)
> at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:326)
> at org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:389)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:211)
> at org.apache.axis2.client.OperationClient.execute(
> OperationClient.java:163)
> ...
> Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element
> must contain the local name, Envelope , but found html
> at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(
> StAXSOAPModelBuilder.java:219)
> at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(
> StAXSOAPModelBuilder.java:177)
> at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(
> StAXOMBuilder.java:163)
> at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(
> StAXSOAPModelBuilder.java:161)
> at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.(
> StAXSOAPModelBuilder.java:110)
> at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(
> BuilderUtil.java:609)
> at org.apache.axis2.transport.TransportUtils.createDocumentElement
> (TransportUtils.java:178)
> at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:111)
> at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:87)
> ... 6 more
>
>
> Running other methods in the same client with the same service work fine,
> if they don't have attachments.  The file I'm trying to send is a 2.5kjpg.  
> What am I doing wrong?
>
> Kimberly
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


Re: Compiler Warnings After Code Generation

2007-10-22 Thread keith chapman
The reason is that Axis2 is JDK 1.4 compatible and hence it does not use
Generics. There warnings pop up because your project uses JDK 1.5 and the
code generated by Axis2 is JDK 1.4 compatible (Without Generics).

Thanks,
Keith.

On 10/22/07, Hart, Leo <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>
> I've used the wsdl2java command-line tool to create a client stub for my
> WSDL.  The code works fine, however now I have hundreds of warnings in
> Eclipse and my ant builds, pointing to the generated code.  Some of these
> include:
>
>- Class is a raw type. References to generic type Class should be
>parameterized
>- Empty block should be documented
>- HashSet is a raw type. References to generic type HashSet
>should be parameterized
>- The local variable other is never read
>
> Now I realize that I can go into the compiler settings within Eclipse and
> turn off these warnings for a project, but I would like to receive these
> warning for code my team has generated.  Does anyone have any suggestions
> around suppressing/fixing these warnings?
>
> Thanks,
> Leo
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


org.apache.axis2.databinding.ADBException: Property cannot be null!

2007-10-22 Thread Huitang Li

Hi,

I created a web service code based on a wsdl, and it is run in resin 
3.1.3, and I have the soapmonitor activated.  When a web service client 
sent a soap message to it, it threw the following exception:


java.lang.RuntimeException: Can not serialize OM Element Envelope
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:916)
   at 
org.apache.axis2.handlers.soapmonitor.SOAPMonitorHandler.invoke(SOAPMonitorHandler.java:101)

   at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
   at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
   at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:442)
   at 
org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:403)
   at 
org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:366)
   at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:154)

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:153)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:91)
   at 
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:103)
   at 
com.caucho.server.security.SecurityFilterChain.doFilter(SecurityFilterChain.java:134)
   at 
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
   at 
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:241)
   at 
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)

   at com.caucho.server.port.TcpConnection.run(TcpConnection.java:586)
   at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:690)
   at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:612)
   at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.axis2.databinding.ADBException: Property cannot be 
null!

   at test.Fault.serialize(Fault.java:95)
   at test.Fault$1.serialize(Fault.java:80)
   at 
org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:82)
   at 
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:599)
   at 
org.apache.axiom.soap.impl.llom.SOAPFaultDetailImpl.internalSerialize(SOAPFaultDetailImpl.java:86)
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
   at 
org.apache.axiom.soap.impl.llom.SOAPFaultImpl.internalSerialize(SOAPFaultImpl.java:192)
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:772)
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
   at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:210)
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
   at 
org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:345)
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:913)

   ... 18 more

This exception will not be shown when all elements in the requesting 
soap message are filled with non-empty (no-blankspace) values.


I notice that the exception is thrown from the following axis2-generated 
code:



  public void serialize(final javax.xml.namespace.QName parentQName,
   final org.apache.axiom.om.OMFactory factory,
   
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter 
xmlWriter)

   throws javax.xml.stream.XMLStreamException,
   org.apache.axis2.databinding.ADBException {
   //We can safely assume an element has only one type associated 
with it

   if (localFault == null) {
   throw new org.apache.axis2.databinding.ADBException(
   "Property cannot be null!"); 
<  the line where the exception is thrown.

   }

   localFault.serialize(MY_QNAME, factory, xmlWriter);
   }


My question is: In the line where the exception is thrown, why is the 
parameter localFault null? How to make it as a non-null value?


Thanks.









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: axis2: create database connection by services in axis2 server

2007-10-22 Thread Qil . Wong
Thanks, Antonio, with all my regards!

2007/10/22, Antonio Manuel Muñiz Martín <[EMAIL PROTECTED]>:
>
> All jars. It is the axis classpath.
>
> Antonio.
>
> 2007/10/22, Qil. Wong <[EMAIL PROTECTED]>:
> >
> > Thanks,Antonio!
> >
> > Another question: should all the third party libraries used in the
> > project be put into /axis2/WEB-INF/lib? or only the drivers?
> >
> >
> > 2007/10/22, Antonio Manuel Muñiz Martín < [EMAIL PROTECTED]>:
> > >
> > > Put the db driver .jar in /axis2/WEB-INF/lib, all jars what you want
> > > to use must go here.
> > >
> > > 2007/10/22, Qil. Wong < [EMAIL PROTECTED]>:
> > > >
> > > > Hi,
> > > >
> > > > I have one javase application and now I need to change it into
> > > > axis2 webservice and publish it.
> > > >
> > > > While it was javase application, it run fine(certanlly, it could
> > > > db connections). But after I change it into axis2 service, when the
> > > > application tries to create database connection, there will be an 
> > > > exception
> > > > : no suitable driver. Actually, all the jdbc libs needed are in 
> > > > classpath.
> > > >
> > > > My method to get connection is from a common database pool(with
> > > > apache libs:common-dbcp.jar,common-pool.jar), the database is
> > > > sqlserver2000. If I get the connection directly by using:
> > > > Class.forName(...), Connection conn = 
> > > > DriverManager.getConnection(url,name,psw),
> > > > I could get the connection successfully.
> > > >
> > > > Could anyone tell me how to solve it by using database
> > > > connection pool?
> > > >
> > >
> > >
> >
>


RE: AXIS Fault "Required Attribute localType is null"

2007-10-22 Thread Raghu Upadhyayula
Hi Saket,

 

Can you post your WSDL?  From the Axis Fault it looks like
you have a variable named "type" in the Incident object which is defined
as not nullable in WSDL and you are not setting that in your request.

 

Thanks

Raghu

 



From: Saket Raizada [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 22, 2007 3:48 PM
To: axis-user@ws.apache.org
Subject: AXIS Fault "Required Attribute localType is null" 

 

 

Hi Folks, 
I am using AXIS 2, 1.3 and created a client for an existing WebService 
I am trying to use the WebService to create an incident using the
example code below 
StringType contact = new StringType(); 
contact.setString("user1"); 
incident.setContact(contact); 
stub.createIncident(incident) 
I get an AXIS Fault "Required Attribute localType is null" , there is no
SOAP body message generated..., however if i comment out the line

//incident.setContact(contact) , the incident gets generated and i can
see the SOAP messages etc. 
I am using ADB binding and am out of ideas what localType is (it's not
part of incident or web service that i am trying to access) also no SOAP
BODY XML is generated.

Any pointers will be very helpful 
-machoq 



Re: AXIS Fault "Required Attribute localType is null"

2007-10-22 Thread Martin Gainty
AXIS Fault "Required Attribute localType is null"The name of the operation 
parameter needs to be a QName (Qualified Name) following the provided example

   private void populateAxisService() throws org.apache.axis2.AxisFault 
{
 //creating the Service with a unique name
 _service = new org.apache.axis2.description.AxisService("MTOMSample" + 
this.hashCode());

//creating the operation
org.apache.axis2.description.AxisOperation __operation;

//create the Operations
_operations = new org.apache.axis2.description.AxisOperation[1];

//coordinate this with supplied parameter in services.xml
__operation = new org.apache.axis2.description.OutInAxisOperation();

// set the name of the Operation as a QName 
__operation.setName(new 
javax.xml.namespace.QName("http://ws.apache.org/axis2/mtomsample/";, 
"attachment"));

//Add the operation to the service
 _service.addOperation(__operation);

_operations[0]=__operation;

}

Martin
  - Original Message - 
  From: Saket Raizada 
  To: axis-user@ws.apache.org 
  Sent: Monday, October 22, 2007 6:48 PM
  Subject: AXIS Fault "Required Attribute localType is null" 




  Hi Folks, 
  I am using AXIS 2, 1.3 and created a client for an existing WebService 
  I am trying to use the WebService to create an incident using the example 
code below 
  StringType contact = new StringType(); 
  contact.setString("user1"); 
  incident.setContact(contact); 
  stub.createIncident(incident) 
  I get an AXIS Fault "Required Attribute localType is null" , there is no SOAP 
body message generated..., however if i comment out the line

  //incident.setContact(contact) , the incident gets generated and i can see 
the SOAP messages etc. 
  I am using ADB binding and am out of ideas what localType is (it's not part 
of incident or web service that i am trying to access) also no SOAP BODY XML is 
generated.

  Any pointers will be very helpful 
  -machoq 


AXIS Fault "Required Attribute localType is null"

2007-10-22 Thread Saket Raizada

> Hi Folks,
> I am using AXIS 2, 1.3 and created a client for an existing WebService
> I am trying to use the WebService to create an incident using the
> example code below
> StringType contact = new StringType();
> contact.setString("user1");
> incident.setContact(contact);
> stub.createIncident(incident)
> I get an AXIS Fault "Required Attribute localType is null" , there is
> no SOAP body message generated..., however if i comment out the line
> //incident.setContact(contact) , the incident gets generated and i can
> see the SOAP messages etc.
> I am using ADB binding and am out of ideas what localType is (it's not
> part of incident or web service that i am trying to access) also no
> SOAP BODY XML is generated.
> Any pointers will be very helpful
> -machoq


[Axis2] WS Client - Modify SOAPBody before transport

2007-10-22 Thread ghodgins

Hi, I'm an Axis2 newbie and have a question about the best way to do
something.

I've generated a synchronous WS client for a .NET WS that works perfectly.

My problem is that I now need to to modify the SOAPBody before it is sent. 

I also need to modify the body of the incoming response before it is
processed.

Is the best way to do this by using a handler? If so, what is the best way
to modify the SOAPBody? Or, how can I replace the existing SOAPBody with a
modified one?

I've read the articles on custom modules:
http://ws.apache.org/axis2/1_3/modules.html
http://ws.apache.org/axis2/1_3/migration.html#custom_deployment

But I have no idea how to best modify the SOAPBody before it is sent or
before axis2 naturally processes the WS response from the service.

Thanks for any help!

Grant
-- 
View this message in context: 
http://www.nabble.com/-Axis2--WS-Client---Modify-SOAPBody-before-transport-tf4673909.html#a13353351
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best way to realize stateful servicesarchitecturewithmassivedata?

2007-10-22 Thread robert lazarski
That's pretty kool. Did you use any streaming to avoid putting the data in
memory and building the tree? Or did you just more or less follow the same
steps in the mtom tutorial?

Robert

On 10/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
>
> Hi
>
> We were in similar situation we were planning to transfer 1GB file as SOAP
> as attachment.
>
> 1)  Axis2 give pretty good support using MTOM and SWA for transferring any
> size file.  1GB file transferred in 67sec on local network. File caching
> feature is great.
> 2) But it is not good idea to transfer SOAP with such large attachment. We
> also hit some our app server & service bus handling limitation. So we
> decided to process data in chunk.  We get file data in chunk and till we get
> all data correctly we dont send confirm to end point (which really delete
> file on source system . End of our getFile operation / confirming file
> received at server ). Same way on reverse we put data in chunk to some temp
> file on destination endpoint.  after placing all data at end we rename it to
> required file.
>
> Let me know your thoughts
>
> Regards
> Yogesh Dhake
>
>
>
>  *"Walker, Jeff" <[EMAIL PROTECTED]>*
>
> 10/22/2007 11:46 AM  Please respond to
> axis-user@ws.apache.org
>
>   To
>   cc
>
>  Subject
> RE: Best way to realize stateful servicesarchitecturewithmassivedata?
>
>
>
>
>
>
> Michele,
> I'm not sure JMS is a viable alternative if large amounts of data are
> transferred. That statement would imply there is some sort of size
> cutoff. There isn't. Just remember, that with JMS you can have persisted
> queues and then all of that data would have to be stored temporarily.
> Personally, I think some of the lessons from JMS (message queuing in
> general) can be applied to web services; keep the msgs as small as
> possible.
>
> Large data transfer (across the network) is a serious problem. There is
> no easy solution that I've seen. Having said that, there are quite a few
> posters who have used attachments with their web services. I have used
> the older DIME format, but other posters have used the newer MTOM. I
> would be interested to see what their performance was like, with large
> files (ie. around a Gigabyte, say). Since MTOM chunks up the files,
> transferring any sized file should theoretically be possible.
>
> Does anyone have any opinions on using MTOM for transferring Gb and and
> multi-Gb files??
> -jeff
>
>
>
>
> -Original Message-
> From: Michele Mazzucco [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 22, 2007 11:21 AM
> To: axis-user@ws.apache.org
> Subject: RE: Best way to realize stateful
> servicesarchitecturewithmassivedata?
>
> Jeff,
>
> I mentioned JMS as possible choice if one has to transfer large amount
> of data since it is asynchronous.
>
> Michele
>
> On Mon, 2007-10-22 at 11:10 -0400, Walker, Jeff wrote:
> > You mentioned WS over JMS. Again, added delay, since another protocol
> > layer is employed.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> *
> ==
> This transmittal and any attachments may contain confidential, privileged
> or sensitive information and is solely for the use of the intended
> recipient. If you are not the intended recipient, you are hereby notified
> that you have received this transmittal and any attachments in error and any
> review, dissemination, distribution or copying thereof is strictly
> prohibited. If you have received this transmittal and any attachments in
> error please notify the sender and immediately destroy the message and all
> its attachments. Any opinions herein expressed may be those of the author
> and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank
> (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho
> Financial Group ("Mizuho"). Mizuho accepts no responsibility for the
> accuracy or completeness of any information herein contained.
> E-Mail received by or sent from officer of Mizuho Securities USA Inc.
> (which is a registered U.S. broker-dealer and the entity through which
> Mizuho generally conducts its investment banking, capital markets, and
> securities business in the United States) is electronically archived and
> recorded and is subject to review and monitoring by and/or disclosure to
> persons other than the recipient, including (but not limited to) Mizuho
> Securities USA Inc. supervisory personnel. Such communications may be
> produced to regulatory authorities or others with legal rights to the
> information.*
>


RE: Best way to realize stateful servicesarchitecturewithmassivedata?

2007-10-22 Thread Yogesh . Dhake
Hi 

We were in similar situation we were planning to transfer 1GB file as SOAP 
as attachment. 

1)  Axis2 give pretty good support using MTOM and SWA for transferring any 
size file.  1GB file transferred in 67sec on local network. File caching 
feature is great.
2) But it is not good idea to transfer SOAP with such large attachment. We 
also hit some our app server & service bus handling limitation. So we 
decided to process data in chunk.  We get file data in chunk and till we 
get all data correctly we dont send confirm to end point (which really 
delete file on source system . End of our getFile operation / confirming 
file received at server ). Same way on reverse we put data in chunk to 
some temp file on destination endpoint.  after placing all data at end we 
rename it to required file. 

Let me know your thoughts

Regards
Yogesh Dhake 




"Walker, Jeff" <[EMAIL PROTECTED]> 
10/22/2007 11:46 AM
Please respond to
axis-user@ws.apache.org


To

cc

Subject
RE: Best way to realize stateful servicesarchitecturewithmassivedata?






Michele,
I'm not sure JMS is a viable alternative if large amounts of data are
transferred. That statement would imply there is some sort of size
cutoff. There isn't. Just remember, that with JMS you can have persisted
queues and then all of that data would have to be stored temporarily.
Personally, I think some of the lessons from JMS (message queuing in
general) can be applied to web services; keep the msgs as small as
possible.

Large data transfer (across the network) is a serious problem. There is
no easy solution that I've seen. Having said that, there are quite a few
posters who have used attachments with their web services. I have used
the older DIME format, but other posters have used the newer MTOM. I
would be interested to see what their performance was like, with large
files (ie. around a Gigabyte, say). Since MTOM chunks up the files,
transferring any sized file should theoretically be possible.

Does anyone have any opinions on using MTOM for transferring Gb and and
multi-Gb files??
-jeff


 

-Original Message-
From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 22, 2007 11:21 AM
To: axis-user@ws.apache.org
Subject: RE: Best way to realize stateful
servicesarchitecturewithmassivedata?

Jeff,

I mentioned JMS as possible choice if one has to transfer large amount
of data since it is asynchronous.

Michele

On Mon, 2007-10-22 at 11:10 -0400, Walker, Jeff wrote:
> You mentioned WS over JMS. Again, added delay, since another protocol
> layer is employed. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



==
This transmittal and any attachments may contain confidential, privileged or 
sensitive information and is solely for the use of the intended recipient. If 
you are not the intended recipient, you are hereby notified that you have 
received this transmittal and any attachments in error and any review, 
dissemination, distribution or copying thereof is strictly prohibited. If you 
have received this transmittal and any attachments in error please notify the 
sender and immediately destroy the message and all its attachments. Any 
opinions herein expressed may be those of the author and not necessarily of 
Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank (USA), Mizuho Securities USA 
Inc. or any other affiliates of Mizuho Financial Group (”Mizuho”). Mizuho 
accepts no responsibility for the accuracy or completeness of any information 
herein contained.
E-Mail received by or sent from officer of Mizuho Securities USA Inc. (which is 
a registered U.S. broker-dealer and the entity through which Mizuho generally 
conducts its investment banking, capital markets, and securities business in 
the United States) is electronically archived and recorded and is subject to 
review and monitoring by and/or disclosure to persons other than the recipient, 
including (but not limited to) Mizuho Securities USA Inc. supervisory 
personnel.  Such communications may be produced to regulatory authorities or 
others with legal rights to the information.


Re: Best way to realize stateful services architecture withmassivedata?

2007-10-22 Thread Michele Mazzucco

Jeff,

I think you forgot to mention the concurrency issues related with  
stateful WS. So, at least under this point of view, stateless WS are  
much more easier to build.


Michele


On 22 Oct 2007, at 17:08, Walker, Jeff wrote:


Ok,
So we have moved-off topic here.
My original email was to Florian Georg, who asked about stateful
services and very large data set transfer, via a stateful web service,
if I remember correctly.

Then Michele asked my opinion on stateful vs stateless.
My point here is that stateless services are far easier than stateful,
but almost useless because most situations require services in  
front of

stateful applications. That's an assertion that I'm sure many will
refute! That's fine, that's what this board is for. (I'm here to learn
as well).

Yes, stateful services are relatively easy to build from an  
engineering

point of view. But retrofitting them into an existing architecture is
very difficult. Also difficult is engineering them into an SOA.  
Most SOA

architectural layouts I have seen skirt the issue and assume stateless
services.

I haven't used WS-SecureConversation.

REST to me is a completely different approach to architecture. But
again, I've only read about it. I would think it also is not  
appropriate
for large data transfer. But I think it is stateless by default,  
right?


The unswimmable sea of WS-* specifications helps only to muddy the
waters. If there are no implementations, the specs mean little. I
thought Axis 2 implements only these:
WS-ReliableMessaging - Supported by Apache Sandesha2
WS-Coordination and WS-AtomicTransaction - Supported by Apache  
Kandula2

WS-Security - Supported by Apache Rampart
WS-Addressing -Module included as part of Axis2 core
-jeff




-Original Message-
From: robert lazarski [mailto:[EMAIL PROTECTED]
Sent: Monday, October 22, 2007 10:59 AM
To: axis-user@ws.apache.org
Subject: Re: Best way to realize stateful services architecture
withmassivedata?

On 10/22/07, Walker, Jeff <[EMAIL PROTECTED]> wrote:

You can definitely create stateful web services. It's just that they

are

very difficult to use. How do you force the client to make the

operation
calls in the expected calling sequence? The client will likely  
need to

keep track of the order of the operations it has called. This is
complicated book-keeping and often the client unable or unwilling to

do
this. Errors become a big issue. What do you do when the 5th call  
of 7
expected calls fails? Should you abandon altogether? How do you  
retry?

The complexity gets ugly, quickly.



Its not that difficult - its actually common and standardized via
WS-SecureConversation. I personally have also used my own UUID scheme
where WS-SecureConversation hasn't been supported on all sides. Coding
up your own scheme takes about 2-3 days depending on the programmer -
I've even seen beginner .net programmers implement UUID token passing
easily.

Calling DB transactions often also requires the right sequence, and
people get by just fine. EJB stateful web services may not be as easy
as a pojo, but people do that often enough too.

In short, anything is easier when its stateless. The whole idea though
behind WS-* is enterprise stuff like asynchronous calls, addressing,
conversations, transactions and reliability. A good case could be made
that its not needed a lot - that's where REST comes in. But if you do
need common usage patterns beyond simple HTTP get and post, there are
seemingly endless WS-* standards that thought of just about everything
- and axis2 implements most of them.

Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to deploy a service to own web-app where axis embaded?

2007-10-22 Thread Thomas Chang
Sure. Here is my solution:
   
  in Step4 do as follow:
  4. Deploy the service onto my web-app with:
org.apache.axis.wsdl.AdminClient  
lhttp://localhost:8080/myWebApp/services/WidgetPrice deploy.wsdd

That means, you have to add the param 
"lhttp://localhost:8080/myWebApp/services/WidgetPrice"; to run the Axis 
AdminClient against your own webapp, instead of Axis, by changing the URL you 
invoke it with. 
   
  Hope this help.
   
  Regards
   
  Thomas
   
   
  
Demetris G <[EMAIL PROTECTED]> schrieb:
  
Thomas - that's great - but always try to share the solutions with the 
list to help
someone else that may have the same problem. Much appreciated.

Thomas Chang wrote:
> Hi all,
>
> I solved my problem myself.
>
>
>
> */Thomas Chang /* schrieb:
>
> Hi all,
>
> I downloaded and installed the axis-1.4. I did the example6
> "Java2WSDL: Building WSDL from Java" in the package and it runs
> quite well. But in this example the web-service is deployed onto
> axis.
>
> Now I try to deploy the same web-service onto my own web-app but
> it failed. I've embeded the axis into my own web-app by copying
> all the sevlet and their mapping to my web.xml.
>
> I do as follow:
>
> 1. Provide a Java interface
> public interface WidgetPrice {
> public void setWidgetPrice(String widgetName, String price);
> public String getWidgetPrice(String widgetName);
> }
>
> 2. Create WSDL using Java2WSDL as follow:
> java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl 
> -l"http://localhost:8080/myWebApp/services/WidgetPrice"; -n 
> "urn:Example6"
> -p"samples.userguide.example6" "urn:Example6" 
> samples.userguide.example6.WidgetPrice
>
> A "wp.wsdl" -file is created.
>
>
> 3. Create Bindings using WSDL2Java with:
> java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -S true 
> -Nurn:Example6 samples.userguide.example6 wp.wsdl
>
> Several .java files and the deploy.wsdd, undeploy.wsdd are created.
>
> 4. Deploy the service onto my web-app with:
> java org.apache.axis.wsdl.AdminClient deploy.wsdd
>
> But after deployment I found the web-service is not deployed onto
> my own web-app but onto the axis though in step2 I've defined the
> server location is "http://localhost:8080/myWebApp/services...";.
>
> Could someone tell me the reason?
>
> Regards
>
> Thomas
>
> 
> Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie
> Yahoo! zu Ihrer Startseite!
> 
>
>
> 
> Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen 
> Sie´s mit dem neuen Yahoo! Mail 
> . 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



   
-
Ihr erstes Baby? Holen Sie sich Tipps von anderen Eltern.

Axis2/Java - Trouble building Axis2/Java from source

2007-10-22 Thread Michael Mole
I'm having trouble building Axis2/Java from source.  Can anyone tell me if 
I'm doing something wrong?

When I try to build Axis2 from source, it tells me this:
( I use this command: %mvn install )
2) wsdl4j:wsdl4j:jar:1.6.2

  Try downloading the file manually from the project website.

  Then, install it using the command:
  mvn install:install-file -DgroupId=wsdl4j -DartifactId=wsdl4j \
  -Dversion=1.6.2 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file 
there:   mvn deploy:deploy-file -Dg
roupId=wsdl4j -DartifactId=wsdl4j \
  -Dversion=1.6.2 -Dpackaging=jar -Dfile=/path/to/file \
   -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
1) org.apache.axis2:axis2-kernel:jar:1.3
2) wsdl4j:wsdl4j:jar:1.6.2


However, I get another error when I try to manually install wsdl4j, using 
this command:
C:\axis2java-1.3-src>mvn install:install-file 
-Dfile="C:\WSDL4J\wsdl4j-1_6_2\lib\wsdl4j.jar" -DgroupId=wsdl4j
-DartifactId=wsdl4j -Dversion=1.6.2 -Dpackaging=jar

[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Apache Axis 2.0 - Parent
[INFO]   Apache Axis 2.0 - Data Binding
[INFO]   Apache Axis 2.0 - Kernel
[INFO]   Apache Axis 2.0 - Code Generation
[INFO]   Apache Axis 2.0 - ADB Codegen
[INFO]   Apache Axis 2.0 - tool - MAR Maven Plugin
[INFO]   Apache Axis 2.0 - Addressing
[INFO]   Apache Axis 2.0 - Java2WSDL
[INFO]   Apache Axis 2.0 - Fast Infoset
[INFO]   Apache Axis 2.0 - MTOM Policy
[INFO]   Apache Axis 2.0 - SAAJ API
[INFO]   Apache Axis 2.0 - SAAJ
[INFO]   Apache Axis 2.0 - JAXWS API
[INFO]   Apache Axis 2.0 - JWS API
[INFO]   Apache Axis 2.0 - Metadata
[INFO]   Apache Axis 2.0 - JSON
[INFO]   Apache Axis 2.0 - Clustering
[INFO]   Apache Axis 2.0 - JAXWS
[INFO]   Apache Axis 2.0 - Scripting
[INFO]   Apache Axis 2.0 - JAXB-RI Data Binding
[INFO]   Apache Axis 2.0 - JiBX Data Binding
[INFO]   Apache Axis 2.0 - spring
[INFO]   Apache Axis 2.0 - XMLBeans Data Binding
[INFO]   Apache Axis 2.0 - Integration
[INFO]   Apache Axis 2.0 - MEX
[INFO]   Apache Axis 2.0 - MEX-Module
[INFO]   Apache Axis 2.0 - Ping
[INFO]   Apache Axis 2.0 - tool - AAR Maven Plugin
[INFO]   Apache Axis 2.0 - Version Service
[INFO]   Apache Axis 2.0 - SOAP Monitor
[INFO]   Apache Axis 2.0 - tool - Ant Plugin
[INFO]   Apache Axis 2.0 - Root
[INFO]   Apache Axis 2.0 - tool - Eclipse Codegen Plugin
[INFO]   Apache Axis 2.0 - tool - Eclipse service Plugin
[INFO]   Apache Axis 2.0 - tool - Intellij IDEA Plugin
[INFO]   Apache Axis 2.0 - tool - Java2WSDL Maven Plugin
[INFO]   Apache Axis 2.0 - tool - WSDL2Code Maven Plugin
[INFO]   Apache Axis 2.0 - Web Application module
[INFO]   Apache Axis 2.0 - Samples
[INFO] Searching repository for plugin with prefix: 'install'.
Downloading: 
http://ws.zones.apache.org/repository2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-ma
ven-plugin-1.6.2.pom
Downloading: 
http://repo1.maven.org/maven2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plugi
n-1.6.2.pom
Downloading: 
http://ws.zones.apache.org/repository2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-ma
ven-plugin-1.6.2.pom
Downloading: 
http://tomcat.apache.org/dev/dist/m2-repository/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axi
s2-mar-maven-plugin-1.6.2.pom
Downloading: 
http://people.apache.org/repo/m2-incubating-repository/org/apache/axis2/axis2-mar-maven-plugin/1
.
6.2/axis2-mar-maven-plugin-1.6.2.pom
Downloading: 
http://repo1.maven.org/eclipse/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plug
in-1.6.2.pom
Downloading: 
http://jibx.sourceforge.net/maven/org.apache.axis2/poms/axis2-mar-maven-plugin-1.6.2.pom
Downloading: 
http://download.java.net/maven/1//org.apache.axis2/poms/axis2-mar-maven-plugin-1.6.2.pom
Downloading: 
http://repo1.maven.org/maven2/org/apache/axis2/axis2-mar-maven-plugin/1.6.2/axis2-mar-maven-plugi
n-1.6.2.pom
[INFO] 

[ERROR] BUILD ERROR
[INFO] 

[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.axis2:axis2-mar-maven-plugin

Reason: POM 'org.apache.axis2:axis2-mar-maven-plugin' not found in 
repository: Unable to download the artifact
 from any repository

  org.apache.axis2:axis2-mar-maven-plugin:pom:1.6.2

from the specified remote repositories:
  apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository),
  eclipse-repo (http://repo1.maven.org/eclipse),
  ws-zones (http://ws.zones.apache.org/repository2),
  jibx (http://jibx.sourceforge.net/maven),
  apache-ws-snapshots2 (http://ws.zones.apache.org/repository2),
  central (http://repo1.maven.org/maven2),
  apache-incubating (
http://people.apache.org/repo/m2-incubating-repository),
  tomcat-repository (http://tomcat.apache.org/dev/dist/m2-repository),
  java.net (http://download.java.net/maven/1/),
  apa

Re: How to deploy a service to own web-app where axis embaded?

2007-10-22 Thread Demetris G


Thomas - that's great - but always try to share the solutions with the 
list to help

someone else that may have the same problem. Much appreciated.

Thomas Chang wrote:

Hi all,

I solved my problem myself.



*/Thomas Chang <[EMAIL PROTECTED]>/* schrieb:

Hi all,

I downloaded and installed the axis-1.4. I did the example6
"Java2WSDL: Building WSDL from Java" in the package and it runs
quite well. But in this example the web-service is deployed onto
axis.

Now I try to deploy the same web-service onto my own web-app but
it failed. I've embeded the axis into my own web-app by copying
all the sevlet and their mapping to my web.xml.

I do as follow:

1. Provide a Java interface
public interface WidgetPrice {
public void setWidgetPrice(String widgetName, String price);
public String getWidgetPrice(String widgetName);
}

2. Create WSDL using Java2WSDL as follow:
java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl 
-l"http://localhost:8080/myWebApp/services/WidgetPrice"; -n 
"urn:Example6"
-p"samples.userguide.example6" "urn:Example6" 
samples.userguide.example6.WidgetPrice


A "wp.wsdl" -file is created.


3. Create Bindings using WSDL2Java with:
java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -S true 
-Nurn:Example6 samples.userguide.example6 wp.wsdl


Several .java files and the deploy.wsdd, undeploy.wsdd are created.

4. Deploy the service onto my web-app with:
java org.apache.axis.wsdl.AdminClient deploy.wsdd

But after deployment I found the web-service is not deployed onto
my own web-app but onto the axis though in step2 I've defined the
server location is "http://localhost:8080/myWebApp/services...";.

Could someone tell me the reason?

Regards

Thomas


Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie
Yahoo! zu Ihrer Startseite!




Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen 
Sie´s mit dem neuen Yahoo! Mail 
. 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



error creating message from generated client

2007-10-22 Thread Kimberly Nicholls
I am having trouble creating a SOAP message from a generated client when 
the message includes attachments -- the client throws 
"org.apache.axiom.soap.SOAPProcessingException: First Element must 
contain the local name, Envelope , but found html."  I am using axis2 
1.3, and I can make requests to other methods (without attachments) in 
the same service with no problems.


Here's what I did:

- set enableMTOM to true in axis2.xml
- created method in my POJO service: public long createAttachment(long 
messageID, DataHandler attData) 
- generated client stub via wsdl2java

- added these lines to client stub:
   _serviceClient.getOptions().setProperty(
   Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
_serviceClient.getOptions().setTimeOutInMilliSeconds(1);
- created client that runs the method like this:
   DataHandler attData = new DataHandler(new 
FileDataSource(filename));

   long attachmentID = stub.createAttachment(messageID, attData);

When I run the client, I get

[INFO] OMException in getSOAPBuilder
org.apache.axiom.soap.SOAPProcessingException: First Element must 
contain the local name, Envelope , but found html
   at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:219)
   at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:177)
   at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:163)
   at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:161)
   at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.(StAXSOAPModelBuilder.java:110)
   at 
org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:609)
   at 
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:178)
   at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111)
   at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:87)
   at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326)
   at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
   at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
   at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

...
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element 
must contain the local name, Envelope , but found html
   at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:219)
   at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:177)
   at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:163)
   at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:161)
   at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.(StAXSOAPModelBuilder.java:110)
   at 
org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:609)
   at 
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:178)
   at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111)
   at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:87)

   ... 6 more


Running other methods in the same client with the same service work 
fine, if they don't have attachments.  The file I'm trying to send is a 
2.5k jpg.  What am I doing wrong?


Kimberly



RE: Best way to realize stateful services architecture withmassivedata?

2007-10-22 Thread Walker, Jeff
Very useful page. Thank you.
Swim easy.
-jeff




-Original Message-
From: robert lazarski [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 22, 2007 12:30 PM
To: axis-user@ws.apache.org
Subject: Re: Best way to realize stateful services architecture
withmassivedata?

On 10/22/07, Walker, Jeff <[EMAIL PROTECTED]> wrote:
>
> The unswimmable sea of WS-* specifications helps only to muddy the
> waters. If there are no implementations, the specs mean little. I
> thought Axis 2 implements only these:
> WS-ReliableMessaging - Supported by Apache Sandesha2
> WS-Coordination and WS-AtomicTransaction - Supported by Apache
Kandula2
> WS-Security - Supported by Apache Rampart
> WS-Addressing -Module included as part of Axis2 core
> -jeff
>

One man's "unswimmable sea" is a mere channel to cross in a few hours
for others. As for implementations, think again.

http://wiki.apache.org/ws/StackComparison

HTH,
Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best way to realize stateful services architecture withmassivedata?

2007-10-22 Thread robert lazarski
On 10/22/07, Walker, Jeff <[EMAIL PROTECTED]> wrote:
>
> The unswimmable sea of WS-* specifications helps only to muddy the
> waters. If there are no implementations, the specs mean little. I
> thought Axis 2 implements only these:
> WS-ReliableMessaging - Supported by Apache Sandesha2
> WS-Coordination and WS-AtomicTransaction - Supported by Apache Kandula2
> WS-Security - Supported by Apache Rampart
> WS-Addressing -Module included as part of Axis2 core
> -jeff
>

One man's "unswimmable sea" is a mere channel to cross in a few hours
for others. As for implementations, think again.

http://wiki.apache.org/ws/StackComparison

HTH,
Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best way to realize stateful services architecture withmassivedata?

2007-10-22 Thread Walker, Jeff
Ok,
So we have moved-off topic here.
My original email was to Florian Georg, who asked about stateful
services and very large data set transfer, via a stateful web service,
if I remember correctly.

Then Michele asked my opinion on stateful vs stateless.
My point here is that stateless services are far easier than stateful,
but almost useless because most situations require services in front of
stateful applications. That's an assertion that I'm sure many will
refute! That's fine, that's what this board is for. (I'm here to learn
as well).

Yes, stateful services are relatively easy to build from an engineering
point of view. But retrofitting them into an existing architecture is
very difficult. Also difficult is engineering them into an SOA. Most SOA
architectural layouts I have seen skirt the issue and assume stateless
services.

I haven't used WS-SecureConversation.

REST to me is a completely different approach to architecture. But
again, I've only read about it. I would think it also is not appropriate
for large data transfer. But I think it is stateless by default, right?

The unswimmable sea of WS-* specifications helps only to muddy the
waters. If there are no implementations, the specs mean little. I
thought Axis 2 implements only these: 
WS-ReliableMessaging - Supported by Apache Sandesha2 
WS-Coordination and WS-AtomicTransaction - Supported by Apache Kandula2 
WS-Security - Supported by Apache Rampart 
WS-Addressing -Module included as part of Axis2 core 
-jeff


 

-Original Message-
From: robert lazarski [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 22, 2007 10:59 AM
To: axis-user@ws.apache.org
Subject: Re: Best way to realize stateful services architecture
withmassivedata?

On 10/22/07, Walker, Jeff <[EMAIL PROTECTED]> wrote:
> You can definitely create stateful web services. It's just that they
are
> very difficult to use. How do you force the client to make the
operation
> calls in the expected calling sequence? The client will likely need to
> keep track of the order of the operations it has called. This is
> complicated book-keeping and often the client unable or unwilling to
do
> this. Errors become a big issue. What do you do when the 5th call of 7
> expected calls fails? Should you abandon altogether? How do you retry?
> The complexity gets ugly, quickly.
>

Its not that difficult - its actually common and standardized via
WS-SecureConversation. I personally have also used my own UUID scheme
where WS-SecureConversation hasn't been supported on all sides. Coding
up your own scheme takes about 2-3 days depending on the programmer -
I've even seen beginner .net programmers implement UUID token passing
easily.

Calling DB transactions often also requires the right sequence, and
people get by just fine. EJB stateful web services may not be as easy
as a pojo, but people do that often enough too.

In short, anything is easier when its stateless. The whole idea though
behind WS-* is enterprise stuff like asynchronous calls, addressing,
conversations, transactions and reliability. A good case could be made
that its not needed a lot - that's where REST comes in. But if you do
need common usage patterns beyond simple HTTP get and post, there are
seemingly endless WS-* standards that thought of just about everything
- and axis2 implements most of them.

Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Compiler Warnings After Code Generation

2007-10-22 Thread Hart, Leo
Hello,
 
I've used the wsdl2java command-line tool to create a client stub for my
WSDL.  The code works fine, however now I have hundreds of warnings in
Eclipse and my ant builds, pointing to the generated code.  Some of
these include:

*   Class is a raw type. References to generic type Class should
be parameterized
*   Empty block should be documented
*   HashSet is a raw type. References to generic type HashSet
should be parameterized
*   The local variable other is never read

Now I realize that I can go into the compiler settings within Eclipse
and turn off these warnings for a project, but I would like to receive
these warning for code my team has generated.  Does anyone have any
suggestions around suppressing/fixing these warnings?
 
Thanks,
Leo


RE: Best way to realize stateful servicesarchitecturewithmassivedata?

2007-10-22 Thread Walker, Jeff
Michele,
I'm not sure JMS is a viable alternative if large amounts of data are
transferred. That statement would imply there is some sort of size
cutoff. There isn't. Just remember, that with JMS you can have persisted
queues and then all of that data would have to be stored temporarily.
Personally, I think some of the lessons from JMS (message queuing in
general) can be applied to web services; keep the msgs as small as
possible.

Large data transfer (across the network) is a serious problem. There is
no easy solution that I've seen. Having said that, there are quite a few
posters who have used attachments with their web services. I have used
the older DIME format, but other posters have used the newer MTOM. I
would be interested to see what their performance was like, with large
files (ie. around a Gigabyte, say). Since MTOM chunks up the files,
transferring any sized file should theoretically be possible.

Does anyone have any opinions on using MTOM for transferring Gb and and
multi-Gb files??
-jeff


 

-Original Message-
From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 22, 2007 11:21 AM
To: axis-user@ws.apache.org
Subject: RE: Best way to realize stateful
servicesarchitecturewithmassivedata?

Jeff,

I mentioned JMS as possible choice if one has to transfer large amount
of data since it is asynchronous.

Michele

On Mon, 2007-10-22 at 11:10 -0400, Walker, Jeff wrote:
> You mentioned WS over JMS. Again, added delay, since another protocol
> layer is employed. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best way to realize stateful services architecturewithmassivedata?

2007-10-22 Thread Michele Mazzucco
Jeff,

I mentioned JMS as possible choice if one has to transfer large amount
of data since it is asynchronous.

Michele

On Mon, 2007-10-22 at 11:10 -0400, Walker, Jeff wrote:
> You mentioned WS over JMS. Again, added delay, since another protocol
> layer is employed. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question about merlin

2007-10-22 Thread Massimiliano Masi

Hi,

Quoting Massimiliano Masi <[EMAIL PROTECTED]>:


Yes. I used the same name and everything was working, but now I cannot.
I should sign the message with the key of the service itself, but
I need to authenticate another user.



I found the following in BindingBuilder.java:


  protected WSSecUsernameToken addUsernameToken(RampartMessageData  
rmd) throws RampartException {


log.debug("Adding a UsernameToken");

RampartPolicyData rpd = rmd.getPolicyData();

//Get the user
//First try options
Options options = rmd.getMsgContext().getOptions();
String user = options.getUserName();
if(user == null || user.length() == 0) {
//Then try RampartConfig
if(rpd.getRampartConfig() != null) {
user = rpd.getRampartConfig().getUser();
}
}


So, it means that to achieve my result I have to put options in the  
RampartMessageData messageContext. But How can I do this?


Thanks,


Massimiliano


This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best way to realize stateful services architecturewithmassivedata?

2007-10-22 Thread Walker, Jeff
Yes,
I agree. Coarse grained operations on the composite interface. But a
stateful service will be so difficult to build, coarse grained or not,
if you have little or no control over the clients. If you do have
control over them then a stateful service could possibly be the better
choice. (Just be careful with error situations).

I did forget network delay. Compare that to marshaling/unmarshaling of
data to XML for every fine-grained stateful call. Still, the composite
calls will take a long time and since it is difficult to estimate, the
client is better off making the calls asynchronously. That is the point
I really wanted to make.

You mentioned WS over JMS. Again, added delay, since another protocol
layer is employed. I've never built a web service running over JMS, but
it is certainly possible. Other posters have previously mentioned JMS
and web services. They might be able to help you out there.
-jeff


-Original Message-
From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 22, 2007 10:49 AM
To: axis-user@ws.apache.org
Subject: RE: Best way to realize stateful services
architecturewithmassivedata?

Ok, now I get your point. But solution # 3 will work *only* if the
"front-end" service exposes coarse grained operations, right? If so,
can't you expose coarse-grained operations in your stateful WS as well?

In point (c) of your conclusions you state that the third approach would
be a bit faster than the first one. However you forget to take the
network delay into account.

Michele

On Mon, 2007-10-22 at 10:38 -0400, Walker, Jeff wrote:
> Well,
> 
> 1st Approach: Stateful Service
> Most applications are finite state machines. People tend to want to
put
> a web service on the front of their application, to say they are "SOA
> compliant" or simply because they think a web service will give their
> application some advantage. But because the application itself is
> stateful, most likely a first attempt at the web service will produce
a
> stateful service.
> 
> You can definitely create stateful web services. It's just that they
are
> very difficult to use. How do you force the client to make the
operation
> calls in the expected calling sequence? The client will likely need to
> keep track of the order of the operations it has called. This is
> complicated book-keeping and often the client unable or unwilling to
do
> this. Errors become a big issue. What do you do when the 5th call of 7
> expected calls fails? Should you abandon altogether? How do you retry?
> The complexity gets ugly, quickly.
> 
> 
> 2nd Approach: Stateless Service
> Here, the designer begins to see that a stateless service is far
easier
> to handle and create. Any operation on the web service interface can
be
> called at any time. No sequence of calls is necessary. Each call is
> fully independent of each other. Errors are localized to that called
> operation, and soap faults sent back to the client are localized to
that
> operation. It's all very clean. It sounds great, but if my above
premise
> is true (that most applications are stateful) then how can you mesh
the
> multiple states of the application with a set of operations in a
> stateless service? What if a request comes in and is passed to the
> application and the application cannot service that request because it
> is no longer in a state that can satisfactorily create the right
> response?
> 
> 
> 3rd Approach: Intermediate Composite Service
> My suggestion (and it is just one of many possible design solutions,
I'm
> sure) is to create an intermediate web service that communicates to
the
> client. This intermediate, composite service offers a stateless
> interface to clients. Each stateless operation on it results in a
> sequence of stateful calls to the actual web service on behalf of the
> client. The composite has some intelligence to decide what to do when
> one of the calls in the middle of the sequence fails. (Usually it
> abandons the whole calling sequence and returns a soap fault to the
> client, but not always. It could conceivably abandon the current
> sequence and start a new one. But that requires memory of the calls
and
> data passed in previously, before the error occurred).
> 
> a). The client is saved from knowing anything about the statefulness
of
> your application.
> b). Your stateful application usually doesn't need altering. A big
plus
> if the code is old and hard to maintain.
> c). The composite service takes approx. as long as the sum of stateful
> calls would take. (Slightly less because the marshaling of data into
XML
> and back is less. It is only done on the one initial call from the
> client).
> d). Because the composite service is still a fairly long running
service
> (you don't know exactly how long it will take on each of its
> operations), it is best called asynchronously, but that is another
> story.
> e). There are drawbacks. It means another service has to be written,
> tested, maintained and deployed to production.

Re: Best way to realize stateful services architecture withmassivedata?

2007-10-22 Thread robert lazarski
On 10/22/07, Walker, Jeff <[EMAIL PROTECTED]> wrote:
> You can definitely create stateful web services. It's just that they are
> very difficult to use. How do you force the client to make the operation
> calls in the expected calling sequence? The client will likely need to
> keep track of the order of the operations it has called. This is
> complicated book-keeping and often the client unable or unwilling to do
> this. Errors become a big issue. What do you do when the 5th call of 7
> expected calls fails? Should you abandon altogether? How do you retry?
> The complexity gets ugly, quickly.
>

Its not that difficult - its actually common and standardized via
WS-SecureConversation. I personally have also used my own UUID scheme
where WS-SecureConversation hasn't been supported on all sides. Coding
up your own scheme takes about 2-3 days depending on the programmer -
I've even seen beginner .net programmers implement UUID token passing
easily.

Calling DB transactions often also requires the right sequence, and
people get by just fine. EJB stateful web services may not be as easy
as a pojo, but people do that often enough too.

In short, anything is easier when its stateless. The whole idea though
behind WS-* is enterprise stuff like asynchronous calls, addressing,
conversations, transactions and reliability. A good case could be made
that its not needed a lot - that's where REST comes in. But if you do
need common usage patterns beyond simple HTTP get and post, there are
seemingly endless WS-* standards that thought of just about everything
- and axis2 implements most of them.

Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SOAP 1.2 support

2007-10-22 Thread Kasper Frederiksen
I would seem we are verry reluctant to upgrade our Axis installation.  
Can you confirm that Axis 1.1 can't support SOAP 1.2?


-Kasper

On 17/10/2007, at 14.23, Anne Thomas Manes wrote:


Axis 1.4 supports SOAP 1.2 -- use the SOAP 1.2 Constants.

Anne

On 10/17/07, Kasper Frederiksen <[EMAIL PROTECTED]> wrote:

What version of the SOAP protocol does the current version (1.4) of
Axis implement?

I am using a system with Axis 1.1 installed, does this support the
1.2 version of the SOAP protocol?

/thanks
Kasper Frederiksen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Kasper Frederiksen
Developer
Basepoint Media
Højbro Plads 10
1200 København K
www.basepointmedia.com




RE: Best way to realize stateful services architecture withmassivedata?

2007-10-22 Thread Michele Mazzucco
Ok, now I get your point. But solution # 3 will work *only* if the
"front-end" service exposes coarse grained operations, right? If so,
can't you expose coarse-grained operations in your stateful WS as well?

In point (c) of your conclusions you state that the third approach would
be a bit faster than the first one. However you forget to take the
network delay into account.

Michele

On Mon, 2007-10-22 at 10:38 -0400, Walker, Jeff wrote:
> Well,
> 
> 1st Approach: Stateful Service
> Most applications are finite state machines. People tend to want to put
> a web service on the front of their application, to say they are "SOA
> compliant" or simply because they think a web service will give their
> application some advantage. But because the application itself is
> stateful, most likely a first attempt at the web service will produce a
> stateful service.
> 
> You can definitely create stateful web services. It's just that they are
> very difficult to use. How do you force the client to make the operation
> calls in the expected calling sequence? The client will likely need to
> keep track of the order of the operations it has called. This is
> complicated book-keeping and often the client unable or unwilling to do
> this. Errors become a big issue. What do you do when the 5th call of 7
> expected calls fails? Should you abandon altogether? How do you retry?
> The complexity gets ugly, quickly.
> 
> 
> 2nd Approach: Stateless Service
> Here, the designer begins to see that a stateless service is far easier
> to handle and create. Any operation on the web service interface can be
> called at any time. No sequence of calls is necessary. Each call is
> fully independent of each other. Errors are localized to that called
> operation, and soap faults sent back to the client are localized to that
> operation. It's all very clean. It sounds great, but if my above premise
> is true (that most applications are stateful) then how can you mesh the
> multiple states of the application with a set of operations in a
> stateless service? What if a request comes in and is passed to the
> application and the application cannot service that request because it
> is no longer in a state that can satisfactorily create the right
> response?
> 
> 
> 3rd Approach: Intermediate Composite Service
> My suggestion (and it is just one of many possible design solutions, I'm
> sure) is to create an intermediate web service that communicates to the
> client. This intermediate, composite service offers a stateless
> interface to clients. Each stateless operation on it results in a
> sequence of stateful calls to the actual web service on behalf of the
> client. The composite has some intelligence to decide what to do when
> one of the calls in the middle of the sequence fails. (Usually it
> abandons the whole calling sequence and returns a soap fault to the
> client, but not always. It could conceivably abandon the current
> sequence and start a new one. But that requires memory of the calls and
> data passed in previously, before the error occurred).
> 
> a). The client is saved from knowing anything about the statefulness of
> your application.
> b). Your stateful application usually doesn't need altering. A big plus
> if the code is old and hard to maintain.
> c). The composite service takes approx. as long as the sum of stateful
> calls would take. (Slightly less because the marshaling of data into XML
> and back is less. It is only done on the one initial call from the
> client).
> d). Because the composite service is still a fairly long running service
> (you don't know exactly how long it will take on each of its
> operations), it is best called asynchronously, but that is another
> story.
> e). There are drawbacks. It means another service has to be written,
> tested, maintained and deployed to production.
> 
> The best approach is obviously to simplify and just create a fully
> stateless service, if that will work with your application. But don't be
> surprised if it doesn't fit well.
> -jeff
> 
> 
> 
> 
> 
> 
> -Original Message-
> From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 22, 2007 9:41 AM
> To: axis-user@ws.apache.org
> Subject: RE: Best way to realize stateful services architecture
> withmassivedata?
> 
> On Mon, 2007-10-22 at 09:09 -0400, Walker, Jeff wrote:
> > 1. Web services shouldn't be stateful. (Far harder to keep that
> > promise than to recite it). My own current service is stateful, and it
> > breaks the SOA rules we have in place here, causing me no end to
> > issues. Removing the statefulness once it creeps into your project is
> > like getting blood from a stone. Best remedy is to create a composite
> > service that is stateless, and that talks to the client. It also
> > formulates a series of web service calls to your stateful service that
> > does the real work. The composite service then returns the result to
> > the client. BPEL could help here.
> 
> Jeff, can you tell me 

RE: Best way to realize stateful services architecture withmassivedata?

2007-10-22 Thread Walker, Jeff
Well,

1st Approach: Stateful Service
Most applications are finite state machines. People tend to want to put
a web service on the front of their application, to say they are "SOA
compliant" or simply because they think a web service will give their
application some advantage. But because the application itself is
stateful, most likely a first attempt at the web service will produce a
stateful service.

You can definitely create stateful web services. It's just that they are
very difficult to use. How do you force the client to make the operation
calls in the expected calling sequence? The client will likely need to
keep track of the order of the operations it has called. This is
complicated book-keeping and often the client unable or unwilling to do
this. Errors become a big issue. What do you do when the 5th call of 7
expected calls fails? Should you abandon altogether? How do you retry?
The complexity gets ugly, quickly.


2nd Approach: Stateless Service
Here, the designer begins to see that a stateless service is far easier
to handle and create. Any operation on the web service interface can be
called at any time. No sequence of calls is necessary. Each call is
fully independent of each other. Errors are localized to that called
operation, and soap faults sent back to the client are localized to that
operation. It's all very clean. It sounds great, but if my above premise
is true (that most applications are stateful) then how can you mesh the
multiple states of the application with a set of operations in a
stateless service? What if a request comes in and is passed to the
application and the application cannot service that request because it
is no longer in a state that can satisfactorily create the right
response?


3rd Approach: Intermediate Composite Service
My suggestion (and it is just one of many possible design solutions, I'm
sure) is to create an intermediate web service that communicates to the
client. This intermediate, composite service offers a stateless
interface to clients. Each stateless operation on it results in a
sequence of stateful calls to the actual web service on behalf of the
client. The composite has some intelligence to decide what to do when
one of the calls in the middle of the sequence fails. (Usually it
abandons the whole calling sequence and returns a soap fault to the
client, but not always. It could conceivably abandon the current
sequence and start a new one. But that requires memory of the calls and
data passed in previously, before the error occurred).

a). The client is saved from knowing anything about the statefulness of
your application.
b). Your stateful application usually doesn't need altering. A big plus
if the code is old and hard to maintain.
c). The composite service takes approx. as long as the sum of stateful
calls would take. (Slightly less because the marshaling of data into XML
and back is less. It is only done on the one initial call from the
client).
d). Because the composite service is still a fairly long running service
(you don't know exactly how long it will take on each of its
operations), it is best called asynchronously, but that is another
story.
e). There are drawbacks. It means another service has to be written,
tested, maintained and deployed to production.

The best approach is obviously to simplify and just create a fully
stateless service, if that will work with your application. But don't be
surprised if it doesn't fit well.
-jeff






-Original Message-
From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 22, 2007 9:41 AM
To: axis-user@ws.apache.org
Subject: RE: Best way to realize stateful services architecture
withmassivedata?

On Mon, 2007-10-22 at 09:09 -0400, Walker, Jeff wrote:
> 1. Web services shouldn't be stateful. (Far harder to keep that
> promise than to recite it). My own current service is stateful, and it
> breaks the SOA rules we have in place here, causing me no end to
> issues. Removing the statefulness once it creeps into your project is
> like getting blood from a stone. Best remedy is to create a composite
> service that is stateless, and that talks to the client. It also
> formulates a series of web service calls to your stateful service that
> does the real work. The composite service then returns the result to
> the client. BPEL could help here.

Jeff, can you tell me about a non-trivial stateless web service?
What is the difference between the first (i.e. the stateful WS talks to
the client) and the second approach (i.e. the stateful WS is hidden by a
stateless one)?

> 
> 2. Web services are not suitable for large data transfer, at all. I
> have found past about 20Mb of data per request/response and the
> service starts to timeout. That is even when RAM is added and
> processors are upgraded. On one of my previous web services gigs I was
> asked to build a web service to transfer files. They grew from 20Mb to
> 75Mb with few troubles except for the occasional timeout, then to 1
> 

Exception: AxisFault by undeploy Web-Service

2007-10-22 Thread Thomas Chang
Hi all,

I am successfully to deploy a web service on to my webapp. But as I try to 
undeploy it, it failed and throws exception as follow:

D:\Projekte\myWebApp>java org.apache.axis.client.AdminClient 
-lhttp://localhost:8080/myWebApp/services/WidgetPrice undeploy.wsdd

log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file undeploy.wsdd
Exception: AxisFault
 faultCode: {http://xml.apache.org/axis/}Client
 faultSubcode:
 faultString: No such operation 'undeployment'
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}hostname:dkv1085

Someone knows the reason?

Regards

Thomas

   
-
Ihr erstes Fernweh? Wo gibt es den schönsten Strand. 

RE: How to deploy a service to own web-app where axis embaded?

2007-10-22 Thread Thomas Chang
Hi all,

I solved my problem myself.



Thomas Chang <[EMAIL PROTECTED]> schrieb: Hi all,

I downloaded and installed the axis-1.4. I did the example6 "Java2WSDL: 
Building WSDL from Java" in the package and it runs quite well. But in this 
example the web-service is deployed onto axis. 

Now I try to deploy the same web-service onto my own web-app but it failed. 
I've embeded the axis into my own web-app by copying all the sevlet and their 
mapping to my web.xml.

I do as follow:

1. Provide a Java interface
public interface WidgetPrice {
public void setWidgetPrice(String widgetName, String price);
public String getWidgetPrice(String widgetName);
}

2. Create WSDL using Java2WSDL as follow:
java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl  
-l"http://localhost:8080/myWebApp/services/WidgetPrice"; -n  "urn:Example6" 
-p"samples.userguide.example6" "urn:Example6"   
samples.userguide.example6.WidgetPrice

A "wp.wsdl" -file is created.
 

3. Create Bindings using WSDL2Java with:
java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -S true  -Nurn:Example6 
samples.userguide.example6 wp.wsdl

Several .java files and the deploy.wsdd, undeploy.wsdd are created.

4. Deploy the service onto my web-app with:
java org.apache.axis.wsdl.AdminClient  deploy.wsdd

But after deployment I found the web-service is not deployed onto my own 
web-app but onto the axis though in step2 I've defined the server location is 
"http://localhost:8080/myWebApp/services...";.

Could someone tell me the reason?

Regards

Thomas

  

-
Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu Ihrer 
Startseite!

 
-
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit 
dem  neuen Yahoo! Mail. 

Re: Examples of Java2WSDL with methods that throw exceptions?

2007-10-22 Thread Mauro Molinari

Mauro Molinari ha scritto:

package com.cardinis.cardinis.webservice.access;

import com.cardinis.cardinis.webservice.CardinisWebServices;
import 
com.cardinis.webservice.ticketFramework.FailedConfigurationException;

import com.cardinis.webservice.ticketFramework.GenericTicketingException;
import com.cardinis.webservice.ticketFramework.InvalidArgumentException;

public class AccessServices extends CardinisWebServices {


Please note that the superclass 
com.cardinis.cardinis.webservice.CardinisWebServices adds no special 
behaviours to its subclasses, just some utility methods called in the 
body of AccessServices methods and that must not be exposed as web services.


--
Mauro Molinari
Software Developer
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Examples of Java2WSDL with methods that throw exceptions?

2007-10-22 Thread Mauro Molinari

Deepal Jayasinghe ha scritto:

Can you please post your java class ? or create a JIRA attaching the
java class

Thanks
Deepal


Hi Deepal,
thank you for your support.

This is my Java class: I removed the body of the methods because it's 
propretary (and a bit complex to attach) code:


package com.cardinis.cardinis.webservice.access;

import com.cardinis.cardinis.webservice.CardinisWebServices;
import com.cardinis.webservice.ticketFramework.FailedConfigurationException;
import com.cardinis.webservice.ticketFramework.GenericTicketingException;
import com.cardinis.webservice.ticketFramework.InvalidArgumentException;

public class AccessServices extends CardinisWebServices {

  public String loginByUsernamePassword(String username, String 
password) throws FailedConfigurationException, InvalidArgumentException, 
GenericTicketingException{

// [cut]
return "test";
  }

  public void logout(String ticket) throws 
FailedConfigurationException, InvalidArgumentException, 
GenericTicketingException {

// [cut]
  }
}

All those three exceptions (FailedConfigurationException, 
InvalidArgumentException, GenericTicketingException) are simple 
extensions of java.lang.Exception, with the same constructors and no 
special behaviour.


The WSDL generated using Axis2 1.3 Java2WSDL has some validation errors 
(given by Eclipse WTP), like:


src-resolve.4.2: Error resolving component 
'ns0:FailedConfigurationException'. It was detected that 
'ns0:FailedConfigurationException' is in namespace 
'http://ticketFramework.webservice.cardinis.com/xsd', but components 
from this namespace are not referenceable from schema document 
'file:///C://WEB-INF/services/accessServices/META-INF/accessServices.wsdl'. 
If this is the incorrect namespace, perhaps the prefix of 
'ns0:FailedConfigurationException' needs to be changed. If this is the 
correct namespace, then an appropriate 'import' tag should be added to 
'file:///C://WEB-INF/services/accessServices/META-INF/accessServices.wsdl'.


Thanks to some hints received in Eclipse WTP newsgroup, I was suggested 
that the definition of Exception is missing. So I tried to run Java2WSDL 
specyfing -xc java.lang.Exception

That problem went away, but then I have other problems, like:

- a problem with the ax21 namespace: I'm not expert in XML, but I think 
that the namespace definition 
xmlns:ax21="http://ticketFramework.webservice.cardinis.com/xsd"; should 
be in  rather than in ...


- many errors like:
cvc-identity-constraint.4.2.2: Duplicate key value 
[FailedConfigurationException] declared for identity constraint 
"message" of element "definitions".
I was told this is because I have two FailedConfigurationException 
message entries defined...


- one such error:
cvc-complex-type.2.4.a: Invalid content was found starting with element 
'wsdl:fault'. One of '{"http://schemas.xmlsoap.org/wsdl/":output}' is 
expected.
I was told this is because I would need an empty wsdl:output before the 
wsdl:fault...


I'm not reporting the whole WSDLs (maybe I should?) because I think you 
can get them by running Java2WSDL on the class above.


Thanks again for your help.

--
Mauro Molinari
Software Developer
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[axis2] Define policy in services.xml on operation level

2007-10-22 Thread Nencho Lupanov
Hi all,

do you know wheather it is valid to attach a policy in
services.xmldescriptor on operation level ,
i tryed this just by embedding the policy tag as a child of the operation
tag, just like i would done it on a service level but
it is not reflected in the wsdl - is that a problem in the wsdl generation
or i am doing something wrong?
You may found my services.xml attached

thanks,
Nencho


  http://sample03.policy.samples.rampart.apache.org";>
Web Service httpbasicauth
true

  http://schemas.xmlsoap.org/ws/2004/09/policy"; xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";>

  
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  

  
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
  

  

  


  
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";>
  

  

  

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  

  


  

  


  

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  


  

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"; xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
  

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
  

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
  

  
  
  

http://schemas.xmlsoap.org/ws/2004/09/policy"; xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";>
  

  http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>

  

  

  
  http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>

  

  
  

  

  

  
  http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>

  

  



  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Best way to realize stateful services architecture with massivedata?

2007-10-22 Thread Michele Mazzucco
On Mon, 2007-10-22 at 09:09 -0400, Walker, Jeff wrote:
> 1. Web services shouldn't be stateful. (Far harder to keep that
> promise than to recite it). My own current service is stateful, and it
> breaks the SOA rules we have in place here, causing me no end to
> issues. Removing the statefulness once it creeps into your project is
> like getting blood from a stone. Best remedy is to create a composite
> service that is stateless, and that talks to the client. It also
> formulates a series of web service calls to your stateful service that
> does the real work. The composite service then returns the result to
> the client. BPEL could help here.

Jeff, can you tell me about a non-trivial stateless web service?
What is the difference between the first (i.e. the stateful WS talks to
the client) and the second approach (i.e. the stateful WS is hidden by a
stateless one)?

> 
> 2. Web services are not suitable for large data transfer, at all. I
> have found past about 20Mb of data per request/response and the
> service starts to timeout. That is even when RAM is added and
> processors are upgraded. On one of my previous web services gigs I was
> asked to build a web service to transfer files. They grew from 20Mb to
> 75Mb with few troubles except for the occasional timeout, then to 1
> Gig in size. The remedy was to call the service asynchronously. There
> are various Microsoft and IBM websites that will explain that mode of
> calling. (If you need them, I can send you the article urls, I just
> don't have them handy right now).
> Remedy is to rethink your architecture. Web services will perform very
> badly for you on large data sets. (So bad as to be totally unusable).
> So simply don't use the web services for the data transfer. Try FTP
> instead, and use the web service to generate the files and pass back
> the address of where to find the files. It sounds like the granularity
> of your service is too fine-grained. You need to think in higher terms
> for the web service operations. 

What about WS with JMS?


Michele


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Examples of Java2WSDL with methods that throw exceptions?

2007-10-22 Thread Deepal Jayasinghe
Can you please post your java class ? or create a JIRA attaching the
java class

Thanks
Deepal

Mauro Molinari wrote:
> Hello to all!
> I'm new to this mailing list, so please sorry if I ask an already
> answered question.
>
> I was wondering if there's any resource with some examples of how to
> generate a WSDL from a POJO with methods that throw exceptions.
>
> As of now, I have many problems generating the WSDL for a class of
> mine with methods that throw exceptions: the generated WSDL has some
> validation problems.
>
> Thanks in advance for any hint.
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Hot Update and ServiceLifeCycle shutdown method

2007-10-22 Thread Walker, Jeff
scope="application"
I think.
-jeff
 

-Original Message-
From: sgopal [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 22, 2007 8:20 AM
To: axis-user@ws.apache.org
Subject: RE: Hot Update and ServiceLifeCycle shutdown method


Hi,
What is your scope set to in the service.xml for this service?

Thanks
srinivasan


dreamryder wrote:
> 
> Ok, I lied.
> ServiceLifecycle.destroy() does get called for me, after each request
is
> satisfied. (I missed it amongst all of my debug output).
> -jeff
>  
> 
> -Original Message-
> From: Walker, Jeff 
> Sent: Friday, October 19, 2007 11:31 AM
> To: axis-user@ws.apache.org
> Subject: RE: Hot Update and ServiceLifeCycle shutdown method
> 
> I have a question for you.
> Are you trying to use javax.xml.rpc.server.ServiceLifecycle, and
> expecting init() and destroy() to be called?
> 
> I get init() called when a request comes in, I can then call various
web
> services methods, but destroy() is NEVER called. Having said that, how
> can it determine that destroy() must be called and no more calls will
be
> made? By the way, I am using WebSphere's JAX-RPC implementation for
this
> web service.
> 
> Even when I shutdown the web service (in WebSphere 6.1 that can be
done
> by unloaded the project from the server) and still destroy() is never
> called.
> -jeff
> 
>  
> 
> -Original Message-
> From: sgopal [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 19, 2007 10:50 AM
> To: axis-user@ws.apache.org
> Subject: Hot Update and ServiceLifeCycle shutdown method
> 
> 
> Hi,
> I have a service running with a request scope and I have a
> servicelifecycle
> class for the service.
> In the startup method of the LifeCycle I initialized a connection to
the
> server using a singleton 
> and in the shutdown method I cleaned up the connection.
> 
> Everything worked fine until I tried the hot update feature.
> 
> The shutdown method was never called . So the cleanup never happened.
> 
> We have a constraint that there can be only one connection to the
server
> from the axis application.
> 
> Axis went and deployed the new AAR file.
> The old connection was never cleaned up and the  web service calls go
to
> the
> new AAR that was deployed
> which says there are no connections to the server.
> 
> How do I resolve this issue.
> 
> Thanks 
> Srinivasan
> 
> 
> 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Hot-Update-and-ServiceLifeCycle-shutdown-method-tf
> 4653738.html#a13296024
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Hot-Update-and-ServiceLifeCycle-shutdown-method-tf
4653738.html#a13342148
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best way to realize stateful services architecture with massivedata?

2007-10-22 Thread Walker, Jeff
Doesn't look like anyone replied. So here goes..
1. Web services shouldn't be stateful. (Far harder to keep that promise than to 
recite it). My own current service is stateful, and it breaks the SOA rules we 
have in place here, causing me no end to issues. Removing the statefulness once 
it creeps into your project is like getting blood from a stone. Best remedy is 
to create a composite service that is stateless, and that talks to the client. 
It also formulates a series of web service calls to your stateful service that 
does the real work. The composite service then returns the result to the 
client. BPEL could help here.

2. Web services are not suitable for large data transfer, at all. I have found 
past about 20Mb of data per request/response and the service starts to timeout. 
That is even when RAM is added and processors are upgraded. On one of my 
previous web services gigs I was asked to build a web service to transfer 
files. They grew from 20Mb to 75Mb with few troubles except for the occasional 
timeout, then to 1 Gig in size. The remedy was to call the service 
asynchronously. There are various Microsoft and IBM websites that will explain 
that mode of calling. (If you need them, I can send you the article urls, I 
just don't have them handy right now).
Remedy is to rethink your architecture. Web services will perform very badly 
for you on large data sets. (So bad as to be totally unusable). So simply don't 
use the web services for the data transfer. Try FTP instead, and use the web 
service to generate the files and pass back the address of where to find the 
files. It sounds like the granularity of your service is too fine-grained. You 
need to think in higher terms for the web service operations.
Just some thoughts.
-jeff

 

-Original Message-
From: Florian Georg [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 21, 2007 11:29 AM
To: axis-user@ws.apache.org
Subject: Best way to realize stateful services architecture with massivedata?

I´m currently thinking of the best way to realize data-intensive
"workflows" composed of web services (similar e.g. to a BPEL engine).
I´ll looking at Axis2 engine for that, but I´m unsure how it could fit
my special needs:

What I need to do is to be able to call subsequent operations on a
service (e.g. configure(), execute(), getNextResults(), reset(), ..).
Background is that these are very long running services which consume
and produce potentially some GBs of data.
The services are dependend of each other, e.g. execute() may only be
called after a predecessor service has successfully executed.
Produced data should be re-usable by differend nodes, e.g. passing
around and re-generate should be minimized.

What do you think of this?
What does Axis provide me for this scenario? 
Should I use, e.g. WS-Resource (Muse) for this? An ESB ?
Or should I even consider mapping this into BPEL and use a process
engine?
(ok, I´ll stop here before it becomes too off-topic)

Any remarks would be greatly appreciated.

thanks in advance
  -- Florian



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: unexpected subelement

2007-10-22 Thread Kahler, Jason J (US SSA)
I changed my type to xsd:anyType,
Interestingly enough now If I pass a string 
Such as aValue

I get a null pointer on the resulting OMElement
Evidently the string is not treated as a text node, nor is it 
Serialized into on OMElement with a string value of "aValue".


-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 19, 2007 8:25 AM
To: axis-user@ws.apache.org
Subject: Re: unexpected subelement

Your other alternative is to define the "value" element as "xs:anyType":

   

Anne

On 10/19/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:
>
>
>
> On 10/18/07, Kahler, Jason J (US SSA) <[EMAIL PROTECTED]>
wrote:
> > I have a wsdl that uses an xsd:any in a complexType.
> > When I submit request via SoapUI I get Unexpected subelement value.
I am
> > using adb as my databinding.
> >
> > Here is my WSDL snippet.
> >
> >
> > 
> > 
> >  minOccurs="1"
> > name="ParameterName" type="xsd:string"/>
> >  minOccurs="1"
> > name="queryOperator" type="tns:queryOperatorType"/>
> >  minOccurs="1"
> > name="value" type="tns:queryValueType">
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> >
> > 
> > 
> >
> >
> >
> > Soap Request:
> >
> >  > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> > xmlns:wfnp=" http://wfnp";>
> >   
> >
> > 
> >  
> >
> anyOldPAram
> > =
> > myValue
>
> this is an  invalid xml. since type is any then you should have a vail
xml
> inside value element
> try this
>  
> >  
> >   
> >
> > 
> >
> >
> > Soap Response:
> >
> >  > xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/";>
> >
> >   
> >  soapenv:Server
> >
> org.apache.axis2.databinding.ADBException :
> > Unexpected subelement value
> >  
> >   
> >
> > 
> >
> > I saw some posts about bugs, but I am using a new version of axis2.
> > Also I use an xsd:any in another service with no issues?
> >
> >
> >
> -
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SSL client keystore

2007-10-22 Thread Steven La Corte
   YAHOO.Shortcuts.hasSensitiveText = true; YAHOO.Shortcuts.sensitivityType = 
["adult"]; YAHOO.Shortcuts.doUlt = false; YAHOO.Shortcuts.location = "us"; 
YAHOO.Shortcuts.lang = "us"; YAHOO.Shortcuts.document_id = 0; 
YAHOO.Shortcuts.document_type = ""; YAHOO.Shortcuts.document_title = ""; 
YAHOO.Shortcuts.document_publish_date = ""; YAHOO.Shortcuts.document_author = 
""; YAHOO.Shortcuts.document_url = ""; YAHOO.Shortcuts.document_tags = ""; 
YAHOO.Shortcuts.annotationSet = { "lw_1193057957_0": { "text": 
"javax.net.ssl.ke", "extended": 0, "startchar": 573, "endchar": 581, "start": 
573, "end": 581, "extendedFrom": "", "predictedCategory": "", 
"predictionProbability": "0", "weight": 1, "type": 
["shortcuts:/us/place/virtual/web_site"], "category": ["IDENTIFIER"], 
"context": "if I set the System.properties javax.net.ssl.keyStore to the server 
keystore javax.net.ssl.trustStore" }, "lw_1193057957_1": { "text": 
"javax.net.ssl.tr", "extended": 0, "startchar": 620, "endchar": 628,
 "start": 620, "end": 628, "extendedFrom": "", "predictedCategory": "", 
"predictionProbability": "0", "weight": 1, "type": 
["shortcuts:/us/place/virtual/web_site"], "category": ["IDENTIFIER"], 
"context": "javax.net.ssl.keyStore to the server keystore 
javax.net.ssl.trustStore to the server keystore and" } };  
YAHOO.Shortcuts.overlaySpaceId = "97546169";  YAHOO.Shortcuts.hostSpaceId = 
"97546168";   I have create self signed certificates (using keytool) and 
keystores for a test server and client. The client posts messages to the server 
through an AXIS-2 1.3 service that is being served by Tomcat. The SSL port 
requires two way authentication. 
   
  The certificate for the client has been imported into the server keystore and 
the certificate for the server has been imported into client keystore.
   
  The client can connect and receive from the server if I set the 
System.properties javax.net.ssl.keyStore to the server keystore, 
javax.net.ssl.trustStore to the server keystore and the Keystore password. 
   
  When I try to set the trustStore, keyStore and password properties to the 
client keystore, I get a 'Bad certificate' exception. 
   
  I was able to create a PKS file from the client keystore and connect to the 
server using Firefox. When I try to connect using IE, the session connects but 
a warning is displayed that also indicates a 'Bad certificate'.
   
  Any thoughts. I really appreciate your help!
   
  Steve




Re: Question about merlin

2007-10-22 Thread Massimiliano Masi

Hi,

Quoting Nandana Mihindukulasooriya <[EMAIL PROTECTED]>:

I get rid of the
problem
by making the username of the UsernameToken and alias of the certificate the
same.
But I think this is not always possible.


Yes. I used the same name and everything was working, but now I cannot.
I should sign the message with the key of the service itself, but
I need to authenticate another user.



This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to deploy a service to own web-app where axis embaded?

2007-10-22 Thread Thomas Chang
Hi all,

I downloaded and installed the axis-1.4. I did the example6 "Java2WSDL: 
Building WSDL from Java" in the package and it runs quite well. But in this 
example the web-service is deployed onto axis. 

Now I try to deploy the same web-service onto my own web-app but it failed. 
I've embeded the axis into my own web-app by copying all the sevlet and their 
mapping to my web.xml.

I do as follow:

1. Provide a Java interface
public interface WidgetPrice {
public void setWidgetPrice(String widgetName, String price);
public String getWidgetPrice(String widgetName);
}

2. Create WSDL using Java2WSDL as follow:
java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl  
-l"http://localhost:8080/myWebApp/services/WidgetPrice"; -n  "urn:Example6" 
-p"samples.userguide.example6" "urn:Example6"  
samples.userguide.example6.WidgetPrice

A "wp.wsdl" -file is created.
 

3. Create Bindings using WSDL2Java with:
java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -S true  -Nurn:Example6 
samples.userguide.example6 wp.wsdl

Several .java files and the deploy.wsdd, undeploy.wsdd are created.

4. Deploy the service onto my web-app with:
java org.apache.axis.wsdl.AdminClient  deploy.wsdd

But after deployment I found the web-service is not deployed onto my own 
web-app but onto the axis though in step2 I've defined the server location is 
"http://localhost:8080/myWebApp/services...";.

Could someone tell me the reason?

Regards

Thomas


   
-
Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu Ihrer 
Startseite!

Re: Question about merlin

2007-10-22 Thread Nandana Mihindukulasooriya
Hi,
   I too came across the same problem when I wanted use both UsernameToken
as a supporting token and sign/encrypt using certificates. I get rid of the
problem
by making the username of the UsernameToken and alias of the certificate the
same.
But I think this is not always possible.
  Yes, password won't be a problem as the Password Callback is only called
when setting
the password of the Username Token. Password of the key store is given as a
crypto
property.

password

Regards,
Nandana

On 10/22/07, Massimiliano Masi <[EMAIL PROTECTED] > wrote:
>
> Hi all,
>
> I've a question about digital signature. I'm using ws-securitypolicy.
> I have a policy that wants to sign the body and I have an usernametoken.
>
> Policy policy = PolicyEngine.getPolicy(builder.getDocumentElement());
> RampartConfig rc = new RampartConfig();
> rc.setUser(username);
> rc.setEncryptionUser("client");
> rc.setPwCbClass(ClientPasswordCallbackHandler.class.getName());
>
> How can I set the username value? If I use rc.setUser, the username is
> also
> used as user for the keystore, and merlin won't instantiate.
> The callback returns with the password only (for the usernametoken, I
> think).
>
>
> Thanks,
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: Hot Update and ServiceLifeCycle shutdown method

2007-10-22 Thread sgopal

Hi,
What is your scope set to in the service.xml for this service?

Thanks
srinivasan


dreamryder wrote:
> 
> Ok, I lied.
> ServiceLifecycle.destroy() does get called for me, after each request is
> satisfied. (I missed it amongst all of my debug output).
> -jeff
>  
> 
> -Original Message-
> From: Walker, Jeff 
> Sent: Friday, October 19, 2007 11:31 AM
> To: axis-user@ws.apache.org
> Subject: RE: Hot Update and ServiceLifeCycle shutdown method
> 
> I have a question for you.
> Are you trying to use javax.xml.rpc.server.ServiceLifecycle, and
> expecting init() and destroy() to be called?
> 
> I get init() called when a request comes in, I can then call various web
> services methods, but destroy() is NEVER called. Having said that, how
> can it determine that destroy() must be called and no more calls will be
> made? By the way, I am using WebSphere's JAX-RPC implementation for this
> web service.
> 
> Even when I shutdown the web service (in WebSphere 6.1 that can be done
> by unloaded the project from the server) and still destroy() is never
> called.
> -jeff
> 
>  
> 
> -Original Message-
> From: sgopal [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 19, 2007 10:50 AM
> To: axis-user@ws.apache.org
> Subject: Hot Update and ServiceLifeCycle shutdown method
> 
> 
> Hi,
> I have a service running with a request scope and I have a
> servicelifecycle
> class for the service.
> In the startup method of the LifeCycle I initialized a connection to the
> server using a singleton 
> and in the shutdown method I cleaned up the connection.
> 
> Everything worked fine until I tried the hot update feature.
> 
> The shutdown method was never called . So the cleanup never happened.
> 
> We have a constraint that there can be only one connection to the server
> from the axis application.
> 
> Axis went and deployed the new AAR file.
> The old connection was never cleaned up and the  web service calls go to
> the
> new AAR that was deployed
> which says there are no connections to the server.
> 
> How do I resolve this issue.
> 
> Thanks 
> Srinivasan
> 
> 
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Hot-Update-and-ServiceLifeCycle-shutdown-method-tf
> 4653738.html#a13296024
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Hot-Update-and-ServiceLifeCycle-shutdown-method-tf4653738.html#a13342148
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



getting Server.userException

2007-10-22 Thread Sudhir Sharma
Hi All,

 

I am new to webservices and axis. While connecting to a .Net webservice
through java client I am getting this exception . can you axis gurus help me
on this.

Thanks in advance.

 

The exception is: 

 

AxisFault

 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

 faultSubcode: 

 faultString: java.net.ConnectException: Connection timed out: connect

 faultActor: 

 faultNode: 

 faultDetail: 

{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException:
Connection timed out: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

at java.net.Socket.connect(Socket.java:518)

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:597)

at
org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFact
ory.java:153)

at
org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFact
ory.java:120)

at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
32)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

at org.apache.axis.client.Call.invoke(Call.java:2767)

at org.apache.axis.client.Call.invoke(Call.java:2443)

at org.apache.axis.client.Call.invoke(Call.java:2366)

at org.apache.axis.client.Call.invoke(Call.java:1812)

at
uk.co.englandnet.gateway.IOGatewayWebservice.ProductServiceSoapStub.login(Pr
oductServiceSoapStub.java:1860)

at ProductSample.(ProductSample.java:13)

at ProductSample.main(ProductSample.java:58)

 

{http://xml.apache.org/axis/}hostname:neetu-goyal

 

java.net.ConnectException: Connection timed out: connect

at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
32)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

at org.apache.axis.client.Call.invoke(Call.java:2767)

at org.apache.axis.client.Call.invoke(Call.java:2443)

at org.apache.axis.client.Call.invoke(Call.java:2366)

at org.apache.axis.client.Call.invoke(Call.java:1812)

at
uk.co.englandnet.gateway.IOGatewayWebservice.ProductServiceSoapStub.login(Pr
oductServiceSoapStub.java:1860)

at ProductSample.(ProductSample.java:13)

at ProductSample.main(ProductSample.java:58)

Caused by: java.net.ConnectException: Connection timed out: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

at java.net.Socket.connect(Socket.java:518)

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:597)

at
org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFact
ory.java:153)

at
org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFact
ory.java:120)

at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

... 12 more

 

 

I am using axis 1.4 and jdk1.6. 

 

Thanks & Best Regards,

Sudhir Sharma

 



Re: axis2: create database connection by services in axis2 server

2007-10-22 Thread Antonio Manuel Muñiz Martín
All jars. It is the axis classpath.

Antonio.

2007/10/22, Qil. Wong <[EMAIL PROTECTED]>:
>
> Thanks,Antonio!
>
> Another question: should all the third party libraries used in the project
> be put into /axis2/WEB-INF/lib? or only the drivers?
>
>
> 2007/10/22, Antonio Manuel Muñiz Martín <[EMAIL PROTECTED]>:
> >
> > Put the db driver .jar in /axis2/WEB-INF/lib, all jars what you want to
> > use must go here.
> >
> > 2007/10/22, Qil. Wong < [EMAIL PROTECTED]>:
> > >
> > > Hi,
> > >
> > > I have one javase application and now I need to change it into
> > > axis2 webservice and publish it.
> > >
> > > While it was javase application, it run fine(certanlly, it could
> > > db connections). But after I change it into axis2 service, when the
> > > application tries to create database connection, there will be an 
> > > exception
> > > : no suitable driver. Actually, all the jdbc libs needed are in classpath.
> > >
> > > My method to get connection is from a common database pool(with
> > > apache libs:common-dbcp.jar,common-pool.jar), the database is
> > > sqlserver2000. If I get the connection directly by using:
> > > Class.forName(...), Connection conn = 
> > > DriverManager.getConnection(url,name,psw),
> > > I could get the connection successfully.
> > >
> > > Could anyone tell me how to solve it by using database connection
> > > pool?
> > >
> >
> >
>


Re: axis2: create database connection by services in axis2 server

2007-10-22 Thread Qil . Wong
Thanks,Antonio!

Another question: should all the third party libraries used in the project
be put into /axis2/WEB-INF/lib? or only the drivers?


2007/10/22, Antonio Manuel Muñiz Martín <[EMAIL PROTECTED]>:
>
> Put the db driver .jar in /axis2/WEB-INF/lib, all jars what you want to
> use must go here.
>
> 2007/10/22, Qil. Wong <[EMAIL PROTECTED]>:
> >
> > Hi,
> >
> > I have one javase application and now I need to change it into axis2
> > webservice and publish it.
> >
> > While it was javase application, it run fine(certanlly, it could db
> > connections). But after I change it into axis2 service, when the application
> > tries to create database connection, there will be an exception : no
> > suitable driver. Actually, all the jdbc libs needed are in classpath.
> >
> > My method to get connection is from a common database pool(with
> > apache libs:common-dbcp.jar,common-pool.jar), the database is
> > sqlserver2000. If I get the connection directly by using: 
> > Class.forName(...),
> > Connection conn = DriverManager.getConnection(url,name,psw), I could get
> > the connection successfully.
> >
> > Could anyone tell me how to solve it by using database connection
> > pool?
> >
>
>


Question about merlin

2007-10-22 Thread Massimiliano Masi

Hi all,

I've a question about digital signature. I'm using ws-securitypolicy.
I have a policy that wants to sign the body and I have an usernametoken.

Policy policy = PolicyEngine.getPolicy(builder.getDocumentElement());
RampartConfig rc = new RampartConfig();
rc.setUser(username);
rc.setEncryptionUser("client");
rc.setPwCbClass(ClientPasswordCallbackHandler.class.getName());

How can I set the username value? If I use rc.setUser, the username is also
used as user for the keystore, and merlin won't instantiate.
The callback returns with the password only (for the usernametoken, I think).


Thanks,


This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Examples of Java2WSDL with methods that throw exceptions?

2007-10-22 Thread Mauro Molinari

Hello to all!
I'm new to this mailing list, so please sorry if I ask an already 
answered question.


I was wondering if there's any resource with some examples of how to 
generate a WSDL from a POJO with methods that throw exceptions.


As of now, I have many problems generating the WSDL for a class of mine 
with methods that throw exceptions: the generated WSDL has some 
validation problems.


Thanks in advance for any hint.

--
Mauro Molinari
Software Developer
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: axis2: create database connection by services in axis2 server

2007-10-22 Thread Antonio Manuel Muñiz Martín
Put the db driver .jar in /axis2/WEB-INF/lib, all jars what you want to use
must go here.

2007/10/22, Qil. Wong <[EMAIL PROTECTED]>:
>
> Hi,
>
> I have one javase application and now I need to change it into axis2
> webservice and publish it.
>
> While it was javase application, it run fine(certanlly, it could db
> connections). But after I change it into axis2 service, when the application
> tries to create database connection, there will be an exception : no
> suitable driver. Actually, all the jdbc libs needed are in classpath.
>
> My method to get connection is from a common database pool(with apache
> libs:common-dbcp.jar,common-pool.jar), the database is sqlserver2000. If I
> get the connection directly by using: Class.forName(...), Connection conn
> = DriverManager.getConnection(url,name,psw), I could get the connection
> successfully.
>
> Could anyone tell me how to solve it by using database connection
> pool?
>


axis2: create database connection by services in axis2 server

2007-10-22 Thread Qil . Wong
Hi,

I have one javase application and now I need to change it into axis2
webservice and publish it.

While it was javase application, it run fine(certanlly, it could db
connections). But after I change it into axis2 service, when the application
tries to create database connection, there will be an exception : no
suitable driver. Actually, all the jdbc libs needed are in classpath.

My method to get connection is from a common database pool(with apache
libs:common-dbcp.jar,common-pool.jar), the database is sqlserver2000. If I
get the connection directly by using: Class.forName(...), Connection conn =
DriverManager.getConnection(url,name,psw), I could get the connection
successfully.

Could anyone tell me how to solve it by using database connection pool?


Re: Codegen for methods with no parameters

2007-10-22 Thread Amila Suriarachchi
On 10/20/07, Chris Rose <[EMAIL PROTECTED]> wrote:
>
> More on this:
>
> It turns out that the client stub that is generated is creating code
> that looks like this:
>
> //Style is taken to be "document". No input parameters
> // according to the WS-Basic profile in this case we have to send an
> empty soap message
> org.apache.axiom.soap.SOAPFactory factory =
> getFactory(_operationClient.getOptions().getSoapVersionURI());
> env = factory.getDefaultEnvelope();
>
> However, what _works_ is to add this line (from the RPC calling style):
> env.getBody().addChild(factory.createOMElement("getVersion",
> "http://ws.management.ecourier.aciworldwide.com/";, ""));


So could you over come the ealier issue?


are you invoking the wsdl2java generated service with the wsdl2java
generated client?
In here since there is no body(correct case) either you should have used a
soap action or
addressing to dispatch the operation correctly.

Amila.


So, the client and the server disagree as to how this method should be
> called.  Moreover, PHP SOAP doesn't work with it either; it appears to
> be non-interoperable.
>
> Has anyone else done this?  How on earth does one create 0-parameter
> methods in document/literal (wrapped) web service that will interoperate
> with PHP, .NET, and Java?
>
> Chris Rose wrote:
> >
> >
> > Amila Suriarachchi wrote:
> >>
> >>
> >> On 10/18/07, *Chris Rose* <[EMAIL PROTECTED]
> >> > wrote:
> >>
> >> I'm trying to tune the code generation and our WSDL for service
> >> methods
> >> with no parameters, which seems to be a fairly ill-documented
> >> process.
> >> I've been all over the place, and I see that there are some bugs in
> >> connection with this (AXIS-3199) which I've started watching, but I
> >> hoped that someone in the community at large can offer some
> >> insight into
> >> this.
> >>
> >> The method looks like this:
> >> public VersionBean getVersion ();
> >>
> >> Our WSDL (as noted in my comment on the bug report) looks like
> this:
> >> 
> >>   
> >> 
> >>
> >>  type='tns:getVersionResponse'/>
> >>
> >> 
> >>  
> >>>> type='ns2:versionBean'/>
> >>  
> >> 
> >>
> >> 
> >>  
> >>  
> >>  
> >> 
> >>
> >> 
> >>  
> >>   
> >>
> >>   
> >>  
> >> 
> >>
> >> 
> >>
> >> 
> >> 
> >> name='getVersionResponse'/>
> >> 
> >>
> >> 
> >>
> >> 
> >> 
> >>
> >> 
> >>
> >> What I'd like to see in the generated ServiceSkeletonInterface is a
> >> getVersion() method with the same signature pattern:  No
> parameters.
> >>
> >> What I get, instead, is a getVersion (GetVersion getVersion)
> method,
> >> which is awkward, as we use a reflection-based tool to map these
> >> methods
> >> to their implementation counterparts.  Divergence between actual
> >> implementation and interface is a problem, then.
> >>
> >>
> >>
> >>
> >> I've tried removing the  message in the operation element,
> >> but
> >> that results in no service whatsoever being generated.
> >>
> >>
> >> this is a problem with the axis2 adb unwrapping.  as a work around you
> >> can remove the
> >> part element from the input message. (Then nothing goes on the soap
> >> boady).
> >
> > That works from the service side; it generates interfaces that _look_
> > right, now, but when I invoke the methods in an axis2 client, I get
> this:
> >
> > rg.apache.axis2.AxisFault: The endpoint reference (EPR) for the
> > Operation not found is
> > http://localhost:8080/ecourier/services/OperationsManagerService and the
> > WSA Action =
> > at
> > org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
> :486)
> >
> > at
> > org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:343)
> >
> > at
> > org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:389)
> >
> > at
> > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:211)
> >
> > at
> > org.apache.axis2.client.OperationClient.execute(OperationClient.java
> :163)
> > at
> >
> com.aciworldwide.ecourier.management.ws.client.OperationsManagerServiceStub.findAllApplications
> (OperationsManagerServiceStub.java:763)
> >
> > at GetVersion.main(GetVersion.java:69)
> >
> >
> > How can I make the client build the correct message?
> >
> >> A second problem with the code generation:  We run the schema
> >> compiler
> >> multiple times, because we isolate our web services into individual
> >> deployment aars which are then assembled at deployment time into a
> >> final
> >> set of services.  What we end up with is things like the
> >> aforementioned
> >> GetVersion class, but with an integer suffix that is...
> frustrating,
> >> esp

Re: Codegen for methods with no parameters

2007-10-22 Thread Amila Suriarachchi
On 10/19/07, Chris Rose <[EMAIL PROTECTED]> wrote:
>
>
>
> Amila Suriarachchi wrote:
> >
> >
> > On 10/18/07, *Chris Rose* <[EMAIL PROTECTED]
> > > wrote:
> >
> > I'm trying to tune the code generation and our WSDL for service
> methods
> > with no parameters, which seems to be a fairly ill-documented
> process.
> > I've been all over the place, and I see that there are some bugs in
> > connection with this (AXIS-3199) which I've started watching, but I
> > hoped that someone in the community at large can offer some insight
> into
> > this.
> >
> > The method looks like this:
> > public VersionBean getVersion ();
> >
> > Our WSDL (as noted in my comment on the bug report) looks like this:
> > 
> >   
> > 
> >
> >  type='tns:getVersionResponse'/>
> >
> > 
> >  
> >type='ns2:versionBean'/>
> >  
> > 
> >
> > 
> >  
> >  
> >  
> > 
> >
> > 
> >  
> >   
> >
> >   
> >  
> > 
> >
> > 
> >
> > 
> > 
> > name='getVersionResponse'/>
> > 
> >
> > 
> >
> > 
> > 
> >
> > 
> >
> > What I'd like to see in the generated ServiceSkeletonInterface is a
> > getVersion() method with the same signature pattern:  No parameters.
> >
> > What I get, instead, is a getVersion (GetVersion getVersion) method,
> > which is awkward, as we use a reflection-based tool to map these
> > methods
> > to their implementation counterparts.  Divergence between actual
> > implementation and interface is a problem, then.
> >
> >
> >
> >
> > I've tried removing the  message in the operation element,
> but
> > that results in no service whatsoever being generated.
> >
> >
> > this is a problem with the axis2 adb unwrapping.  as a work around you
> > can remove the
> > part element from the input message. (Then nothing goes on the soap
> boady).
>
> That works from the service side; it generates interfaces that _look_
> right, now, but when I invoke the methods in an axis2 client, I get this:
>
> rg.apache.axis2.AxisFault: The endpoint reference (EPR) for the
> Operation not found is
> http://localhost:8080/ecourier/services/OperationsManagerService and the
> WSA Action =


this seems to be a dispatching problem. since you have change the context
root please check
whether the requests correctly goes to the axis2 servlet.


at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
> :486)
> at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:343)
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:389)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:211)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> at
>
> com.aciworldwide.ecourier.management.ws.client.OperationsManagerServiceStub.findAllApplications
> (OperationsManagerServiceStub.java:763)
> at GetVersion.main(GetVersion.java:69)
>
>
> How can I make the client build the correct message?
>
> > A second problem with the code generation:  We run the schema
> compiler
> > multiple times, because we isolate our web services into individual
> > deployment aars which are then assembled at deployment time into a
> final
> > set of services.  What we end up with is things like the
> aforementioned
> > GetVersion class, but with an integer suffix that is... frustrating,
> > especially when the fact that it's generated in a different package
> > each
> > time is taken into account.  It looks like the JavaBeanWriter is
> doing
> > this, but the name generation behaviour in it is not amenable to
> > overriding since it depends extensively on private variables.  Has
> > anyone got a better bean writer implementation they can suggest?
> >
> >
> > I fixed this issue. please have a look at with a nighly build.
> >
> >
> > I'm currently using the ADB code generator, if it makes a
> difference.
> > --
> > Chris Rose
> > DeveloperPlanet Consulting Group
> > (780) 577-8433
> > [EMAIL PROTECTED] 
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > 
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
> --
> Chris Rose
> DeveloperPlanet Consulting Group
> (780) 577-8433
> [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROT

Re: Codegen for methods with no parameters

2007-10-22 Thread Amila Suriarachchi
On 10/19/07, Chris Rose <[EMAIL PROTECTED]> wrote:
>
> On 19-Oct-07, at 2:49 AM, Amila Suriarachchi wrote:
> > On 10/18/07, Chris Rose <[EMAIL PROTECTED]> wrote: I'm
> > trying to tune the code generation and our WSDL for service methods
> > with no parameters, which seems to be a fairly ill-documented process.
> > I've been all over the place, and I see that there are some bugs in
> > connection with this (AXIS-3199) which I've started watching, but I
> > hoped that someone in the community at large can offer some insight
> > into
> > this.
> >
> > The method looks like this:
> > public VersionBean getVersion ();
> >
> > Our WSDL (as noted in my comment on the bug report) looks like this:
> > 
> >   
> > 
> >
> > 
> >
> > 
> >  
> >   
> >  
> > 
> >
> > 
> >  
> >  
> >  
> > 
> >
> > 
> >  
> >   
> >
> >   
> >  
> > 
> >
> > 
> >
> > 
> > 
> >
> > 
> >
> > 
> >
> > 
> > 
> >
> > 
> >
> > What I'd like to see in the generated ServiceSkeletonInterface is a
> > getVersion() method with the same signature pattern:  No parameters.
> >
> > What I get, instead, is a getVersion (GetVersion getVersion) method,
> > which is awkward, as we use a reflection-based tool to map these
> > methods
> > to their implementation counterparts.  Divergence between actual
> > implementation and interface is a problem, then.
> >
> >
> >
> > I've tried removing the  message in the operation element, but
> > that results in no service whatsoever being generated.
> >
> > this is a problem with the axis2 adb unwrapping.  as a work around
> > you can remove the
> > part element from the input message. (Then nothing goes on the soap
> > boady).
> >
> >
> > A second problem with the code generation:  We run the schema compiler
> > multiple times, because we isolate our web services into individual
> > deployment aars which are then assembled at deployment time into a
> > final
> > set of services.  What we end up with is things like the
> > aforementioned
> > GetVersion class, but with an integer suffix that is... frustrating,
> > especially when the fact that it's generated in a different package
> > each
> > time is taken into account.  It looks like the JavaBeanWriter is doing
> > this, but the name generation behaviour in it is not amenable to
> > overriding since it depends extensively on private variables.  Has
> > anyone got a better bean writer implementation they can suggest?
> >
> > I fixed this issue. please have a look at with a nighly build.
> >
> Good to know, but I am required to work with released versions of
> Axis only, for now.  Depending on the timing of a release vs. the
> release of our product, I might be able to justify changing the version.
>
> How stable are the nightlies?  Can I drop one in as a production engine?


not a good idea. But you can do this.
get a nighly build and generate the classes. and then create the service
archive (.aar) from it
deploy this service archive file in a released version server.

So you use nighly build only to generate code. and you can test this
generated code and veryfy
any issues.

>
> >
> > I'm currently using the ADB code generator, if it makes a difference.
> > --
> > Chris Rose
> > DeveloperPlanet Consulting Group
> > (780) 577-8433
> > [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
> --
> Chris Rose
> DeveloperPlanet Consulting Inc.
> 424-4922 ext 339
> [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.