Two Way Authentication using WSS4J

2007-10-02 Thread ali.mohammed

Hi Everyone,
 
I am working with AXIS and WSS4J to implement two way authentication
using X.509 certificates. I have a simple Web Service running on AXIS
and I have written a small client application to invoke the web service.
But I cant figure out the way to send Client side certificates to the
server and make the server authenticate the client.
 
I cannot find a step by step guide for doing this. I am new to AXIS and
WSS4J and I am totally lost.
 
Any help is greatly appreciated.
Please let me know if I do not make sense.
 

Regards,

Mohammed

Phone - 91-80-28520408 / extn - 80219

 

 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

RE: [NEWSENDER] - RE: [NEWSENDER] - RE: Exposing JAVA Overloaded methods as service - Message is from an unknown sender - Message is from an unknown sender

2007-10-02 Thread Raghavan
Thanks a lot jeff.
We will try to implement ur suggestion of having unique names.
 
Thanks once again,
Raghavan.V.
 
-Original Message-
From: Walker, Jeff [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 28, 2007 7:30 PM
To: axis-user@ws.apache.org
Subject: [NEWSENDER] - RE: [NEWSENDER] - RE: Exposing JAVA Overloaded
methods as service - Message is from an unknown sender - Message is from
an unknown sender
 
Hi Raghavan,
again, the more typical solution from the web services community is to
simply change operation names and then you can leave your parameters
alone. (i strongly recommend this). But there are a few things about
your approach you might want to think about.
 
Do's:
1. Move from RPC to Doc/lit web services. (Doc/lit-wrapped is even
better since it works best with .NET).
2. When writing a web service interface, don't think of sending fields
like username and status strings. think in terms of sending and
receiving a message. In that message, there is one object. that object
maps to a compexType in schema. That complexType can then extend another
complexType (single inheritance). Each of these types contain fields.
That is where username and status get defined as xsd:string types.
 
Don'ts:
1. Don't pass language specific objects (like the Connection class in
Java) as parameters in web service calls. There is no way in soap or
wsdl to enforce that only Java clients call the appropriate
Java-oriented method on the interface. All operations should be callable
by all clients at all times. (This forces the web services interface to
be very generic).
2. Don't overload methods. Just have a second method with a unique name.
If you still insist on sending the Connection object, might I suggest
the names getmessages(userrname, status0 and
getMessagesWithConnection(username, status, Connection). My previous
suggestions b) and c) were mere technical sleigh-of-hand XML Schema
approaches to simulate overloaded methods.
 

---
Still,
both b) and c) require an XML Schema to be constructed, and then move to
Doc/Lit wrapped web service format. Doc/Lit wrapped requires that you
pass in just one object in both the request and the response. That
object (a complexType defiend in the schema) then contains the fields
and any other objects that you require.
See:

http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/ This
article is an excellent summary of what I mean. The complexType will
look something like:
 

   
 
 
 
   


   
 
   

Notice the "connection" field has minoccurs="0". This makes it optional.
So, a single operation exists in the web service now, called
GetMessages. It takes a single object as a parameter, that is also
called GetMessages (see above article as to why the operation and
parameter name is the same). That object is based on a complexType in
schema called "GetMessages" and it has three fields, of which two are
required and the 3rd is optional. The 3rd field is another complexType
called "Connection", that contains all of the data you need to create a
Java Connection object on the server.
 
Suggestion c). is another way to do it in Schema. Instead of having an
optional field, have a base type with the two required fields. Extend
that type with another type that adds in the connection fields. When you
declare the operation in the wsdl, refer to the base class. When the
client actually calls it, they can pass in either an instance of the
base type, with just username and status, or an instance of the
subclass, which contains username, status and connection fields. In the
service implementation class, you can use instanceof operator to
determine if you got a sublass or not. Hence, type derivation.
-jeff
 

  _  

From: Raghavan [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 28, 2007 12:15 AM
To: axis-user@ws.apache.org
Subject: RE: [NEWSENDER] - RE: Exposing JAVA Overloaded methods as
service - Message is from an unknown sender
Importance: High
Thanks Jeff for the solution.
The reason for the overloaded methods is that the service can be called
from either a .NET client  or a java web service.
In the case of  .NET client I could'nt pass the SQL connection but where
as I could pass a connection from a java web service. That's why we
opted for the overload method.
This is the first time we are using web service. 
 
So it would be very helpful, if you could elaborate the points B & C..
How can I make the parameter optional in schema and where can I find
info abt type derivation?
 
Thanks in advance
Rgds,
Raghavan.V.
 
-Original Message-
From: Walker, Jeff [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 27, 2007 6:22 PM
To: axis-user@ws.apache.org
Subject: [NEWSENDER] - RE: Exposing JAVA Overloaded me

Re: TIMEOUT probleme

2007-10-02 Thread Upul Godage
Hi,

Check EchoNonBlockingDualClient, EchoNonBlockingClient.java in Axis2 user
guide samples.
http://ws.apache.org/axis2/1_3/userguide-samples.html#clients

Also 'Do a Non-Blocking Invocation' section in Advanced user guide.
http://ws.apache.org/axis2/1_3/adv-userguide.html

Upul

On 10/3/07, jerome.mariette <[EMAIL PROTECTED]> wrote:
>
>
> Hi everybody,
> I'm facing a little probleme ... I deployed a web service which is
> processing some job wich can take some times (hours ish) so my web service
> is time out. I saw how to set the time out value, but I don't know the
> time
> it can take sometime. There is a way to say infinite ?
>
> I'm thinking about making a web service which submit my jobs and then when
> my jobs are done send the result back but have no idea how to contact
> again
> the calling machine ?? is that possible ??
>
> let me know,
> thx
> --
> View this message in context:
> http://www.nabble.com/TIMEOUT-probleme-tf4559559.html#a13012089
> 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: AXISCLASSPATH

2007-10-02 Thread Upul Godage
You have to add the AXISCLASSPATH contents to CLASSPATH when running client.

http://ws.apache.org/axis/java/install.html says,
To use Axis client code, you can select AXISCLASSPATH when invoking Java by
entering
java -cp %AXISCLASSPATH% ...

Also check Axis2 at http://ws.apache.org/axis2/.

Upul

On 10/3/07, zhshqzyc <[EMAIL PROTECTED]> wrote:
>
>
> Because I get the java client error "ClassNotFoundException", so I guess
> my
> setting AXISCLASS is wrong.
>
> I read the Axis setup tutorial.
> It is probably a good time to add the AXISCLASSPATH variable to your
> CLASSPATH variable.
> How to add?
> I already set AXISCLASSPATH.
>
> [code]
> %AXIS_LIB%\axis.jar;%AXIS_LIB%\common-discovery-0.2.jar
> ;%AXIS_LIB%\commons-logging-1.0.4.jar
> ;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;%AXIS_LIB%\log4j-1.2.8.jar
> ;%AXIS_LIB%\xml-apis.jar;%AXIS_LIB%\xercesImpl.jar
> [/code]
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/AXISCLASSPATH-tf4558968.html#a13010276
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


TIMEOUT probleme

2007-10-02 Thread jerome.mariette

Hi everybody,
I'm facing a little probleme ... I deployed a web service which is
processing some job wich can take some times (hours ish) so my web service
is time out. I saw how to set the time out value, but I don't know the time
it can take sometime. There is a way to say infinite ?

I'm thinking about making a web service which submit my jobs and then when
my jobs are done send the result back but have no idea how to contact again
the calling machine ?? is that possible ??

let me know,
thx
-- 
View this message in context: 
http://www.nabble.com/TIMEOUT-probleme-tf4559559.html#a13012089
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 client

2007-10-02 Thread jerome.mariette


Thx so much it's working :)








Anas Mughal wrote:
> 
> Try this:
> 
> http://localhost:8080/axis2/services/Version/getVersion
> 
> 
> --
> Anas Mughal
> 
> 
> 
> On 9/28/07, jerome.mariette <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hello everybody,
>> I'm using axis2 to develop a web service. I did it and it's working but I
>> can't access to the Endpoint!
>> When I deploye it, I can perfectly request the webservice and everything
>> is
>> fine, but if I want to access its EndPoint, I have the following:
>> The endpoint reference (EPR) for the Operation not found is
>> /axis2/services/AvedService and the WSA Action = null
>> So I tryed with the Version service which is already deployed in Axis
>> with
>> the following URL:
>> http://localhost:8080/axis2/services/Version
>> and got the same problem !!
>>
>> So I'm wondering if there is something specific to do to ba able to
>> access
>> the endpoint ?? I'd like to request my web service from Java Code so I do
>> need to access the EndPoint first !
>>
>> thanks for your help,
>> Jerome
>> --
>> View this message in context:
>> http://www.nabble.com/Axis2-client-tf4536570.html#a12947772
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Anas Mughal
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Axis2-client-tf4536570.html#a13012051
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: AXISCLASSPATH

2007-10-02 Thread zhshqzyc

What I get 
[code]

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/di
scovery/tools/DiscoverSingleton
at
org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45
)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory
.java:41)
at
org.apache.axis.components.logger.LogFactory.(LogFactory.java
:33)
at org.apache.axis.client.AdminClient.(AdminClient.java:48)

C:\axis\samples\stock>
[/code]
-- 
View this message in context: 
http://www.nabble.com/AXISCLASSPATH-tf4558968.html#a13010486
Sent from the Axis - User mailing list archive at Nabble.com.


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



AXISCLASSPATH

2007-10-02 Thread zhshqzyc

Because I get the java client error "ClassNotFoundException", so I guess my
setting AXISCLASS is wrong.

I read the Axis setup tutorial.
It is probably a good time to add the AXISCLASSPATH variable to your
CLASSPATH variable.
How to add?
I already set AXISCLASSPATH.

[code]
%AXIS_LIB%\axis.jar;%AXIS_LIB%\common-discovery-0.2.jar;%AXIS_LIB%\commons-logging-1.0.4.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\xml-apis.jar;%AXIS_LIB%\xercesImpl.jar
[/code]




-- 
View this message in context: 
http://www.nabble.com/AXISCLASSPATH-tf4558968.html#a13010276
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: Migrating from Tomcat AXIS2 to Standalone AXIS2

2007-10-02 Thread Ted Jones
Thank you Ajith. I will check it out.

Ted

- Original Message -
From: "Ajith Ranabahu" <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Tuesday, October 2, 2007 10:00:06 AM (GMT-0600) America/Chicago
Subject: Re: Migrating from Tomcat AXIS2 to Standalone AXIS2

Hi Ted,
There is an Axis2 based production quality server called
WSAS(http://wso2.com/products/wsas/) (fully opensource) from WSO2. It
is based on the tomcat core and can act much more reliably than the
simple Axis server.

Ajith

On 10/2/07, redhatter <[EMAIL PROTECTED]> wrote:
>
> If I could chime in on this... I see a need for a production quality
> standalone Axis2 server. To assume that  users of a web service are content
> using Tomcat or some other J2EE container may be incorrect. From personal
> experience, I have seen customers that have sworn allegiance to one
> container or another and need our web service to run in their environment.
> This means mimicking multiple environments to test our web services which is
> time and resource intensive. A production caliber standalone Axis2 container
> would alleviate the need for this additional resource drain and simplify
> technical support.
>
> Thanks,
> Ted
>
>
> Demetris G wrote:
> >
> >
> > Exactly ... thanks for the good feedback Anne and Amila.
> >
> > Anne Thomas Manes wrote:
> >> You'll find this to be the case with most open source projects -- why
> >> reimplement the application container capability again when systems
> >> like Tomcat already exist? The Axis and Axis2 teams are focusing on
> >> solving a different problem -- processing and dispatching XML
> >> messaging requests. The projects are designed to run in any Java EE or
> >> servlet engine.
> >>
> >> If you do find a commercial or open source project that includes an
> >> application container, most likely it includes a copy of Tomcat or
> >> Jetty or it is built on a Java EE app server.
> >>
> >> Axis does support a stand-alone runtime mode, but it is intended only
> >> for testing purposes, not for production runtime.
> >>
> >> Anne
> >>
> >> On 9/19/07, Demetris G <[EMAIL PROTECTED]> wrote:
> >>
> >>> In other words - and excuse the multiple emails on this - although I do
> >>> have a good understanding on how
> >>> Axis and Axis2 work, my point is that I noticed in the literature that
> >>> some researchers are using the wrong
> >>> terminology to explain their functionality that confuses some people.
> >>> These projects are the implementations
> >>> of the SOAP (and REST processing) specifications, they can expose WS and
> >>> process their communications
> >>> with the world. What people should understand is that the service
> >>> implementations are not really "contained"
> >>> in these engines and thus the Tomcats etc. Well in any case, thanks for
> >>> the feedback Amila.
> >>>
> >>> Demetris G wrote:
> >>>
>  Would you say the same for Axis ? Axis can be used as a standalone web
>  services container - yes ?
>  If not then we have people publishing papers on that that may have it
>  wrong.
> 
>  Thanks
> 
>  Demetris G wrote:
> 
> > That's what I thought :) Thanks Amila.
> >
> > Amila Suriarachchi wrote:
> >
> >> On 9/19/07, *Amila Suriarachchi* <[EMAIL PROTECTED]
> >> > wrote:
> >>
> >>
> >>
> >> On 9/18/07, *Demetris G* < [EMAIL PROTECTED]
> >> > wrote:
> >>
> >>
> >> So hold on a sec - Amila, are you saying that Axis2 is not
> >> considered a
> >> stable and reliable enough
> >> standalone web service container
> >>
> >> Axis2 is not a  web service container.  Axis2 is a soap and REST
> >> message processor which supports WS*.  Axis2 is a stable product.
> >> Basically it concentrates on Soap and REST  message processing.
> >>
> >>
> >> Sorry I mean It is not a standalone web application container. It
> >> alows users to deploy web services and expose them with the soap and
> >> REST message processing capabilities.
> >>
> >>
> >> and it should always be deployed within
> >> other proven
> >> containers (i.e. Tomcat etc.)?
> >>
> >> Yes this is the recommended way.  if you want an standalone
> >> server
> >> you can use
> >> WSAS ( http://wso2.com/products/wsas/) which uses  the axis2 and
> >> embedded tomcat server.
> >>
> >> Is this the case only for Axis2 or also
> >> Axis? Where is this documented?
> >>
> >>
> >>
> >>
> >> Amila Suriarachchi wrote:
> >> >
> >> >
> >> > On 9/18/07, *Marko Simic* < [EMAIL PROTECTED]
> >> 
> >> >  >> >> wrote:
> >> >
> >> >
> >> > 

Web Service REST + JSON

2007-10-02 Thread Karina Pereyra
I'm nearby of success.
I have now my pojo services with this method, but i have the last problem.
When i use Badgerfish response comes to client (response is difficult
to parse in javascript),
But when i use Mapped i have the next error:

Mapped formatted JSON with namespaces are not supported in Axis2.
Make sure that your request doesn't include namespaces or use the
Badgerfish convention.

How i could use mapped formatter in axis2 with pojo?

public User UserInfo(String username ) throws AxisFault{
MessageContext msgContext =
org.apache.axis2.context.MessageContext.getCurrentMessageContext().getCurrentMessageContext().getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE
);

msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE,"application/json");
return (User)entries.get(username);
}

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



Running Axis 1.4 under JDK 1.3.x

2007-10-02 Thread Gamble, Wesley (WG10)
All,

 

I would like to run Axis 1.4 under JDK 1.3.x.  Can anyone point me at
the correct set of dependencies?

 

Wes



Autogenerated code format - configuration for PrettyPrint (Jalopy)

2007-10-02 Thread James Maes
All, 

We are using the wsdl2java tools to create our client side
soap handlers and unit tests and It's working great.  The only issue I am
having is with the format of the code that it is generating.  We have to
meet a different format code standard where I work and if possible I would
like to have this tool write it's code in that format. 

 

I have already modified all the xsl templates in the codegen package to fit
our commenting standards, etc but now I need to configure the post process
PrettyPrint formatter different. 

 

I've tracked all the code I could for this (from
JavaPrettyPrinterExtension.java to org.apache.axis2.util.PrettyPrint).  I
can't find or figure out how the configuration for Jalopy is being set. 

 

Can anyone point me in the right direction?

 

Thanks

-JM



Re: Web Services REST + JSON client JS

2007-10-02 Thread Karina Pereyra
I have a little problem i could't use Mapped but when i solve this
i'will write this tutorial.
Regards.


On 10/2/07, Anas Mughal <[EMAIL PROTECTED]> wrote:
> Please do create a guide. I wish to suggest using Axis2-based Rest
> services/JSON on my current project. Couldn't get time to dig into how to
> setup a small sample app. The Axis2 documentation was that much help.
>
> A guide would be greatly helpful.
> Regards.
> --
> anas mughal
>
>
>
>
>
>
> On 10/2/07, Karina Pereyra < [EMAIL PROTECTED]> wrote:
> > Wohhh, i think it's working, after i finish I'll create a small guide
> > to create json + rest + javascript client applications but i need a
> > little help to complete this functionalities.
> > I'd like to use Mapped formater (to parse in client with a single eval
> > method) but i have this errror, Using Badgerfish all work fine but not
> > using Mapped.
> >
> > 2007-10-02 15:25:34,647 [http-8080-1] ERROR
> >
> org.apache.axis2.transport.http.CommonsHTTPTransportSender
>  - Mapped
> > formatted JSON with namespaces are not supported in Axis2. Make sure
> > that your request doesn't include namespaces or use the Badgerfish
> > convention
> > org.apache.axis2.AxisFault: Mapped formatted JSON with namespaces are
> > not supported in Axis2. Make sure that your request doesn't include
> > namespaces or use the Badgerfish convention
> >
> > Could i remove header from request before send and response? how can i
> > solve this issue?
> >
> >
> > On 10/2/07, keith chapman <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > Use this
> > >
> > > MessageContext msgContext =
> > >
> org.apache.axis2.context.MessageContext.getCurrentMessageContext().getCurrentMessageContext().getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE
> > > );
> > >
> > > The reason is that
> > >
> org.apache.axis2.context.MessageContext.getCurrentMessageContext().getCurrentMessageContext()
> > > gives you the request messageContext but what you want is the response
> > > messageContext. That should work.
> > >
> > >
> > > Thanks,
> > > Keith.
> > >
> > >
> > > On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED]> wrote:
> > > > Keith,
> > > >I'm a neebie using axis2, i dont have  an context created i
> > > > only create a pojo object and return a object.
> > > >I've modified the message bulder and messageformater section
> > > > but i want to force my POJO to return a json string.
> > > >I've added this lines into my pojo service but did't work.
> > > >
> > > > MessageContext msgContext =
> > > >
> > >
> org.apache.axis2.context.MessageContext.getCurrentMessageContext();
> > > >
> > >
> msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE
> > > ,"application/json");
> > > >
> > > > Where i need to add this set property configuration?
> > > >
> > > >
> > > >
> > > > regargs
> > > > lechu
> > > >
> > > >
> > > >
> > > >
> > > > On 10/2/07, keith chapman <[EMAIL PROTECTED] > wrote:
> > > > > Hi,
> > > > >
> > > > > You can do so by setting the following property to application/json,
> > > > > application/json/badgerfish or text/javascript
> > > > >
> > > > >
> > >
> msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE
> > > ,
> > > > > );
> > > > >
> > > > > also make sure you have the following in your axis2.xml
> > > > >
> > > > >  > > > >
> > > > > class="
> org.apache.axis2.json.JSONMessageFormatter"/>
> > > > >  > > > > contentType="application/json/badgerfish"
> > > > >
> > > > >
> > > class="
> org.apache.axis2.json.JSONBadgerfishMessageFormatter
> > > "/>
> > > > >  > > > >
> > > > > class="org.apache.axis2.json.JSONMessageFormatter
> "/>
> > > > >
> > > > > in the messageFoematters section and
> > > > >
> > > > >  > > > >  class="
> > > > > org.apache.axis2.json.JSONOMBuilder"/>
> > > > >  > > > > contentType="application/json/badgerfish"
> > > > >
> > > > > class="
> org.apache.axis2.json.JSONBadgerfishOMBuilder"/>
> > > > >  > > > >
> > > > > class="org.apache.axis2.json.JSONOMBuilder "/>
> > > > >
> > > > > in the messageBuilders section.
> > > > >
> > > > > You might also wanna take a look at http://wso2.org/library/768 this
> > > article
> > > > > which describes JSON support in axis2 and explains the above
> > > configurations.
> > > > > Hope that you have a happy time trying JSON and Axis2...
> > > > >
> > > > > Thanks,
> > > > > Keith.
> > > > >
> > > > >
> > > > > On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED] > wrote:
> > > > > >
> > > > > > Hi guys,
> > > > > >
> > > > > > I'd like to start using axis2 as a service engine.
> > > > > >
> > > > > > All clients in my structure are javacripts clients,
> and
> > > > > > the best option could be use REST request and response using JSON
> > > > > > objects?
> > > > > >
> > > > > > I'm using pojo objects in this way:
> > > > > >
> > > > > > public class User {
> > > > > >  private HashMap entries 

Re: Web Services REST + JSON client JS

2007-10-02 Thread Anas Mughal
Please do create a guide. I wish to suggest using Axis2-based Rest
services/JSON on my current project. Couldn't get time to dig into how to
setup a small sample app. The Axis2 documentation was that much help.

A guide would be greatly helpful.
Regards.
--
anas mughal





On 10/2/07, Karina Pereyra <[EMAIL PROTECTED]> wrote:
>
> Wohhh, i think it's working, after i finish I'll create a small guide
> to create json + rest + javascript client applications but i need a
> little help to complete this functionalities.
> I'd like to use Mapped formater (to parse in client with a single eval
> method) but i have this errror, Using Badgerfish all work fine but not
> using Mapped.
>
> 2007-10-02 15:25:34,647 [http-8080-1] ERROR
> org.apache.axis2.transport.http.CommonsHTTPTransportSender  - Mapped
> formatted JSON with namespaces are not supported in Axis2. Make sure
> that your request doesn't include namespaces or use the Badgerfish
> convention
> org.apache.axis2.AxisFault: Mapped formatted JSON with namespaces are
> not supported in Axis2. Make sure that your request doesn't include
> namespaces or use the Badgerfish convention
>
> Could i remove header from request before send and response? how can i
> solve this issue?
>
>
> On 10/2/07, keith chapman <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Use this
> >
> > MessageContext msgContext =
> > org.apache.axis2.context.MessageContext.getCurrentMessageContext
> ().getCurrentMessageContext().getOperationContext().getMessageContext(
> WSDLConstants.MESSAGE_LABEL_OUT_VALUE
> > );
> >
> > The reason is that
> > org.apache.axis2.context.MessageContext.getCurrentMessageContext
> ().getCurrentMessageContext()
> > gives you the request messageContext but what you want is the response
> > messageContext. That should work.
> >
> >
> > Thanks,
> > Keith.
> >
> >
> > On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED]> wrote:
> > > Keith,
> > >I'm a neebie using axis2, i dont have  an context created i
> > > only create a pojo object and return a object.
> > >I've modified the message bulder and messageformater section
> > > but i want to force my POJO to return a json string.
> > >I've added this lines into my pojo service but did't work.
> > >
> > > MessageContext msgContext =
> > >
> > org.apache.axis2.context.MessageContext.getCurrentMessageContext();
> > >
> > msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE
> > ,"application/json");
> > >
> > > Where i need to add this set property configuration?
> > >
> > >
> > >
> > > regargs
> > > lechu
> > >
> > >
> > >
> > >
> > > On 10/2/07, keith chapman <[EMAIL PROTECTED] > wrote:
> > > > Hi,
> > > >
> > > > You can do so by setting the following property to application/json,
> > > > application/json/badgerfish or text/javascript
> > > >
> > > >
> > msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE
> > ,
> > > > );
> > > >
> > > > also make sure you have the following in your axis2.xml
> > > >
> > > >  > > >
> > > > class=" org.apache.axis2.json.JSONMessageFormatter"/>
> > > >  > > > contentType="application/json/badgerfish"
> > > >
> > > >
> > class="org.apache.axis2.json.JSONBadgerfishMessageFormatter
> > "/>
> > > >  > > >
> > > > class="org.apache.axis2.json.JSONMessageFormatter"/>
> > > >
> > > > in the messageFoematters section and
> > > >
> > > >  > > >  class="
> > > > org.apache.axis2.json.JSONOMBuilder"/>
> > > >  > > > contentType="application/json/badgerfish"
> > > >
> > > > class="org.apache.axis2.json.JSONBadgerfishOMBuilder"/>
> > > >  > > >
> > > > class="org.apache.axis2.json.JSONOMBuilder "/>
> > > >
> > > > in the messageBuilders section.
> > > >
> > > > You might also wanna take a look at http://wso2.org/library/768 this
> > article
> > > > which describes JSON support in axis2 and explains the above
> > configurations.
> > > > Hope that you have a happy time trying JSON and Axis2...
> > > >
> > > > Thanks,
> > > > Keith.
> > > >
> > > >
> > > > On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED] > wrote:
> > > > >
> > > > > Hi guys,
> > > > >
> > > > > I'd like to start using axis2 as a service engine.
> > > > >
> > > > > All clients in my structure are javacripts clients,
> and
> > > > > the best option could be use REST request and response using JSON
> > > > > objects?
> > > > >
> > > > > I'm using pojo objects in this way:
> > > > >
> > > > > public class User {
> > > > >  private HashMap entries = new HashMap();
> > > > >   public User(){
> > > > >  }
> > > > > public void Add( User ){
> > > > > this.entries.put (entry.getName(), entry);
> > > > > }
> > > > > public User Info(String name){
> > > > >   return (User) entries.get(name);
> > > > > }
> > > > > }
> > > > >
> > > > >
> > > > >
> > > > > public class User {
> > > > > priva

Re: Web Services REST + JSON client JS

2007-10-02 Thread Karina Pereyra
Wohhh, i think it's working, after i finish I'll create a small guide
to create json + rest + javascript client applications but i need a
little help to complete this functionalities.
I'd like to use Mapped formater (to parse in client with a single eval
method) but i have this errror, Using Badgerfish all work fine but not
using Mapped.

2007-10-02 15:25:34,647 [http-8080-1] ERROR
org.apache.axis2.transport.http.CommonsHTTPTransportSender  - Mapped
formatted JSON with namespaces are not supported in Axis2. Make sure
that your request doesn't include namespaces or use the Badgerfish
convention
org.apache.axis2.AxisFault: Mapped formatted JSON with namespaces are
not supported in Axis2. Make sure that your request doesn't include
namespaces or use the Badgerfish convention

Could i remove header from request before send and response? how can i
solve this issue?


On 10/2/07, keith chapman <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Use this
>
> MessageContext msgContext =
> org.apache.axis2.context.MessageContext.getCurrentMessageContext().getCurrentMessageContext().getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE
> );
>
> The reason is that
> org.apache.axis2.context.MessageContext.getCurrentMessageContext().getCurrentMessageContext()
> gives you the request messageContext but what you want is the response
> messageContext. That should work.
>
>
> Thanks,
> Keith.
>
>
> On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED]> wrote:
> > Keith,
> >I'm a neebie using axis2, i dont have  an context created i
> > only create a pojo object and return a object.
> >I've modified the message bulder and messageformater section
> > but i want to force my POJO to return a json string.
> >I've added this lines into my pojo service but did't work.
> >
> > MessageContext msgContext =
> >
> org.apache.axis2.context.MessageContext.getCurrentMessageContext();
> >
> msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE
> ,"application/json");
> >
> > Where i need to add this set property configuration?
> >
> >
> >
> > regargs
> > lechu
> >
> >
> >
> >
> > On 10/2/07, keith chapman <[EMAIL PROTECTED] > wrote:
> > > Hi,
> > >
> > > You can do so by setting the following property to application/json,
> > > application/json/badgerfish or text/javascript
> > >
> > >
> msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE
> ,
> > > );
> > >
> > > also make sure you have the following in your axis2.xml
> > >
> > >  > >
> > > class=" org.apache.axis2.json.JSONMessageFormatter"/>
> > >  > > contentType="application/json/badgerfish"
> > >
> > >
> class="org.apache.axis2.json.JSONBadgerfishMessageFormatter
> "/>
> > >  > >
> > > class="org.apache.axis2.json.JSONMessageFormatter"/>
> > >
> > > in the messageFoematters section and
> > >
> > >  > >  class="
> > > org.apache.axis2.json.JSONOMBuilder"/>
> > >  > > contentType="application/json/badgerfish"
> > >
> > > class="org.apache.axis2.json.JSONBadgerfishOMBuilder"/>
> > >  > >
> > > class="org.apache.axis2.json.JSONOMBuilder "/>
> > >
> > > in the messageBuilders section.
> > >
> > > You might also wanna take a look at http://wso2.org/library/768 this
> article
> > > which describes JSON support in axis2 and explains the above
> configurations.
> > > Hope that you have a happy time trying JSON and Axis2...
> > >
> > > Thanks,
> > > Keith.
> > >
> > >
> > > On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED] > wrote:
> > > >
> > > > Hi guys,
> > > >
> > > > I'd like to start using axis2 as a service engine.
> > > >
> > > > All clients in my structure are javacripts clients, and
> > > > the best option could be use REST request and response using JSON
> > > > objects?
> > > >
> > > > I'm using pojo objects in this way:
> > > >
> > > > public class User {
> > > >  private HashMap entries = new HashMap();
> > > >   public User(){
> > > >  }
> > > > public void Add( User ){
> > > > this.entries.put (entry.getName(), entry);
> > > > }
> > > > public User Info(String name){
> > > >   return (User) entries.get(name);
> > > > }
> > > > }
> > > >
> > > >
> > > >
> > > > public class User {
> > > > private String name = null;
> > > > public String getName() {
> > > > return name;
> > > > }
> > > >
> > > > public void setName(String name) {
> > > > this. name = name;
> > > > }
> > > > }
> > > >
> > > > How can i force json response ?
> > > > I have added the tags in axis2.xml file.
> > > >
> > > > regards
> > > > Lechu
> > > >
> > > >
> > >
> -
> > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Keith Chapman

RE: Axis 2.0 Content-type

2007-10-02 Thread Ganesan, Chandru
- 
http://axisversion.sample/xsd";>
  Hello I am Axis2 version service , My version is
1.1.1 
  
 

Thanks
Chandru Ganesan 

 




From: keith chapman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 02, 2007 12:48 PM
To: axis-user@ws.apache.org
Subject: Re: Axis 2.0 Content-type


This is strange cause Axis actually treated your request as SOAP
1.1 cause the response itself is soap 1.1 but with the wrong
content-type header. May i know your axis2 version please?

Thanks,
Keith.


On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote: 

Here is the request/response with HTTP header. SOAP
request was transmitted after removing the messageBuilders from
axis2.xml and redeploying application. Please note that I've not
included the complete response in this email
 
 
Appreciate your help.
 
Thanks
Chandru
 
 
REQUEST



104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header - >> "POST
http://16.85.4.239:7001/axis2/rest/ProcessDocumentWebService/processRequ
est HTTP/1.1[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header - >> "Content-Length: 840[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header - >> "Content-Type: text/xml;
charset="utf-8"[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header - >> "SOAPAction: ""[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header - >> "User-Agent: Jakarta
Commons-HttpClient/2.0.1[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header - >> "Host: 16.85.4.239:7001[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header - >> "Proxy-Connection: Keep-Alive[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header - >> "[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "http://schemas.xmlsoap.org/soap/envelope/";
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse
curity-secext-1.0.xsd " [\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utili
ty-1.0.xsd
 " >[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "
spml20admin[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "PASSWORD[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "
WScqanjCEAC4mQoBE07sAQ==[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "
2003-07-16T01:24:32Z [\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "spml20[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
 
 

RESPONSE

==

Re: Axis 2.0 Content-type

2007-10-02 Thread keith chapman
This is strange cause Axis actually treated your request as SOAP 1.1 cause
the response itself is soap 1.1 but with the wrong content-type header. May
i know your axis2 version please?

Thanks,
Keith.

On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
>
>  Here is the request/response with HTTP header. SOAP request was
> transmitted after removing the messageBuilders from axis2.xml and
> redeploying application. Please note that I've not included the complete
> response in this email
>
>
> Appreciate your help.
>
> Thanks
> Chandru
>
>
> REQUEST
>
> 
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> >> "POST
> http://16.85.4.239:7001/axis2/rest/ProcessDocumentWebService/processRequestHTTP/1.1[\r][\n]";
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> >> "Content-Length: 840[\r][\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> >> "Content-Type: text/xml; charset="utf-8"[\r][\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> >> "SOAPAction: ""[\r][\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> >> "User-Agent: Jakarta Commons-HttpClient/2.0.1[\r][\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> >> "Host: 16.85.4.239:7001[\r][\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> >> "Proxy-Connection: Keep-Alive[\r][\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> >> "[\r][\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "http://schemas.xmlsoap.org/soap/envelope/";  xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
> [\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> >[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "spml20admin[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> " Type="wsse:PasswordText">PASSWORD[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "WScqanjCEAC4mQoBE07sAQ==[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "2003-07-16T01:24:32Z [\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "spml20[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
> 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> 
> "[\n]"
>
>
>  RESPONSE
>
> 
>
> 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> << "HTTP/1.1 200 OK[\r][\n]"
> 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> << "Via: 1.1 HOUWEBPROXY03[\r][\n]"
> 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> << "Connection: Keep-Alive[\r][\n]"
> 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> << "Proxy-Connection: Keep-Alive[\r][\n]"
> 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> << "Transfer-Encoding: chunked[\r][\n]"
> 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> << "Date: Tue, 02 Oct 2007 17:21:27 GMT[\r][\n]"
> 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> << "Content-Type: application/xml; charset=utf-8[\r][\n]"
> 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header -
> << "Cache-Control: no-cache="set-cookie"[\r][\n]"
> 117468 DEBUG [ class ro.sync.ui.applic

Re: Web Services REST + JSON client JS

2007-10-02 Thread keith chapman
Hi,

Use this

MessageContext msgContext =
org.apache.axis2.context.MessageContext.getCurrentMessageContext
().getCurrentMessageContext().getOperationContext().getMessageContext(
WSDLConstants.MESSAGE_LABEL_OUT_VALUE);

The reason is that
org.apache.axis2.context.MessageContext.getCurrentMessageContext().getCurrentMessageContext()
gives you the request messageContext but what you want is the response
messageContext. That should work.

Thanks,
Keith.


On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED]> wrote:
>
> Keith,
>I'm a neebie using axis2, i dont have  an context created i
> only create a pojo object and return a object.
>I've modified the message bulder and messageformater section
> but i want to force my POJO to return a json string.
>I've added this lines into my pojo service but did't work.
>
> MessageContext msgContext =
> org.apache.axis2.context.MessageContext.getCurrentMessageContext();
> msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE
> ,"application/json");
>
> Where i need to add this set property configuration?
>
>
>
> regargs
> lechu
>
>
>
>
> On 10/2/07, keith chapman <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > You can do so by setting the following property to application/json,
> > application/json/badgerfish or text/javascript
> >
> > msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE,
> > );
> >
> > also make sure you have the following in your axis2.xml
> >
> >  >
> > class="org.apache.axis2.json.JSONMessageFormatter"/>
> >  > contentType="application/json/badgerfish"
> >
> > class="org.apache.axis2.json.JSONBadgerfishMessageFormatter"/>
> >  >
> > class="org.apache.axis2.json.JSONMessageFormatter"/>
> >
> > in the messageFoematters section and
> >
> >  >  class="
> > org.apache.axis2.json.JSONOMBuilder"/>
> >  > contentType="application/json/badgerfish"
> >
> > class="org.apache.axis2.json.JSONBadgerfishOMBuilder"/>
> >  >
> > class="org.apache.axis2.json.JSONOMBuilder"/>
> >
> > in the messageBuilders section.
> >
> > You might also wanna take a look at http://wso2.org/library/768 this
> article
> > which describes JSON support in axis2 and explains the above
> configurations.
> > Hope that you have a happy time trying JSON and Axis2...
> >
> > Thanks,
> > Keith.
> >
> >
> > On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi guys,
> > >
> > > I'd like to start using axis2 as a service engine.
> > >
> > > All clients in my structure are javacripts clients, and
> > > the best option could be use REST request and response using JSON
> > > objects?
> > >
> > > I'm using pojo objects in this way:
> > >
> > > public class User {
> > >  private HashMap entries = new HashMap();
> > >   public User(){
> > >  }
> > > public void Add( User ){
> > > this.entries.put (entry.getName(), entry);
> > > }
> > > public User Info(String name){
> > >   return (User) entries.get(name);
> > > }
> > > }
> > >
> > >
> > >
> > > public class User {
> > > private String name = null;
> > > public String getName() {
> > > return name;
> > > }
> > >
> > > public void setName(String name) {
> > > this. name = name;
> > > }
> > > }
> > >
> > > How can i force json response ?
> > > I have added the tags in axis2.xml file.
> > >
> > > regards
> > > Lechu
> > >
> > >
> > -
> > > 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/
>
> -
> 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: Web Services REST + JSON client JS

2007-10-02 Thread Lechuza lechuza
Keith,
   I'm a neebie using axis2, i dont have  an context created i
only create a pojo object and return a object.
   I've modified the message bulder and messageformater section
but i want to force my POJO to return a json string.
   I've added this lines into my pojo service but did't work.

MessageContext msgContext =
org.apache.axis2.context.MessageContext.getCurrentMessageContext();
msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE,"application/json");

Where i need to add this set property configuration?



regargs
lechu




On 10/2/07, keith chapman <[EMAIL PROTECTED]> wrote:
> Hi,
>
> You can do so by setting the following property to application/json,
> application/json/badgerfish or text/javascript
>
> msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE,
> );
>
> also make sure you have the following in your axis2.xml
>
> 
> class="org.apache.axis2.json.JSONMessageFormatter"/>
>  contentType="application/json/badgerfish"
>
> class="org.apache.axis2.json.JSONBadgerfishMessageFormatter"/>
> 
> class="org.apache.axis2.json.JSONMessageFormatter"/>
>
> in the messageFoematters section and
>
>   class="
> org.apache.axis2.json.JSONOMBuilder"/>
>  contentType="application/json/badgerfish"
>
> class="org.apache.axis2.json.JSONBadgerfishOMBuilder"/>
> 
> class="org.apache.axis2.json.JSONOMBuilder"/>
>
> in the messageBuilders section.
>
> You might also wanna take a look at http://wso2.org/library/768 this article
> which describes JSON support in axis2 and explains the above configurations.
> Hope that you have a happy time trying JSON and Axis2...
>
> Thanks,
> Keith.
>
>
> On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED]> wrote:
> >
> > Hi guys,
> >
> > I'd like to start using axis2 as a service engine.
> >
> > All clients in my structure are javacripts clients, and
> > the best option could be use REST request and response using JSON
> > objects?
> >
> > I'm using pojo objects in this way:
> >
> > public class User {
> >  private HashMap entries = new HashMap();
> >   public User(){
> >  }
> > public void Add( User ){
> > this.entries.put (entry.getName(), entry);
> > }
> > public User Info(String name){
> >   return (User) entries.get(name);
> > }
> > }
> >
> >
> >
> > public class User {
> > private String name = null;
> > public String getName() {
> > return name;
> > }
> >
> > public void setName(String name) {
> > this. name = name;
> > }
> > }
> >
> > How can i force json response ?
> > I have added the tags in axis2.xml file.
> >
> > regards
> > Lechu
> >
> >
> -
> > 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/

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



RE: Axis 2.0 Content-type

2007-10-02 Thread Ganesan, Chandru
Here is the request/response with HTTP header. SOAP request was
transmitted after removing the messageBuilders from axis2.xml and
redeploying application. Please note that I've not included the complete
response in this email
 
 
Appreciate your help.
 
Thanks
Chandru
 
 
REQUEST


104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- >> "POST
http://16.85.4.239:7001/axis2/rest/ProcessDocumentWebService/processRequ
est HTTP/1.1[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- >> "Content-Length: 840[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- >> "Content-Type: text/xml; charset="utf-8"[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- >> "SOAPAction: ""[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- >> "User-Agent: Jakarta Commons-HttpClient/2.0.1[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- >> "Host: 16.85.4.239:7001[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- >> "Proxy-Connection: Keep-Alive[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- >> "[\r][\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "http://schemas.xmlsoap.org/soap/envelope/";
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse
curity-secext-1.0.xsd" [\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >>
"xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse
curity-utility-1.0.xsd" >[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "
spml20admin[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "PASSWORD[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "
WScqanjCEAC4mQoBE07sAQ==[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "
2003-07-16T01:24:32Z [\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "spml20[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
104658 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - >> "[\n]"
 
 
RESPONSE



117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "HTTP/1.1 200 OK[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Via: 1.1 HOUWEBPROXY03[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Connection: Keep-Alive[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Proxy-Connection: Keep-Alive[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Transfer-Encoding: chunked[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Date: Tue, 02 Oct 2007 17:21:27 GMT[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Content-Type: application/xml; charset=utf-8[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Cache-Control: no-cache="set-cookie"[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Set-Cookie:
JSESSIONID=LLvXHC2X8gyyQlTdR0QTwhXf0Ln5nR8MwJhSvS7SQyBm2bYTfc8h!-2076308
598; path=/[\r][\n]"
117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]"
117515 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - << "0"
117515 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.content - << "f"
117515 DEBUG [ class ro.sync.ui.application.A

Re: Axis 2.0 Content-type

2007-10-02 Thread keith chapman
The reason you received the response as application/XML is because Axis2
treated your request as REST. Can you send me the request and response (with
the http headers) taken after reverting the changes you did to the axis2.xml
.

Thanks,
Keith.

On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
>
>
> I'm using Oxygen 8.2, WSDL/SOAP Analyzer tool to send SOAP request to Axis
> 2 server. When I use HTTP client it doesn't complain about
> content-type=application/xml in the response. However, Oxygen is unable to
> understand the SOAP response and fails with following error message:
>
>
> Invalid Content-Type:application/xml. Is this an error message instead of
> a SOAP response?
>
> I tried sending a SOAP request with a dummy URI in the SOAPAction from
> Oxygen and still get above error message.
>
> This is the response I received from Oxygen support team:
>
> The axis server responds with a "Content-Type: application/xml;
> charset=utf-8" header.
>
> Unfortunately the "com.sun.xml.messaging.saaj.soap.MessageImpl" class from
> the "saaj-impl.jar" we are using to interpret the message tries to map the
> content type received from the server either as "text/xml" in which case it
> considers the SOAP response to be of version 1.1 or as
> "application/soap+xml" in which case it considers the response to be of
> version 1.2.
>
> As neither matches, the SOAP client throws the error message you received.
>
> Thanks
> Chandru Ganesan
>
>
>  --
> *From:* keith chapman [mailto:[EMAIL PROTECTED]
> *Sent:* Tuesday, October 02, 2007 11:30 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Axis 2.0 Content-type
>
> Hi,
>
> The SOAPaction is an attribute which can be used to dispatch a message. If
> a service advertises that it uses a SOAPAction you can set it in the client
> so that the client sends it in the request. As SOAPaction is mandatory in
> SOAP 1.1 request you should atleast have the following header
>
> SOAPAction: ""
>
> What is the client that your using. If its axis2 it does the above (Add an
> empty SOAPaction if its not specified) if the request is SOAP 1.1.
>
> Thanks,
> Keith
>
> On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi Keith
> >
> > Thanks for the quick response.
> >
> > As you've guessed correctly the request does not contain a SOAPAction.
> > I'm not quite clear about what should the value of SOAPAction be so that
> > Axis 2.0 treats it as SOAP 1.1 request. As I'm researching this topic,
> > appreciate your thoughts on it.
> >
> > Thanks
> > Chandru Ganesan
> >
> >
> >  --
> > *From:* keith chapman [mailto:[EMAIL PROTECTED]
> > *Sent:* Tuesday, October 02, 2007 10:59 AM
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: Axis 2.0 Content-type
> >
> >  No you dont need to modify your axis2.xml leave it as it was. Can you
> > check the SOAP request you sent. I'm sure it does not contain the SOAPAction
> > header. In SOAP 1.1 the SOAPAction is mandatory and axis2 uses this as a
> > key to differentiate  between REST request and SOAP 1.1 request (As some
> > REST request uses  text/xml as the contentType). The reason your response
> > was application/xml is because Axis2 treated  your request as a REST request
> > and responded accordingly.
> >
> > Thanks,
> > Keith.
> >
> > On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Hi
> > >
> > > When I send a SOAP request to Axis 2.0 service the response contains
> > > content-type=application/xml in the HTTP header. This causes WSDL/SOAP
> > > client tool to throw an exception as it doesn't understand the
> > > content-type of application/xml. For SOAP 1.1 it expects
> > > content-type=text/xml. I  modified the Axis2.xml to include following
> > > lines. But this still doesn't return  content-type=text/xml. Am I
> > > missing something in the Axis2.xml so that content-type of text/xml
> > > can
> > > be returned in the response.
> > >
> > > Appreciate your input very much.
> > >
> > > Modified Axis2.xml contains following lines for text/xml:
> > > =
> > > 
> > >  > > class=""/>
> > >  > > class=""/>
> > >  > > class=""/>
> > > 
> > >
> > >
> > > SOAP response
> > > =
> > > "HTTP/1.1 200 OK[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Via: 1.1 HOUWEBPROXY03[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Connection: Keep-Alive[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Proxy-Connection: Keep-Alive[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Transfer-Encoding: chunked[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Date: Mon, 01 Oct 2007 19:37:41 GMT[\r][\n]"
> > > 128708 DEBUG [ class

Re: Axis 2.0 Content-type

2007-10-02 Thread keith chapman
Did you remember to revert the changes you did to your axis2.xml?

On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
>
>
> I'm using Oxygen 8.2, WSDL/SOAP Analyzer tool to send SOAP request to Axis
> 2 server. When I use HTTP client it doesn't complain about
> content-type=application/xml in the response. However, Oxygen is unable to
> understand the SOAP response and fails with following error message:
>
>
> Invalid Content-Type:application/xml. Is this an error message instead of
> a SOAP response?
>
> I tried sending a SOAP request with a dummy URI in the SOAPAction from
> Oxygen and still get above error message.
>
> This is the response I received from Oxygen support team:
>
> The axis server responds with a "Content-Type: application/xml;
> charset=utf-8" header.
>
> Unfortunately the "com.sun.xml.messaging.saaj.soap.MessageImpl" class from
> the "saaj-impl.jar" we are using to interpret the message tries to map the
> content type received from the server either as "text/xml" in which case it
> considers the SOAP response to be of version 1.1 or as
> "application/soap+xml" in which case it considers the response to be of
> version 1.2.
>
> As neither matches, the SOAP client throws the error message you received.
>
> Thanks
> Chandru Ganesan
>
>
>  --
> *From:* keith chapman [mailto:[EMAIL PROTECTED]
> *Sent:* Tuesday, October 02, 2007 11:30 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Axis 2.0 Content-type
>
> Hi,
>
> The SOAPaction is an attribute which can be used to dispatch a message. If
> a service advertises that it uses a SOAPAction you can set it in the client
> so that the client sends it in the request. As SOAPaction is mandatory in
> SOAP 1.1 request you should atleast have the following header
>
> SOAPAction: ""
>
> What is the client that your using. If its axis2 it does the above (Add an
> empty SOAPaction if its not specified) if the request is SOAP 1.1.
>
> Thanks,
> Keith
>
> On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi Keith
> >
> > Thanks for the quick response.
> >
> > As you've guessed correctly the request does not contain a SOAPAction.
> > I'm not quite clear about what should the value of SOAPAction be so that
> > Axis 2.0 treats it as SOAP 1.1 request. As I'm researching this topic,
> > appreciate your thoughts on it.
> >
> > Thanks
> > Chandru Ganesan
> >
> >
> >  --
> > *From:* keith chapman [mailto:[EMAIL PROTECTED]
> > *Sent:* Tuesday, October 02, 2007 10:59 AM
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: Axis 2.0 Content-type
> >
> >  No you dont need to modify your axis2.xml leave it as it was. Can you
> > check the SOAP request you sent. I'm sure it does not contain the SOAPAction
> > header. In SOAP 1.1 the SOAPAction is mandatory and axis2 uses this as a
> > key to differentiate  between REST request and SOAP 1.1 request (As some
> > REST request uses  text/xml as the contentType). The reason your response
> > was application/xml is because Axis2 treated  your request as a REST request
> > and responded accordingly.
> >
> > Thanks,
> > Keith.
> >
> > On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Hi
> > >
> > > When I send a SOAP request to Axis 2.0 service the response contains
> > > content-type=application/xml in the HTTP header. This causes WSDL/SOAP
> > > client tool to throw an exception as it doesn't understand the
> > > content-type of application/xml. For SOAP 1.1 it expects
> > > content-type=text/xml. I  modified the Axis2.xml to include following
> > > lines. But this still doesn't return  content-type=text/xml. Am I
> > > missing something in the Axis2.xml so that content-type of text/xml
> > > can
> > > be returned in the response.
> > >
> > > Appreciate your input very much.
> > >
> > > Modified Axis2.xml contains following lines for text/xml:
> > > =
> > > 
> > >  > > class=""/>
> > >  > > class=""/>
> > >  > > class=""/>
> > > 
> > >
> > >
> > > SOAP response
> > > =
> > > "HTTP/1.1 200 OK[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Via: 1.1 HOUWEBPROXY03[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Connection: Keep-Alive[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Proxy-Connection: Keep-Alive[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Transfer-Encoding: chunked[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Date: Mon, 01 Oct 2007 19:37:41 GMT[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J ]
> > > httpclient.wire.header
> > > - << "Content-Type: application/xml; charset=utf-8[\r][\n]"
> > > 128708 DEBUG [ class ro.sync.ui.application.A.J 

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

2007-10-02 Thread Pantvaidya, Vishwajit
Hi Amila,

By the way, (as mentioned at the beginning of this thread), I am on Axis2 1.3.

The ant task I am using has the following options
"-o ... -l java -ss -sd -d ... -ssi -f -uri ... -ns2p ...".
(for the -d option, I have tried adb/xmlbeans/jaxbri/jaxme)

If you are able to generate classes correctly, can you send me a zip of those?


Thanks,

Vish.


From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 2:32 PM
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String

Actually I do see that the complex types are getting generated - but the "-f" 
option seems to be working erratically, because of which those types got 
generated with a "src" folder at the topmost level.
But unwrapping does not work with jaxme/jaxbri/ADB.

My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like 
axis1 even if wsdl remains same and irrespective of the value of the "-d" 
wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, 
etc, and make change in the webservice implementation to handle, for example, 
xmlbeans.XmlString instead of java.lang.String.

So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice 
operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString 
instead of java String.

Any suggestions/thoughts/corrections?



From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String

Hi Amila,

Let me know if I am doing anything wrong here or if I need to change anything.


- Vish.


From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String

I also tried using jaxb hoping that it would directly map to java types - found 
2 problems there.
1. axis2 does not support unwrapping for jaxb - why is that?
2. for the same wsdl, I emailed you, it created an interface as follows:
public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
);
But it did not create the class for the complex types 
com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. 
Am I doing anything wrong here or is there a problem with the axis2 jaxb 
support?


- Vish.


From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String

For this wsdl - it creates interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (
org.apache.xmlbeans.XmlString sessiontoken,
org.apache.xmlbeans.XmlString trackingnumber,
org.apache.xmlbeans.XmlInt version
);

So the unwrapping here is okay - but I need java.lang,String params instead of 
xmlbeans.XmlString. I know that XmlString contains a string finally - but I do 
not really need that additional wrapper.
Is this happening because of the bindings functionality introduced in axis2?
Is it possible in axis2 to do wsdl2java using only POJO types?



From: Amila Suriarachchi [mailto:[EMAIL PROTECTED]
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String


On 8/23/07, Pantvaidya, Vishwajit <[EMAIL PROTECTED]> 
wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives 
error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 
resulting in interface with parameters of java types. Hasn't that been retained 
in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also 
completed fine - but resulting classes had all complex type params with 
generated types. So I tried the -uw option - hoping it will unwrap those. But 
now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema 
format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping 
works with the document literal type services. if you can send your wsdl I can 
check.


org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:370),
 
org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.j

RE: Axis 2.0 Content-type

2007-10-02 Thread Ganesan, Chandru
 
I'm using Oxygen 8.2, WSDL/SOAP Analyzer tool to send SOAP request to
Axis 2 server. When I use HTTP client it doesn't complain about
content-type=application/xml in the response. However, Oxygen is unable
to understand the SOAP response and fails with following error message:
 
Invalid Content-Type:application/xml. Is this an error message instead
of a SOAP response?

I tried sending a SOAP request with a dummy URI in the SOAPAction from
Oxygen and still get above error message.

This is the response I received from Oxygen support team:

The axis server responds with a "Content-Type: application/xml;
charset=utf-8" header.

Unfortunately the "com.sun.xml.messaging.saaj.soap.MessageImpl" class
from the "saaj-impl.jar" we are using to interpret the message tries to
map the content type received from the server either as "text/xml" in
which case it considers the SOAP response to be of version 1.1 or as
"application/soap+xml" in which case it considers the response to be of
version 1.2.

As neither matches, the SOAP client throws the error message you
received.

Thanks
Chandru Ganesan 

 




From: keith chapman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 02, 2007 11:30 AM
To: axis-user@ws.apache.org
Subject: Re: Axis 2.0 Content-type


Hi,

The SOAPaction is an attribute which can be used to dispatch a
message. If a service advertises that it uses a SOAPAction you can set
it in the client so that the client sends it in the request. As
SOAPaction is mandatory in SOAP 1.1 request you should atleast have the
following header

SOAPAction: ""

What is the client that your using. If its axis2 it does the
above (Add an empty SOAPaction if its not specified) if the request is
SOAP 1.1.

Thanks,
Keith 


On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote: 

 
Hi Keith
 
Thanks for the quick response.
 
As you've guessed correctly the request does not contain
a SOAPAction. I'm not quite clear about what should the value of
SOAPAction be so that Axis 2.0 treats it as SOAP 1.1 request. As I'm
researching this topic, appreciate your thoughts on it.

Thanks
Chandru Ganesan 

 




From: keith chapman
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 02, 2007 10:59 AM
To: axis-user@ws.apache.org
Subject: Re: Axis 2.0 Content-type



No you dont need to modify your axis2.xml leave
it as it was. Can you check the SOAP request you sent. I'm sure it does
not contain the SOAPAction header. In SOAP 1.1 the SOAPAction is
mandatory and axis2 uses this as a key to differentiate  between REST
request and SOAP 1.1 request (As some REST request uses  text/xml as the
contentType). The reason your response was application/xml is because
Axis2 treated  your request as a REST request and responded accordingly.


Thanks,
Keith. 


On 10/2/07, Ganesan, Chandru
<[EMAIL PROTECTED]> wrote: 


Hi

When I send a SOAP request to Axis 2.0
service the response contains
content-type=application/xml in the HTTP
header. This causes WSDL/SOAP
client tool to throw an exception as it
doesn't understand the 
content-type of application/xml. For
SOAP 1.1 it expects
content-type=text/xml. I  modified the
Axis2.xml to include following
lines. But this still doesn't return
content-type=text/xml. Am I
missing something in the Axis2.xml so
that content-type of text/xml can
be returned in the response.

Appreciate your input very much.

Modified Axis2.xml contains following
lines for text/xml:

= 







SOAP response
=
"HTTP/1.1 200 OK[\r]

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

2007-10-02 Thread Pantvaidya, Vishwajit
Thanks Gennady and Bob Lazarski for your help and pointers.

My thoughts - Axis1 was tightly tied to JAX-RPC which determined the mapping 
from xml types to java. Even with the flexible databinding in axis2, some 
backward compatibility of axis1 code could have been maintained had the support 
to jaxme/jaxbri been complete (with unwrapping and all that). But probably that 
was not one of the design goals for axis2.


- Vish.


From: Gennady Shumakher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 02, 2007 12:57 AM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String

Hi Vish,
I faced the similar issues during evaluation of migration of our project from 
axis1 to axis2. As far I understand the issue here is that wsdl2java generation 
frameworks and databinding techniques don't have the strict unification of the 
way the code is generated. So even switching from one data binding to another 
would cause the need of code modifications since the generated complex data 
types are exposed in completely different API manner. (ADB - new SomeType(); 
XmlBeans - SomeType.Factory.newInstance()).
To switch easily between data binding methods the one could consider code2wsdl 
path.

Regarding the options you mentioned according to 1.3 documentation jaxme and 
jaxbri are in experimental phase.

Gennady


From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED]
Sent: Monday, October 01, 2007 23:32
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String
Actually I do see that the complex types are getting generated - but the "-f" 
option seems to be working erratically, because of which those types got 
generated with a "src" folder at the topmost level.
But unwrapping does not work with jaxme/jaxbri/ADB.

My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like 
axis1 even if wsdl remains same and irrespective of the value of the "-d" 
wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, 
etc, and make change in the webservice implementation to handle, for example, 
xmlbeans.XmlString instead of java.lang.String.

So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice 
operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString 
instead of java String.

Any suggestions/thoughts/corrections?



From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String

Hi Amila,

Let me know if I am doing anything wrong here or if I need to change anything.


- Vish.


From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String

I also tried using jaxb hoping that it would directly map to java types - found 
2 problems there.
1. axis2 does not support unwrapping for jaxb - why is that?
2. for the same wsdl, I emailed you, it created an interface as follows:
public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
);
But it did not create the class for the complex types 
com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. 
Am I doing anything wrong here or is there a problem with the axis2 jaxb 
support?


- Vish.


From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String

For this wsdl - it creates interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (
org.apache.xmlbeans.XmlString sessiontoken,
org.apache.xmlbeans.XmlString trackingnumber,
org.apache.xmlbeans.XmlInt version
);

So the unwrapping here is okay - but I need java.lang,String params instead of 
xmlbeans.XmlString. I know that XmlString contains a string finally - but I do 
not really need that additional wrapper.
Is this happening because of the bindings functionality introduced in axis2?
Is it possible in axis2 to do wsdl2java using only POJO types?



From: Amila Suriarachchi [mailto:[EMAIL PROTECTED]
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with 
xmlbeans.XmlString instead of java.lang.String


On 8/23/07, Pantvaidya, Vishwajit <[EMAIL PROTECTED]> 
wrote:

Tried scomp with xmlbean

Re: Axis 2.0 Content-type

2007-10-02 Thread keith chapman
Hi,

The SOAPaction is an attribute which can be used to dispatch a message. If a
service advertises that it uses a SOAPAction you can set it in the client so
that the client sends it in the request. As SOAPaction is mandatory in SOAP
1.1 request you should atleast have the following header

SOAPAction: ""

What is the client that your using. If its axis2 it does the above (Add an
empty SOAPaction if its not specified) if the request is SOAP 1.1.

Thanks,
Keith

On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
>
>
> Hi Keith
>
> Thanks for the quick response.
>
> As you've guessed correctly the request does not contain a SOAPAction. I'm
> not quite clear about what should the value of SOAPAction be so that Axis
> 2.0 treats it as SOAP 1.1 request. As I'm researching this topic,
> appreciate your thoughts on it.
>
> Thanks
> Chandru Ganesan
>
>
>  --
> *From:* keith chapman [mailto:[EMAIL PROTECTED]
> *Sent:* Tuesday, October 02, 2007 10:59 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Axis 2.0 Content-type
>
> No you dont need to modify your axis2.xml leave it as it was. Can you
> check the SOAP request you sent. I'm sure it does not contain the SOAPAction
> header. In SOAP 1.1 the SOAPAction is mandatory and axis2 uses this as a
> key to differentiate  between REST request and SOAP 1.1 request (As some
> REST request uses  text/xml as the contentType). The reason your response
> was application/xml is because Axis2 treated  your request as a REST request
> and responded accordingly.
>
> Thanks,
> Keith.
>
> On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi
> >
> > When I send a SOAP request to Axis 2.0 service the response contains
> > content-type=application/xml in the HTTP header. This causes WSDL/SOAP
> > client tool to throw an exception as it doesn't understand the
> > content-type of application/xml. For SOAP 1.1 it expects
> > content-type=text/xml. I  modified the Axis2.xml to include following
> > lines. But this still doesn't return  content-type=text/xml. Am I
> > missing something in the Axis2.xml so that content-type of text/xml can
> > be returned in the response.
> >
> > Appreciate your input very much.
> >
> > Modified Axis2.xml contains following lines for text/xml:
> > =
> > 
> >  > class=""/>
> >  > class=""/>
> >  > class=""/>
> > 
> >
> >
> > SOAP response
> > =
> > "HTTP/1.1 200 OK[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "Via: 1.1 HOUWEBPROXY03[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "Connection: Keep-Alive[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "Proxy-Connection: Keep-Alive[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "Transfer-Encoding: chunked[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "Date: Mon, 01 Oct 2007 19:37:41 GMT[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "Content-Type: application/xml; charset=utf-8[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "Cache-Control: no-cache="set-cookie"[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "Set-Cookie:
> > JSESSIONID=zLGnHBMF7LRLqfr59qZ8TGWQXyHx6j7qh1BBTZyGQRXjsZn3Wb9n!16440382
> > 36; path=/[\r][\n]"
> > 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> > - << "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]"
> >
> >
> > thanks
> > Chandru Ganesan
> >
> > -
> > 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/
>
>


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


Re: Web Services REST + JSON client JS

2007-10-02 Thread keith chapman
Hi,

You can do so by setting the following property to application/json,
application/json/badgerfish or text/javascript

msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE,
);

also make sure you have the following in your axis2.xml





in the messageFoematters section and





in the messageBuilders section.

You might also wanna take a look at http://wso2.org/library/768 this article
which describes JSON support in axis2 and explains the above configurations.
Hope that you have a happy time trying JSON and Axis2...

Thanks,
Keith.

On 10/2/07, Lechuza lechuza <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> I'd like to start using axis2 as a service engine.
>
> All clients in my structure are javacripts clients, and
> the best option could be use REST request and response using JSON
> objects?
>
> I'm using pojo objects in this way:
>
> public class User {
>  private HashMap entries = new HashMap();
>   public User(){
>  }
> public void Add( User ){
> this.entries.put (entry.getName(), entry);
> }
> public User Info(String name){
>   return (User) entries.get(name);
> }
> }
>
>
>
> public class User {
> private String name = null;
> public String getName() {
> return name;
> }
>
> public void setName(String name) {
> this. name = name;
> }
> }
>
> How can i force json response ?
> I have added the tags in axis2.xml file.
>
> regards
> Lechu
>
> -
> 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: Axis 2.0 Content-type

2007-10-02 Thread Ganesan, Chandru
 
Hi Keith
 
Thanks for the quick response.
 
As you've guessed correctly the request does not contain a SOAPAction.
I'm not quite clear about what should the value of SOAPAction be so that
Axis 2.0 treats it as SOAP 1.1 request. As I'm researching this topic,
appreciate your thoughts on it.

Thanks
Chandru Ganesan 

 




From: keith chapman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 02, 2007 10:59 AM
To: axis-user@ws.apache.org
Subject: Re: Axis 2.0 Content-type


No you dont need to modify your axis2.xml leave it as it was.
Can you check the SOAP request you sent. I'm sure it does not contain
the SOAPAction header. In SOAP 1.1 the SOAPAction is mandatory and axis2
uses this as a key to differentiate  between REST request and SOAP 1.1
request (As some REST request uses  text/xml as the contentType). The
reason your response was application/xml is because Axis2 treated  your
request as a REST request and responded accordingly. 

Thanks,
Keith. 


On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote: 


Hi

When I send a SOAP request to Axis 2.0 service the
response contains
content-type=application/xml in the HTTP header. This
causes WSDL/SOAP
client tool to throw an exception as it doesn't
understand the 
content-type of application/xml. For SOAP 1.1 it expects
content-type=text/xml. I  modified the Axis2.xml to
include following
lines. But this still doesn't return
content-type=text/xml. Am I
missing something in the Axis2.xml so that content-type
of text/xml can
be returned in the response.

Appreciate your input very much.

Modified Axis2.xml contains following lines for
text/xml:

= 







SOAP response
=
"HTTP/1.1 200 OK[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header
- << "Via: 1.1 HOUWEBPROXY03[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header
- << "Connection: Keep-Alive[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header 
- << "Proxy-Connection: Keep-Alive[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header
- << "Transfer-Encoding: chunked[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header
- << "Date: Mon, 01 Oct 2007 19:37:41 GMT[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header
- << "Content-Type: application/xml;
charset=utf-8[\r][\n]" 
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header
- << "Cache-Control: no-cache="set-cookie"[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header 
- << "Set-Cookie:

JSESSIONID=zLGnHBMF7LRLqfr59qZ8TGWQXyHx6j7qh1BBTZyGQRXjsZn3Wb9n!16440382
36; path=/[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ]
httpclient.wire.header
- << "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]" 


thanks
Chandru Ganesan


-
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/ 



Proxy Configuration

2007-10-02 Thread Flavio Silva
Hi People

Reading some tutorials at wso2 and others, i've found some code how to 
configure proxy and ntlm, but my doubt is how i bind or set the options in the 
connection at the client ?
i will show and example:

The Proxy Auth code:

Options options = new Options();
 
HttpTransportProperties.Authenticator
   auth = new HttpTransportProperties.Authenticator();
auth.setUsername("username");
auth.setPassword("password");
// set if realm or domain is known

options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, 
auth);

The WS connection:
ConfigurationContext ccObject = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null , 
null);
WSServiceStub wsObject = new WSServiceStub(ccObject, _strEndPoint);


Which is the code that make the wsObject know about the proxy ?

Thanks in advance!

Flávio


KEEP SPYWARE OFF YOUR COMPUTER - Protect your computer with Spyware Terminator!
Visit http://www.spywareterminator.com/install and find out more!

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



Web Services REST + JSON client JS

2007-10-02 Thread Lechuza lechuza
Hi guys,

I'd like to start using axis2 as a service engine.

All clients in my structure are javacripts clients, and
the best option could be use REST request and response using JSON
objects?

I'm using pojo objects in this way:

public class User {
 private HashMap entries = new HashMap();
  public User(){
 }
public void Add( User ){
this.entries.put (entry.getName(), entry);
}
public User Info(String name){
  return (User) entries.get(name);
}
}



public class User {
private String name = null;
public String getName() {
return name;
}

public void setName(String name) {
this. name = name;
}
}

How can i force json response ?
I have added the tags in axis2.xml file.

regards
Lechu

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



Re: Axis 2.0 Content-type

2007-10-02 Thread keith chapman
No you dont need to modify your axis2.xml leave it as it was. Can you check
the SOAP request you sent. I'm sure it does not contain the SOAPAction
header. In SOAP 1.1 the SOAPAction is mandatory and axis2 uses this as a key
to differentiate  between REST request and SOAP 1.1 request (As some REST
request uses  text/xml as the contentType). The reason your response was
application/xml is because Axis2 treated  your request as a REST request and
responded accordingly.

Thanks,
Keith.

On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote:
>
>
> Hi
>
> When I send a SOAP request to Axis 2.0 service the response contains
> content-type=application/xml in the HTTP header. This causes WSDL/SOAP
> client tool to throw an exception as it doesn't understand the
> content-type of application/xml. For SOAP 1.1 it expects
> content-type=text/xml. I  modified the Axis2.xml to include following
> lines. But this still doesn't return  content-type=text/xml. Am I
> missing something in the Axis2.xml so that content-type of text/xml can
> be returned in the response.
>
> Appreciate your input very much.
>
> Modified Axis2.xml contains following lines for text/xml:
> =
> 
>  class=""/>
>  class=""/>
>  class=""/>
> 
>
>
> SOAP response
> =
> "HTTP/1.1 200 OK[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "Via: 1.1 HOUWEBPROXY03[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "Connection: Keep-Alive[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "Proxy-Connection: Keep-Alive[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "Transfer-Encoding: chunked[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "Date: Mon, 01 Oct 2007 19:37:41 GMT[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "Content-Type: application/xml; charset=utf-8[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "Cache-Control: no-cache="set-cookie"[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "Set-Cookie:
> JSESSIONID=zLGnHBMF7LRLqfr59qZ8TGWQXyHx6j7qh1BBTZyGQRXjsZn3Wb9n!16440382
> 36; path=/[\r][\n]"
> 128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
> - << "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]"
>
>
> thanks
> Chandru Ganesan
>
> -
> 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: JAXWS Handler

2007-10-02 Thread Nicholas L Gallardo

Hi Robert,

Axis2's JAX-WS implementation does include support for the JAX-WS handler
API.

They are configured via the @HandlerChain annotation which points to a file
describing the handlers.  There are samples under the
$AXIS2_HOME/modules/jaxws/test/org/apache/axis2/jaxws/sample/addnumbershandler

Good luck!

-Nick




   
 Robert Almonte
 <[EMAIL PROTECTED] 
 it.com>To
   axis-user@ws.apache.org 
 10/02/2007 09:48   cc
 AM
   Subject
   JAXWS Handler   
 Please respond to 
 [EMAIL PROTECTED] 
  he.org   
   
   
   





Hi all,
Does anybody know if the Axis' JAXWS implementation support the JAXWS'
handlers?

I will guess that I can add a handler by using the module, is this the only
way?
Any info about Axis JAXWS sample will be appreciated.

Thanks,
Robert

--
View this message in context:
http://www.nabble.com/JAXWS-Handler-tf4555226.html#a13000113
Sent from the Axis - User mailing list archive at Nabble.com.


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

<><><>

why HTTPSListener is defined as inner class

2007-10-02 Thread Nencho Lupanov
Hi all,

I would like to use
org.apache.axis2.transport.http.HTTPSListener in order to configure
transportReceiver in axis2.xml ,
this is handled later on AxisConfigBuilder.processTransportReceivers by
instatiating the corresponding class,
only that innner classes are instantiated differently...so my question is,
could we just separate HTTPSListener from
Listing Agent , so i can freely use HTTPSListener without changing
AxisConfigBuilder.processTransportReceivers.
Note that there is no actual reason for this class to be inner right?

Thanks,
Nencho


client-config.wsdd not found

2007-10-02 Thread Yolanda Ward

I am using WAS 5.1 and Axis 1.4.  When I run locally, Axis has no problem
finding my config file however when I deploy to our certifcation
environment, Axis is having problems finding my client-config.wsdd file.  I
have defined a system property, axis.ClientConfigFile with the value
\WEB-INF\config\...  This property is defined both locally and in the
certification environment.  I get the error below.

Anyone have any ideas?

org.apache.axis.InternalException: org.apache.axis.ConfigurationException: 
org.apache.axis.ConfigurationException: No engine configuration file -
aborting!
org.apache.axis.ConfigurationException: No engine configuration file -
aborting!
at
org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:205)
at org.apache.axis.AxisEngine.init(AxisEngine.java:187)
at org.apache.axis.AxisEngine.(AxisEngine.java:172)
at org.apache.axis.client.AxisClient.(AxisClient.java:88)
at org.apache.axis.client.Service.getAxisClient(Service.java:143)
at org.apache.axis.client.Service.(Service.java:152)
-- 
View this message in context: 
http://www.nabble.com/client-config.wsdd-not-found-tf4555434.html#a13000804
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: Migrating from Tomcat AXIS2 to Standalone AXIS2

2007-10-02 Thread Ajith Ranabahu
Hi Ted,
There is an Axis2 based production quality server called
WSAS(http://wso2.com/products/wsas/) (fully opensource) from WSO2. It
is based on the tomcat core and can act much more reliably than the
simple Axis server.

Ajith

On 10/2/07, redhatter <[EMAIL PROTECTED]> wrote:
>
> If I could chime in on this... I see a need for a production quality
> standalone Axis2 server. To assume that  users of a web service are content
> using Tomcat or some other J2EE container may be incorrect. From personal
> experience, I have seen customers that have sworn allegiance to one
> container or another and need our web service to run in their environment.
> This means mimicking multiple environments to test our web services which is
> time and resource intensive. A production caliber standalone Axis2 container
> would alleviate the need for this additional resource drain and simplify
> technical support.
>
> Thanks,
> Ted
>
>
> Demetris G wrote:
> >
> >
> > Exactly ... thanks for the good feedback Anne and Amila.
> >
> > Anne Thomas Manes wrote:
> >> You'll find this to be the case with most open source projects -- why
> >> reimplement the application container capability again when systems
> >> like Tomcat already exist? The Axis and Axis2 teams are focusing on
> >> solving a different problem -- processing and dispatching XML
> >> messaging requests. The projects are designed to run in any Java EE or
> >> servlet engine.
> >>
> >> If you do find a commercial or open source project that includes an
> >> application container, most likely it includes a copy of Tomcat or
> >> Jetty or it is built on a Java EE app server.
> >>
> >> Axis does support a stand-alone runtime mode, but it is intended only
> >> for testing purposes, not for production runtime.
> >>
> >> Anne
> >>
> >> On 9/19/07, Demetris G <[EMAIL PROTECTED]> wrote:
> >>
> >>> In other words - and excuse the multiple emails on this - although I do
> >>> have a good understanding on how
> >>> Axis and Axis2 work, my point is that I noticed in the literature that
> >>> some researchers are using the wrong
> >>> terminology to explain their functionality that confuses some people.
> >>> These projects are the implementations
> >>> of the SOAP (and REST processing) specifications, they can expose WS and
> >>> process their communications
> >>> with the world. What people should understand is that the service
> >>> implementations are not really "contained"
> >>> in these engines and thus the Tomcats etc. Well in any case, thanks for
> >>> the feedback Amila.
> >>>
> >>> Demetris G wrote:
> >>>
>  Would you say the same for Axis ? Axis can be used as a standalone web
>  services container - yes ?
>  If not then we have people publishing papers on that that may have it
>  wrong.
> 
>  Thanks
> 
>  Demetris G wrote:
> 
> > That's what I thought :) Thanks Amila.
> >
> > Amila Suriarachchi wrote:
> >
> >> On 9/19/07, *Amila Suriarachchi* <[EMAIL PROTECTED]
> >> > wrote:
> >>
> >>
> >>
> >> On 9/18/07, *Demetris G* < [EMAIL PROTECTED]
> >> > wrote:
> >>
> >>
> >> So hold on a sec - Amila, are you saying that Axis2 is not
> >> considered a
> >> stable and reliable enough
> >> standalone web service container
> >>
> >> Axis2 is not a  web service container.  Axis2 is a soap and REST
> >> message processor which supports WS*.  Axis2 is a stable product.
> >> Basically it concentrates on Soap and REST  message processing.
> >>
> >>
> >> Sorry I mean It is not a standalone web application container. It
> >> alows users to deploy web services and expose them with the soap and
> >> REST message processing capabilities.
> >>
> >>
> >> and it should always be deployed within
> >> other proven
> >> containers (i.e. Tomcat etc.)?
> >>
> >> Yes this is the recommended way.  if you want an standalone
> >> server
> >> you can use
> >> WSAS ( http://wso2.com/products/wsas/) which uses  the axis2 and
> >> embedded tomcat server.
> >>
> >> Is this the case only for Axis2 or also
> >> Axis? Where is this documented?
> >>
> >>
> >>
> >>
> >> Amila Suriarachchi wrote:
> >> >
> >> >
> >> > On 9/18/07, *Marko Simic* < [EMAIL PROTECTED]
> >> 
> >> >  >> >> wrote:
> >> >
> >> >
> >> > Since the only "remote part" of application is single
> >> web
> >> service
> >> > I thought
> >> > it would be much easer for deployment/management to
> >> deploy
> >> > preconfigured
> >> > 

Re: Migrating from Tomcat AXIS2 to Standalone AXIS2

2007-10-02 Thread redhatter

If I could chime in on this... I see a need for a production quality
standalone Axis2 server. To assume that  users of a web service are content
using Tomcat or some other J2EE container may be incorrect. From personal
experience, I have seen customers that have sworn allegiance to one
container or another and need our web service to run in their environment.
This means mimicking multiple environments to test our web services which is
time and resource intensive. A production caliber standalone Axis2 container
would alleviate the need for this additional resource drain and simplify
technical support.

Thanks,
Ted


Demetris G wrote:
> 
> 
> Exactly ... thanks for the good feedback Anne and Amila.
> 
> Anne Thomas Manes wrote:
>> You'll find this to be the case with most open source projects -- why
>> reimplement the application container capability again when systems
>> like Tomcat already exist? The Axis and Axis2 teams are focusing on
>> solving a different problem -- processing and dispatching XML
>> messaging requests. The projects are designed to run in any Java EE or
>> servlet engine.
>>
>> If you do find a commercial or open source project that includes an
>> application container, most likely it includes a copy of Tomcat or
>> Jetty or it is built on a Java EE app server.
>>
>> Axis does support a stand-alone runtime mode, but it is intended only
>> for testing purposes, not for production runtime.
>>
>> Anne
>>
>> On 9/19/07, Demetris G <[EMAIL PROTECTED]> wrote:
>>   
>>> In other words - and excuse the multiple emails on this - although I do
>>> have a good understanding on how
>>> Axis and Axis2 work, my point is that I noticed in the literature that
>>> some researchers are using the wrong
>>> terminology to explain their functionality that confuses some people.
>>> These projects are the implementations
>>> of the SOAP (and REST processing) specifications, they can expose WS and
>>> process their communications
>>> with the world. What people should understand is that the service
>>> implementations are not really "contained"
>>> in these engines and thus the Tomcats etc. Well in any case, thanks for
>>> the feedback Amila.
>>>
>>> Demetris G wrote:
>>> 
 Would you say the same for Axis ? Axis can be used as a standalone web
 services container - yes ?
 If not then we have people publishing papers on that that may have it
 wrong.

 Thanks

 Demetris G wrote:
   
> That's what I thought :) Thanks Amila.
>
> Amila Suriarachchi wrote:
> 
>> On 9/19/07, *Amila Suriarachchi* <[EMAIL PROTECTED]
>> > wrote:
>>
>>
>>
>> On 9/18/07, *Demetris G* < [EMAIL PROTECTED]
>> > wrote:
>>
>>
>> So hold on a sec - Amila, are you saying that Axis2 is not
>> considered a
>> stable and reliable enough
>> standalone web service container
>>
>> Axis2 is not a  web service container.  Axis2 is a soap and REST
>> message processor which supports WS*.  Axis2 is a stable product.
>> Basically it concentrates on Soap and REST  message processing.
>>
>>
>> Sorry I mean It is not a standalone web application container. It
>> alows users to deploy web services and expose them with the soap and
>> REST message processing capabilities.
>>
>>
>> and it should always be deployed within
>> other proven
>> containers (i.e. Tomcat etc.)?
>>
>> Yes this is the recommended way.  if you want an standalone
>> server
>> you can use
>> WSAS ( http://wso2.com/products/wsas/) which uses  the axis2 and
>> embedded tomcat server.
>>
>> Is this the case only for Axis2 or also
>> Axis? Where is this documented?
>>
>>
>>
>>
>> Amila Suriarachchi wrote:
>> >
>> >
>> > On 9/18/07, *Marko Simic* < [EMAIL PROTECTED]
>> 
>> > > >> wrote:
>> >
>> >
>> > Since the only "remote part" of application is single
>> web
>> service
>> > I thought
>> > it would be much easer for deployment/management to
>> deploy
>> > preconfigured
>> > standalone dedicated server. Also it could take less
>> memory and
>> > performance
>> > could be better.
>> > Anyway, these are only assumptions = something that
>> should be tested.
>> >
>> > If you think I am wrong, I would like to hear why and
>> what you may
>> > suggest.
>> > Thanks.
>> >
>> >
>> > Tomcat 

Axis 2.0 Content-type

2007-10-02 Thread Ganesan, Chandru

Hi 

When I send a SOAP request to Axis 2.0 service the response contains
content-type=application/xml in the HTTP header. This causes WSDL/SOAP
client tool to throw an exception as it doesn't understand the
content-type of application/xml. For SOAP 1.1 it expects
content-type=text/xml. I  modified the Axis2.xml to include following
lines. But this still doesn't return  content-type=text/xml. Am I
missing something in the Axis2.xml so that content-type of text/xml can
be returned in the response.

Appreciate your input very much.

Modified Axis2.xml contains following lines for text/xml:
=







SOAP response
=
"HTTP/1.1 200 OK[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Via: 1.1 HOUWEBPROXY03[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Connection: Keep-Alive[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Proxy-Connection: Keep-Alive[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Transfer-Encoding: chunked[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Date: Mon, 01 Oct 2007 19:37:41 GMT[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Content-Type: application/xml; charset=utf-8[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Cache-Control: no-cache="set-cookie"[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "Set-Cookie:
JSESSIONID=zLGnHBMF7LRLqfr59qZ8TGWQXyHx6j7qh1BBTZyGQRXjsZn3Wb9n!16440382
36; path=/[\r][\n]"
128708 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header
- << "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]"


thanks
Chandru Ganesan

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



Re: [Axis2] UnsupportedOperationException: TODO

2007-10-02 Thread Jack Sprat
For anyone using Websphere version 6.1, this appears to be a bug that was 
corrected with fix pack5.  See this link:
http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg1PK29135

T


Jack Sprat <[EMAIL PROTECTED]> wrote: I am trying to validate an XML file 
against a schema and get an UnsupportedOperationException with a message of 
"TODO" (no quotes) when running in Websphere 6.1.  This does not fail in Tomcat 
5.5

Here is a snippet of the stack trace:

java.lang.UnsupportedOperationException: TODO

 at 
org.apache.axiom.om.impl.dom.DocumentImpl.getDoctype(DocumentImpl.java:225)
  at 
org.apache.xerces.jaxp.validation.DOMValidatorHelper.setupEntityMap(Unknown
Source)
  at
org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown
Source)
  at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown
Source)
  at javax.xml.validation.Validator.validate(Unknown Source)
...

The source of the Axiom 1.2.4 DocumentImpl#getDocType method:

public DocumentType getDoctype() {
// TODO
throw new UnsupportedOperationException("TODO");
}

Is the wrong DOM implementation being used?  If so, how can I fix this??  I'm 
using Axis2-1.2.

Thanks,
T


  

   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 

JAXWS Handler

2007-10-02 Thread Robert Almonte

Hi all,
Does anybody know if the Axis' JAXWS implementation support the JAXWS'
handlers?

I will guess that I can add a handler by using the module, is this the only
way?
Any info about Axis JAXWS sample will be appreciated.

Thanks,
Robert

-- 
View this message in context: 
http://www.nabble.com/JAXWS-Handler-tf4555226.html#a13000113
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: Generate service that exclusively supports soap1.1 requests

2007-10-02 Thread Erwin Reinhoud
Thanks for that info. I'll track the issue and voted for it. Hope it will be 
implemented soon. Otherwise i still can look at the synapse solution.

Kind regards,
Erwin



-Oorspronkelijk bericht-
Van: Nadir Amra [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 2 oktober 2007 16:13
Aan: axis-user@ws.apache.org
CC: axis-user@ws.apache.org
Onderwerp: Re: Generate service that exclusively supports soap1.1
requests


There are several open JIRA's related to this, primary one is: 
http://issues.apache.org/jira/browse/AXIS2-3114

Nadir K. Amra


"Upul Godage" <[EMAIL PROTECTED]> wrote on 10/02/2007 02:59:07 AM:

> Hi,
> 
> I think you can use Apache Synapse for this, using in front of the 
> web service. (http://ws.apache.org/synapse/)  Check the SOAP-1.2-
> namespaced Envelope using 'filter' mediator (works like an if 
> condition using xpath) and in the sequence using 'makefault' 
> mediator to send fault. Or otherway check for SOAP-1.1-namespaced 
> Envelope, if yes then send further otherwise 'makefault'. 
> 
> Upul
> 

> On 10/2/07, Erwin Reinhoud < [EMAIL PROTECTED]> wrote:
> Hello All,
> 
> I already posted this before but saw no reply. I hope somebody can 
> at least tell me if my expectations are correct, which are that if i
> only have the soap1.1 binding in the WSDL than all soap1.2 requests 
> would get a soapfault.
> 
> So would it be possible to have a service that exclusively supports 
> soap1.1 requests by only having ther soap1.1 binding in wsdl? Is 
> there an other configurable way to only support 1.1?  In earlier 
> versions of axis2 there were always 2 bindings (soap1.1 and soap1.2)
> so both calls were supported.
> 
> 
> Thanks in advance.
> 
> Kind regards,
> Erwin
> 
> - 
> 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]


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



Re: Generate service that exclusively supports soap1.1 requests

2007-10-02 Thread Nadir Amra
There are several open JIRA's related to this, primary one is: 
http://issues.apache.org/jira/browse/AXIS2-3114

Nadir K. Amra


"Upul Godage" <[EMAIL PROTECTED]> wrote on 10/02/2007 02:59:07 AM:

> Hi,
> 
> I think you can use Apache Synapse for this, using in front of the 
> web service. (http://ws.apache.org/synapse/)  Check the SOAP-1.2-
> namespaced Envelope using 'filter' mediator (works like an if 
> condition using xpath) and in the sequence using 'makefault' 
> mediator to send fault. Or otherway check for SOAP-1.1-namespaced 
> Envelope, if yes then send further otherwise 'makefault'. 
> 
> Upul
> 

> On 10/2/07, Erwin Reinhoud < [EMAIL PROTECTED]> wrote:
> Hello All,
> 
> I already posted this before but saw no reply. I hope somebody can 
> at least tell me if my expectations are correct, which are that if i
> only have the soap1.1 binding in the WSDL than all soap1.2 requests 
> would get a soapfault.
> 
> So would it be possible to have a service that exclusively supports 
> soap1.1 requests by only having ther soap1.1 binding in wsdl? Is 
> there an other configurable way to only support 1.1?  In earlier 
> versions of axis2 there were always 2 bindings (soap1.1 and soap1.2)
> so both calls were supported.
> 
> 
> Thanks in advance.
> 
> Kind regards,
> Erwin
> 
> - 
> 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]



AXIS 2 1.1 Rampart and Attribute Statement Assertions

2007-10-02 Thread Chris82KS

Hi
I've read that Rampart 1.1 can only send SAML Assertions with Authentication
Statements. But can Rampart authenticate SAML Assertions with Attribute
Statements in the INFLOW SECURITY? 

Greetings
Chris
-- 
View this message in context: 
http://www.nabble.com/AXIS-2-1.1-Rampart-and-Attribute-Statement-Assertions-tf4555044.html#a12999394
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: Newbie Help with deploy.wsdd

2007-10-02 Thread New AxisU
Anne,

Thanks for the link & for writing the document.  I think it will help me!


On 10/1/07, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
>
> "Document" style means that Axis expects you to use a wrapper object
> as your parameter. "Wrapped" style means that Axis will automagically
> wrap your parameters in a wrapper object for you. See
>
> http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html
> for a description of wrapped style.
>
> Anne
>
> On 10/1/07, New AxisU <[EMAIL PROTECTED]> wrote:
> > SUCCESS!
> >
> > Following Anne's advice I went back to the wsdl above & discovered that
> it
> > was missing some definitions.  But that wasn't enough.  I went back to
> the
> > old version & cut it down similarly & of course it worked.  So then I
> > started trying to see what was different between them.  Trying to make
> the
> > new wsdl look like the old one I was able to get a good deploy.wsdd &
> good
> > message.
> >
> > If you are reading this, let me say that I am still unclear about all of
> > this.  Here's the deploy.wsdd that didn't work.  Notice that
> > style="document"  in the  tag.
> >
> >
> >
> >  > xmlns="http://xml.apache.org/axis/wsdd/";
> >
> > xmlns:java="http://xml.apache.org/axis/wsdd/providers/java
> > ">
> >
> >   
> >
> >> use="literal">
> > 
> >> value="urn:discovery.services.netcentric.sec"/>
> >   
> >http://dws.sec,urn:us:gov:ic:ism:v2,urn:discovery.services.netcentric.sec,http://www.opengis.net/gml
> "/>
> >   
> >   
> >   
> >   
> >> returnQName="getVersionReturn" returnType="rtns:string" xmlns:rtns="
> > http://www.w3.org/2001/XMLSchema"; >
> >   
> >   
> >
> > 
> > 
> >
> > The corresponding wsdl is
> >
> >
> > 
> >  > xmlns:impl="urn:discovery.services.netcentric.sec"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/ "
> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > xmlns="urn:discovery.services.netcentric.sec"
> > targetNamespace="urn:discovery.services.netcentric.sec">
> >  
> >> xmlns="http://www.w3.org/2001/XMLSchema";>
> >
> > 
> > 
> >
> > 
> >  
> >   
> >   
> > 
> >
> >   
> >
> >  
> >  
> >
> >  
> >   
> >  
> >  
> >   
> > > message="impl:getVersionRequest"/>
> > > message="impl:getVersionResponse"/>
> >   
> >  
> >  
> >   http://schemas.xmlsoap.org/soap/http"/>
> >   
> >
> >
> > 
> >
> >
> > 
> >
> >   
> >  
> >  
> >> binding="impl:discoverySoapBinding">
> >http://localhost:8015/dF-1.4.1/services/discovery"/>
> >   
> >  
> > 
> >
> > The magic fix was to change
> >
> >
> >
> >  
> >
> >  
> >   
> >  
> >
> > to
> >
> >  
> > 
> >   
> >   
> >  > element="impl:getVersionResponse"/>
> >   
> >
> > Now the deploy.wsdd looks like
> >
> >  > xmlns="http://xml.apache.org/axis/wsdd/";
> >
> > xmlns:java="http://xml.apache.org/axis/wsdd/providers/java
> > ">
> >
> >   
> >
> >> use="literal">
> >
> >> value="urn:discovery.services.netcentric.sec"/>
> >   
> >
> >  http://dws.sec,urn:us:gov:ic:ism:v2,urn:discovery.services.netcentric.sec,http://www.opengis.net/gml
> "/>
> >   
> >   
> >   
> >   
> >> xmlns:operNS="urn:discovery.services.netcentric.sec"
> > returnQName="retNS:getVersionReturn" xmlns:retNS="urn:
> > discovery.services.netcentric.sec" returnType="rtns:string"
> > xmlns:rtns="http://www.w3.org/2001/XMLSchema"; >
> >   
> >   
> >
> >   
> > 
> >
> > Notice that the style is now "wrapped" and the namespaces inside
>  > name="getVersion" are all different & for my purposes correct.
> >
> > I'm happy that my wsdl is working, but I still wish I understood why
> this is
> > so?  What controls the style="" setting?  Is there some website I could
> > refer to to explain why the
> >
> >  > element="impl:getVersionResponse"/>
> >
> > is more correct?
> >
> >
> > On 10/1/07, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> >
> > >
> > > I suggest that you edit the WSDL, then run WSDL2Java to generate your
> new
> > WSDD.
> > >
> > > Anne
> > >
> > > On 9/28/07, New AxisU < [EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > Hi, I need help with deploy.wsdd & ...?
> > > >
> > > > I have an existing wsdl that returns this soap message:
> > > >
> > > >  > > >
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> > > >   xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
> > > >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > > >   
> > > >  > > > xmlns="urn:discovery.services.netcentric.sec ">
> > > >   Version 1.0 from discovery in
> > > > tomcat
> > > > 
> > > >   
> > > > 
> > > >
> > > > The schemas inside this wsdl were updated & so I need to make a new
> > version
> > > > of the web service.
> > > >
> > > > After I generate java code using axis 1.4 and edit the deploy.wsddby
> > hand,
> > > > the best I've been able t

RE: Generating adb code with wsa (2005/08) action mappings in WSDL

2007-10-02 Thread Erwin Reinhoud
Hello Amila,
 
Thanks, i was hoping this was possible, but how? I thought defining it in the 
wsdl and than generate the code would do the job, but unfortunately this does 
not work, since the default (i.e.  [target namespace][delimiter][port type 
name][delimiter][input|output name] ) is set in the service.xml. Or do you mean 
just doing this manually in service.xml after generation of code?
 
Thanks again.
 
Kind regards,
Erwin
 
 
 

-Oorspronkelijk bericht-
Van: Amila Suriarachchi [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 2 oktober 2007 12:59
Aan: axis-user@ws.apache.org
Onderwerp: Re: Generating adb code with wsa (2005/08) action mappings in WSDL


you can override it.

Amila.


On 10/2/07, Erwin Reinhoud < [EMAIL PROTECTED]> wrote: 

Hello All,

I have a wsaw: http://www.w3.org/2005/03/addressing/wsd reference in my wsdl to 
define the wsa:action for an operation request and response. I see that these 
are used in the service.xml, however, when i deviate from the standard (i.e. 
[target namespace][delimiter][port type name][delimiter][input|output name]) 
the generated action is still conforming to this standard and actionmapping in 
service.xml is not changed. Is this expected behaviour, or should one be free 
to define their own wsa:action in the wsdl and have that action mapping in the 
service.xml?

Thanks in advance.

Kind regards,
Erwin


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






-- 
Amila Suriarachchi,
WSO2 Inc. 



Re: Problem building available services

2007-10-02 Thread Suran Jayathilaka

Ana Belén Antón Gironés wrote:

Hi again!

I am trying now building my actual service but I receive this error message:


Error: java.lang.NoClassDefFoundError: org/dom4j/DocumentException at
java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown
Source) at
org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.(DefaultSchema
Generator.java:115) at
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:340) at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.ja
va:347) at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(
ArchiveReader.java:95) at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGrou
p(ArchiveReader.java:172) at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:78)
at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(Deploy
mentFileData.java:137) at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:
571) at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.jav
a:141) at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.jav
a:318) at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListe
ner.java:220) at
org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.j
ava:118) at
org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAx
isConfigurator.java:272) at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationCont
ext(ConfigurationContextFactory.java:78) at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.ja
va:500) at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420) at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:11
39) at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3956) at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
60) at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714) at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:120) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at
org.apache.catalina.core.StandardService.start(StandardService.java:448) at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at
org.apache.catalina.startup.Catalina.start(Catalina.java:552) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

I understand the class org/dom4j/DocumentException is not found. How can I
get that it be found? 


I suppose that generating a .aar file it should be inclosed, but I don't
know how I have to make that.

Best regards and thank you for your appreciated help.

Ana Belén
  
 






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


  

Hullo Ana,

Can you attach your service class code, and describe any other resources 
you are using? That may help in figuring out what's wrong.


And did you mean that you don't know how to make an .aar file or that 
you don't know how to include your dependancy jars with your service?


Cheers.
Suran





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



Re: How to configure axis2 to use the default keystore

2007-10-02 Thread Dimuthu
Hi,

Specify your keystore details as follows, before doing the call.

System.setProperty("javax.net.ssl.trustStore", "x");
System.setProperty("javax.net.ssl.trustStoreType", "y");
System.setProperty("javax.net.ssl.trustStorePassword","z");


Thank you,
Dimuthu

http://wso2.org

On Mon, 2007-10-01 at 16:03 -0400, Gul Onural wrote:
> Hi,
> 
> Looks like when we use HTTPS/SSL to communicate with a web service
> running on Linux, 
> the keystore is used is the one under where JAVA_HOME environment
> variable points to  
> (%JAVA_HOME%/jre/lib/security/cacerts).
> 
> Is there a way to configure axis2 to use default keystore
> (~/.keystore) on Unix/Linux ?
> 
> Gul
> 
> 
> 
> 
> 
> 
-- 



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



problem invoking axis service from PDA with CDC configuration

2007-10-02 Thread Michele Amoretti
Hi all,

I have a client running on a PDA with JVM 1.3, and CDC configuration. The
client should invoke a Web Service deployed in Tomcat on a server.

The problem is that when the client invokes the service, it always receive a
null response, and (strange thing) the server does not seem to receive any
request (it should log something on stdout but it doesn't). No exception is
raised!

If I run the client code on my laptop, the invocation is correct and the
server logs correctly.

Any idea? Maybe some .jar is lacking on the PDA?

-- 
Michele Amoretti, Ph.D.
Distributed Systems Group
Dipartimento di Ingegneria dell'Informazione
Università degli Studi di Parma
http://www.ce.unipr.it/amoretti


RE: Problem building available services

2007-10-02 Thread Ana Belén Antón Gironés

Hi again!

I am trying now building my actual service but I receive this error message:


Error: java.lang.NoClassDefFoundError: org/dom4j/DocumentException at
java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown
Source) at
org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.(DefaultSchema
Generator.java:115) at
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:340) at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.ja
va:347) at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(
ArchiveReader.java:95) at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGrou
p(ArchiveReader.java:172) at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:78)
at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(Deploy
mentFileData.java:137) at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:
571) at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.jav
a:141) at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.jav
a:318) at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListe
ner.java:220) at
org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.j
ava:118) at
org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAx
isConfigurator.java:272) at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationCont
ext(ConfigurationContextFactory.java:78) at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.ja
va:500) at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420) at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:11
39) at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3956) at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
60) at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714) at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:120) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at
org.apache.catalina.core.StandardService.start(StandardService.java:448) at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at
org.apache.catalina.startup.Catalina.start(Catalina.java:552) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

I understand the class org/dom4j/DocumentException is not found. How can I
get that it be found? 

I suppose that generating a .aar file it should be inclosed, but I don't
know how I have to make that.

Best regards and thank you for your appreciated help.

Ana Belén
  
 





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



Re: Generating adb code with wsa (2005/08) action mappings in WSDL

2007-10-02 Thread Amila Suriarachchi
you can override it.

Amila.

On 10/2/07, Erwin Reinhoud <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>
> I have a wsaw:http://www.w3.org/2005/03/addressing/wsd reference in my
> wsdl to define the wsa:action for an operation request and response. I see
> that these are used in the service.xml, however, when i deviate from the
> standard (i.e. [target namespace][delimiter][port type
> name][delimiter][input|output name]) the generated action is still
> conforming to this standard and actionmapping in service.xml is not
> changed. Is this expected behaviour, or should one be free to define their
> own wsa:action in the wsdl and have that action mapping in the service.xml
> ?
>
> Thanks in advance.
>
> Kind regards,
> Erwin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.


Re: Exception Handling and Axisfaults

2007-10-02 Thread Charitha Kankanamge

Hi Jay,
Did you check Axis2 FaultHandling sample? It is in AXIS2_HOME/samples 
directory of the binary distribution.


regards
Charitha

Jay Zawar wrote:


Hi,

has anybody out there actually built a client and webservice which really deals and handles correctly custom exceptions - and a precise documentation on it ? I am _never_ getting a non-null .getDetail in the AxisFault, although I clearly throw a custom exception at the server side. 


Axis folks, do you have actually a working example for this ? Why is the .getDetail always empty  
Even modiying the axis2.xml in the axis2.war file deployed on jboss wont help (true)

Kind regards,

Jay

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



 




--
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070

A bug in the hand is better than one as yet undetected



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



Exception Handling and Axisfaults

2007-10-02 Thread Jay Zawar
Hi,

has anybody out there actually built a client and webservice which really deals 
and handles correctly custom exceptions - and a precise documentation on it ? I 
am _never_ getting a non-null .getDetail in the AxisFault, although I clearly 
throw a custom exception at the server side. 

Axis folks, do you have actually a working example for this ? Why is the 
.getDetail always empty  Even modiying the axis2.xml in the axis2.war file 
deployed on jboss wont help (true)

Kind regards,

Jay

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



RE: *SPAM*: 04.70/4.0 - Re: Problem building available services

2007-10-02 Thread Ana Belén Antón Gironés
Hi Suran,

Thank you very much for your great help!!

I have restarted Tomcat again and the Sum Service has been listed!
Now, I am going to try the same with my actual service. I hope I get it!!!

Best regards,

Ana Belén.


-Mensaje original-
De: Suran Jayathilaka [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 02 de octubre de 2007 11:44
Para: axis-user@ws.apache.org
Asunto: Re: *SPAM*: 04.70/4.0 - Re: Problem building available services

Ana Belén Antón Gironés wrote:
> Hi,
>
> Thank you for your fast answer, Suran. I am using Apache Tomcat 5.5 
> and
> Axis2 1.3 war, too. 
> Could you please say me the procedure followed for you step to step? I 
> don't know what I have forgotten.
>
> Thank you!
>
> Ana Belén
>
> -Mensaje original-
> De: Suran Jayathilaka [mailto:[EMAIL PROTECTED] Enviado el: martes, 02 
> de octubre de 2007 10:57
> Para: axis-user@ws.apache.org
> Asunto: *SPAM*: 04.70/4.0 - Re: Problem building available services
>
> Ana Belén Antón Gironés wrote:
>   
Hi Ana,
Glad to be of assistance.
I'm gonna go thru each step since you have requested so.
I used the non-installer zip version of tomcat. But IMO that shouldn't make
a difference.

I extracted tomcat to my drive.
downloaded axis2-1.3.war and extracted it. Then copied the axis2.war file to
TOMCAT_HOME\webapps

Then I started tomcat so that the axis2.war will get exploded.
Then stopped tomcat.

In my IDE, i created ur package structure, created a class named Sum, and
copied your java code as it was. Compiled it.
Created a folder named META-INF. in it, put a services.xml file with your
services.xml content exactly.
Put both META-INF, and the org folder in to a folder called Sum.
copied the Sum folder to TOMCAT_HOME\webapps\axis2\WEB-INF\services folder.
Started tomcat again.
When I accessed localhost:8080/axis2, the Sum service was listed.

My folder structure is identical to yours.

Sum
- META-INF
  - services.xml
- org
  - ana
 - web
- services
   - Sum.class


Hope it helped.
Suran




-
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]



HTTP Status 500 question

2007-10-02 Thread Dominik Heller
I am new to Axis and by setting up Axis 1_4 I get the following
Error Message when trying to invoke the list of services. the happyaxispage
is fine and I followed exactly the installation guide.
Thx in advance for your help

type Exception report


message


description The server encountered an internal error () that prevented it
>from fulfilling this request.


exception


javax.servlet.ServletException: Servlet.init() for servlet AxisServlet
threw exception

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)



org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)



org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)



org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)



org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)


 java.lang.Thread.run(Thread.java:595)



root cause


java.lang.NoClassDefFoundError: javax/xml/rpc/encoding/Deserializer
 java.lang.ClassLoader.defineClass1(Native Method)
 java.lang.ClassLoader.defineClass(ClassLoader.java:620)

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 java.net.URLClassLoader.access$100(URLClassLoader.java:56)
 java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 java.security.AccessController.doPrivileged(Native Method)
 java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 java.lang.ClassLoader.loadClass(ClassLoader.java:299)
 java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 java.lang.Class.forName0(Native Method)
 java.lang.Class.forName(Class.java:242)
 org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:177)
 java.security.AccessController.doPrivileged(Native Method)

org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
 org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)

org.apache.axis.deployment.wsdd.WSDDTypeMapping.getLanguageSpecificType(WSDDTypeMapping.java:183)



org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542)



org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253)

org.apache.axis.deployment.wsdd.WSDDService.(WSDDService.java:233)

org.apache.axis.deployment.wsdd.WSDDDeployment.(WSDDDeployment.java:192)



org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)



org.apache.axis.deployment.wsdd.WSDDDocument.(WSDDDocument.java:65)

org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)


 org.apache.axis.AxisEngine.init(AxisEngine.java:172)
 org.apache.axis.AxisEngine.(AxisEngine.java:156)
 org.apache.axis.server.AxisServer.(AxisServer.java:88)

org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109)



org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73)



org.apache.axis.server.AxisServer.getServer(AxisServer.java:73)

org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:185)



org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396)



org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112)



org.apache.axis.transport.http.AxisServlet.init(AxisServlet.java:156)
 javax.servlet.GenericServlet.init(GenericServlet.java:212)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)



org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)



org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)



org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)



org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)


 java.lang.Thread.run(Thread.java:595)

-- 
Pt! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

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



Re: Problem with return HashMap.

2007-10-02 Thread Amila Suriarachchi
On 10/1/07, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
>
> Perhaps -- but if the application consuming the service doesn't
> understand Maps, the whole idea of the Map is lost anyway.


what I mean is something like this

Lets say we have a service interface like this
 public void method1(HashMap param1){

}

where there is a map and the generated schema in the wsdl would be like
this,

http://ws.apache.org/rmi/types";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>













http://ws.apache.org/rmi/types"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema";>








so any client can code gen for this schema and invoke the service. upon
receing the
request axis2 must be able to produce the hashMap and calls to the method.

So the client no needs to know the hash Maps. The only thing it has to do is
to send the
request according to the wsdl.

On the other hand if a user has the same client code he can create the
request using it.


A good approach is to maintain a clean separation between your
> external XML-based interface and your internal object model -- just as
> you use a DAO to maintain a clean separation between your internal
> object model and a database.


yes this is a  possible approach. but isn't it better to provide  correct
support?

This method has following disadvantages.
1. since we have to create a extra layer it gives a performance issue.
2. we have to maintain two seperate object hierachies. so the code
duplication and problems with
maintance.

Maybe we should be thinking about creating a more formal interface
> abstraction model -- EIO (external interface object)...
>
> Anne
>
> On 9/28/07, Bhojraj, Santosh <[EMAIL PROTECTED]> wrote:
> > Nah. The whole idea of the Map would be lost then.
> > This was supported in Axis 1.2. So why can't it be done in Axis2 ?
> >
> >
> >
> > -Original Message-
> > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> > Sent: Friday, September 28, 2007 4:02 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: Problem with return HashMap.
> >
> > A better solution is to convert a hashmap to an array.
> >
> > On 9/28/07, Bhojraj, Santosh <[EMAIL PROTECTED]> wrote:
> > > Will it at least work if JIBX is used for data binding ?
> > >
> > >
> > > -Original Message-
> > > From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, September 28, 2007 9:28 AM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: Problem with return HashMap.
> > >
> > > Axis2 does not support hasmap in 1.3 release. May be we will provide
> > > that in a future release.
> > >
> > > Thanks
> > > Deepal
> > >
> > > [EMAIL PROTECTED] wrote:
> > > > Hi,
> > > > I have simple web service ( Axis2-1.3 ) which has method return
> > > > java.util.HashMap:
> > > >
> > > > public class SimpleWebService {
> > > >
> > > >   private HashMap _map;
> > > >   public SimpleWebService() {
> > > >   _map = new HashMap();
> > > >
> > > >   }
> > > >   public HashMap getMap() {
> > > >   _map.put("AA", "BB");
> > > >   _map.put("BB", "BB");
> > > >   _map.put("CC", "BB");
> > > >   _map.put("DD", "BB");
> > > >   _map.put("EE", "BB");
> > > >   return _map;
> > > >   }
> > > > }
> > > >
> > > > I use RPCServiceClient. Problem occurred when I try obtain values in
> > > HashMap.
> > > > >From client I have gotten empty hash map.
> > > > Do you have any experience with serialization HashMap or other java
> > > collections ? Do you know where can I find any samples ?
> > > > Regards,
> > > >
> > > >
> > > > 
> > > > -- Fajne i smieszne. Zobacz najlepsze filmiki!
> > > >
> > > >
> > >  http://link.interia.pl/f1bbb
> > > 
> > > >
> > > >
> > > > 
> > > > - 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]
> > >
> > >
> >
> > -
> > 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: *SPAM*: 04.70/4.0 - Re: Problem building available services

2007-10-02 Thread Suran Jayathilaka

Ana Belén Antón Gironés wrote:
Hi, 


Thank you for your fast answer, Suran. I am using Apache Tomcat 5.5 and
Axis2 1.3 war, too. 
Could you please say me the procedure followed for you step to step? I don't

know what I have forgotten.

Thank you!

Ana Belén

-Mensaje original-
De: Suran Jayathilaka [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 02 de octubre de 2007 10:57

Para: axis-user@ws.apache.org
Asunto: *SPAM*: 04.70/4.0 - Re: Problem building available services

Ana Belén Antón Gironés wrote:
  

Hi Ana,
Glad to be of assistance.
I'm gonna go thru each step since you have requested so.
I used the non-installer zip version of tomcat. But IMO that shouldn't 
make a difference.


I extracted tomcat to my drive.
downloaded axis2-1.3.war and extracted it. Then copied the axis2.war 
file to TOMCAT_HOME\webapps


Then I started tomcat so that the axis2.war will get exploded.
Then stopped tomcat.

In my IDE, i created ur package structure, created a class named Sum, 
and copied your java code as it was. Compiled it.
Created a folder named META-INF. in it, put a services.xml file with 
your services.xml content exactly.

Put both META-INF, and the org folder in to a folder called Sum.
copied the Sum folder to TOMCAT_HOME\webapps\axis2\WEB-INF\services folder.
Started tomcat again.
When I accessed localhost:8080/axis2, the Sum service was listed.

My folder structure is identical to yours.

Sum
   - META-INF
 - services.xml
   - org
 - ana
- web
   - services
  - Sum.class


Hope it helped.
Suran




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



Re: Generate service that exclusively supports soap1.1 requests

2007-10-02 Thread keith chapman
AFAIK Axis2 will not throw if the request is SOAP 1.2 and your WSDL
advertises a SOAP 1.1 Binding. Axis2 by default support SOAP 1.1,
SOAP1.2and HTTP Request and it response according to your request.
Though your WSDL
advertises SOAP 1.1 if Axis2 receives a SOAP 1.2 request it will respond
using SOAP 1.2 (Not a fault response).

Thanks,
Keith.

On 9/27/07, Erwin Reinhoud <[EMAIL PROTECTED]> wrote:
>
>
> Hello All,
>
> I am wondering if it would be possible to have a service that exclusively
> supports soap1.1 requests. A SOAPfault is given if it is a soap1.2request. In 
> earlier versions of axis2 there were always 2 bindings (
> soap1.1 and soap1.2) in the generated wsdl, now you can use your own WSDL,
> so i thought that if i only have the soap1.1 binding than all soap1.2requests 
> would get a soapfault.
>
> Anybody any ideas?
>
> Thanks in advance.
>
> Kind regards,
> Erwin
>
> -
> 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: Problem with service archiver plugin eclipse

2007-10-02 Thread Jay Zawar
Hi,

I wanted to add: I use the following plugin versions:

Axis2_Codegen_Wizard_1.2.0
Axis2_Service_Archiver_1.0.0

(and using Axis2 1.2)

Kind regards,

Jay

> -Original Message-
> From: Jay Zawar 
> Sent: mardi 2 octobre 2007 11:32
> To: axis-user@ws.apache.org
> Subject: Problem with service archiver plugin eclipse
> 
> 
> Hi,
> 
> I downgraded to Axis2 1.2 because our BPM is working with Axis2 1.2. 
> 
> When trying to archive the service, it just won't load the 
> class file. Although pointing at the right directory (\bin, 
> under which the package hierarchy exists), it wont load the 
> class file(s).
> 
> Directory structure:
> Parent dir: "TestProject"
> 
> /src
> /bin
> /bin/com
> /bin/com/foo
> /bin/com/foo/bar
> /bin/com/foo/bar/AService.class
> /bin/com/foo/bar/CustomException.class
> 
> At the end of the service archiver dialog, I specify 
> com.foo.bar.AService as being the class name for the service 
> which's name is "AService".  I point to /TestProject/bin by 
> browsing, after clicking the browse button. It won't 
> find/load the class. The dialog stops here.
> 
> Worked fine with Axis2 1.3 though. 
> 
> I am using Java 1.5.0.12, the project builds successfully.
> 
> Kind regards,
> 
> Jay
> 
> 
> -
> 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]



Problem with service archiver plugin eclipse

2007-10-02 Thread Jay Zawar
Hi,

I downgraded to Axis2 1.2 because our BPM is working with Axis2 1.2. 

When trying to archive the service, it just won't load the class file. Although 
pointing at the right directory (\bin, under which the package hierarchy 
exists), it wont load the class file(s).

Directory structure:
Parent dir: "TestProject"

/src
/bin
/bin/com
/bin/com/foo
/bin/com/foo/bar
/bin/com/foo/bar/AService.class
/bin/com/foo/bar/CustomException.class

At the end of the service archiver dialog, I specify com.foo.bar.AService as 
being the class name for the service which's name is "AService".  I point to 
/TestProject/bin by browsing, after clicking the browse button. It won't 
find/load the class. The dialog stops here.

Worked fine with Axis2 1.3 though. 

I am using Java 1.5.0.12, the project builds successfully.

Kind regards,

Jay


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



RE: *SPAM*: 04.70/4.0 - Re: Problem building available services

2007-10-02 Thread Ana Belén Antón Gironés
Hi, 

Thank you for your fast answer, Suran. I am using Apache Tomcat 5.5 and
Axis2 1.3 war, too. 
Could you please say me the procedure followed for you step to step? I don't
know what I have forgotten.

Thank you!

Ana Belén

-Mensaje original-
De: Suran Jayathilaka [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 02 de octubre de 2007 10:57
Para: axis-user@ws.apache.org
Asunto: *SPAM*: 04.70/4.0 - Re: Problem building available services

Ana Belén Antón Gironés wrote:
> Good morning,
>  
> I am new in axis and I am a bit lost. Sorry. I would like to get your 
> help, please.
>  
> I would like make some as easy as build a service from a Java Object. 
> I have followed the user guide in the apache org web page but the 
> service is remarked as "Faulty services" and I have got this error
> message:
>  
> Error: org.apache.axis2.deployment.DeploymentException: Invalid 
> service. META-INF directory not found. at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs
> (ArchiveReader.java:274)
> at
> org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.jav
> a:64)
> at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(
> DeploymentFileData.java:137)
> at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine
> .java:571)
> at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoLi
> st.java:141)
> at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListen
> er.java:318)
> at
> org.apache.axis2.deployment.RepositoryListener.checkServices(Repositor
> yListener.java:220)
> at
> org.apache.axis2.deployment.RepositoryListener.startListener(Repositor
> yListener.java:312)
> at
> org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(Sc
> hedulerTask.java:64)
> at
> org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.
> java:71)
> at
> org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run
> (Scheduler.java:83) at java.util.TimerThread.mainLoop(Unknown Source) 
> at java.util.TimerThread.run(Unknown Source) Caused by:
> org.apache.axis2.deployment.DeploymentException: Invalid service. 
> META-INF directory not found. at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs
> (ArchiveReader.java:262)
> ... 12 more
>  
>  
> For that, I have created this "services.xml":
>  
> 
> 
>   Suma
> 
> 
>  mep="http://www.w3.org/2004/08/wsdl/in-only";
> class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>  mep="http://www.w3.org/2004/08/wsdl/in-out";
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> 
> 
> org.ana.web.services.Sum
> 
> 
>  
> and this directory structure (in C:\Program Files\Apache Software 
> Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services)
>  - Sum
>- META-INF
>  - services.xml
>- org
>  - ana
>- web
>  - services
>- Sum.class 
>-Sum.java
> My Sum.java is as simple as:
>
> *package* org.ana.web.services;
>
> *public* *class* Sum {
>
> *public* String getSum (*int* a, *int* b){
>
> Integer c = a+b;
>
> *return* ("The operation is: "+a+" + "+b+" = "+c);
>
> }
>
> }
>
> Thank you very much in advance and best regards,
>  
> Ana Belen.
Hi Ana,

I tried your exact code and directory structure on WindowsXP, Apache Tomcat
5.5.20, using the Axis2 1.3 war. And it worked without a problem.

Can you please tell us which version of Axis2 you are using? If you are
using an older version, I suggest you download the Axis2 1.3 release and
try.

You can also try creating a service archive with an .aar extension using the
Java jar tool, and deploying that instead of the exploded directory
structure.

Best of luck!
Suran.


-
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]



Generating adb code with wsa (2005/08) action mappings in WSDL

2007-10-02 Thread Erwin Reinhoud
Hello All,

I have a wsaw:http://www.w3.org/2005/03/addressing/wsd reference in my wsdl to 
define the wsa:action for an operation request and response. I see that these 
are used in the service.xml, however, when i deviate from the standard (i.e. 
[target namespace][delimiter][port type name][delimiter][input|output name]) 
the generated action is still conforming to this standard and actionmapping in 
service.xml is not changed. Is this expected behaviour, or should one be free 
to define their own wsa:action in the wsdl and have that action mapping in the 
service.xml?

Thanks in advance.

Kind regards,
Erwin


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



RE: Generate service that exclusively supports soap1.1 requests

2007-10-02 Thread Erwin Reinhoud
Hello Upul,
 
Thanks for the info. I have not used Synapse yet, but will have a look at it.
 
Kind regards,
 
Erwin

-Oorspronkelijk bericht-
Van: Upul Godage [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 2 oktober 2007 9:59
Aan: axis-user@ws.apache.org
Onderwerp: Re: Generate service that exclusively supports soap1.1 requests


Hi,

I think you can use Apache Synapse for this, using in front of the web service. 
( http://ws.apache.org/synapse/)  Check the SOAP-1.2-namespaced Envelope using 
'filter' mediator (works like an if condition using xpath) and in the sequence 
using 'makefault' mediator to send fault. Or otherway check for 
SOAP-1.1-namespaced Envelope, if yes then send further otherwise 'makefault'. 

Upul



On 10/2/07, Erwin Reinhoud <   [EMAIL PROTECTED]> 
wrote: 

Hello All,

I already posted this before but saw no reply. I hope somebody can at least 
tell me if my expectations are correct, which are that if i only have the 
soap1.1 binding in the WSDL than all soap1.2 requests would get a soapfault.

So would it be possible to have a service that exclusively supports soap1.1 
requests by only having ther soap1.1 binding in wsdl? Is there an other 
configurable way to only support 1.1?  In earlier versions of axis2 there were 
always 2 bindings (soap1.1 and soap1.2) so both calls were supported.


Thanks in advance.

Kind regards,
Erwin

- 
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: Problem building available services

2007-10-02 Thread Suran Jayathilaka

Ana Belén Antón Gironés wrote:

Good morning,
 
I am new in axis and I am a bit lost. Sorry. I would like to get your 
help, please.
 
I would like make some as easy as build a service from a Java Object. 
I have followed the user guide in the apache org web page but the 
service is remarked as "Faulty services" and I have got this error 
message:
 
Error: org.apache.axis2.deployment.DeploymentException: Invalid 
service. META-INF directory not found. at 
org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:274) 
at 
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:64) 
at 
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:137) 
at 
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:571) 
at 
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:141) 
at 
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:318) 
at 
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:220) 
at 
org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:312) 
at 
org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64) 
at 
org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71) 
at 
org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83) 
at java.util.TimerThread.mainLoop(Unknown Source) at 
java.util.TimerThread.run(Unknown Source) Caused by: 
org.apache.axis2.deployment.DeploymentException: Invalid service. 
META-INF directory not found. at 
org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:262) 
... 12 more
 
 
For that, I have created this "services.xml":
 



  Suma


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"/>


org.ana.web.services.Sum

 
 
and this directory structure (in C:\Program Files\Apache Software 
Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services)

 - Sum
   - META-INF
 - services.xml
   - org
 - ana
   - web
 - services
   - Sum.class 
   -Sum.java

My Sum.java is as simple as:

*package* org.ana.web.services;

*public* *class* Sum {

*public* String getSum (*int* a, *int* b){

Integer c = a+b;

*return* ("The operation is: "+a+" + "+b+" = "+c);

}

}

Thank you very much in advance and best regards,
 
Ana Belen.

Hi Ana,

I tried your exact code and directory structure on WindowsXP, Apache 
Tomcat 5.5.20, using the Axis2 1.3 war. And it worked without a problem.


Can you please tell us which version of Axis2 you are using? If you are 
using an older version, I suggest you download the Axis2 1.3 release and 
try.


You can also try creating a service archive with an .aar extension using 
the Java jar tool, and deploying that instead of the exploded directory 
structure.


Best of luck!
Suran.


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



RE: Exception handling - AxisFault

2007-10-02 Thread Pär Malmqvist

I also have problem with this and I have a bad solution for the moment.
Set the parameter DrillDownToRootCauseForFaultReason to true in the axis2.xml 
configuration file at the server side.
Then you can see the Exception in the AxisFault message. I think it is 
getDetails().
 
 
/Pär
 
 
 
 
> Subject: Exception handling - AxisFault> Date: Tue, 2 Oct 2007 09:57:08 
> +0200> From: [EMAIL PROTECTED]> To: axis-user@ws.apache.org> > Hi,> > I am 
> desperate since 2 weeks, because I keep hanging on this problem: I do not 
> know how AxisFault is handled, and why my custom exception is not serialized 
> and passed back to the client side, where it should be re-instantiated by 
> reflection, as it should be, according to the Axis2 tools. > > To be honest, 
> I am not sure anymore if this works at all, and I am only 1 step before 
> implementing my own webservice handling classes and quit the Axis framework, 
> or look for something else - the framework is unfortunately _completely_ 
> useless if something as basic as that does not function or is poorly 
> documented. I would of course also appreciate verbose documentation on how 
> exceptions are passed, how AxisFault is handled, instantiated, passed back, 
> serialized, etc. etc.> > So I repost my problem here, in hope for help or 
> advice. If I do not get any until tomorrow, I will have to recommend using 
> something else. > > My problem: I can invoke web services without problems, 
> but I do not get back customized exceptions on my Java client side.> > Here 
> is my generation procedure and source:> 1) I write a class AService, in which 
> I define one simple operation (add(int,int,int)), it returns a result of type 
> long, if the third argument is 0. If the 3rd int is not 0, it will throw 
> "CustomException".> 2) "CustomException" is a class defined as extending 
> java.lang.Exception and implements java.io.Serializable> 3) I generate the 
> service with Axis2 tools, and deploy the service.> 4) I generate the wsdl. 
> The wsdl correctly includes the fault element named  name="CustomException">> > 
> 5) I generate the java client with the axis2 codegen wizard.> 6) I invoke the 
> web service with it, without exception testing: works.> 7) I invoke it to 
> throw the exception (3rd int = 1): doesn't work. I only get an AxisFault. But 
> the generated client should throw a CustomException. AxisFault.getDetail() is 
> empty. > > What is wrong ?> I include the 2 simple java files from which I 
> started here:> package com.foo.bar;> > > public class AService {> public long 
> Add(int a, int b, int exceptionThrown) throws CustomException {> > if 
> (exceptionThrown != 0) {> System.out.println("CustomException to b 
> instantiated"); > > CustomException e = new CustomException();> 
> e.setCustomMsg("bar");> throw e;> }> > > return a+b;}> > }> > Here the 
> exception class:> package com.foo.bar;> > import java.io.Serializable;> > 
> public class CustomException extends java.lang.Exception implements 
> Serializable {> > private static final long serialVersionUID = 
> 1542353156105984960L;> private String customMsg;> > public String 
> getCustomMsg() {return customMsg;}> public void setCustomMsg(String 
> customMsg) {this.customMsg=customMsg;}> > > }> > > Here is the generated 
> WSDL:>  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
> xmlns:xsd="http://bar.foo.com/xsd"; xmlns:ns="http://bar.foo.com"; 
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
> targetNamespace="http://bar.foo.com";> xmlns:xs="http://www.w3.org/2001/XMLSchema"; attributeFormDefault="qualified" 
> elementFormDefault="qualified" targetNamespace="http://bar.foo.com/xsd";>> 
> > > > 
>  />> > > >  name="CustomException" type="xsd:CustomException" />>  name="CustomException">> >  base="xs:Exception">> >  nillable="true" type="xs:string" />> > > 
> > > > 
> > >  type="xs:int" />> > 
> > 
> > > >  name="AddResponse">> > >  name="return" nillable="true" type="xs:long" />> > 
> > >  name="AddMessage"> /> name="part1" element="xsd:AddResponse" /> name="CustomException"> /> name="Add">http://www.w3.org/2006/05/addressing/wsdl"; 
> wsaw:Action="urn:Add" message="ns:AddMessage" /> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; 
> message="ns:AddResponseMessage" wsaw:Action="urn:Add" /> message="ns:CustomException" name="CustomException" 
> /> type="ns:AServicePortType"> transport="http://schemas.xmlsoap.org/soap/http"; style="document" 
> /> style="document" /> /> /> /> name="AServiceSOAP12Binding" type="ns:AServicePortType"> transport="http://schemas.xmlsoap.org/soap/http"; style="document" 
> /> style="document" /> /> /> /> name="AService"> binding="ns:AServiceSOAP11Binding"> location="http://localhost:8080/axis2/services/AService"; 
> /> binding="ns:AServiceSOAP12Binding"> location="http://localhost:8080/axis2/services

Re: Generate service that exclusively supports soap1.1 requests

2007-10-02 Thread Upul Godage
Hi,

I think you can use Apache Synapse for this, using in front of the web
service. (http://ws.apache.org/synapse/)  Check the
SOAP-1.2-namespacedEnvelope using 'filter' mediator (works like an if
condition using xpath)
and in the sequence using 'makefault' mediator to send fault. Or otherway
check for SOAP-1.1-namespaced Envelope, if yes then send further otherwise
'makefault'.

Upul


On 10/2/07, Erwin Reinhoud <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>
> I already posted this before but saw no reply. I hope somebody can at
> least tell me if my expectations are correct, which are that if i only have
> the soap1.1 binding in the WSDL than all soap1.2 requests would get a
> soapfault.
>
> So would it be possible to have a service that exclusively supports
> soap1.1 requests by only having ther soap1.1 binding in wsdl? Is there an
> other configurable way to only support 1.1?  In earlier versions of axis2
> there were always 2 bindings (soap1.1 and soap1.2) so both calls were
> supported.
>
>
> Thanks in advance.
>
> Kind regards,
> Erwin
>
> -
> 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]
>
>


Exception handling - AxisFault

2007-10-02 Thread Jay Zawar
Hi,

I am desperate since 2 weeks, because I keep hanging on this problem: I do not 
know how AxisFault is handled, and why my custom exception is not serialized 
and passed back to the client side, where it should be re-instantiated by 
reflection, as it should be, according to the Axis2 tools. 

To be honest, I am not sure anymore if this works at all, and I am only 1 step 
before implementing my own webservice handling classes and quit the Axis 
framework, or look for something else - the framework is unfortunately 
_completely_ useless if something as basic as that does not function or is 
poorly documented. I would of course also appreciate verbose documentation on 
how exceptions are passed, how AxisFault is handled, instantiated, passed back, 
serialized, etc. etc.

So I repost my problem here, in hope for help or advice. If I do not get any 
until tomorrow, I will have to recommend using something else. 

My problem: I can invoke web services without problems, but I do not get back 
customized exceptions on my Java client side.

Here is my generation procedure and source:
1) I write a class AService, in which I define one simple operation 
(add(int,int,int)), it returns a result of type long, if the third argument is 
0. If the 3rd int is not 0, it will throw "CustomException".
2) "CustomException" is a class defined as extending java.lang.Exception and 
implements java.io.Serializable
3) I generate the service with Axis2 tools, and deploy the service.
4) I generate the wsdl. The wsdl correctly includes the fault element named 


5) I generate the java client with the axis2 codegen wizard.
6) I invoke the web service with it, without exception testing: works.
7) I invoke it to throw the exception (3rd int = 1): doesn't work. I only get 
an AxisFault. But the generated client should throw a CustomException. 
AxisFault.getDetail() is empty. 

What is wrong ?
I include the 2 simple java files from which I started here:
package com.foo.bar;


public class AService {
public long Add(int a, int b, int exceptionThrown) throws 
CustomException {

if (exceptionThrown != 0) {
System.out.println("CustomException to b 
instantiated");

CustomException e = new CustomException();
e.setCustomMsg("bar");
throw e;
}


return a+b;}

}

Here the exception class:
package com.foo.bar;

import java.io.Serializable;

public class CustomException extends java.lang.Exception implements 
Serializable {

private static final long serialVersionUID = 1542353156105984960L;
private String customMsg;

public String getCustomMsg() {return customMsg;}
public void setCustomMsg(String customMsg) {this.customMsg=customMsg;}


}


Here is the generated WSDL:
http://schemas.xmlsoap.org/wsdl/soap12/"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:xsd="http://bar.foo.com/xsd"; xmlns:ns="http://bar.foo.com"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
targetNamespace="http://bar.foo.com";>http://www.w3.org/2001/XMLSchema"; attributeFormDefault="qualified" 
elementFormDefault="qualified" targetNamespace="http://bar.foo.com/xsd";>

































http://www.w3.org/2006/05/addressing/wsdl"; wsaw:Action="urn:Add" 
message="ns:AddMessage" />http://www.w3.org/2006/05/addressing/wsdl"; 
message="ns:AddResponseMessage" wsaw:Action="urn:Add" />http://schemas.xmlsoap.org/soap/http"; style="document" 
/>http://schemas.xmlsoap.org/soap/http"; style="document" 
/>http://localhost:8080/axis2/services/AService"; 
/>http://localhost:8080/axis2/services/AService"; 
/>

Thanks in advance for help,

Jay


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



RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

2007-10-02 Thread Gennady Shumakher
Hi Vish,
I faced the similar issues during evaluation of migration of our project
from axis1 to axis2. As far I understand the issue here is that
wsdl2java generation frameworks and databinding techniques don't have
the strict unification of the way the code is generated. So even
switching from one data binding to another would cause the need of code
modifications since the generated complex data types are exposed in
completely different API manner. (ADB - new SomeType(); XmlBeans -
SomeType.Factory.newInstance()).
To switch easily between data binding methods the one could consider
code2wsdl path.
 
Regarding the options you mentioned according to 1.3 documentation jaxme
and jaxbri are in experimental phase.
 
Gennady
 


From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 01, 2007 23:32
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String



Actually I do see that the complex types are getting generated - but the
"-f" option seems to be working erratically, because of which those
types got generated with a "src" folder at the topmost level.

But unwrapping does not work with jaxme/jaxbri/ADB.

 

My takeaway from this exercise: Axis2 wsdl2java cannot generate same
code like axis1 even if wsdl remains same and irrespective of the value
of the "-d" wsdl2java option. Just migrating to axis2 forces people to
use xmlbeans, adb, etc, and make change in the webservice implementation
to handle, for example, xmlbeans.XmlString instead of java.lang.String.

 

So my options are to:

1.  use jaxme/jaxbri with wrapper classes even for simple webservice
operations like login, etc 
2.  use xmlbeans and change my axis1 implementation to handle
XmlString instead of java String. 

 

Any suggestions/thoughts/corrections?

 

 



From: Pantvaidya, Vishwajit 
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String

 

Hi Amila,

 

Let me know if I am doing anything wrong here or if I need to change
anything.

 

 

- Vish.

 



From: Pantvaidya, Vishwajit 
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String

 

I also tried using jaxb hoping that it would directly map to java types
- found 2 problems there.

1. axis2 does not support unwrapping for jaxb - why is that?

2. for the same wsdl, I emailed you, it created an interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (

com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement

);

But it did not create the class for the complex types
com.selectica.ws.ecm.wsdlgen.UploadRequestElement and
OperationStatusElement. Am I doing anything wrong here or is there a
problem with the axis2 jaxb support?

 

 

- Vish.

 



From: Pantvaidya, Vishwajit 
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String

 

For this wsdl - it creates interface as follows:

 

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument
Upload (

org.apache.xmlbeans.XmlString sessiontoken,

org.apache.xmlbeans.XmlString trackingnumber,

org.apache.xmlbeans.XmlInt version

);

 

So the unwrapping here is okay - but I need java.lang,String params
instead of xmlbeans.XmlString. I know that XmlString contains a string
finally - but I do not really need that additional wrapper.

Is this happening because of the bindings functionality introduced in
axis2?

Is it possible in axis2 to do wsdl2java using only POJO types?

 

 



From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String

 

 

On 8/23/07, Pantvaidya, Vishwajit <[EMAIL PROTECTED]> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) -
it gives error "error: invalid.document.type: Document is not a wsdl
file".

 

But coming back to original problem - the wsdl used to process fine with
axis1 resulting in interface with parameters of java types. Hasn't that
been retained in axis2?

 

Tried wsdl2java with ADB to see if that gives me what I want. That also
completed fine - but resulting classes had all complex type params with
generated types. So I tried the -uw option - hoping it will unwrap
those. But now I get error

 

org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported
Schema format for unwrapping! found unknown type

Problem building available services

2007-10-02 Thread Ana Belén Antón Gironés
Good morning,
 
I am new in axis and I am a bit lost. Sorry. I would like to get your help,
please.
 
I would like make some as easy as build a service from a Java Object. I have
followed the user guide in the apache org web page but the service is
remarked as "Faulty services" and I have got this error message: 
 
Error: org.apache.axis2.deployment.DeploymentException: Invalid service.
META-INF directory not found. at
org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(Archi
veReader.java:274) at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:64)
at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(Deploy
mentFileData.java:137) at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:
571) at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.jav
a:141) at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.jav
a:318) at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListe
ner.java:220) at
org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListe
ner.java:312) at
org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(Schedule
rTask.java:64) at
org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:7
1) at
org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Sched
uler.java:83) at java.util.TimerThread.mainLoop(Unknown Source) at
java.util.TimerThread.run(Unknown Source) Caused by:
org.apache.axis2.deployment.DeploymentException: Invalid service. META-INF
directory not found. at
org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(Archi
veReader.java:262) ... 12 more
 
 
For that, I have created this "services.xml":
 


  Suma


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"/>


org.ana.web.services.Sum

 
 
and this directory structure (in C:\Program Files\Apache Software
Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services)
 - Sum

   - META-INF

 - services.xml

   - org

 - ana

   - web

 - services

   - Sum.class 
   -Sum.java
My Sum.java is as simple as:

package org.ana.web.services;

public class Sum {

public String getSum (int a, int b){

Integer c = a+b;

return ("The operation is: "+a+" + "+b+" = "+c);

}

}

Thank you very much in advance and best regards,
 
Ana Belen.