Topics for discussion at Microsoft re: Axis interop with .NET, Windows

2008-02-21 Thread Bjorn Townsend


(crossposted on the user and dev lists)

I'm heading to Microsoft next week along with a number of other Apache  
folks to meet with them about improving compatibility between Apache  
projects and Windows Server 2008. I'd like to get input from the  
community as far as what people would like me to talk to them about.  
I'm especially looking for test cases you'd like me to try out to make  
sure compatibility is maintained, and also to find out about any  
existing interop problems you might be encountering in current versions.


If you could provide your feedback some time before Monday morning  
Pacific time (GMT -8), I'd be most grateful. I'll be there through  
Wednesday, so if you're not able to provide feedback before Monday  
there is some leeway.


Thanks!

Bjorn

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



Re: WSDL parser

2008-02-21 Thread Sukma Agung Verdianto
Hi Demetris,
To read a local file you could simply use "file:///path/to/wsdl/file.wsdl"
as readWSDL argument -> reader.readWSDL("file:///path/to/your/wsdl");,
Or if you have a WSDL serialized in String, you could use reader.readWSDL(
null, new InputSource(new StringReader(wsdlString)));

Regards,
Sukma

On Fri, Feb 22, 2008 at 1:22 PM, Demetris G <[EMAIL PROTECTED]> wrote:

>
> Hi all,
>
>does anyone know of a piece of code similar to the one below that
> can read/parse  a local WSDL file
> serialized in a string rather than a remote WSDL given by a URI?
>
> Thanks
>
> Sukma Agung Verdianto wrote:
> > Hi Demetris,
> >
> > You can try to use wsdl4j (http://sourceforge.net/projects/wsdl4j) to
> > get the operations of specified wsdl file. (AFAIK, Axis2 uses this in
> > their wsdl2java code)
> >
> > public static void main(String[] args) throws Exception {
> >
> > WSDLFactory fac = WSDLFactoryImpl.newInstance();
> >
> > WSDLReader reader = fac.newWSDLReader();
> >
> > Definition def =
> > reader.readWSDL("http://api.google.com/GoogleSearch.wsdl";);
> >
> > Map services = def.getServices();
> >
> > for(Object serviceKey : services.keySet()) {
> >
> > QName serviceQName = (QName) serviceKey;
> >
> > Service service = (Service) services.get(serviceQName);
> >
> > System.out.println("Namespace: " +
> > service.getQName().getNamespaceURI() + ", Service Name: " +
> > service.getQName().getLocalPart());
> >
> > Map ports = service.getPorts();
> >
> > for(Object portKey : ports.keySet()) {
> >
> > String portName = (String) portKey;
> >
> > Port port = (Port) ports.get(portName);
> >
> > System.out.println("  Namespace: " +
> > port.getBinding().getQName().getNamespaceURI() + ", Binding Name: " +
> > port.getBinding().getQName().getLocalPart());
> >
> > List operations = port.getBinding().getBindingOperations();
> >
> > for(Object operation : operations) {
> >
> > BindingOperation op = (BindingOperation) operation;
> >
> > System.out.print("Operation Name: " + op.getName());
> >
> > List ll = op.getExtensibilityElements();
> >
> > for(Object soap : ll) {
> >
> > if(SOAPOperation.class.isInstance(soap)) {
> >
> > System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI() + ")");
> >
> > }
> >
> > }
> >
> > System.out.println();
> >
> > }
> >
> > }
> >
> > }
> >
> > }
> >
> >
> > Above code read remote wsdl, and extract its information.
> >
> > Regards,
> > Sukma
> >
> > On Feb 17, 2008 2:09 PM, Demetris G <[EMAIL PROTECTED]
> > > wrote:
> >
> >
> > Hi all,
> >
> >I am trying to use the wsdlParser from the Axis API to parse
> > the methods
> > out of an incoming WSDL file - does anyone who has used this
> > before have
> > any info on how to use this tool? OR any other way I could get the
> > operations
> > of the remote service out of the WSDL file? I would appreciate it.
> >
> > Thanks
> >
> >
> >
> -
> > 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: WSDL parser

2008-02-21 Thread Demetris G


Hey Sukma,

   thanks for the response - I oringally went with the second option 
but I was getting an exception
on the StringReader. I think I know what the problem is - at least you 
verified for me that I am on

the right path. I appreciate it.

Many regards once again

Sukma Agung Verdianto wrote:

Hi Demetris,

To read a local file you could simply use 
"file:///path/to/wsdl/file.wsdl" as readWSDL argument 
-> reader.readWSDL("file:///path/to/your/wsdl");,
Or if you have a WSDL serialized in String, you could 
use reader.readWSDL(null, new InputSource(new StringReader(wsdlString)));


Regards,
Sukma

On Fri, Feb 22, 2008 at 1:22 PM, Demetris G <[EMAIL PROTECTED] 
> wrote:



Hi all,

   does anyone know of a piece of code similar to the one below that
can read/parse  a local WSDL file
serialized in a string rather than a remote WSDL given by a URI?

Thanks

Sukma Agung Verdianto wrote:
> Hi Demetris,
>
> You can try to use wsdl4j
(http://sourceforge.net/projects/wsdl4j) to
> get the operations of specified wsdl file. (AFAIK, Axis2 uses
this in
> their wsdl2java code)
>
> public static void main(String[] args) throws Exception {
>
> WSDLFactory fac = WSDLFactoryImpl.newInstance();
>
> WSDLReader reader = fac.newWSDLReader();
>
> Definition def =
> reader.readWSDL("http://api.google.com/GoogleSearch.wsdl";);
>
> Map services = def.getServices();
>
> for(Object serviceKey : services.keySet()) {
>
> QName serviceQName = (QName) serviceKey;
>
> Service service = (Service) services.get(serviceQName);
>
> System.out.println("Namespace: " +
> service.getQName().getNamespaceURI() + ", Service Name: " +
> service.getQName().getLocalPart());
>
> Map ports = service.getPorts();
>
> for(Object portKey : ports.keySet()) {
>
> String portName = (String) portKey;
>
> Port port = (Port) ports.get(portName);
>
> System.out.println("  Namespace: " +
> port.getBinding().getQName().getNamespaceURI() + ", Binding
Name: " +
> port.getBinding().getQName().getLocalPart());
>
> List operations = port.getBinding().getBindingOperations();
>
> for(Object operation : operations) {
>
> BindingOperation op = (BindingOperation) operation;
>
> System.out.print("Operation Name: " + op.getName());
>
> List ll = op.getExtensibilityElements();
>
> for(Object soap : ll) {
>
> if(SOAPOperation.class.isInstance(soap)) {
>
> System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI()
+ ")");
>
> }
>
> }
>
> System.out.println();
>
> }
>
> }
>
> }
>
> }
>
>
> Above code read remote wsdl, and extract its information.
>
> Regards,
> Sukma
>
> On Feb 17, 2008 2:09 PM, Demetris G <[EMAIL PROTECTED]

> >> wrote:
>
>
> Hi all,
>
>I am trying to use the wsdlParser from the Axis API to parse
> the methods
> out of an incoming WSDL file - does anyone who has used this
> before have
> any info on how to use this tool? OR any other way I could
get the
> operations
> of the remote service out of the WSDL file? I would
appreciate it.
>
> Thanks
>
>
>
-

> 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: Axis2 changes the content of my static WSDL

2008-02-21 Thread Guy Rouillier
Hello from an Axis2 newbie.  I joined too late to reply to the subject 
thread, which addresses getting Axis2 to report the original WSDL.  Here 
is what Upul Godage said there on 2008-02-05:


> There is another parameter.  modifyUserWSDLPortAddress Try adding this
> parameter also with the value false.
>
> true
> false

This works.  For me, both parameters are required.  You must have these 
parameter definitions all on one line.  Following the example in the 
Axis2 Quick Start Guide (see Code Listing 3: The Service Definition 
File), I originally coded these like so:



   true


   false


This does *not* work; when I use this format, Axis2 does not supply the 
original WSDL.  I lost a couple hours on this, unfortunately.  Posting 
this in the hopes that it will save someone else the time.


--
Guy Rouillier

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



Re: WSDL parser

2008-02-21 Thread Demetris G


Hi all,

   does anyone know of a piece of code similar to the one below that 
can read/parse  a local WSDL file

serialized in a string rather than a remote WSDL given by a URI?

Thanks

Sukma Agung Verdianto wrote:

Hi Demetris,

You can try to use wsdl4j (http://sourceforge.net/projects/wsdl4j) to 
get the operations of specified wsdl file. (AFAIK, Axis2 uses this in 
their wsdl2java code)


public static void main(String[] args) throws Exception {

WSDLFactory fac = WSDLFactoryImpl.newInstance();

WSDLReader reader = fac.newWSDLReader();

Definition def = 
reader.readWSDL("http://api.google.com/GoogleSearch.wsdl";);


Map services = def.getServices();

for(Object serviceKey : services.keySet()) {

QName serviceQName = (QName) serviceKey;

Service service = (Service) services.get(serviceQName);

System.out.println("Namespace: " + 
service.getQName().getNamespaceURI() + ", Service Name: " + 
service.getQName().getLocalPart());


Map ports = service.getPorts();

for(Object portKey : ports.keySet()) {

String portName = (String) portKey;

Port port = (Port) ports.get(portName);

System.out.println("  Namespace: " + 
port.getBinding().getQName().getNamespaceURI() + ", Binding Name: " + 
port.getBinding().getQName().getLocalPart());


List operations = port.getBinding().getBindingOperations();

for(Object operation : operations) {

BindingOperation op = (BindingOperation) operation;

System.out.print("Operation Name: " + op.getName());

List ll = op.getExtensibilityElements();

for(Object soap : ll) {

if(SOAPOperation.class.isInstance(soap)) {

System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI() + ")");

}

}

System.out.println();

}

}

}

}


Above code read remote wsdl, and extract its information.

Regards,
Sukma

On Feb 17, 2008 2:09 PM, Demetris G <[EMAIL PROTECTED] 
> wrote:



Hi all,

   I am trying to use the wsdlParser from the Axis API to parse
the methods
out of an incoming WSDL file - does anyone who has used this
before have
any info on how to use this tool? OR any other way I could get the
operations
of the remote service out of the WSDL file? I would appreciate it.

Thanks


-
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: axis2 status of rpc encoding

2008-02-21 Thread Amila Suriarachchi
I started adding rpc/encoding some times ago and there are some suggestions
for that. I have to finish it.
The current status is not completed. Most probably this will available with
Axis2 1.4 release.

Please create a jira with your wsdl.

thanks,
Amila.

On Thu, Feb 21, 2008 at 6:45 PM, John Langley <[EMAIL PROTECTED]>
wrote:

> Thank you for your reply Martin,
>
> I'm digging into the problem more now. The offending service is defined
> by some wsdl that is complex enough to potentially obscure the problem.
> I will try and recreate the problem with a simple example and forward on
> the results as I get them.
>
> Thanks again for the reply! It helps to know that there is sample / test
> code that I can dig into. One of the things I will probably do is
> recreate the axis2 test but implement it with the service side being
> built and delivered with axis1 tools.
>
> -- Langley
>
>
>
> On Wed, 2008-02-20 at 09:44 -0500, Martin Gainty wrote:
> > Hi John
> >
> > 2 questions:
> > 1)Cant help without looking at the wsdl for a service with a pingReturn
> > operation
> > 2)rpc is supported as exemplified style="rpc" attribute illustrated in
> > intergration/test-resources/rpc/test-rpc-2.wsdl
> >  
> >  > transport="http://schemas.xmlsoap.org/soap/http"/>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > HTH
> > Martin--
> > 978-400-7544
> >
> > - Original Message -
> > From: "John Langley" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Wednesday, February 20, 2008 8:43 AM
> > Subject: axis2 status of rpc encoding
> >
> >
> > > Hi,
> > >   I've been trying to use Axis2 to generate java classes (using
> > > wsdl2java.sh) from wsdl for that describes an rpc/literal service
> > > delivered from Axis1. Regardless of which options I choose I seem to
> > > consistently get a complaint about an "unexpected subelement".
> > >
> > > "org.apache.axis2.databinding.ADBException: Unexpected subelement
> > > pingReturn
> > > org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> > > Unexpected subelement pingReturn"
> > >
> > >
> > >   What is the official status of rpc encoding support in Axis2? I've
> > > seen Jira issues that have a status of "resolved" around this, but I
> see
> > > comments on the user mailing list suggesting that axis2 does not
> support
> > > rpc encoding.
> > >
> > > Can anyone comment on either: 1) the official status of rpc encoding
> > > support or 2) their personal experience with it?
> > >
> > > Thanks in advance
> > >
> > > -- Langley
> > >
> > >
> > > -
> > > 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]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.


SCT

2008-02-21 Thread Hardev Sian
 
   
  I know that rahas has been integrated into rampart but I was interested at 
looking at this example : 
  
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/RahasScenario3Test.java
   
  which talks about using an acquired SCT token to secure the web service 
requests/responses.
   
  Can anybody help in locating this or something similar.
   
  Thanks,
   
  Hardev

   
-
Get the name you always wanted with the new y7mail email address.

Re: ConfigurationContext and servletContext

2008-02-21 Thread Deepal jayasinghe

mathieu fabre wrote:

Hi,

I work on a webapp and I write my own transport (transportListener and 
transportSender)

I use an axisServlet configured with axis2.xml.

i need to obtain the servlet context during the configuration of my 
transport (init() method)


Is it possible to obtain the servlet context by using 
ConfigurationContext of axis...?

Yes you can using the following code,

ServletContext contxt = 
configContext.getProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT);


Thanks
Deepal


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



Re: Nightly Rampart Build?

2008-02-21 Thread Nandana Mihindukulasooriya
Hi Simon,

> Is there a nightly rampart build available.

http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/

regards,
/nandana

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



axis2 error on Sun app server 8.1

2008-02-21 Thread wxtech

Hi, I tried to deploy axis2 1.3 sample web service StockQuoteService
on SunOne app server 8.1, and I keep getting errors when trying using
http (and same error using Java client):

http://localhost:8080/axis2/services/StockQuoteService/getPrice?symbo...
Response:

unknown


On Server side, error in server.log:
[#|2008-02-21T16:06:02.638-0500|SEVERE|sun-appserver-ee8.1_02|
javax.enterprise.system.container.web|_ThreadID=12;|
org.apache.catalina.core.
[EMAIL PROTECTED]: Exception Processing
ErrorPage[errorCode=500, location=/axis2-web/Error/error500.jsp]
java.lang.IllegalStateException
at org.apache.coyote.Response.reset(Response.java:302)
at
org.apache.coyote.tomcat5.CoyoteResponse.reset(CoyoteResponse.java:
665)
at
org.apache.coyote.tomcat5.CoyoteResponse.reset(CoyoteResponse.java:
931)
at
org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:
418)
at
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:
330)
at
org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:
177)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
552)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at
com.sun.enterprise.web.connector.httpservice.HttpServiceProcessor.process(HttpServiceProcessor.java:
226)
at
com.sun.enterprise.web.HttpServiceWebContainer.service(HttpServiceWebContainer.java:
2071)
|#]

Anyone has similar experience or any clue? Thanks. 
-- 
View this message in context: 
http://www.nabble.com/axis2-error-on-Sun-app-server-8.1-tp15619433p15619433.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Maven2 project

2008-02-21 Thread Lukasz Lenart
Hi,

I want to setup maven2 project with axis2, but I can't find any
example. What I want to achieve, is to build server-side classes from
given WSDLs, implement the skeletons and build aar archive and maybe,
deploy them to given server.

Could you someone share with me the pom.xml, how it should be
configured? But not some parts, I want to see whole pom.xml, with all
dependencies, plugins, goals, etc. Something like "know-how" ;-)


Thanks in advance
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



RE: Badly formed XML response with array of complex types

2008-02-21 Thread Alick Buckley
Hi Gordon,
 
This type of problem has been posted before, it was quite some time ago, you
could search Axis mail list.
 
You could look at upgrading from Axis 1.3 to Axis 1.4.
 
I had no problems  when  upgrading from Axis 1.3 to Axis 1.4.
 
I use Axis 1.4 and have no problems with sending and receiving int arrays.
 
I happen to have a test SOAP service that sends and receive numbers inside a
bean. ( See attachments )
 
Attached is the WSDL and a sample SOAP request message.
 
I use Axis in a custom built standalone mode.
 
Note: When I create a JavaBean class, I also include the Apache Axis
Meta-Data, to help the Axis serialization process.
 

 
elemField = new org.apache.axis.description.ElementDesc () ;

elemField.setFieldName ( "a_int" ) ;

elemField.setXmlName ( new javax.xml.namespace.QName (
"http://soap.service.acme.com";, "a_int" ) ) ;

elemField.setXmlType ( new javax.xml.namespace.QName (
"http://www.w3.org/2001/XMLSchema";, "int" ) ) ;

elemField.setNillable ( true ) ;

elemField.setItemQName ( new javax.xml.namespace.QName (
"http://soap.service.acme.com";, "item" ) ) ; // int array

typeDesc.addFieldDesc ( elemField ) ;


 
SOAP message using int []
 

http://schemas.xmlsoap.org/soap/envelope/
 " xmlns:xsd="
http://www.w3.org/2001/XMLSchema  "
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance
 ">

http://soap.service.acme.com
 ">

X

123
456

20.1
21.11
22
22345678
223.546
22385943
2435.456
23245






 
  http://soap.service.acme.com  " xmlns="
http://www.w3.org/2001/XMLSchema  ">

   

 
  
 

   

   

 


   

   

 
 
 
 
 
 
 
 
 
 

   



[Alick Buckley] 
 -Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, 21 February 2008 11:58 PM
To: axis-user@ws.apache.org
Subject: Re: Badly formed XML response with array of complex types



Hi Everybody

I am getting the same problem even when the return object only has an array
of primitives

Response message from web service is;


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

http://access.cobra.chubb.com";>





1


ohmygosh!





I'm sure I must be missing something really obvious here.

The object I am returning is of type TestData and is defined as follows;

package com.chubb.cobra.model.echo;

public class TestData {

private String testString;
private int[] testInts = null;

public TestData() {
}

public int[] getTestInts() {
return testInts;
}
public void setTestInts(int[] testInts) {
this.testInts = testInts;
}
public String getTestString() {
return this.testString;
}
public void setTestString(String testString) {
this.testString = testString;
}
}

I'm new to web services and I really would appreciate any suggestions on
what I could be doing wrong here as it's really holding me up

Thanks

Gordon

Inactive hide details for [EMAIL PROTECTED]@chubb.com






[EMAIL PROTECTED] 

18/02/2008 15:00 



Please respond to
axis-user@ws.apache.org




To

axis-user@ws.apache.org 



cc





Subject

Badly formed XML response with array of complex types   


Hi

I am having a problem using Axis 1.3 to create a web service with a complex
return type.

My example is pretty simple:

In my Java code I am returning a single Vehicle object which has a RegNumber
int field and an array of VehicleDriver objects each of which has a driverId
int field and a driverName String field.

The problem I am getting is that in the xml response that is being sent to
my .NET client the driver array tag and the tags for the individual drivers
themselves are both getting the name of the driver array in my Java code.

To clarify, this is the response I'm getting:

ResponseCode: 200 (OK)
Date:Fri, 15 Feb 2008 17:54:49 GMT
Server:WebLogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284
Content-Type:text/xml; charset=utf-8
Transfer-Encoding:chunked


http://schemas.xmlsoap.org/soap/envelope/>
http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
 http://www.w3.org/2001/XMLSchema";
xmlns:xsi="  

Problem accessing policy via external URI

2008-02-21 Thread dmike

I would like to store my policy information in a separate file and reference
it from within WSDL via wsp:PolicyReference/@URI attribute.  This does not
seem to work for me.

When I embed the policy details within the WSDL and then reference the
policy internally (e.g. )
running wsdl2code produces desired results.  However when referencing the
same policy information via an external URI (e.g. http://host/policy.xml#operation_policy"/>) the policy is ignored while
wsdl2code prints out an error "ERROR: Ignoring policy - null".

Having traced this flow I can see that the policy is retrieved from the
external URI, however when the call is made to AxisPolicyLocator.register()
the latter raises an UnsupportedOperationException which causes the
"Ignoring policy" message to be printed.  Can someone advise as to whether
Axis2 supports policy references via external URI's.  I understand that I
can modify the client code to get the policy from an external file, but I
would like to see this done automatically by wsdl2code utility when
processing my WSDL.  Any help would be much appreciated!

Thanks,
Michael
-- 
View this message in context: 
http://www.nabble.com/Problem-accessing-policy-via-external-URI-tp15618306p15618306.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Nightly Rampart Build?

2008-02-21 Thread Simon Nunn
Is there a nightly rampart build available.  I see the Axis2 nightlys at:
http://people.apache.org/dist/axis2/nightly/, but I haven't been able to
find anything pointing to a new rampart nightly build.

 

-Simon 



Objects created from Axis - modifyied in another class

2008-02-21 Thread Mat
I am creating an API layer over the Axis generated classes - one of the
methods created off the stub is 'getAlertInterfaces' which returns
'AlertInterface[]'.  When I try to pass the 'AlertInterface' array that
was returned form 'getAlertIntefaces' I get the following exception.
What I am trying to do is create a 'factory' class that converts an
AlertInteface to a 'context'/HashMap. Is there a way to access objects
returned from a stub in other classes?  I feel like this should be a
common problem... Thanks in advance.



Exception in thread "main" AxisFault 
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException 
 faultSubcode: 
 faultString: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is
used in a different document than the one that created it. 
 faultActor: 
 faultNode: 
 faultDetail: 

{http://xml.apache.org/axis/}stackTrace:org.w3c.dom.DOMException:
WRONG_DOCUMENT_ERR: A node is used in a different document than the one
that created it. 
at
com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:389)
 
at
com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(ParentNode.java:321)
 
at
com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:275) 
at
org.apache.axis.message.SOAPFaultBuilder.onEndChild(SOAPFaultBuilder.java:305) 
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1090)
 
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
 
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
 
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) 
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
 
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
 
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) 
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
 
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) 
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
 
at
org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) 
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) 
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
 
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) 
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
com.cable.comcast.axis.arbor.PeakflowSP.PeakflowSPBindingStub.getAlertInterfaces(PeakflowSPBindingStub.java:448)
 
at
com.cable.comcast.nsec.debug.PeakflowSPBindingStubTest.main(PeakflowSPBindingStubTest.java:45)


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



ConfigurationContext and servletContext

2008-02-21 Thread mathieu fabre
Hi,

I work on a webapp and I write my own transport (transportListener and
transportSender)
I use an axisServlet configured with axis2.xml.

i need to obtain the servlet context during the configuration of my
transport (init() method)

Is it possible to obtain the servlet context by using ConfigurationContext
of axis...?

my transport is configure with some values which are not static, so i can't
put them in a file -> i would
like to use the servlet Context.

thanks,

Mat


Re: [Axis2][Savan] Is there WS Eventing for Axis2/Java

2008-02-21 Thread Leon Searl

Hi Samir,

No we are getting into an area that I am not very
familiar with.

I saw the same behavior with the savan sample.
I turned on a whole bunch of debugging and found
out that the publication message within the
listener service was getting
through most of the phases but seemed to be
getting dropped at the point where
axis2 uses reflection to try to find the method
in the service implementation class to invoke for
the operation. I did not look any further
to try to determine what the problem was.

I made a whole bunch of changes to savan to
support services and clients using ADB instead
of Axiom which
seems to have solved the problem for me.

leon

samir shaikh wrote:

Leon,

I was just hoping to include a payload in the
subscribe request... but apparently as per the
specification thats not the way this is supposed to
work.

I also noticed that it looks like fireandforget method
is used for publishing events to the event listener.
In my case the event does not appear to be getting
processed by the listener even though a Http Status
code is being returned by the ListenerService.

I suspect this because I can see the same behavior
when I do a fireandforget vs. a sendRecieve from my
subscriber client.

Any ideas or configuration on the web server or on
savan to get around to this?

Samir


--- Leon Searl <[EMAIL PROTECTED]> wrote:


Hi Samir,

I'm not sure what you mean.
I assume that what you want to do is add some data
to the
subscription request that the publisher/eventing
service would then add
to the published data sent to a subscriber service
when
an event occurs.

If you take a look
at the specification for WS-Eventing you'll
see that there is not much extra that you can put
into the subscribe request. So I doubt that
it is possible to do what you ask.

There is nothing to prevent you from adding more
operations to an eventing service where one
operation
would for storing the extra data that you want
sent out with event notifications.

leon

samir shaikh wrote:

Hi Leon,

Is there a way to put a payload in the subscribe
request? I was hoping to call a service on the

server

with the subscribe request.

Thanks,
Samir

--- Leon Searl <[EMAIL PROTECTED]> wrote:


Hi Samir,

Please look at
https://issues.apache.org/jira/browse/SAVAN-4
I've attached a couple of patches that should fix
the
savan-config.xml issue that I described below.

leon

Leon Searl wrote:

Hi Samir,

I've made several changes.

- There was a problem with the module class
  loader looking for the savan-config.xml
  file in the jar file. The config file does not

get

  included in the jar if you do a clean build.
  Although it will get included in the jar if
  you do two builds in a row without a clean
  in between.
  I changed the module class init function to
  only look for the savan-config.xml in the mar
  file.

- It is redundant to have all of the classes in
  both the jar and mar files. I made a change
  so that only the savan-module.class was in the
  mar.

- I made a change to support using ADB for the
  client, publisher and subscriber.

- I was not able to make the sample work. I
  think that something must have changed
  in axis2 1.3 to stop it from working.
  Everything works until the published messaged
  message gets to the subscriber. The message is
  getting dropped somewhere just before the
  business logic would get invoked. I believe
  that it has something to do with addressing
  being 'on' on the publisher out side but

addressing

  not being 'on' in the subscriber. But
  I'm not sure about this.

leon

samir shaikh wrote:

Leon,

I was able to make it work finally!

Just curious, what changes are you making to

Savan...

anything that is needed to get WS-Eventing

going?

Samir

--- Leon Searl <[EMAIL PROTECTED]> wrote:


Hi Samir,

I have significantly modified
Savan so I don't have a stock jar and mar.
I'm reluctant to give you my modified Savan
since I'm sure it has bugs.

leon

samir shaikh wrote:

Leon,

I'm having trouble getting maven to work thru

my

proxy.

Can you send me the compiled jar and mar you

mention

below?

I'm assuming they'll be exactly the same if i

were

to

get mvn working also.

Samir


--- Leon Searl <[EMAIL PROTECTED]> wrote:


Hi Samir,

Yes, although I have not used the mar or jar

yet

so I dont know if it has any problems.

In the trunk/java directory I did the

following

command:
mvn package
The mar shows up in:


trunk/java/modules/mar/target/savan-SNAPSHOT.mar

The jar (for the service and client API)

shows

up

in

trunk/java/modules/core/target/savan-SNAPSHOT.jar

The sample code gets compiled and shows up

in:

trunk/java/modules/samples/target/savan-samples-SNAPSHOT.jar

This requires that you have maven installed.

I'm

also
using java 1.5.

I hope this helps.

Maybe tomorrow I'll actually try my own

service

and

client/service
to see if I can get it to work.

Other than the javadocs I have not found any

other

documentation
so you are on your own there unless

Re: axis2 status of rpc encoding

2008-02-21 Thread John Langley
Thank you for your reply Martin, 

I'm digging into the problem more now. The offending service is defined
by some wsdl that is complex enough to potentially obscure the problem.
I will try and recreate the problem with a simple example and forward on
the results as I get them. 

Thanks again for the reply! It helps to know that there is sample / test
code that I can dig into. One of the things I will probably do is
recreate the axis2 test but implement it with the service side being
built and delivered with axis1 tools. 

-- Langley 



On Wed, 2008-02-20 at 09:44 -0500, Martin Gainty wrote:
> Hi John
> 
> 2 questions:
> 1)Cant help without looking at the wsdl for a service with a pingReturn
> operation
> 2)rpc is supported as exemplified style="rpc" attribute illustrated in
> intergration/test-resources/rpc/test-rpc-2.wsdl
>  
>  transport="http://schemas.xmlsoap.org/soap/http"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> HTH
> Martin--
> 978-400-7544
> 
> - Original Message -
> From: "John Langley" <[EMAIL PROTECTED]>
> To: 
> Sent: Wednesday, February 20, 2008 8:43 AM
> Subject: axis2 status of rpc encoding
> 
> 
> > Hi,
> >   I've been trying to use Axis2 to generate java classes (using
> > wsdl2java.sh) from wsdl for that describes an rpc/literal service
> > delivered from Axis1. Regardless of which options I choose I seem to
> > consistently get a complaint about an "unexpected subelement".
> >
> > "org.apache.axis2.databinding.ADBException: Unexpected subelement
> > pingReturn
> > org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> > Unexpected subelement pingReturn"
> >
> >
> >   What is the official status of rpc encoding support in Axis2? I've
> > seen Jira issues that have a status of "resolved" around this, but I see
> > comments on the user mailing list suggesting that axis2 does not support
> > rpc encoding.
> >
> > Can anyone comment on either: 1) the official status of rpc encoding
> > support or 2) their personal experience with it?
> >
> > Thanks in advance
> >
> > -- Langley
> >
> >
> > -
> > 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]



External Schemas in WSDL

2008-02-21 Thread Kahler, Jason J (US SSA)
 

Is this still broken? Is there really no way for me to run the Maven aar
plugin to build an archive that

Has a WSDL with external schemas ? I try and everything builds, but I
cannot get the WSDL back from my service.

 

I don't believe supplying the full path to the schemas is possible (they
live in the aar file) any ideas?

 

Jason J. Kahler

Senior Software Engineer

BAE Systems Network Systems

Northeast Engineering Development Center

428 Phoenix Drive, Rome NY. 13441

Office: 315.838.2177

Email: [EMAIL PROTECTED]

 



Re: Badly formed XML response with array of complex types

2008-02-21 Thread GDavidson

Hi Everybody

I am getting the same problem even when the return object only has an array
of primitives

Response message from web service is;


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  
http://access.cobra.chubb.com";>
  




  1


ohmygosh!
  

  


I'm sure I must be missing something really obvious here.

The object I am returning is of type TestData and is defined as follows;

  package com.chubb.cobra.model.echo;

  public class TestData {

  private String testString;
  private int[] testInts = null;

  public TestData() {
  }

  public int[] getTestInts() {
  return testInts;
  }
  public void setTestInts(int[] testInts) {
  this.testInts = testInts;
  }
  public String getTestString() {
  return this.testString;
  }
  public void setTestString(String testString) {
  this.testString = testString;
  }
  }

I'm new to web services and I really would appreciate any suggestions on
what I could be doing wrong here as it's really holding me up

Thanks

Gordon



   
 [EMAIL PROTECTED] 
 om
To
 18/02/2008 15:00  axis-user@ws.apache.org 
cc
   
 Please respond to Subject
 [EMAIL PROTECTED] Badly formed XML response with  
  he.org   array of complex types  
   
   
   
   
   
   




Hi

I am having a problem using Axis 1.3 to create a web service with a complex
return type.

My example is pretty simple:

In my Java code I am returning a single Vehicle object which has a
RegNumber int field and an array of VehicleDriver objects each of which has
a driverId int field and a driverName String field.

The problem I am getting is that in the xml response that is being sent to
my .NET client the driver array tag and the tags for the individual drivers
themselves are both getting the name of the driver array in my Java code.

To clarify, this is the response I'm getting:

ResponseCode: 200 (OK)
Date:Fri, 15 Feb 2008 17:54:49 GMT
Server:WebLogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284
Content-Type:text/xml; charset=utf-8
Transfer-Encoding:chunked


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";>

http://access.cobra.chubb.com";>



1
Mr Ian Edward Wit


2
Mrs Deborah Wit


358 JWP





My wsdl looks like this:


http://localhost:7001/services/services/ServicesFacade"; xmlns:apachesoap="
http://xml.apache.org/xml-soap"; xmlns:impl="
http://localhost:7001/services/services/ServicesFacade"; xmlns:intf="
http://localhost:7001/services/services/ServicesFacade"; xmlns:tns1="
http://access.cobra.chubb.com"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema";>


http://access.cobra.chubb.com"; xmlns="http://www.w3.org/2001/XMLSchema";>
http://localhost:7001/services/services/ServicesFacade
"/>















http://localhost:7001/services/services/ServicesFacade"; xmlns="
http://www.w3.org/2001/XMLSchema";>
































http://schemas.xmlsoap.org/soap/http"/>












http://localhost:7001/services/services/ServicesFacade"/>




This seems to result in the returned data not coming through as I guess the
response doesn't really make sense.
Has anyone else experienced the same problem and if so what do I need to
change to fix it???

Any help would be greatly appreciated.

Cheers

Gordon<><><>

Re: Re: Policies in services.xml

2008-02-21 Thread Amila Suriarachchi
you have to specify them in service.xml file

On Mon, Feb 18, 2008 at 4:39 PM, Christian Mielke <[EMAIL PROTECTED]> wrote:

> OK thanks for your reply, but RAMPART needs the policy in the services.xml,
> or not? Or is there another way to specify the policy for RAMPART and not in
> the services.xml?
> Greetings
> Christian
>
> - original Nachricht 
>
> Betreff: Re: Policies in services.xml
> Gesendet: Mo, 18. Feb 2008
> Von: Amila Suriarachchi
>
> There are two things
> 1. Normally you can not set the Rampart specific polices in a wsdl file.
> So any way you have to add them to the services.xml
> 2. There is no need to add polices in the wsdl to the services.xml. At the
> deployment time, the deployment engine creates the AxisObject structure
> using the WSDL11ToAxisServiceBuilder. This correctly sets the polices to the
> AxisObject structure.
>
> thanks,
> Amila.
>
>
> On Feb 18, 2008 1:17 PM, Christian Mielke <[EMAIL PROTECTED]> wrote:
> Hello,
> I want to use WS-Policy for my Web-Services. So I add a policy inside my
> WSDL and then I use WSDL2JAVA to generate my code. When I use this tool, the
> services.xml gets also generated, but why isn't the used policy of the
> WSDL also written in the generated services.xml so that I only have to add
> the neccessary RAMPART parameters?
> Greetings
> Christian
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
> --- original Nachricht Ende 
>



-- 
Amila Suriarachchi,
WSO2 Inc.


Re: ADB Binding error - Probably BUG

2008-02-21 Thread Amila Suriarachchi
What is the Axis2 version you use? if you get this error with a nightly
build please log a jira.

thanks,
Amila.

2008/2/20 lucky <[EMAIL PROTECTED]>:

> Hi,
>
> We are developing a Axis2 Top-Down WebService and while invoking WS we are
> getting following exception at client side -
>
>
>
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>
>   at ws.schemas.EmployeeRs_TypeSequence_type1$Factory.parse(*
> EmployeeRs_TypeSequence_type1.java:388*)
>
>   at ws.schemas.EmployeeRs_TypeSequence_type2$Factory.parse(*
> EmployeeRs_TypeSequence_type2.java:562*)
>
>   at
>
>
>
>
>
> After debugging it is noticed that, it is going in an infinite loop in
> class
>
> EmployeeRs_TypeSequence_type2.java generated from schema -
>
>
>
> while (!loopDone2) {
>
> // Step to next element event.
>
> while (!reader.isStartElement() &&
>
> !reader.isEndElement())
>
> reader.next();
>
>
>
> if (reader.isEndElement()) {
>
> //two continuous end elements means we are
> exiting the xml structure
>
> loopDone2 = true;
>
> } else {
>
> list2.add(
> ws.schemas.EmployeeRs_TypeSequence_type1.Factory.parse(
>
> reader));
>
> }
>
> }
>
>
>
> Corresponding Schema causing trouble –
>
>
>
> <*xsd:sequence* minOccurs="0">
>
> 
>
> <*xsd:sequence* minOccurs="0" maxOccurs="unbounded">
>
>  minOccurs="0" />
>
> 
>
>
>
> 
>
>
>
> While going through the inner sequence, its never coming out of while loop
> mentioned above.
>
>
>
>  We can't change our WSDL and Schema at this stage and have to make it
> work. Is it a defect in AXIS 2 ADB binding? Or we doing something wrong
> here?
>
> Any help is much appreciated.Thanking you all in anticipation.
>
> P.S.
>
> We are using following command to create the stub and other classes from
> Schema. –
>
>
>
> wsdl2java -uri D:.\Sequence.wsdl -o D:\Sequence -p wsdl.Sequence-s 
> -ss -sd -d adb -g -ns2p urn:sequence:XSD:1=
> ws.schemas,urn:sequence:XSD:a=wsdl.Sequence -ssi
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-- 
Amila Suriarachchi,
WSO2 Inc.


Re: How to perform REST requests in a Service?

2008-02-21 Thread keith chapman
Axis2 by default supports both REST and SOAP unless u explicitly turn it
off. Hence the default config makes all service can be accessed via REST.
e.g the version can be accessed at
http://localhost:8080/axis2/services/version/getVersion

Thanks,
Keith.

On Thu, Feb 21, 2008 at 3:23 PM, Moley Harey <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I have implemented an Axis2 web service following the Axis2 Tutorials and
> using Axis Data Binding, I have implemented a client that test the SOAP over
> HTTP requests/responses.
>
> My question is what should I do to support not only SOAP but REST
> requests?
> I have seen in my axis2.xml file some parameters such as "restPath",
> "disableREST" etc... that I should tune to get this but is there anything I
> have to add to my SOAP service implementation?
>
> Thanks,
>
> Mh
>
> --
> ~~~
> Para atras, solo para tomar impulso!
>
> http://chromewaves.blogspot.com/




-- 
Keith Chapman
Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


Re: How to perform REST requests in a Service?

2008-02-21 Thread Charitha Kankanamge

Hi Moley,
If I understood your question correctly, you don't have anything to 
configure in your axis2.xml or service implementation class in order to 
get the REST support.


Suppose your service is Sampleservice and it has one operation called 
sayHello(). Then you can invoke your service in RESTful manner as follows.

http://localhost:8080/axis2/services/Sampleservice/sayHello

regards
Charitha

Moley Harey wrote:


Hi,

I have implemented an Axis2 web service following the Axis2 Tutorials 
and using Axis Data Binding, I have implemented a client that test the 
SOAP over HTTP requests/responses.


My question is what should I do to support not only SOAP but REST 
requests?
I have seen in my axis2.xml file some parameters such as "restPath", 
"disableREST" etc... that I should tune to get this but is there 
anything I have to add to my SOAP service implementation?


Thanks,

Mh

--
~~~
Para atras, solo para tomar impulso!

http://chromewaves.blogspot.com/ 





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



Java EE 5 and Axis2

2008-02-21 Thread Milan Kuchtiak

Hi, I am new in Axis2 and I have a question.

Is there any recommended way how to use web resources (e.g. DataSource) 
for web services ?


E.g. in  Java EE 5 there is a nice way to inject a Data Source :

private @Resource DataSource catalogDS;

Thanks for any response.

Milan



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



Re: Example policy file needed

2008-02-21 Thread Nandana Mihindukulasooriya
Hi Simon,
Please take a look at samples come with the Apache Rampart
distribution. They contain policies that defines
Sample 01 - Username Token authentication
Sample 05 - SAML token

thanks,
nandana

[1] - 
https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/policy/sample01/
[2] - 
https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/policy/sample02/


On Thu, Feb 21, 2008 at 12:36 AM, Simon Nunn <[EMAIL PROTECTED]> wrote:
>
>
>
>
> I am trying to use ws-policy for my webservice.   I would like for the
> service to receive either a saml assertion or a username token for
> authetication.  I have been unsuccessful in getting a ws-policy configured
> for this.  Does anyone have an example of a policy file that does this?
>
>
>
> Thanks,
>
>  Simon
>
>



-- 
Nandana Mihindukulasooriya
Software Engineer
WSO2 inc.

http://nandana83.blogspot.com/
http://nandanasm.wordpress.com/

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



Multibyte character used in service name

2008-02-21 Thread Milan Kuchtiak

Hi,

I used the "C(" character in services.xml  for service:name attribute :



   C(Service service
   
   mep="http://www.w3.org/2004/08/wsdl/in-only"; 
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
   http://www.w3.org/2004/08/wsdl/in-out"; 
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

   
   i18n.CService


Looks like the service wsdl is not available for this particular web 
service.

Is Axis2 supporting internationalization for service names ?

When listing web services in my browser, I get :


   Available services


   ?Service 

Service EPR : http://localhost:8080/axis2/services/?Service


   Service Description : ?Service

/Service Status : Active/
/Available Operations/

   * hello



How to perform REST requests in a Service?

2008-02-21 Thread Moley Harey
Hi,

I have implemented an Axis2 web service following the Axis2 Tutorials and
using Axis Data Binding, I have implemented a client that test the SOAP over
HTTP requests/responses.

My question is what should I do to support not only SOAP but REST requests?
I have seen in my axis2.xml file some parameters such as "restPath",
"disableREST" etc... that I should tune to get this but is there anything I
have to add to my SOAP service implementation?

Thanks,

Mh

-- 
~~~
Para atras, solo para tomar impulso!

http://chromewaves.blogspot.com/


Re: [Axis2] Deploying multiple services under single web app (single war file)

2008-02-21 Thread Antonio Manuel Muñiz Martín
Yes, it is.

You can deploy each service independently in axis2 container. You only have
to divide your WSDL in N WSDL´s and generate the aar files for each.
Deploy the aar files in axis container, and you will have N web services.

Each service may have its own axis2.xml and services.xml, look at axis doc.

One WSDL belong to a webservice, and one web service only has one wsdl.

Bye.

2008/2/21, Raghu Upadhyayula <[EMAIL PROTECTED]>:
>
>  Hi,
>
>
>
> I'm using Axis2 1.3.  Is it possible to deploy multiple services under
> single web application (I mean using single war file).
>
>
>
> Here's my scenario.
>
>
>
> *Current situation:*
>
> Currently I have a webservice with multiple methods (one of them being the
> login method).  The clients of my webservice will first call the login
> method with username & password, I'll authenticate them and return a session
> id in the response.  The clients use that session id (pass it in the soap
> header) in all the subsequent calls within that session.
>
>
>
> *I want it to be changed something like this: *
>
> I want to make the login method as a separate webservice and all the other
> remaining methods in the existing webservice.  So that the clients will call
> the login method (with username & password), I'll return session id and the
> clients will use that session id to invoke other webservice methods.
>
>
>
> I wanted it like this because in future I'll create another webservice
> which has a certificate based authentication (currently it is password based
> authentication) and that webservice will authenticate the client and also
> return a session id and the clients will use that session id to invoke the
> other webservice methods.
>
>
>
> *Questions: *
>
> 1.   Is this possible with Axis2?
>
> 2.   If yes, then how should I do it?
>
> 3.   Should there be separate WSDL's, axis2.xml's, services.xml's for
> each of the webservices?
>
> 4.   How to generate client stubs for such a scenario?
>
> 5.   Can the same wsdl file work for different webservices?
>
>
>
> *Note:*  I've tried creating a serviceGroup in the service.xml but it
> didn't work for me.
>
>
>
> Thanks
>
> Raghu
>


Re: How to get the properties in context.xml in the server skeleton class

2008-02-21 Thread Suriya Simsuwat
Thank you very very much, Simon. It works like a charm this time. ;)

Simon Steinacker <[EMAIL PROTECTED]> wrote: This way it works:

 > MessageContext ctx = MessageContext.getCurrentMessageContext();
 > ServletContext sr = (ServletContext) 
ctx.getProperty("transport.http.servletContext");
 > System.out.println("xsltPath: " + sr.getInitParameter("xsltPath"));

regards
Simon


Suriya Simsuwat wrote:
> Thank Simon for your reply. I have tried it, but always got the 
> java.lang.NullPointerException. Any suggestion?
>
> My context.xml data located in \webapps\axis2\META-INF :
>  
>
>  

> 

>  
>  
> My SOAP server class :
>  
>  
> /**
> * HelloServiceSkeleton java skeleton for the axisService
> */
> * *
> *public* *class* HelloServiceSkeleton *implements* 
> HelloServiceSkeletonInterface {
> /**
> * Auto generated method signature
> * [EMAIL PROTECTED] helloRequest
> */
> *public* com.glovia.www.hello.HelloResponse sayHello(
> com.glovia.www.hello.HelloRequest helloRequest) {
> System./out/.println("Print properties from Tomcat context.xml");
> String xsltPath = "";
> *try* {
> MessageContext msgC = MessageContext./getCurrentMessageContext/();
> System./out/.println("Get MessageContext");
> ServletContext context = ((HttpServlet) msgC
> .getProperty(HTTPConstants./MC_HTTP_SERVLET/))
> .getServletContext();
> System./out/.println("Get ServletContext");
> xsltPath = context.getInitParameter("xsltPath");
> System./out/.println("Get xsltPath");
> xsltPath = context.getInitParameter("xsltPath");
> } *catch* (Exception e) {
> e.printStackTrace();
> }
> System./out/.println("XsltPath : "+xsltPath);
> HelloResponse resp = *new* HelloResponse();
> resp.setHelloResponse("Hi "+ helloRequest.getHelloRequest());
> *return* resp;
> }
> }
>  
>  
>  
> The error message :
>  
> java.lang.NullPointerException
> at 
> com.glovia.service.HelloServiceSkeleton.sayHello(HelloServiceSkeleton
> .java:48)
> at 
> com.glovia.service.HelloServiceMessageReceiverInOut.invokeBusinessLog
> ic(HelloServiceMessageReceiverInOut.java:48)
> at 
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBus
> inessLogic(AbstractInOutSyncMessageReceiver.java:42)
> at 
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe
> ssageReceiver.java:96)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> at 
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
> uest(HTTPTransportUtils.java:275)
> at 
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1
> 20)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:269)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:188)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:213)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:174)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:127)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:117)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:108)
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> a:174)
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :874)
> at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
> rocessConnection(Http11BaseProtocol.java:665)
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
> int.java:528)
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
> lowerWorkerThread.java:81)
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:689)
> at java.lang.Thread.run(Thread.java:595)
>  
>
> */Simon Steinacker /* wrote:
>
> Something like this
>
> > MessageContext msgC=MessageContext.getCurrentContext();
> > ServletContext
> 
> context=((HttpServlet)msgC.getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext();
>
> should work.
> Generally speaking you can get a lot of properties concerning the
> current http and soap message by using the
> MessageContext.getProperty(...) method. Parameters taht can be
> used for
> this are located in org.apache.axis2.Constants or HTTPConstants or
> whatever.
>
> Hope that helped,
> best regards,
> Simon
>
>
> Suriya Simsuwat wrote:
> > Hi all,
> >
> > I would like to know is it possible to get the properties'
> values from
> > the file 'context.xml' in \webapps\axis2\META-INF.

Re: configure AxisServlet

2008-02-21 Thread mathieu fabre
Oups, sorry, i make a mistake. axisServlet will find the WEB-INF repository
by defaut, it's right.

Thanks for your answer and thanks for your time,

Mat

2008/2/21, mathieu fabre <[EMAIL PROTECTED]>:
>
> So, if I understand well, your solution is to set nothing about the
> repository and configuration file (xml)
> For the configuration file, it works, but for the repository, axisServlet
> will not find the repository WEB-INF by default??
>
>
> 2008/2/20, Davanum Srinivas <[EMAIL PROTECTED]>:
> >
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> >
> > axis2.repository.path should be the full directory path. So i'd
> > recommend that you don't set that as well.
> >
> >
> > mathieu fabre wrote:
> > | Thanks for your answer,
> > |
> > | for axis2.xml location, axisServlet search for the path
> > | WEB-INF/conf/axis2.xml by default.
> > | So, i removed the tag axis2.xml.path and it's
> > | value.
> > |
> > | But if i put the tag :
> > |
> > | 
> > |axis2.repository.path
> > |WEB-INF
> > | 
> > |
> > | I obtain an exception :
> > |
> > | org.apache.axis2.deployment.DeploymentException: The system cannot
> > locate
> > | the specified repository location: WEB-INF
> > | at org.apache.axis2.deployment.DeploymentEngine.loadRepository(
> > | DeploymentEngine.java:127)
> > | at
> > |
> > org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration
> > (
> > | WarBasedAxisConfigurator.java:199)
> > | at
> > |
> > org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> > | (ConfigurationContextFactory.java:64)
> > | at org.apache.axis2.transport.http.AxisServlet.initConfigContext(
> > | AxisServlet.java:500)
> > | at org.apache.axis2.transport.http.AxisServlet.init(
> > AxisServlet.java
> > | :420)
> > | at org.mortbay.jetty.servlet.ServletHolder.initServlet(
> > | ServletHolder.java:433)
> > | at org.mortbay.jetty.servlet.ServletHolder.doStart(
> > ServletHolder.java
> > | :256)
> > | at org.mortbay.component.AbstractLifeCycle.start(
> > AbstractLifeCycle.java
> > | :40)
> > | ...
> > |
> > | It seem it don't work well... :(
> > |
> > | 2008/2/20, Davanum Srinivas <[EMAIL PROTECTED]>:
> >
> > | Don't specify them at all..AxisServlet looks in WEB-INF/conf for
> > axis2.xmland uses WEB-INF as the repo.
> >
> > |
> > | -- dims
> > |
> > | mathieu fabre wrote:
> > | | Hi,
> > | |
> > | | I use an AxisServlet in a webapp.
> > | |
> > | | in the web.xml i configure my axisServlet like that :
> > | |
> > | | 
> > | | AxisServlet
> > | | Apache-Axis Servlet
> > | | org.apache.axis2.transport.http.AxisServlet
> > | | 
> > | | 
> > | |   axis2.xml.path
> > | |   C:\long
> > | | path\webapp\WEB-INF\conf\axis2.xml
> > | | 
> > | | 
> > | |   axis2.repository.path
> > | |   C:\long
> > path\webapp\WEB-INF\
> > | | 
> > | | 
> > | |   contextRoot
> > | |   /
> > | | 
> > | | 
> > | |   servicePath
> > | |   services
> > | | 
> > | | 1
> > | |   
> > | |
> > | | But i want to configure "axis2.xml.path" and "axis2.repository.path"
> > | with
> > | | relative path like "WEB-INF\conf\axis2.xml"
> > | |
> > | | How could I do that ? I know I must use the context of my webapp but
> > i
> > | don't
> > | | know how
> > | |
> > | | thanks in advance,
> > | |
> > | | Mat
> > | |
> > |>
> >
> > - -
> >
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > |>
> > |>
> >
> >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.5 (Cygwin)
> >
> >
> > iD8DBQFHvGKugNg6eWEDv1kRAhs9AJ9+veyhEndd6IZso/feZ3XfEVGd4ACfUtGS
> > bFO7QVyqsbKhybdjoJdFPHs=
> > =Qftd
> >
> > -END PGP SIGNATURE-
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


Re: How to get the properties in context.xml in the server skeleton class

2008-02-21 Thread Simon Steinacker

This way it works:

> MessageContext ctx = MessageContext.getCurrentMessageContext();
> ServletContext sr = (ServletContext) 
ctx.getProperty("transport.http.servletContext");

> System.out.println("xsltPath: " + sr.getInitParameter("xsltPath"));

regards
Simon


Suriya Simsuwat wrote:
Thank Simon for your reply. I have tried it, but always got the 
java.lang.NullPointerException. Any suggestion?


My context.xml data located in \webapps\axis2\META-INF :
 
   
 


 
 
My SOAP server class :
 
 
/**

* HelloServiceSkeleton java skeleton for the axisService
*/
* *
*public* *class* HelloServiceSkeleton *implements* 
HelloServiceSkeletonInterface {

/**
* Auto generated method signature
* [EMAIL PROTECTED] helloRequest
*/
*public* com.glovia.www.hello.HelloResponse sayHello(
com.glovia.www.hello.HelloRequest helloRequest) {
System./out/.println("Print properties from Tomcat context.xml");
String xsltPath = "";
*try* {
MessageContext msgC = MessageContext./getCurrentMessageContext/();
System./out/.println("Get MessageContext");
ServletContext context = ((HttpServlet) msgC
.getProperty(HTTPConstants./MC_HTTP_SERVLET/))
.getServletContext();
System./out/.println("Get ServletContext");
xsltPath = context.getInitParameter("xsltPath");
System./out/.println("Get xsltPath");
xsltPath = context.getInitParameter("xsltPath");
} *catch* (Exception e) {
e.printStackTrace();
}
System./out/.println("XsltPath : "+xsltPath);
HelloResponse resp = *new* HelloResponse();
resp.setHelloResponse("Hi "+ helloRequest.getHelloRequest());
*return* resp;
}
}
 
 
 
The error message :
 
java.lang.NullPointerException
at 
com.glovia.service.HelloServiceSkeleton.sayHello(HelloServiceSkeleton

.java:48)
at 
com.glovia.service.HelloServiceMessageReceiverInOut.invokeBusinessLog

ic(HelloServiceMessageReceiverInOut.java:48)
at 
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBus

inessLogic(AbstractInOutSyncMessageReceiver.java:42)
at 
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe

ssageReceiver.java:96)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq

uest(HTTPTransportUtils.java:275)
at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1

20)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

icationFilterChain.java:269)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

ilterChain.java:188)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV

alve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV

alve.java:174)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j

ava:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j

ava:117)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal

ve.java:108)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav

a:174)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java

:874)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p

rocessConnection(Http11BaseProtocol.java:665)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo

int.java:528)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol

lowerWorkerThread.java:81)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP

ool.java:689)
at java.lang.Thread.run(Thread.java:595)
 


*/Simon Steinacker <[EMAIL PROTECTED]>/* wrote:

Something like this

> MessageContext msgC=MessageContext.getCurrentContext();
> ServletContext

context=((HttpServlet)msgC.getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext();

should work.
Generally speaking you can get a lot of properties concerning the
current http and soap message by using the
MessageContext.getProperty(...) method. Parameters taht can be
used for
this are located in org.apache.axis2.Constants or HTTPConstants or
whatever.

Hope that helped,
best regards,
Simon


Suriya Simsuwat wrote:
> Hi all,
>
> I would like to know is it possible to get the properties'
values from
> the file 'context.xml' in \webapps\axis2\META-INF.
>
> The example of context.xml
>
>
>
>
>
>
>
> It said on Tomcat document that the value can be retrieved by
calling
> |ServletContext.getInitParameter(), |but I do not know how to
get this
> data via the Axis2 server skeleton class. Thank you for any help in
> advance.
>
> Cheers,

Re: configure AxisServlet

2008-02-21 Thread mathieu fabre
So, if I understand well, your solution is to set nothing about the
repository and configuration file (xml)
For the configuration file, it works, but for the repository, axisServlet
will not find the repository WEB-INF by default??


2008/2/20, Davanum Srinivas <[EMAIL PROTECTED]>:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> axis2.repository.path should be the full directory path. So i'd recommend
> that you don't set that as well.
>
>
> mathieu fabre wrote:
> | Thanks for your answer,
> |
> | for axis2.xml location, axisServlet search for the path
> | WEB-INF/conf/axis2.xml by default.
> | So, i removed the tag axis2.xml.path and it's
> | value.
> |
> | But if i put the tag :
> |
> | 
> |axis2.repository.path
> |WEB-INF
> | 
> |
> | I obtain an exception :
> |
> | org.apache.axis2.deployment.DeploymentException: The system cannot
> locate
> | the specified repository location: WEB-INF
> | at org.apache.axis2.deployment.DeploymentEngine.loadRepository(
> | DeploymentEngine.java:127)
> | at
> |
> org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(
> | WarBasedAxisConfigurator.java:199)
> | at
> |
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> | (ConfigurationContextFactory.java:64)
> | at org.apache.axis2.transport.http.AxisServlet.initConfigContext(
> | AxisServlet.java:500)
> | at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java
> | :420)
> | at org.mortbay.jetty.servlet.ServletHolder.initServlet(
> | ServletHolder.java:433)
> | at org.mortbay.jetty.servlet.ServletHolder.doStart(
> ServletHolder.java
> | :256)
> | at org.mortbay.component.AbstractLifeCycle.start(
> AbstractLifeCycle.java
> | :40)
> | ...
> |
> | It seem it don't work well... :(
> |
> | 2008/2/20, Davanum Srinivas <[EMAIL PROTECTED]>:
>
> | Don't specify them at all..AxisServlet looks in WEB-INF/conf for
> axis2.xmland uses WEB-INF as the repo.
>
> |
> | -- dims
> |
> | mathieu fabre wrote:
> | | Hi,
> | |
> | | I use an AxisServlet in a webapp.
> | |
> | | in the web.xml i configure my axisServlet like that :
> | |
> | | 
> | | AxisServlet
> | | Apache-Axis Servlet
> | | org.apache.axis2.transport.http.AxisServlet
> | | 
> | | 
> | |   axis2.xml.path
> | |   C:\long
> | | path\webapp\WEB-INF\conf\axis2.xml
> | | 
> | | 
> | |   axis2.repository.path
> | |   C:\long path\webapp\WEB-INF\
> | | 
> | | 
> | |   contextRoot
> | |   /
> | | 
> | | 
> | |   servicePath
> | |   services
> | | 
> | | 1
> | |   
> | |
> | | But i want to configure "axis2.xml.path" and "axis2.repository.path"
> | with
> | | relative path like "WEB-INF\conf\axis2.xml"
> | |
> | | How could I do that ? I know I must use the context of my webapp but i
> | don't
> | | know how
> | |
> | | thanks in advance,
> | |
> | | Mat
> | |
> |>
>
> - -
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> |>
> |>
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.5 (Cygwin)
>
>
> iD8DBQFHvGKugNg6eWEDv1kRAhs9AJ9+veyhEndd6IZso/feZ3XfEVGd4ACfUtGS
> bFO7QVyqsbKhybdjoJdFPHs=
> =Qftd
>
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>