Re: SOAP to REST proxy

2008-03-16 Thread Philipp Leitner

Hi,

I though about something like that, too, for the same reason. However, 
there's two caveats to the idea:


- REST services do not expose an interface definition a la WSDL... there 
would be WADL, but IMHO you currently seem to rather encounter a lion in 
 alaska than a WADL file in the real world.


- with REST you have no guarantee that the service works on XML - it 
might as well return JSON, HTML, plain text, RTF, ...


So a really general converter might be hard to implement...

/philipp

Jim Alateras schrieb:
I was wondering whether anyone has developed a SOAP to REST web service, 
that would run in axis2 and call restful web services. I need a 
mechanism that will allow me to expose any external restful web service 
as a SOAP service.  I need this so that I can orchestrate both SOAP and 
REST based web services using something like BPEL.


cheers
/jima

-
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: GetxxxRequest and GetxxxRequest12..why 2 different classes

2008-02-27 Thread Philipp Leitner
That's because there are by default two different SOAP bindings in a 
Axis2 WSDL definition. One is a SOAP 1.1 binding, the other SOAP 1.2. So 
one of the wrappers uses the SOAP1.1 binding, and the other uses SOAP1.2


/philipp

[EMAIL PROTECTED] schrieb:
I am generating a proxy client using adb beans. It creates a wrapper 
object for the request and response. For example…


 


GetXRequestàgetXRequest12

GetXResponseàgetXResponse11

 


So I do the following

 


getXRequest12 = new getXRequest12()

getXRequest = new getXRequest()

getXRequest.setXXX();

getXRequest.setXXX();

getXRequest12.setGetXRequest(getXRequest)

 


Then the stub class takes wrapper class called.. getXRequest12

 


Can anyone clarify why adb generator does this?

 


**John Ranaudo**

 



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



Re: AXIS 2 with WSIF 2.0

2008-02-22 Thread Philipp Leitner

Hi Sushant,

thus i am trying to find a solution, that is common across.

I wonder how WSIF would help you with that problem? WSIF is based on a 
rather old Axis1 version, which is iirc not exactly an interoperability 
miracle. I think you would be better off using either Axis2, Codehaus 
XFire or Apache CXF as a client for all three service hosts (Jboss, 
Axis2, Oracle). I would recommnd WSIF only if you really need one of the 
distinguising features of WSIF, not if you just want to build a generic 
Web service client. IMHO there are just better alternatives available 
for the standard use cases.


/philipp

sushant schrieb:

Hi Tobias,

It is not mandatory for me to use WSIF.
Its just, i might have web services deployed on Jboss,Axis 2 and oracle 
app server,

thus i am trying to find a solution, that is common across.

Thanks
Sushant


*/Tobias Anstett [EMAIL PROTECTED]/* wrote:


Hi Sushant,


Can somebody point me to an example of creating web service
client with WSIF and the web service is developed for AXIS 2.13


As far as i know WSIF is the Web Service Invocation Framework
integrated for example in the Rational Application Developer. I
think your axis client is configured correctly, but WSIF needs
custom serializers / deserializers to map the response or create the
request. I have worked with WSIF two years ago and finally switched
to axis.

Is there any reason why you won't create a client with axis instead
of WSIF ?

Regards, Tobias



Meet people who discuss and share your passions. Join them now. 
http://in.rd.yahoo.com/tagline_groups_7/*http://in.promos.yahoo.com/groups 



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



Re: Basic tips for a newbie, problems with really complex types

2008-02-05 Thread Philipp Leitner
I was just wondering if there were any other kind 
 of diagram more useful for this purpose

Well, if the issue is having a number of classes (data structures) and trying 
to understand how they relate to each other then I would say class diagrams are 
basically the best visualization you can currently have.

 I've read 
 http://ws.apache.org/axis2/1_3/userguide-creatingclients.html#createclients 
 but there aren't many details like, for example, this issue with 
 OMElement. Where could I find a deeper explanation about using Axis2 and 
 it's databinding capabilities, and maybe more examples?

I probably should have explained that in more detail. Your xsd:anyType is 
basically a placeholder for some undefined XML content. Compare it to a Java 
interface like 'Object invoke(Object parameter)'. Just from looking at the 
interface (or, in your case, the WSDL description) neither you nor any tool in 
the world can tell what /kind of/ object you will be passed. Basically, you 
would have to ask the original developer what he actually wanted to do with 
this method. From the point of static type safety this method is entirely 
undefined.

The same goes for your WSDL description - xsd:anyType says 'there's gonna be 
some XML content here, but I am not going to tell you what it looks like'. 
Therefore Axis2 is unable to create a Java type for this content. The only 
thing Axis2 is able to do is to hand /you/ (i.e., the client) the XML document 
and hope that you know (for instance, because you have talked offline to the 
service provider) what to do with this undefined bunch of data. And this is 
exactly what happens - you can receive a OMElement (an OMElement is just a 
AXIOM representation of a XML (sub-)tree), but unlike other fields you would 
have to deal with the XML data yourself in this special case. Have a look at 
http://ws.apache.org/axis2/1_0/OMTutorial.html for a tutorial on how to work 
with AXIOM.

/philipp

 Original-Nachricht 
 Datum: Tue, 05 Feb 2008 14:15:41 +0100
 Von: [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: Basic tips for a newbie, problems with really complex types

 
 It's my fault for not having explained a bit more... I had thougth  
 about making UML diagrams... I was just wondering if there were any  
 other kind of diagram more useful for this purpose... thanks for your  
 advice regarding this anyway...
 
 I've read  
 http://ws.apache.org/axis2/1_3/userguide-creatingclients.html#createclients
  
 but there aren't many details like, for example, this issue with  
 OMElement. Where could I find a deeper explanation about using Axis2  
 and it's databinding capabilities, and maybe more examples?
 
 Thanks for your answers.
 
 
 
 Philipp Leitner [EMAIL PROTECTED] wrote:
 
  1º The types are a bit too complex and I find sometimes lost
 
  You could use some kind of 'source code to class diagram' wizard to   
  visualize your data structures after you have generated your stubs   
  using wsdl2java (I think there is a good one as plugin for Ecipse).   
  Or you could use a tool such as Altova XMLSpy to directly visualize   
  your XSD files.
 
  2º In one of the xsd I have this definition:
 
  Your XSD file represents an xsd:anyType type. Basically that means   
  that about everything can come along at this point in the Web   
  service message. Axis2 has no way whatsoever of figuring out what   
  this data will look like BEFORE it actually receives a request.   
  That's bad news, because it means that you cannot cast it to a   
  class. You have to directly deal with this data on XML (or more   
  accurately, on AXIOM) level.
 
  hth, philipp
 
  
  Hi, I've just started a WS client and I chose axis2 because I had to do
  a little web service server and client and I used axis 1.4 with no
  troubles at all.
 
  This is something a bit bigger, since I'm not at college anymore, and I
  have two problems. I've been given a huge wsdl and two xsd files
  defining some types used for the ws. I've used wsdl2java to generate
  code (using adb bindings... I could switch to something a bit more
  complex if there were any advantates regarding my current issues), but:
 
  1º The types are a bit too complex and I find sometimes lost, not
  knowing how to build a single object for a request... Do you make any
  kind of diagrams when dealing with such a large hierarchy of types?
 
  2º In one of the xsd I have this definition:
  complexType name=QueryExpressionType mixed=true
 sequence
 any namespace=##other processContents=lax/
 /sequence
 attribute name=queryLanguage type=rim:referenceURI
  use=required/
 /complexType
 
  and the generated class QueryExpressionType has an attribute:
 
  /**
  * field for ExtraElement
  */
 protected org.apache.axiom.om.OMElement localExtraElement;
 
  How can I cast this to the class representing the actual data in the
  message?
 
  Thanks for your time.
 
  I think I should

Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call

2008-02-01 Thread Philipp Leitner
Not sure about that - I reckon you can transfer any type of attachment 
using MTOM (not only binary), but I actually never tried that so far.


What I meant with 'split the huge invocation' is simply that you do not 
transfer all results of your query at one time, but over a few 
consequent invocations.


I.e. clients would not invoke a 'get me all IDs to my query' method, but 
rather something like 'get me the first 10.000 results to this query', 
process these results, then send 'get me the second 10.000 results to 
this query' ... and so on. IMHO that's the generally accepted way of 
dealing with big datasets, even outside the area of Web services.


/philipp

Raghu Upadhyayula schrieb:

Thanks for your reply Narayan.

 

So, if I have to use mtom then I need to change my method to return the 
attachment (xsd:base64binary) instead of returning the long[] right?


 


Thanks

Raghu



*From:* Narayan S Dhillon [mailto:[EMAIL PROTECTED]
*Sent:* Thursday, January 31, 2008 3:11 PM
*To:* axis-user@ws.apache.org
*Subject:* Re: [Axis2] Webservices - 100% Memory and CPU usage 
(OutOfMemoryError) on API call


 


if you transferring heavy data oevr the wire, consider using mtom.

On 31/01/2008, *Philipp Leitner* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Still not sure whether you expirience the exception on client or server
side.

However: 300.000 longs do seem like a lot of elements to transport at
once. I would not be surprised if such a huge array simply leads to
memory problems during wrapping/unwrapping.

Best solution (if that is indeed the problem) would be to split the one
huge invocation into a number of smaller ones (or increasing the heap
size to  avoid memory problems, but that's probably just a temporary fix).

100% CPU does not seem very uncommon to me - I have seen similar
behavior during wrapping/unwrapping of big SOAP messages. XML processing
is expensive in terms of CPU cycles.

/philipp


Raghu Upadhyayula schrieb:

 Hi Phillip,

I think there were around 300,000 elements in the long[] when I ran
 into this issue.

I suppose, the exception happens in the app logic, I haven't tried
 it on my local machine yet (the error happened on one of our QA
 servers).

In the application logic, what I do is, execute a query, loop
 through the result set, store the results in a ListLong as I don't
 know how many rows are in the result set, and then loop through the
 ListLong and store then in the long[] and return the long[] back to
 the client.

 Thanks
 Raghu
 -Original Message-
 From: Philipp Leitner [mailto:[EMAIL PROTECTED] 

mailto:[EMAIL PROTECTED]]

 Sent: Thursday, January 31, 2008 5:05 AM
 To: axis-user@ws.apache.org mailto:axis-user@ws.apache.org
 Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage
 (OutOfMemoryError) on API call

 How many elements are there in your long[] when you run out of memory?
 When exactly does the exception happen (in your app logic, during
 wrapping, during transmission, on client side?).

 /philipp

 Raghu Upadhyayula schrieb:
 Hi,



 I have a webservice API call which is using 100% of Memory  CPU and
 throwing an OutOfMemoryError (I'm using Axis2 1.3).



 My webservice call returns a long array.



 Here is the signature of my webservice API.



 *public long[] getIds(Calendar startDate, Calendar endDate) throws
 Exception; *



 Based on the given startDate  endDate, I retrieve the corresponding
 records from the database and store the ids in a long array and return

 the long array to the client.



 If the number of records is more, I'm having the issue of 100% memory
 /
 CPU usage or OutOfMemoryError.



 Does anyone of you have any ideas on how to overcome this issue?



 Thanks

 Raghu


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED] 

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

mailto:[EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED] 

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

mailto:[EMAIL PROTECTED]

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


 



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



Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call

2008-01-31 Thread Philipp Leitner
Still not sure whether you expirience the exception on client or server 
side.


However: 300.000 longs do seem like a lot of elements to transport at 
once. I would not be surprised if such a huge array simply leads to 
memory problems during wrapping/unwrapping.


Best solution (if that is indeed the problem) would be to split the one 
huge invocation into a number of smaller ones (or increasing the heap 
size to  avoid memory problems, but that's probably just a temporary fix).


100% CPU does not seem very uncommon to me - I have seen similar 
behavior during wrapping/unwrapping of big SOAP messages. XML processing 
is expensive in terms of CPU cycles.


/philipp


Raghu Upadhyayula schrieb:

Hi Phillip,

I think there were around 300,000 elements in the long[] when I ran
into this issue.

I suppose, the exception happens in the app logic, I haven't tried

it on my local machine yet (the error happened on one of our QA
servers).

In the application logic, what I do is, execute a query, loop

through the result set, store the results in a ListLong as I don't
know how many rows are in the result set, and then loop through the
ListLong and store then in the long[] and return the long[] back to
the client.

Thanks
Raghu
-Original Message-
From: Philipp Leitner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 31, 2008 5:05 AM

To: axis-user@ws.apache.org
Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage
(OutOfMemoryError) on API call

How many elements are there in your long[] when you run out of memory? 
When exactly does the exception happen (in your app logic, during 
wrapping, during transmission, on client side?).


/philipp

Raghu Upadhyayula schrieb:

Hi,

 

I have a webservice API call which is using 100% of Memory  CPU and 
throwing an OutOfMemoryError (I'm using Axis2 1.3).


 


My webservice call returns a long array.

 


Here is the signature of my webservice API.

 

*public long[] getIds(Calendar startDate, Calendar endDate) throws 
Exception; *


 

Based on the given startDate  endDate, I retrieve the corresponding 
records from the database and store the ids in a long array and return



the long array to the client.

 


If the number of records is more, I'm having the issue of 100% memory
/ 

CPU usage or OutOfMemoryError.

 


Does anyone of you have any ideas on how to overcome this issue?

 


Thanks

Raghu



-
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: Process SOAP message containg XHTML

2008-01-14 Thread Philipp Leitner
Probably including XHTML document in a CDATA section helps, i.e. instead 
of passing back


html
..
/html

you pass back

![CDATA[
html
..
/html
]]

(on client-side you would obviously have to strip the CDATA tags again).

On a sidenote, I am not sure if your design (Web service that returns a 
XHTML response encoded as String) is so beautiful. Have you ever though 
about writing a RESTful Web service without SOAP, that just returns XML 
or XHTML representations? Would seem like a simpler and more 
understandable solution to your challenges...


/philipp

Scott Malinowski schrieb:

Paul,

Thanks. I saw MTOM during my research but I am very new to web services 
and SOAP and I am finding some of these other features (including MTOM) 
a bit daunting. Mostly, I need to make sure the web service I write can 
be accessed not only by my Java client but also by our sister 
application, which is written in PowerBuilder. It looks like you have to 
enable MTOM on the client but I am unable to find how that can be done 
in PowerBuilder. It appears you have to have PowerBuilder use .NET 
instead of EasySOAP, which is PowerBuilder's implementation of SOAP. 
Sadly, my organization will not allow .NET so I am limited. This is why 
I am using plain vanilla SOAP. The client creates a SOAP message and 
calls the service. My web service doesn't do anything with SOAP itself. 
It is just a Java class which generates XHTML and returns it. The SOAP 
container on the server (Axis2) takes care of converting the string to a 
SOAP message response. Somewhere in that process of taking my string and 
converting it to a SOAP message is where it encodes it.


I did try changing the wsdl to have the return type be base64Binary but 
that did not keep the XHTML from being encoded. I was hoping there would 
be a simple change I can make to the wsdl to tell SOAP to ignore the 
content of the return and don't encode it but maybe there isn't an easy way.


I will look further into MTOM. Maybe I can at least get it working via a 
Java client. In the meantime, any other ideas from you or anyone else 
would be greatly appreciated!


Thanks,
Scott

- Original Message 
From: Paul Fremantle [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Monday, January 14, 2008 12:07:56 PM
Subject: Re: Process SOAP message containg XHTML

One option would be to treat the data as a binary message and use MTOM
to send it. This should reduce the XML processing and will also avoid
any encoding issues.

Paul

On Jan 14, 2008 3:36 PM, Scott Malinowski [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:

 
  Hello,
 
  This is probably a SOAP question more than an AXIS2 question. If 
there is a

  better place to post my question please let me know.
 
  I have written a SOAP web service using AXIS2. It returns XHTML as a 
string.
  The problem is on the client side. It takes several minutes to 
process the

  response, which is only a few hundred kilobytes. My research on this has
  pointed me to the fact that the XHTML within the SOAP response has become
  encoded (e.g. '' has become 'lt;') and that it is taking awhile for 
this

  data to be converted back. It only takes a second or so for the client to
  send the request and receive a response. The time delay comes when I call
  getSOAPBody() on the client. I have tried wrapping the XHTML in 
'![CDATA['
  and ']]' but to no avail (it is still encoded in the SOAP response). 
How do
  I return XHTML so that Axis2 and/or SOAP ignores the XHTML when 
building the

  response and leaves it unencoded?
 
  Thanks,
  Scott
 
   
  Looking for last minute shopping deals? Find them fast with Yahoo! 
Search.




--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

Oxygenating the Web Service Platform, www.wso2.com http://www.wso2.com

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





Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
it now. 
http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
 


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



Re: WSA Action = null for endpoint...

2008-01-10 Thread Philipp Leitner
If you have a SOAP-based endpoint (i.e., either SOAP 1.1 or 1.2 binding) 
then you just can't invoke the service using your browser. The service 
expects a well-formed SOAP input, while your browser only sends a simple 
HTTP GET request.


If you have deployed your service using Axis2 and the standard 
configuration then you should automatically have a REST endpoint 
(besides the two SOAP endpoints mentioned before). Unlike the SOAP ones 
you should be able to invoke this service using your browser (at least 
if it is simple enough and does not require input).


/philipp

silver17 schrieb:

Hi guys,

I'm relatively newb to the world of web services and i've come accross
something else.  I built a web service and put it in it's own war file, and
it works, sort of.  When I use my java client to hit the endpoint (eg:
http://server/path/services/publish) it works great, but when i load my
browser with that same URL I get an error indicating there is no Endpoint
because WSA Action is null, can someone explain this to me? 


Here is my wsdl.

?xml version=1.0 encoding=UTF-8?
wsdl:definitions name=RegistryPublish
targetNamespace=http://services.registry.agr.gc.ca/publish/;
xmlns:tns=http://services.registry.agr.gc.ca/publish/;
xmlns:axis2=http://services.registry.agr.gc.ca/publish/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:ows=http://www.opengis.net/ows/1.1;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:csw=http://www.opengis.net/cat/csw/2.0.2;
wsdl:documentation
WSDL Description for the Registry Publishing Service.
/wsdl:documentation
  wsdl:types
xsd:schema
xsd:import 
namespace=http://www.opengis.net/cat/csw/2.0.2;
schemaLocation=csw-Publication.xsd/
xsd:import namespace=http://www.opengis.net/ows/1.1;
schemaLocation=owsExceptionReport.xsd/
/xsd:schema
  /wsdl:types
  wsdl:message name=msgTransactionFailedFault
wsdl:part name=fault element=ows:ExceptionReport
/wsdl:part
  /wsdl:message
  wsdl:message name=msgTransaction
wsdl:part name=part1 element=csw:Transaction
/wsdl:part
  /wsdl:message
  wsdl:message name=msgTransactionResponse
wsdl:part name=part1 element=csw:TransactionResponse
/wsdl:part
  /wsdl:message
  wsdl:message name=msgInvalidRequestFault
wsdl:part name=fault element=ows:ExceptionReport
/wsdl:part
  /wsdl:message
  wsdl:portType name=RegistryPublish_portType
wsdl:operation name=Transaction
  wsdl:input message=tns:msgTransaction
/wsdl:input
  wsdl:output message=tns:msgTransactionResponse
/wsdl:output
  wsdl:fault name=InvalidRequestFault
message=tns:msgInvalidRequestFault
/wsdl:fault
  wsdl:fault name=TransactionFailedFault
message=tns:msgTransactionFailedFault
/wsdl:fault
/wsdl:operation
  /wsdl:portType
  wsdl:binding name=RegistryPublishSOAP11_binding
type=tns:RegistryPublish_portType
soap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http/
wsdl:operation name=Transaction
  soap:operation soapAction=urn:Transaction style=document/
  wsdl:input
soap:body use=literal/
  /wsdl:input
  wsdl:output
soap:body use=literal/
  /wsdl:output
  wsdl:fault name=InvalidRequestFault
soap:fault name=InvalidRequestFault use=literal/
  /wsdl:fault
  wsdl:fault name=TransactionFailedFault
soap:fault name=TransactionFailedFault use=literal/
  /wsdl:fault
/wsdl:operation
  /wsdl:binding
  wsdl:service name=RegistryPublish
wsdl:port name=RegistryPublishSOAP11port_http
binding=tns:RegistryPublishSOAP11_binding
  soap:address
location=http://localhost:8080/RegistryPublishServiceHibernate/services/RegistryPublish/
/wsdl:port
  /wsdl:service
/wsdl:definitions



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



Re: [Axis1] Properties valued parameters arrive empty

2007-12-25 Thread Philipp Leitner
java.util.Properties is a variant of a hashtable. It is very hard to 
serialize something like a hashtable in an interoperable way to XML. You 
should transform your properties file into something easier to handle.


As a general rule you should stay away from all java.util.Collections 
data structures ... use arrays instead if necessary.


/philipp

Aaron Stromas schrieb:

Hello,

I'm trying to deploy a simple POJO based web service similar to the  
whether example in the Axis2 distribution. The difference is that one of 
the parameters is java.util.Properties. The service receives the 
parameter but it has no values in it. Apparently, I need to do something 
on the RPC client side of things to cause the appropriate serialization. 
Can somebody offer a suggestion? Thanks in advance.


Cheers,

-a

--
Aaron Stromas
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Mobile: +972 (0)528 334889


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



Re: restful client support using get

2007-12-24 Thread Philipp Leitner

With the help of this list I once came up with a client like this:

Options op = new Options();
op.setTo(new EndpointReference(endpoint));
op.setProperty(Constants.Configuration.ENABLE_REST,
  Constants.VALUE_TRUE);
op.setProperty (Constants.Configuration.HTTP_METHOD,
  Constants.Configuration.HTTP_METHOD_GET); 
op.setProperty(Constants.Configuration.CONTENT_TYPE,

  HTTPConstants.MEDIA_TYPE_TEXT_XML);
ServiceClient sender = new ServiceClient();
sender.setOptions(op);
OMElement response = sender.sendReceive(null);
  // if there's a NPE at that line you
  // may need to send some dummy AXIOM object
  // instead of null

'endpoint' is a string that contains the URI that you want to retrieve, 
including all request parameters and stuff. You need a recent version of 
 Axis2 for that example to work.


Hope that helps.

/philipp

Michael Lambert schrieb:
I cannot find a decent example of how to write a REST client using Axis2 
and a simple GET statement. Can someone please provide an example or 
point me to appropriate documentation. The only example I have found i 
uses POST and that doesnt even seem to work (there isnt an empty 
constructor for the Call  object provided in the sample):


   http://ws.apache.org/axis2/0_94/rest-ws.html

I am trying to interface with Googles Geocode API :-/

Thank you!

-
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: xmlns= on wrong element

2007-10-21 Thread Philipp Leitner
Seems strange to me. If I remember my XML basics course correctly then 
'xmlns=' is the same as having no namespace declaration at all 
(supposing that you do not have a default namespace). If that is correct 
then both SOAP requests that you mentioned are absolutely identical.


Personally I would recommend to 'not' use the -sp options and give it a 
try with the default ns settings ...


/philipp

Frank J. Øynes wrote:
This is probably a noob question, but I am having problem setting up my 
wsdl file so that the SOAP request sent by my client is accepted by the 
service.


There are two places where the xmlns= is put, first at the Command 
element, and later at the Properties'


The service requires xmlns= in the StoredProcess element, i.e. the 
first child of where in now ends up, and does not accept that it is in 
the Properties element.


Can someone please hint me what I am doing wrong here? How can I make 
the xmlns= disappear from Command and Properties,

and make it appear in StoredProcess ?

(btw, I am using wsdl2java with the -sp option to suppress all ns 
prefixes, and also state unqualified for both elements and attributes)


 LISTING OF ACCEPTABLE SOAP REQUEST -
?xml version='1.0' encoding='UTF-8'?
   soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

  soapenv:Body
 Execute xmlns=urn:schemas-microsoft-com:xml-analysis
Command
   StoredProcess xmlns= name=Online Scoring
  Stream name=instream
 Table
PM_SOK
   Naeringsinteresser_a22/Naeringsinteresser_a
   Anm_Antall_a43/Anm_Antall_a
   
D_Inntekt_Skatt_t0_t2_R44/D_Inntekt_Skatt_t0_t2_R

   D_Formue_t0_t2_R45/D_Formue_t0_t2_R
   
Overtrekk_belop_mean_646/Overtrekk_belop_mean_6

   Purring_1_gang_Nye_YY47/Purring_1_gang_Nye_YY
   Dager_Eldste_Konto_a48/Dager_Eldste_Konto_a
   Omsetning_KR_Mean_349/Omsetning_KR_Mean_3
/PM_SOK
 /Table
  /Stream
   /StoredProcess
/Command
Properties
   PropertyList
  DataSourceInfoProvider=SASSPS/DataSourceInfo
  ContentData/Content
   /PropertyList
/Properties
 /Execute
  /soapenv:Body
   /soapenv:Envelope

-  AND THIS IS REJECTED DUE TO THE SMALL DIFFERENCES MENTIONED --
?xml version='1.0' encoding='UTF-8'?
   soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

  soapenv:Body
 Execute xmlns=urn:schemas-microsoft-com:xml-analysis
Command xmlns=
   StoredProcess name=Online Scoring
  Stream name=instream
 Table
PM_SOK
   Naeringsinteresser_a22/Naeringsinteresser_a
   Anm_Antall_a43/Anm_Antall_a
   
D_Inntekt_Skatt_t0_t2_R44/D_Inntekt_Skatt_t0_t2_R

   D_Formue_t0_t2_R45/D_Formue_t0_t2_R
   
Overtrekk_belop_mean_646/Overtrekk_belop_mean_6

   Purring_1_gang_Nye_YY47/Purring_1_gang_Nye_YY
   Dager_Eldste_Konto_a48/Dager_Eldste_Konto_a
   Omsetning_KR_Mean_349/Omsetning_KR_Mean_3
/PM_SOK
 /Table
  /Stream
   /StoredProcess
/Command
Properties xmlns=
   PropertyList
  DataSourceInfoProvider=SASSPS/DataSourceInfo
  ContentData/Content
   /PropertyList
/Properties
 /Execute
  /soapenv:Body
   /soapenv:Envelope


- Complete WSDL: -

?xml version= 1.0 encoding=utf-8?
q1:definitions xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:http= 
http://schemas.xmlsoap.org/wsdl/http/; 
xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:tm= 
http://microsoft.com/wsdl/mime/textMatching/; 
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soapenc= 
http://schemas.xmlsoap.org/soap/encoding/; 
xmlns:s0=urn:schemas-microsoft-com:xml-analysis 
xmlns:q1=http://schemas.xmlsoap.org/wsdl/; 
targetNamespace=urn:schemas-microsoft-com:xml-analysis

q1:types
s:schema 
targetNamespace=urn:schemas-microsoft-com:xml-analysis 
elementFormDefault=unqualified attributeFormDefault=unqualified

s:element name=Discover
s:complexType
s:sequence
s:element name=RequestType type=s:string 
nillable=true/

s:element name=Restrictions nillable=true
s:complexType
s:sequence
 

Re: uploading a file

2007-10-16 Thread Philipp Leitner

Depending on the size of the text (!) file a simple String might do.

/philipp

Charitha Kankanamge schrieb:

feh wrote:


Hi folks.

I've got an Axis2 client that needs to send a text file to an Axis2 
server.

What's the best way to accomplish this?

Thanks!
 

MTOM (SOAP message transmission and optimization mechanism) can be used 
to sernd binary data in axis2. MTOMSample 
(AXIS2_HOME/samples/MTOMsample), which is included in axis2 binary 
distribution will help you to get an initial understanding on this.

Also, please check http://ws.apache.org/axis2/1_3/mtom-guide.html

regards
Charitha




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



Re: Is Java2WSDL WRAPPED style WS-I conform?

2007-10-05 Thread Philipp Leitner
yes, doc/lit with wrapped parameters is WS-I conform. See 
http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/ for 
details on the different variants of WSDL encodings.


/philipp

Michael Imhof wrote:

The only types of SOAP bindings supported is document/literal and
rpc/literal.
If I generate my wsdl using Java2WSDL with style WRAPPED, i get a
document/literal wsdl.

But I don't understand the difference between WRAPPED and DOCUMENT style?
Are both WS-I conform?

Regards,
Michael



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



Re: new to axis

2007-10-04 Thread Philipp Leitner

are you connected to the internet when you run the example?

/philipp

loredana loredana wrote:
Hy guys, I'm new to axis and I am having a small problem understanding even the begining example...ok, so i took the most simple web service from w3 schools: http://www.w3schools.com/webservices/tempconvert.asmx 
and I tried to make a web service client like the first example presented on the axis site. As I understood, it should look like this:


try{

String endpoint =
  http://www.w3schools.com/webservices/tempconvert.asmx;;
   
  Service  service = new Service();

  Call call= (Call) service.createCall();

  call.setTargetEndpointAddress( new java.net.URL(endpoint) );

  call.setOperationName(new QName(http://tempuri.org;, 
CelsiusToFahrenheit));
  call.addParameter(Celsius, org.apache.axis.Constants.XSD_STRING, 
javax.xml.rpc.ParameterMode.IN);
  call.setReturnType(org.apache.axis.Constants.XSD_STRING);
  

  String ret = (String) call.invoke( new Object[] { 10 } );
   
  System.out.println(result:  + ret + ');}catch{}


this should return something like short50/short but instead I get a 
java.net.NoRouteToHostException

So what am I doing wrong?. What exactly did I missunderstood? 10x in advance






  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search

http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz


-
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: new to axis

2007-10-04 Thread Philipp Leitner
well, not that I claim to be an expert in Axis 1 (which you seem to be 
using), but from what I see the code looks OK.


Anyway, your exception is pretty obvious - 
java.net.NoRouteToHostException means - well - that your application 
cannot reach the host. AFAIK this means that either the host is not 
online or does not exist (what it does), or that you are having problems 
with your inet connection.


Can you access the endpoint with your browser?

/philipp

loredana loredana wrote:
yes :). are you saying the java code is correct and should work? 




- Original Message 
From: Philipp Leitner [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, October 4, 2007 3:24:30 PM
Subject: Re: new to axis

are you connected to the internet when you run the example?

/philipp

loredana loredana wrote:
Hy guys, I'm new to axis and I am having a small problem understanding even the begining example...ok, so i took the most simple web service from w3 schools: http://www.w3schools.com/webservices/tempconvert.asmx 
and I tried to make a web service client like the first example presented on the axis site. As I understood, it should look like this:


try{

String endpoint =
  http://www.w3schools.com/webservices/tempconvert.asmx;;;
   
  Service  service = new Service();

  Call call= (Call) service.createCall();

  call.setTargetEndpointAddress( new java.net.URL(endpoint) );

  call.setOperationName(new QName(http://tempuri.org;;, 
CelsiusToFahrenheit));
  call.addParameter(Celsius, org.apache.axis.Constants.XSD_STRING, 
javax.xml.rpc.ParameterMode.IN);
  call.setReturnType(org.apache.axis.Constants.XSD_STRING);
  

  String ret = (String) call.invoke( new Object[] { 10 } );
   
  System.out.println(result:  + ret + ');}catch{}


this should return something like short50/short but instead I get a 
java.net.NoRouteToHostException

So what am I doing wrong?. What exactly did I missunderstood? 10x in advance






  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search

http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz


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






   


Moody friends. Drama queens. Your life? Nope! - their life, your story. Play 
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  



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


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



Re: new to axis

2007-10-04 Thread Philipp Leitner
Well, probably you should check whether the SOAPAction header is set at 
all ... try monitoring your network traffic while issuing the invocation 
with a tool like TCPMon, and check if a HTTP header named 'SOAPAction' 
is set in the WS invocation.


/philipp

loredana loredana wrote:

I am using a proxy since I am on an intranet but as I used in other 
applications I wrote

Properties systemSettings = System.getProperties();
  systemSettings.put(http.proxyHost, xx);
  systemSettings.put(http.proxyPort, xx);
  System.setProperties(systemSettings);

now I'm getting Server did not recognize the value of HTTP Header SOAPAction. 
I'm trying to figure out the problem though I have the impression I'm doing 
something wrong somewhere

- Original Message 
From: Philipp Leitner [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, October 4, 2007 4:08:21 PM
Subject: Re: new to axis

well, not that I claim to be an expert in Axis 1 (which you seem to be 
using), but from what I see the code looks OK.


Anyway, your exception is pretty obvious - 
java.net.NoRouteToHostException means - well - that your application 
cannot reach the host. AFAIK this means that either the host is not 
online or does not exist (what it does), or that you are having problems 
with your inet connection.


Can you access the endpoint with your browser?

/philipp

loredana loredana wrote:
yes :). are you saying the java code is correct and should work? 




- Original Message 
From: Philipp Leitner [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, October 4, 2007 3:24:30 PM
Subject: Re: new to axis

are you connected to the internet when you run the example?

/philipp

loredana loredana wrote:
Hy guys, I'm new to axis and I am having a small problem understanding even the begining example...ok, so i took the most simple web service from w3 schools: http://www.w3schools.com/webservices/tempconvert.asmx 
and I tried to make a web service client like the first example presented on the axis site. As I understood, it should look like this:


try{

String endpoint =
  http://www.w3schools.com/webservices/tempconvert.asmx
   
  Service  service = new Service();

  Call call= (Call) service.createCall();

  call.setTargetEndpointAddress( new java.net.URL(endpoint) );

  call.setOperationName(new QName(http://tempuri.org;;;, 
CelsiusToFahrenheit));
  call.addParameter(Celsius, org.apache.axis.Constants.XSD_STRING, 
javax.xml.rpc.ParameterMode.IN);
  call.setReturnType(org.apache.axis.Constants.XSD_STRING);
  

  String ret = (String) call.invoke( new Object[] { 10 } );
   
  System.out.println(result:  + ret + ');}catch{}


this should return something like short50/short but instead I get a 
java.net.NoRouteToHostException

So what am I doing wrong?. What exactly did I missunderstood? 10x in advance






  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search

http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz


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






   


Moody friends. Drama queens. Your life? Nope! - their life, your story. Play 
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  



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


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






  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 





-
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: Newbye Question:Content-lenght??

2007-09-30 Thread Philipp Leitner

yes, the content-length specifies the size of the message in bytes

/philipp

at4david schrieb:

Thank you very much for your response, but I have a another question, Octects
= Number of bytes of the body message???

Thank you in advance


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



Re: Newbye Question:Content-lenght??

2007-09-30 Thread Philipp Leitner
Not sure about that, but AFAIK Apache Axis (2?) has something like an 
Interceptor (as in the POSA pattern) interface (is it called Handler 
Chain interface, or something?) ... using this interface you might be 
able to hook these WSS4J events and do your measures. At the moment I 
cannot provide detailed information, though ...


/philipp

at4david schrieb:

Thank you again, I would generate graphics in which to show the time spent by
the message since that is generated in the client to the server received it.
I am using WSS4J and I would like to know how long is the proccess the
encryption and decryption. Do you know how I could do it??

Thank you again


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



Re: Newbye Question:Content-lenght??

2007-09-30 Thread Philipp Leitner

AFAIK == as far as I Know :) don't look for that

/philipp

at4david wrote:

Thank you again, I will look for AFAIK in Internet and I will try it on.



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



Document/literal bare in POJO services?

2007-09-25 Thread Philipp Leitner

Hi all,

just a quick question: how can I tell Axis2 to deploy a POJO service as 
defined for instance in http://ws.apache.org/axis2/1_3/pojoguide.html 
using the 'bare' parameter style for doc/lit (instead of the default 
'wrapped')? I have not yet found any documentation on this, and can't 
seem to figure it out myself...


thanks in advance,
philipp

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



Re: Calling Webservice by JSP

2007-09-18 Thread Philipp Leitner
The code you are using is Axis 1, not Axis 2. Either switch your code to 
Axis 2 or deploy the old Axis 1.4 (?) jars instead of the Axis 2 ones.


In general it is desirable to use the newer Axis 2. For a tutorial on 
how to do stubless invocations look at 
http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html


(but if the service you are trying to invoke never changes it might be 
easier to create client-side stubs and use those, see 
http://ws.apache.org/axis2/1_3/userguide-creatingclients.html#createclients).


/philipp

Nasreen Laghari wrote:


 
Hi,


I'm using axis2 and windows vista. I'm trying to access webservice
by jsp.
I have pasted Axis.jar and jaxrpc.jar to Tomcat 5.5\common\lib and
also in java/jre/lib/ext.

I'm having different exception every time. Some time
org.apache.axis.AxisClient can not be initialize, Some time
org/apache/commons/discovery/tools/DiscoverSingleton no class Def
found error.

I have a feeling that may be axis.jar and jaxrpc.jar are conflicting
as both have Service.class but i'm using full path of Service Class
So I dont know Why it is creating problem.

*Fowlling is the code i'm using to create the JSP Client*

%@ page

import=org.apache.axis.client.Call,org.apache.axis.client.Service,org.apache.axis.encoding.XMLType,
org.apache.axis.utils.Options,javax.xml.rpc.ParameterMode,java.net.URL
%
%

String endpointString =
http://localhost:8080/axis2/services/Random?wsdl;;

Service service1 = new Service();

Call callOne = (Call)service1.createCall();
Call callone = new Call();

URL endpoint = new URL(endpointString);

callOne.setTargetEndpointAddress(endpoint);

callOne.setOperationName(RandomNumber);
String ret = (String)callOne.invoke(new Object[] { });

%
HTML
BODY
% out.println(Webservice Outout:+ret); %
/BODY
/HTML

*And following is the detail copy of Error:*

org.apache.jasper.JasperException: Could not initialize class
org.apache.axis.client.AxisClient

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause

javax.servlet.ServletException: Could not initialize class
org.apache.axis.client.AxisClient

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.abc_jsp._jspService(abc_jsp.java:63)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.NoClassDefFoundError: Could not initialize class
org.apache.axis.client.AxisClient
org.apache.axis.client.Service.getAxisClient(Service.java:104)
org.apache.axis.client.Service.init(Service.java:113)
org.apache.jsp.abc_jsp._jspService(abc_jsp.java:49)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


*And sometime I also get this:
*

*exception*

org.apache.jasper.JasperException:
org/apache/commons/discovery/tools/DiscoverSingleton

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

*root cause*

javax.servlet.ServletException:
org/apache/commons/discovery/tools/DiscoverSingleton

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.abc_jsp._jspService(abc_jsp.java:63)

Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

2007-07-30 Thread Philipp Leitner
AFAIK Axis 2 does not support RPC/encoded at all since it is  not WS-I 
compliant.


/philipp

alpatino2 schrieb:

Hi!

I have a slightly different requirement: I received wsdl's from a service
provider that implements the TR-069 spec, this spec define the use of
rpc/encoded style. I need to invoke this service but I am not able to
generate the client, I tried to generate the client for the sample
stockAvailableNotification.wsdl extracted from the Building Web Services
with Java book, but I get the following error:



Exception in thread main
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerationEngine.java:140)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
Parser SAX Error: org.xml.sax.SAXException: Fatal Error:
URI=file:///home/albertop/axis2/wsdl-rpc/examples/src/ch6/ex2/stockAvailableNotification.wsdl
Line=24: The prefix wsdl for attribute wsdl:arrayType associated with an
element type attribute is not bound.
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:300)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerationEngine.java:97)
... 2 more
Caused by: org.xml.sax.SAXException: Fatal Error:
URI=file:///home/albertop/axis2/wsdl-rpc/examples/src/ch6/ex2/stockAvailableNotification.wsdl
Line=24: The prefix wsdl for attribute wsdl:arrayType associated with an
element type attribute is not bound.

The wsdl from the book is:

?xml version=1.0 ?
definitions name=StockAvailableNotification
targetNamespace=
   http://www.skatestown.com/services/StockAvailableNotification;
 xmlns:xsd=http://www.w3.org/2000/10/XMLSchema;
 xmlns:reg=http://www.skatestown.com/ns/registrationRequest;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
 xmlns=http://schemas.xmlsoap.org/wsdl/;

   !-- Type definitions from the registration schema--
   types
  xsd:schema
targetNamespace=http://www.skatestown.com/ns/registrationRequest;
 xmlns:xsd=http://www.w3.org/2000/10/XMLSchema;
 xmlns=http://www.skatestown.com/schemas/ns/registrationRequest;

 xsd:complexType name=registrationRequest
xsd:sequence
   xsd:element name=items
  xsd:complexType name=ArrayOfItem
 complexContent
restriction base=soapenc:Array
   attribute ref=soapenc:arrayType
   wsdl:arrayType=xsd:string[]/
/restriction
 /complexContent
  /complexType
   /xsd:element

   xsd:element name=address type=xsd:uriReference/

   xsd:element name=transport 
default=http://schemas.xmlsoap.org/soap/smtp;

minOccurs=0
  xsd:simpleType
 xsd:restriction base=xsd:uriReference
xsd:enumeration
value=http://schemas.xmlsoap.org/soap/http/
xsd:enumeration
value=http://schemas.xmlsoap.org/soap/smtp/
 /xsd:restriction
  /xsd:simpleType
   /xsd:element

   xsd:element name=clientArg type=xsd:string
minOccurs=0/
/xsd:sequence
 /xsd:complexType

 xsd:simpleType name=correlationID
xsd:restriction base=xsd:string
!-- some appropriate restriction --
/xsd:restriction
 /xsd:simpleType
  /xsd:schema
   /types

   !-- Message definitions --
   message name=StockAvailableRegistrationRequest
  part name=registration element=reg:registrationRequest/
  part name=expiration type=xsd:timeInstant/
   /message

   message name=StockAvailableRegistrationResponse
  part name=correlationID type=reg:correlationID/
   /message

   message name=StockAvailableRegistrationError
  part name=errorString type=xsd:string/
   /message

   message name=StockAvailableExpirationError
  part name=errorString type=xsd:string/
   /message

   message name=StockAvailableNotification
  part name=timeStamp type=xsd:timeInstant/
  part name=correlationID type=reg:correlationID/
  part name=items type=reg:items/
  part name=clientArg type=xsd:string/
   /message

   message name=StockAvailableExpirationNotification
  part name=timeStamp type=xsd:timeInstant/
  part name=correlationID type=reg:correlationID/
  part name=items type=reg:ArrayOfItem/
  part name=clientArg type=xsd:string/
   /message

   message name=StockAvailableCancellation
  part name=correlationID type=reg:correlationID/
   /message

   !-- Port type 

Re: [Axiom] Using XPAth with namespaces

2007-07-25 Thread Philipp Leitner
Most probably it is :) I was just suggesting a quick workaround that 
should reliably work :)


/philipp

Jochen Zink wrote:

Thanks,

but is it not possible to use addNamespace() Methode? 


regards.
Jochen


-Ursprüngliche Nachricht-
Von: axis-user@ws.apache.org
Gesendet: 25.07.07 12:03:32
An: axis-user@ws.apache.org
Betreff: Re: [Axiom] Using XPAth with namespaces




Hi,

you can try to get around this problem by changing the XPath expression:

For instance you can rewrite the query

//ex:TITLE   (with xmlns:ex=http://www.example.com/cds;)

as

//*[local-name(.) = 'TITEL' and namespace-uri(.) = 
'http://www.example.com/cds']


Not exactly the most pretty XPath expression, but should also work with 
AXIOm without using the addNamespace() method...


/philipp

Jochen Zink wrote:

Hello,

I try to use Axiom with XPath and Namespaces.

My XML I want to parse is the following:
RequestSecurityTokenResponse 
xmlns=http://schemas.xmlsoap.org/ws/2005/02/trust;
 wsp:AppliesTo 
  xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy;
   wsa:EndpointReference 
   xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing/;

   
wsa:Addresshttps://www.vdg-portal.de/VDGAuthPortal/services/TicketService/wsa:Address
 /wsa:EndpointReference
/wsp:AppliesTo
 /RequestSecurityTokenResponse

I want the wsa:Address Element.

I guess it goes like this:
AXIOMXPath xpath = new AXIOMXPath( /wst:RequestSecurityTokenResponse/ +
  wsp:AppliesTo/ +
  
wsa:EndpointReference/ +
  wsa:Address);

xpath.addNamespace( wst, http://schemas.xmlsoap.org/ws/2005/02/trust; );

xpath.addNamespace( wsp, 
http://schemas.xmlsoap.org/ws/2004/09/policy; );
xpath.addNamespace( wsa, 
http://schemas.xmlsoap.org/ws/2004/08/addressing/; );

OMElement address = (OMElement) xpath.selectSingleNode(requestedSecurityToken);




But the address Element is null. What do I wrong?

Thanks a lot!
___
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=00


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





___
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=00


-
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: [Axiom] Using XPAth with namespaces

2007-07-25 Thread Philipp Leitner

Hi,

you can try to get around this problem by changing the XPath expression:

For instance you can rewrite the query

//ex:TITLE   (with xmlns:ex=http://www.example.com/cds;)

as

//*[local-name(.) = 'TITEL' and namespace-uri(.) = 
'http://www.example.com/cds']


Not exactly the most pretty XPath expression, but should also work with 
AXIOm without using the addNamespace() method...


/philipp

Jochen Zink wrote:

Hello,

I try to use Axiom with XPath and Namespaces.

My XML I want to parse is the following:
RequestSecurityTokenResponse 
xmlns=http://schemas.xmlsoap.org/ws/2005/02/trust;
 wsp:AppliesTo 
  xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy;
   wsa:EndpointReference 
   xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing/;

   
wsa:Addresshttps://www.vdg-portal.de/VDGAuthPortal/services/TicketService/wsa:Address
 /wsa:EndpointReference
/wsp:AppliesTo
 /RequestSecurityTokenResponse

I want the wsa:Address Element.

I guess it goes like this:
AXIOMXPath xpath = new AXIOMXPath( /wst:RequestSecurityTokenResponse/ +
  wsp:AppliesTo/ +
  
wsa:EndpointReference/ +
  wsa:Address);

xpath.addNamespace( wst, http://schemas.xmlsoap.org/ws/2005/02/trust; );

xpath.addNamespace( wsp, 
http://schemas.xmlsoap.org/ws/2004/09/policy; );
xpath.addNamespace( wsa, 
http://schemas.xmlsoap.org/ws/2004/08/addressing/; );

OMElement address = (OMElement) xpath.selectSingleNode(requestedSecurityToken);




But the address Element is null. What do I wrong?

Thanks a lot!
___
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=00


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



Axis2 REST invocation problem

2007-07-11 Thread Philipp Leitner

Hi all,

I have a service deployed with Axis2 with a couple of operations in it. 
As it is default the service has 3 bindings, SOAP1.1, SOAP1.2 and HTTP 
(REST).


Now I am trying to invoke this service using WSDL2java generated stubs.

I use

java -cp $CP org.apache.axis2.wsdl.WSDL2Java -d xmlbeans -uri 
http://localhost:8080/axis2/services/DADocTestService?wsdl


, i.e. I am using pretty much the default values for WSDL2java, but 
switched to XMLBeans databinding.


When I am invoking the service using the the SOAP1.1 connector 
everything seems to be working smoothly, but as soon as I try to use the 
HTTP binding I get the following error:


Exception in thread main java.lang.RuntimeException: Data binding error
at 
at.ac.tuwien.infosys.dacoss.eval.doc.DADocTestServiceDADocTestServiceHttpport1Stub.fromOM(DADocTestServiceDADocTestServiceHttpport1Stub.java:4089)
at 
at.ac.tuwien.infosys.dacoss.eval.doc.DADocTestServiceDADocTestServiceHttpport1Stub.getString(DADocTestServiceDADocTestServiceHttpport1Stub.java:2672)
at 
at.ac.tuwien.infosys.dsg.dacoss.eval.v2.Axis2Runner.doRESTStringInvocation(Axis2Runner.java:161)
at 
at.ac.tuwien.infosys.dsg.dacoss.eval.v2.Axis2Runner.main(Axis2Runner.java:50)


Looking at the HTTP communications with tcpmon this is not surprising:

Request:

POST /axis2/rest/DADocTestService/getString HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
SOAPAction: 
User-Agent: Axis2
Host: localhost:8081
Transfer-Encoding: chunked

f
param0=TestTest
0

Response:

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 11 Jul 2007 09:13:44 GMT
Connection: close

288
?xml version='1.0' encoding='UTF-8'?soapenv:Envelope 
xmlns:wsa=http://www.w3.org/2005/08/addressing; 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Headerwsa:ReplyTowsa:Addresshttp://www.w3.org/2005/08/addressing/none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:906A7FD5BF3FB35F451184145224596/wsa:MessageIDwsa:Actionhttp://www.w3.org/2005/08/addressing/soap/fault/wsa:Action/soapenv:Headersoapenv:Bodysoapenv:Faultfaultcode/faultcodefaultstringRequired 
element null defined in the schema can not be found in the 
request/faultstringdetail 
//soapenv:Fault/soapenv:Body/soapenv:Envelope

0

I am using the 1.2 release of Axis2 on client side, and Axis2 1.1.1 on 
server side. Updating the server to 1.2 is no option currently.


Is REST generally not working with a 1.2 client and a 1.1.1 server, or 
am I doing something wrong here?


/philipp

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



Re: Axis2 REST invocation problem

2007-07-11 Thread Philipp Leitner
Relevant parts of the WSDL attached. Note that the problem is not 
specific to this operation, but occurs whenever I try to invoke /any/ 
operation using REST.


...
xs:schema attributeFormDefault=qualified 
elementFormDefault=qualified 
targetNamespace=http://infosys.tuwien.ac.at/dacoss/eval/doc/;

  xs:element name=getString
xs:complexType
  xs:sequence
xs:element name=param0 nillable=true type=xs:string/
  /xs:sequence
/xs:complexType
  /xs:element
  xs:element name=getStringResponse
xs:complexType
  xs:sequence
xs:element name=return nillable=true type=xs:string/
  /xs:sequence
/xs:complexType
  /xs:element
/xs:schema
...
wsdl:message name=getStringMessage
  wsdl:part name=part1 element=ns0:getString/
/wsdl:message
wsdl:message name=getStringResponse
  wsdl:part name=part1 element=ns0:getStringResponse/
/wsdl:message
...
wsdl:operation name=getString
  soap:operation soapAction=urn:getString style=document/
wsdl:input
  soap:body use=literal/
/wsdl:input
wsdl:output
  soap:body use=literal/
/wsdl:output
/wsdl:operation
...

thank you,
philipp

keith chapman schrieb:

can u post the schema for the operation getString please.

Thanks,
Keith.

On 7/11/07, *Philipp Leitner*  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi all,

I have a service deployed with Axis2 with a couple of operations in it.
As it is default the service has 3 bindings, SOAP1.1, SOAP1.2 and HTTP
(REST).

Now I am trying to invoke this service using WSDL2java generated stubs.

I use

java -cp $CP org.apache.axis2.wsdl.WSDL2Java -d xmlbeans -uri
http://localhost:8080/axis2/services/DADocTestService?wsdl

, i.e. I am using pretty much the default values for WSDL2java, but
switched to XMLBeans databinding.

When I am invoking the service using the the SOAP1.1 connector
everything seems to be working smoothly, but as soon as I try to use the
HTTP binding I get the following error:

Exception in thread main java.lang.RuntimeException: Data binding
error
 at

at.ac.tuwien.infosys.dacoss.eval.doc.DADocTestServiceDADocTestServiceHttpport1Stub.fromOM(DADocTestServiceDADocTestServiceHttpport1Stub.java
:4089)
 at

at.ac.tuwien.infosys.dacoss.eval.doc.DADocTestServiceDADocTestServiceHttpport1Stub.getString(DADocTestServiceDADocTestServiceHttpport1Stub.java:2672)
 at
at.ac.tuwien.infosys.dsg.dacoss.eval.v2.Axis2Runner.doRESTStringInvocation
(Axis2Runner.java:161)
 at

at.ac.tuwien.infosys.dsg.dacoss.eval.v2.Axis2Runner.main(Axis2Runner.java:50)

Looking at the HTTP communications with tcpmon this is not surprising:

Request:

POST /axis2/rest/DADocTestService/getString HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
SOAPAction: 
User-Agent: Axis2
Host: localhost:8081
Transfer-Encoding: chunked

f
param0=TestTest
0

Response:

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 11 Jul 2007 09:13:44 GMT
Connection: close

288
?xml version=' 1.0' encoding='UTF-8'?soapenv:Envelope
xmlns:wsa=http://www.w3.org/2005/08/addressing;
xmlns:soapenv=

http://schemas.xmlsoap.org/soap/envelope/;soapenv:Headerwsa:ReplyTowsa:Addresshttp://www.w3.org/2005/08/addressing/none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:906A7FD5BF3FB35F451184145224596/wsa:MessageIDwsa:Action

http://www.w3.org/2005/08/addressing/soap/fault/wsa:Action/soapenv:Headersoapenv:Bodysoapenv:Faultfaultcode/faultcodefaultstringRequired

element null defined in the schema can not be found in the
request/faultstringdetail
//soapenv:Fault/soapenv:Body/soapenv:Envelope
0

I am using the 1.2 release of Axis2 on client side, and Axis2 1.1.1 on
server side. Updating the server to 1.2 is no option currently.

Is REST generally not working with a 1.2 client and a 1.1.1 server, or
am I doing something wrong here?

/philipp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
mailto:[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: Performance ServiceClient vs. OperationClient

2007-07-05 Thread Philipp Leitner
Still having problems with that ... as you suggested I changed my AXIOM 
processing and created a DataSource that serializes my data model on 
demand (I tried to adapt the ADBDataSource used in ADB). Unfortunately 
this didn't change the performance too much (made the entire processing 
about 10% quicker in my tests, but this may also just be statistical 
fluctuation...). I am still having the problem that the actual execution 
time is about 3 times higher in my ServiceClient based solution as 
compared to the ADB stubs (I am comparing the time spent in 
ServiceClient.requestResponse() in my solution with the time that the 
stubs spend in _operationClient.execute(true);).


/philipp

Davanum Srinivas wrote:

That's because you already created the AXIOM model in memory...I'd
recommend starting from this test case :)

http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMSourcedElementTest.java 



thanks,
dims

On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:

OK, so it actually is that much quicker to use XMLStreamWriter and
writeStartElement(), writeEndElement() instead of createOMElement() and
the like? What is the reason for this?

I experimented a little with the generated Axis2 stubs, and added a 
simple


   env.toStringWithConsume();

just to see how this preliminary consumation of the AXIOM model
influences the invocation time. To my surprise this didn't quite change
the invocation time that much ...

Is there any good documentation on AXIOM and stream parsing available? I
definitely need to understand AXIOM a lot better before I am able to
make significant process here ...

thanks for your help,
philipp

Davanum Srinivas wrote:
 For best performance, lot of effort mind you :) is to use OMDataSource
 (see test case in AXIOM svn) on the send side. You will have to use
 the serialize method the gives you XMLStreamWriter and you can write
 out the xml directly to the output stream. On the other side, you can
 get a XMLStreamReader using getXMLStreamReaderWithoutCaching on the
 returned OMElement. using that you can read whatever pieces you need
 from the response.

 thanks,
 dims

 On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:
 Hi Dims,

 I already expected something like this ... I just couldn't find much
 optimization in the generated ADB stubs - I probably just looked at 
the

 wrong places ...

 Currently my AXIOM code is quite naive. I am using the 
createOMElement

 and createOMText methods of OMFactory to iteratively create my SOAP
 payload, and invoke the service using the ServiceClient interface

 snip
 ServiceClient sender = new ServiceClient();
 OMelement result = sender.sendReceive(axisOp);
 /snip

 /philipp

 Davanum Srinivas schrieb:
  Philipp,
 
  Am afraid the key to performance is not ServiceClient vs
  OperationClient as you rightly pointed guessed. The key is AXIOM
  itself and its usage. If you post your code with request/response
  sample then we may be able to help. But the best way to 
understand is
  to look at the generated code for ADB databinding. All tricks we 
know

  in terms of perfomance gets into the generated code :)
 
  thanks,
  dims
 
  On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:
  Hi list,
 
  I have a question rg. performance of the ServiceClient compared 
to the

  OperationClient interface.
 
  Personally, I would expect the performance* to be roughly the 
same for
  both interfaces since ServiceClient is just a more convenient 
wrapper

  for simple tasks.
 
  But now I have measured the invocation times (as defined below), 
and

  found that my handwritten client (which uses ServiceClient and
 AXIOM)
  takes about 4 times as long as the stubs generated by wsdl2java 
(which

  use the OperationClient interface) to produce a result against the
 same
  service. I guess the reason for this performance boost of the
 client is
  either that (a) the OperationClient interface is for some reason 
a lot

  faster than the ServiceClient interface or that (b) there is some
 tricky
  optimization going on somewhere in the ADB stubs that I failed to
 see so
  far.
 
  Has anybody any insight here that could help me to improve my
  self-produced client, or any other information that would help me
  understand the differences here?
 
  thanks in advance,
  philipp
 
  P.S.: I also did a few comparisons with other frameworks (WSIF and
  XFire), and Axis2 seems to be doing quite well so far. Definitely
  quicker than WSIF, and in a good tie with XFire (but I still have
 to do
  a lot to get really conclusive results here).
 
 
  *in this context I mean with performance the time between 
calling eg.

  ServiceClient.sendReceive() and the response being returned to the
  client.
 
  
-

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

Re: Performance ServiceClient vs. OperationClient

2007-07-05 Thread Philipp Leitner

Addendum: here's the relevant part of my data source implementation:

snip
public class DaCoSSDataSource implements OMDataSource {

public DaCoSSDataSource(... some params ...) {
...
}

public void serialize(OutputStream output, OMOutputFormat format)
throws XMLStreamException {
XMLStreamWriter xmlStreamWriter =
  StAXUtils.createXMLStreamWriter(output);
serialize(xmlStreamWriter);
xmlStreamWriter.flush();
}

public void serialize(Writer writer, OMOutputFormat format) throws
XMLStreamException {
serialize(StAXUtils.createXMLStreamWriter(writer));
}

public void serialize(XMLStreamWriter xmlWriter)
throws XMLStreamException {
// this fires the conversion to XML using xmlWriter
// as XMLStreamWriter
converter.convert(..., xmlWriter);
}

public XMLStreamReader getReader() throws XMLStreamException {
// not implemented since I figured that I don't need this method
return null;
}
}
/snip

/philipp

Philipp Leitner wrote:
Still having problems with that ... as you suggested I changed my AXIOM 
processing and created a DataSource that serializes my data model on 
demand (I tried to adapt the ADBDataSource used in ADB). Unfortunately 
this didn't change the performance too much (made the entire processing 
about 10% quicker in my tests, but this may also just be statistical 
fluctuation...). I am still having the problem that the actual execution 
time is about 3 times higher in my ServiceClient based solution as 
compared to the ADB stubs (I am comparing the time spent in 
ServiceClient.requestResponse() in my solution with the time that the 
stubs spend in _operationClient.execute(true);).


/philipp

Davanum Srinivas wrote:

That's because you already created the AXIOM model in memory...I'd
recommend starting from this test case :)

http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMSourcedElementTest.java 



thanks,
dims

On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:

OK, so it actually is that much quicker to use XMLStreamWriter and
writeStartElement(), writeEndElement() instead of createOMElement() and
the like? What is the reason for this?

I experimented a little with the generated Axis2 stubs, and added a 
simple


   env.toStringWithConsume();

just to see how this preliminary consumation of the AXIOM model
influences the invocation time. To my surprise this didn't quite change
the invocation time that much ...

Is there any good documentation on AXIOM and stream parsing available? I
definitely need to understand AXIOM a lot better before I am able to
make significant process here ...

thanks for your help,
philipp

Davanum Srinivas wrote:
 For best performance, lot of effort mind you :) is to use OMDataSource
 (see test case in AXIOM svn) on the send side. You will have to use
 the serialize method the gives you XMLStreamWriter and you can write
 out the xml directly to the output stream. On the other side, you can
 get a XMLStreamReader using getXMLStreamReaderWithoutCaching on the
 returned OMElement. using that you can read whatever pieces you need
 from the response.

 thanks,
 dims

 On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:
 Hi Dims,

 I already expected something like this ... I just couldn't find much
 optimization in the generated ADB stubs - I probably just looked 
at the

 wrong places ...

 Currently my AXIOM code is quite naive. I am using the 
createOMElement

 and createOMText methods of OMFactory to iteratively create my SOAP
 payload, and invoke the service using the ServiceClient interface

 snip
 ServiceClient sender = new ServiceClient();
 OMelement result = sender.sendReceive(axisOp);
 /snip

 /philipp

 Davanum Srinivas schrieb:
  Philipp,
 
  Am afraid the key to performance is not ServiceClient vs
  OperationClient as you rightly pointed guessed. The key is AXIOM
  itself and its usage. If you post your code with request/response
  sample then we may be able to help. But the best way to 
understand is
  to look at the generated code for ADB databinding. All tricks we 
know

  in terms of perfomance gets into the generated code :)
 
  thanks,
  dims
 
  On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:
  Hi list,
 
  I have a question rg. performance of the ServiceClient compared 
to the

  OperationClient interface.
 
  Personally, I would expect the performance* to be roughly the 
same for
  both interfaces since ServiceClient is just a more convenient 
wrapper

  for simple tasks.
 
  But now I have measured the invocation times (as defined 
below), and

  found that my handwritten client (which uses ServiceClient and
 AXIOM)
  takes about 4 times as long as the stubs generated by wsdl2java 
(which

  use the OperationClient interface) to produce a result against the
 same
  service. I guess the reason

Performance ServiceClient vs. OperationClient

2007-07-02 Thread Philipp Leitner

Hi list,

I have a question rg. performance of the ServiceClient compared to the 
OperationClient interface.


Personally, I would expect the performance* to be roughly the same for 
both interfaces since ServiceClient is just a more convenient wrapper 
for simple tasks.


But now I have measured the invocation times (as defined below), and 
found that my handwritten client (which uses ServiceClient and AXIOM) 
takes about 4 times as long as the stubs generated by wsdl2java (which 
use the OperationClient interface) to produce a result against the same 
service. I guess the reason for this performance boost of the client is 
either that (a) the OperationClient interface is for some reason a lot 
faster than the ServiceClient interface or that (b) there is some tricky 
optimization going on somewhere in the ADB stubs that I failed to see so 
far.


Has anybody any insight here that could help me to improve my 
self-produced client, or any other information that would help me 
understand the differences here?


thanks in advance,
philipp

P.S.: I also did a few comparisons with other frameworks (WSIF and 
XFire), and Axis2 seems to be doing quite well so far. Definitely 
quicker than WSIF, and in a good tie with XFire (but I still have to do 
a lot to get really conclusive results here).



*in this context I mean with performance the time between calling eg. 
ServiceClient.sendReceive() and the response being returned to the client.


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



Re: Performance ServiceClient vs. OperationClient

2007-07-02 Thread Philipp Leitner

Hi Dims,

I already expected something like this ... I just couldn't find much 
optimization in the generated ADB stubs - I probably just looked at the 
wrong places ...


Currently my AXIOM code is quite naive. I am using the createOMElement 
and createOMText methods of OMFactory to iteratively create my SOAP 
payload, and invoke the service using the ServiceClient interface


snip
ServiceClient sender = new ServiceClient();
OMelement result = sender.sendReceive(axisOp);
/snip

/philipp

Davanum Srinivas schrieb:

Philipp,

Am afraid the key to performance is not ServiceClient vs
OperationClient as you rightly pointed guessed. The key is AXIOM
itself and its usage. If you post your code with request/response
sample then we may be able to help. But the best way to understand is
to look at the generated code for ADB databinding. All tricks we know
in terms of perfomance gets into the generated code :)

thanks,
dims

On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:

Hi list,

I have a question rg. performance of the ServiceClient compared to the
OperationClient interface.

Personally, I would expect the performance* to be roughly the same for
both interfaces since ServiceClient is just a more convenient wrapper
for simple tasks.

But now I have measured the invocation times (as defined below), and
found that my handwritten client (which uses ServiceClient and AXIOM)
takes about 4 times as long as the stubs generated by wsdl2java (which
use the OperationClient interface) to produce a result against the same
service. I guess the reason for this performance boost of the client is
either that (a) the OperationClient interface is for some reason a lot
faster than the ServiceClient interface or that (b) there is some tricky
optimization going on somewhere in the ADB stubs that I failed to see so
far.

Has anybody any insight here that could help me to improve my
self-produced client, or any other information that would help me
understand the differences here?

thanks in advance,
philipp

P.S.: I also did a few comparisons with other frameworks (WSIF and
XFire), and Axis2 seems to be doing quite well so far. Definitely
quicker than WSIF, and in a good tie with XFire (but I still have to do
a lot to get really conclusive results here).


*in this context I mean with performance the time between calling eg.
ServiceClient.sendReceive() and the response being returned to the 
client.


-
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: Performance ServiceClient vs. OperationClient

2007-07-02 Thread Philipp Leitner
OK, so it actually is that much quicker to use XMLStreamWriter and 
writeStartElement(), writeEndElement() instead of createOMElement() and 
the like? What is the reason for this?


I experimented a little with the generated Axis2 stubs, and added a simple

  env.toStringWithConsume();

just to see how this preliminary consumation of the AXIOM model 
influences the invocation time. To my surprise this didn't quite change 
the invocation time that much ...


Is there any good documentation on AXIOM and stream parsing available? I 
definitely need to understand AXIOM a lot better before I am able to 
make significant process here ...


thanks for your help,
philipp

Davanum Srinivas wrote:

For best performance, lot of effort mind you :) is to use OMDataSource
(see test case in AXIOM svn) on the send side. You will have to use
the serialize method the gives you XMLStreamWriter and you can write
out the xml directly to the output stream. On the other side, you can
get a XMLStreamReader using getXMLStreamReaderWithoutCaching on the
returned OMElement. using that you can read whatever pieces you need

from the response.


thanks,
dims

On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:

Hi Dims,

I already expected something like this ... I just couldn't find much
optimization in the generated ADB stubs - I probably just looked at the
wrong places ...

Currently my AXIOM code is quite naive. I am using the createOMElement
and createOMText methods of OMFactory to iteratively create my SOAP
payload, and invoke the service using the ServiceClient interface

snip
ServiceClient sender = new ServiceClient();
OMelement result = sender.sendReceive(axisOp);
/snip

/philipp

Davanum Srinivas schrieb:
 Philipp,

 Am afraid the key to performance is not ServiceClient vs
 OperationClient as you rightly pointed guessed. The key is AXIOM
 itself and its usage. If you post your code with request/response
 sample then we may be able to help. But the best way to understand is
 to look at the generated code for ADB databinding. All tricks we know
 in terms of perfomance gets into the generated code :)

 thanks,
 dims

 On 7/2/07, Philipp Leitner [EMAIL PROTECTED] wrote:
 Hi list,

 I have a question rg. performance of the ServiceClient compared to the
 OperationClient interface.

 Personally, I would expect the performance* to be roughly the same for
 both interfaces since ServiceClient is just a more convenient wrapper
 for simple tasks.

 But now I have measured the invocation times (as defined below), and
 found that my handwritten client (which uses ServiceClient and 
AXIOM)

 takes about 4 times as long as the stubs generated by wsdl2java (which
 use the OperationClient interface) to produce a result against the 
same
 service. I guess the reason for this performance boost of the 
client is

 either that (a) the OperationClient interface is for some reason a lot
 faster than the ServiceClient interface or that (b) there is some 
tricky
 optimization going on somewhere in the ADB stubs that I failed to 
see so

 far.

 Has anybody any insight here that could help me to improve my
 self-produced client, or any other information that would help me
 understand the differences here?

 thanks in advance,
 philipp

 P.S.: I also did a few comparisons with other frameworks (WSIF and
 XFire), and Axis2 seems to be doing quite well so far. Definitely
 quicker than WSIF, and in a good tie with XFire (but I still have 
to do

 a lot to get really conclusive results here).


 *in this context I mean with performance the time between calling eg.
 ServiceClient.sendReceive() and the response being returned to the
 client.

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



Retrieving SOAP headers of WS response

2007-05-29 Thread Philipp Leitner

Hi all,

I have two question on the Axis2 client-side API:

I know that there are quite simple convenience methods for adding SOAP 
header fields when using the client-side API (like 
ServiceClient.addStringHeader(...) ), but is it also possible to get a 
map or so of the headers that the /response/ SOAP message contained?


A related question: is it possible with Axis2 to directly set or 
retrieve the HTTP header fields (of course only senseful in a HTTP 
binding) besides what you can specify in 
org.apache.axis2.client.Options? For instance is it possible to insert a 
header foo: bar in all my WS invocations? And again: is it possible to 
retrieve the HTTP headers of the HTTP response in the Axis2 client (to 
get, for instance, the Server value...).


Thank you in advance,
philipp

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



Re: Retrieving SOAP headers of WS response

2007-05-29 Thread Philipp Leitner
With WSDL 2.0 you can specify http headers in the wsdl itself (For both 
HTTP and SOAP bindings).


okay, but I was thinking more of the situation where I have a service 
which I cannot change, and want to set the headers on client side (the 
service will use WSDL 1.1). Except from that I do not want to use 
wsdl2java, instead I am constructing the AXIOM model myself. Is it 
possible to directly access the HTTP headers in such a situation?


but is it also possible to get a map or so of the headers that the 
/response/ SOAP message contained?


For me this would be the more important question - do you know how I can 
access the SOAP headers of the SOAP response?


/philipp

keith chapman wrote:

Hi Philipp,

With WSDL 2.0 you can specify http headers in the wsdl itself (For 
both HTTP and SOAP bindings). And if you use wsdl2java on such a WSDL 
the code generated contains methods to add the HTTPHeader. For the 
client it will be just another parameter passed into the operation. 
The stub will retrive this parameter and stick it in as a HTTP header.


But there is no easy method such as above to retrive an HTTP response 
header.


Thanks,
Keith.

On 5/29/07, *Philipp Leitner*  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi all,

I have two question on the Axis2 client-side API:

I know that there are quite simple convenience methods for adding SOAP
header fields when using the client-side API (like
ServiceClient.addStringHeader(...) ), but is it also possible to get a
map or so of the headers that the /response/ SOAP message contained?

A related question: is it possible with Axis2 to directly set or
retrieve the HTTP header fields (of course only senseful in a HTTP
binding) besides what you can specify in
org.apache.axis2.client.Options ? For instance is it possible to
insert a
header foo: bar in all my WS invocations? And again: is it
possible to
retrieve the HTTP headers of the HTTP response in the Axis2 client (to
get, for instance, the Server value...).

Thank you in advance,
philipp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
mailto:[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: Error: Cannot load SchemaTypeSystem

2007-04-25 Thread Philipp Leitner
You are not missing SchemaTypeSystem, but rather 
schemaorg_apache_xmlbeans.system.sCBF8B98FA2E75865F9C83C43E1056B1A.TypeSystemHolder 
. This is a file that gets generated by XMLBeans when it compiles XML 
Schemata. You have to add all class files in the directory 
schemaorg_apache_xmlbeans (they get generated when running wsdl2java) 
to the run path.


/philipp

craig wickesser schrieb:

Hi,
   I am using Axis2 to access a web service, and I generated the Java 
code from a WSDL.  Works great  So I created a simple Test class which 
looks like:
 
class Test {

public static void main(String[] args) {
 
FooBarServiceStub stub = new FooBarServiceStub();
   
SayHelloDocument reqDoc = SayHelloDocument.Factory.newInstance();

.
.
.
 
}

}
 
When I run this I get an error (at the lin where it creates a 
newInstance of SayHelloDocument):
 


Exception in thread main java.lang.ExceptionInInitializerError

at blah.SayHelloDocument$Factory.newInstance(

_SayHelloDocument.java:132_)

at blah.Test.main(

_Test.java:25_)

Caused by:

_java.lang.RuntimeException_: Cannot load SchemaTypeSystem. Unable to 
load class with name 
schemaorg_apache_xmlbeans.system.sCBF8B98FA2E75865F9C83C43E1056B1A.TypeSystemHolder. 
Make sure the generated binary files are on the classpath.


I have located the TypeSystemHolder.class that it references but no 
matter what I try (i.e. adding it to the classpath, unless I am doing 
that wrong) I continue to get the error.  Can someone help?


I try to run this Test class from Eclipse, so I can set the Classpath 
via the Run menu.


 



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



Re: Axis2 doc/wrapped service with many params

2007-04-23 Thread Philipp Leitner
This is not doc/wrapped anymore if I do it like this :-/ this is more 
like rpc/encoded .


/philipp

Martin Gainty schrieb:

Good Evening Phillip-
try this in your wsdl..

message name=sampleMessage
part name=first type=xsd:string
part name=second type=xsd:string
part name=third type=xsd:string
/message
portTyle name=SomePortName
operation name=someMethod
 parameterOrder=first second third
..
/operation
/portType

HTH
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - From: Dennis Sosnoski [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Sunday, April 22, 2007 5:43 PM
Subject: Re: Axis2 doc/wrapped service with many params



Hi Philipp,

Both the order and the names of the parameters are supposed to matter 
in wrapped doc/lit, since this uses an xs:sequence to compose the 
parameter elements. With JiBX data binding the names definitely 
matter, as is also the case with XMLBeans; if ADB doesn't care about 
the names this seems like a significant error in the ADB code.


 - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Philipp Leitner wrote:

Hi all,

I just did a few experiements with an Axis2 service that I deployed. 
I am using the doc/wrapped style, and have an operation that looks 
something like this (in Java notation):


snip

public String concatSomeStuff(String param1, String param2, String 
param3, int param4);


/snip

The operation will just concatenate the parameters and return them as 
String.


Now I discovered that a SOAP request like this

concatSomeStuff
param314/param3
param2Sperrgasse /param2
param0Philipp Leitner /param0
param/param1
/concatSomeStuff

bears a different result then a request like

concatSomeStuff
param2Sperrgasse /param2
param314/param3
param/param1
param0Philipp Leitner /param0
/concatSomeStuff

(note the different order of the parameters).

Meanwhile, the actual /name/ of the parameters does not seem to 
matter. A request like


concatSomeStuff
aSperrgasse /a
b14/b
c111/c
dPhilipp Leitner /d
/concatSomeStuff

still works.

Is this really how Axis2 (or doc-style SOAP in general) is supposed 
to work? The order of the parameters is important, while the name is 
not important? For some reason I always figured it should be the 
other way 'round.


Can somebody shed some light on this issue?

/philipp



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




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


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



Re: Axis2 doc/wrapped service with many params

2007-04-23 Thread Philipp Leitner
Yes, I used the POJO approach to create my test service. Anyway, the 
client that I am currently writing should be able to communicate with 
all kinds of doc/wrapped services (Axis as well as .NET, etc), so I 
should not rely on any specifics of the Axis2 message receiver anyway.


OK, so in the end I learned that the sequence of parameters matters 
(obviously, if I think about it), and that the parameter names /should/ 
also matter (even if this condition is not checked by all service 
providers).


Dennis, Amila, thanks a lot for your help!

/philipp

Amila Suriarachchi schrieb:
Philip are you deploying a service using a POJO or creating a service 
with a wsdl?
I belive you use the former method. In this case you use the 
RPCMessageReceiver and it does not care about the parameter names. 
But if you use the wsdl first approach please log a jira with your wsdl.


On 4/23/07, *Dennis Sosnoski* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi Philipp,

Both the order and the names of the parameters are supposed to matter in
wrapped doc/lit, since this uses an xs:sequence to compose the
parameter elements. With JiBX data binding the names definitely matter,
as is also the case with XMLBeans; if ADB doesn't care about the names
this seems like a significant error in the ADB code.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Philipp Leitner wrote:
  Hi all,
 
  I just did a few experiements with an Axis2 service that I
deployed. I
  am using the doc/wrapped style, and have an operation that looks
  something like this (in Java notation):
 
  snip
 
  public String concatSomeStuff(String param1, String param2, String
  param3, int param4);
 
  /snip
 
  The operation will just concatenate the parameters and return
them as
  String.
 
  Now I discovered that a SOAP request like this
 
  concatSomeStuff
  param314/param3
  param2Sperrgasse /param2
  param0Philipp Leitner /param0
  param/param1
  /concatSomeStuff
 
  bears a different result then a request like
 
  concatSomeStuff
  param2Sperrgasse /param2
  param314/param3
  param/param1
  param0Philipp Leitner /param0
  /concatSomeStuff
 
  (note the different order of the parameters).
 
  Meanwhile, the actual /name/ of the parameters does not seem to
  matter. A request like
 
  concatSomeStuff
  aSperrgasse /a
  b14/b
  c111/c
  dPhilipp Leitner /d
  /concatSomeStuff
 
  still works.
 
  Is this really how Axis2 (or doc-style SOAP in general) is
supposed to
  work? The order of the parameters is important, while the name is not
  important? For some reason I always figured it should be the
other way
  'round.
 
  Can somebody shed some light on this issue?
 
  /philipp
 

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




--
Amila Suriarachchi,
WSO2 Inc.


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



Axis2 doc/wrapped service with many params

2007-04-22 Thread Philipp Leitner

Hi all,

I just did a few experiements with an Axis2 service that I deployed. I 
am using the doc/wrapped style, and have an operation that looks 
something like this (in Java notation):


snip

public String concatSomeStuff(String param1, String param2, String 
param3, int param4);


/snip

The operation will just concatenate the parameters and return them as 
String.


Now I discovered that a SOAP request like this

concatSomeStuff
param314/param3
param2Sperrgasse /param2
param0Philipp Leitner /param0
param/param1
/concatSomeStuff

bears a different result then a request like

concatSomeStuff
param2Sperrgasse /param2
param314/param3
param/param1
param0Philipp Leitner /param0
/concatSomeStuff

(note the different order of the parameters).

Meanwhile, the actual /name/ of the parameters does not seem to matter. 
A request like


concatSomeStuff
aSperrgasse /a
b14/b
c111/c
dPhilipp Leitner /d
/concatSomeStuff

still works.

Is this really how Axis2 (or doc-style SOAP in general) is supposed to 
work? The order of the parameters is important, while the name is not 
important? For some reason I always figured it should be the other way 
'round.


Can somebody shed some light on this issue?

/philipp

--
Philipp Wolfgang Leitner, Bakk.rer.soc.oec.
0225511
Vienna University of Technology

They say a barking grad never writes.

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



Re: REST over GET support in Java clients?

2007-04-17 Thread Philipp Leitner

Hi Keith,

I have one further question: I noticed that nothing but synchronous 
request-response style invocation seems to be possible with REST enabled 
(no matter whether GET or POST is being used). I reckon this might be a 
limitation of the REST architecture itself (which is AFAIK inherently 
synchronous and request/response oriented).


Is there a way to do fire-and-forget or callback calls in a RESTful way 
using Axis2? Do I need the release candidate for that?


/philipp

keith chapman schrieb:

Hi Phillip,
 
Most of the REST support (including support for PUT and DELETE) was 
added after the 1.1 release. The REST support in Axis2 mostly emulates 
the WSDL 2.0 HTTPBinding. The 1.2 release will be out by the end of this 
month. You can use the 1.2 Release candidate for the moment.
 
Also some of the properties I mentioned in my previous reply was added 
after the 1.1 release (eg. MESSAGE_TYPE)
 
Thanks,

Keith.

 
On 4/16/07, *Philipp Leitner* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


I am currently at version 1.1.1 . Do you think that I should upgrade to
a more recent version?

/philipp

keith chapman schrieb:
  Hi Philipp,
 
  I guess the parameter ENABLE_REST_THROUGH_GET is not used
anymore. Yes
  Axis2 supports REST. BTW which version are you using?
 
  The following applies if you are using the nightlies or the 1.2
Release
  candidate.
 
  Hope I answered your question...
 
  See comments inline
 
  On 4/16/07, *Philipp Leitner* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
 
  Hi folks,
 
  I am wondering if there is support for REST over HTTP GET for
Java
  clients in Axis2?
 
  I know that there is the configuration parameter
  Constants.Configuration.ENABLE_REST_THROUGH_GET , but so far
I  could
  not make it work.
 
  I tried something like
 
  snip
  Options options = new Options();
  options.setTo(new EndpointReference(toEpr));
 
 
  // Not really needed but better have it as it takes care of
setting up
  default REST rules in case you miss something
 
  options.setProperty(Constants.Configuration.ENABLE_REST,
  Constants.VALUE_TRUE );
 
 
   // Not needed
 
 
options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET ,

  Constants.VALUE_TRUE);
 
 
 
  // Need to add the following bit of code
 
  // The following will set the httpMethod to use (Supported
methods are
  GET, PUT, DELETE and POST)
   options.setProperty (Constants.Configuration.HTTP_METHOD,
  Constants.Configuration.HTTP_METHOD_GET);
 
  // Set the relavant contentType (Need to set the messagetype as
well as
  its needed by the messageFormatters)
  // Supported contentTypes are  application/x-www-form-urlencoded,
  multipart/form-data and application/xml;
   options.setProperty (Constants.Configuration.CONTENT_TYPE,
  HTTPConstants);
  options.setProperty(Constants.Configuration.MESSAGE_TYPE,
  HTTPConstants);
 
  ServiceClient sender = new ServiceClient();
  sender.setOptions(options);
  OMElement result = sender.sendReceive(
  OMAbstractFactory.getOMFactory().createOMElement(dummy,
null));
  /snip
 
  so far. I figure that the payload of an GET request should
be null or
  something irrelevant, given that a GET request does not have
a body to
  contain any payload?
 
  A quick check with tcpmon showed me that this code actually
works, but
  still (although I enabled
  Constants.Configuration.ENABLE_REST_THROUGH_GET ) uses HTTP
POST for the
  request.
 
  Can anybody tell me how I enable REST GET in the client (or
if it is
  even supported) ?
 
  regards,
  philipp
 
 
 
  --
  Philipp Wolfgang Leitner, Bakk.rer.soc.oec .
  0225511
  Vienna University of Technology
 
   A programmer is a person who passes as an exacting expert
on the
  basis of
  being able to turn out, after innumerable punching, an infinite
  series of
  incomprehensible answers calculated with micrometric
precisions from
  vague
  assumptions based on debatable figures taken from
inconclusive documents
  and carried out on instruments of problematical accuracy by
persons of
  dubious reliability and questionable mentality for the avowed
  purpose of
  annoying and confounding a hopelessly defenseless department

REST over GET support in Java clients?

2007-04-16 Thread Philipp Leitner

Hi folks,

I am wondering if there is support for REST over HTTP GET for Java 
clients in Axis2?


I know that there is the configuration parameter 
Constants.Configuration.ENABLE_REST_THROUGH_GET , but so far I  could 
not make it work.


I tried something like

snip
Options options = new Options();
options.setTo(new EndpointReference(toEpr));
options.setProperty(Constants.Configuration.ENABLE_REST,
   Constants.VALUE_TRUE); 
options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET,

   Constants.VALUE_TRUE);

ServiceClient sender = new ServiceClient();
sender.setOptions(options);
OMElement result = sender.sendReceive(
   OMAbstractFactory.getOMFactory().createOMElement(dummy, null));
/snip

so far. I figure that the payload of an GET request should be null or 
something irrelevant, given that a GET request does not have a body to 
contain any payload?


A quick check with tcpmon showed me that this code actually works, but 
still (although I enabled 
Constants.Configuration.ENABLE_REST_THROUGH_GET) uses HTTP POST for the 
request.


Can anybody tell me how I enable REST GET in the client (or if it is 
even supported) ?


regards,
philipp



--
Philipp Wolfgang Leitner, Bakk.rer.soc.oec.
0225511
Vienna University of Technology

 A programmer is a person who passes as an exacting expert on the basis of
being able to turn out, after innumerable punching, an infinite series of
incomprehensible answers calculated with micrometric precisions from vague
assumptions based on debatable figures taken from inconclusive documents
and carried out on instruments of problematical accuracy by persons of
dubious reliability and questionable mentality for the avowed purpose of
annoying and confounding a hopelessly defenseless department that was
unfortunate enough to ask for the information in the first place.
-- IEEE Grid newsmagazine 

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



Re: REST over GET support in Java clients?

2007-04-16 Thread Philipp Leitner
I am currently at version 1.1.1 . Do you think that I should upgrade to 
a more recent version?


/philipp

keith chapman schrieb:

Hi Philipp,

I guess the parameter ENABLE_REST_THROUGH_GET is not used anymore. Yes 
Axis2 supports REST. BTW which version are you using?


The following applies if you are using the nightlies or the 1.2 Release 
candidate.


Hope I answered your question...

See comments inline

On 4/16/07, *Philipp Leitner* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi folks,

I am wondering if there is support for REST over HTTP GET for Java
clients in Axis2?

I know that there is the configuration parameter
Constants.Configuration.ENABLE_REST_THROUGH_GET , but so far I  could
not make it work.

I tried something like

snip
Options options = new Options();
options.setTo(new EndpointReference(toEpr));


// Not really needed but better have it as it takes care of setting up 
default REST rules in case you miss something


options.setProperty(Constants.Configuration.ENABLE_REST,
Constants.VALUE_TRUE );


 // Not needed

options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET ,
Constants.VALUE_TRUE);



// Need to add the following bit of code

// The following will set the httpMethod to use (Supported methods are 
GET, PUT, DELETE and POST)
 options.setProperty (Constants.Configuration.HTTP_METHOD,   
Constants.Configuration.HTTP_METHOD_GET);


// Set the relavant contentType (Need to set the messagetype as well as 
its needed by the messageFormatters)
// Supported contentTypes are  application/x-www-form-urlencoded, 
multipart/form-data and application/xml;
 options.setProperty(Constants.Configuration.CONTENT_TYPE,   
HTTPConstants);
options.setProperty(Constants.Configuration.MESSAGE_TYPE,   
HTTPConstants);


ServiceClient sender = new ServiceClient();
sender.setOptions(options);
OMElement result = sender.sendReceive(
OMAbstractFactory.getOMFactory().createOMElement(dummy, null));
/snip

so far. I figure that the payload of an GET request should be null or
something irrelevant, given that a GET request does not have a body to
contain any payload?

A quick check with tcpmon showed me that this code actually works, but
still (although I enabled
Constants.Configuration.ENABLE_REST_THROUGH_GET ) uses HTTP POST for the
request.

Can anybody tell me how I enable REST GET in the client (or if it is
even supported) ?

regards,
philipp



--
Philipp Wolfgang Leitner, Bakk.rer.soc.oec .
0225511
Vienna University of Technology

 A programmer is a person who passes as an exacting expert on the
basis of
being able to turn out, after innumerable punching, an infinite
series of
incomprehensible answers calculated with micrometric precisions from
vague
assumptions based on debatable figures taken from inconclusive documents
and carried out on instruments of problematical accuracy by persons of
dubious reliability and questionable mentality for the avowed
purpose of
annoying and confounding a hopelessly defenseless department that was
unfortunate enough to ask for the information in the first place.
 -- IEEE Grid newsmagazine 

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


Thanks,
Keith.

--
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: Delivering Swing component?

2007-04-13 Thread Philipp Leitner
I think what Anne wanted to say was not so much that it is not 
/possible/ to use SOAP to exchange Swing components (I see no general 
problem with that), but that it frankly is against the idea of Web 
Services to mis-use it like a distributed object middleware. There might 
be much better (read: more performant, easier) ways to do what you want 
to do without SOAP.


/philipp

Ross Allard schrieb:
Thanks Anne, 

That seems rather harsh.  I have in fact delivered Java objects via SOAP and Axis, albeit simple ones.  And the Axis doc mentioned the ability to exchange arbitrary Java objects.  However, I realize a Swing object is a bit of a stretch.  I was just curious.  Now on to Plan B. 


Ross

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 12, 2007 8:39 PM

To: [EMAIL PROTECTED]
Subject: Re: Delivering Swing component?

SOAP does not deliver objects. It exchanges XML messages. Don't think of SOAP 
as a distributed object system.

Anne

On 4/12/07, Ross Allard [EMAIL PROTECTED] wrote:

Has anyone created a service that delivers a Swing component (e.g. Jpanel)?

Thanks,
Ross

-
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: [Axis2] wsdl2java overriding my files

2007-04-11 Thread Philipp Leitner
OK, after your last posting I was finally able to understand what you 
actually want to do :-)


-- you have generated stubs with wsdl2java in the past, changed them and 
are now re-running wsdl2java, and want to somehow preserve your changes.


I am quite sure that this is not possible with Axis or Axis2 - simply 
because the logic necessary behind such a feature would be tremendious. 
You would have to know what the file looked like originally, do kind of 
a 'diff' between the original and the changed version, generate the new 
stubs and (and this is the really hard part) know where to put the 
changes so that they are 'semantically equivalent'. I daresay this is in 
general impossible.


/philipp

Anil VVNN schrieb:

I couldn't able to find the solution yet. Could somebody shed light on this.
Thanks.


Philipp Leitner-2 wrote:
Hmm, I might be wrong, but I think that the package that wsdl2java 
generates the data objects to depend on the namespace of these objects 
in the WSDL file ... but I am quite sure that there is some way you can 
overwrite this with a parameter (can't check right now). Best if you dig 
into the wsdl2java source and look yourself.


/philipp

Anil VVNN schrieb:

Philipp,

Unfortunately, this did not work. This is what I did,

arg line=-p com.myprj.webservice.generated/

Actually its generating some of the files (Stub, Skeleton and
MessageReceiverInOut) to com.myprj.webservice.generated folder but
other
wrapper objects of complex types are still writing to
com.myprj.webservice
folder.

Did I miss anything. Thanks.



Philipp Leitner-2 wrote:
The thing is, you should let these files be generated into a /different/ 
package :-)


Try

arg line=-p com.myprj.webservice.generated/

This should do the trick.

/philipp

Anil VVNN schrieb:

Philipp,

Are you referring to arg line=-p com.myprj.webservice/ in my ant
script. if so, I removed this line but it is still overriding the files
under com.myprj.webservice directory. 


Observed that it is not overriding code of Stub, Skeleton and
MessageReceiverInOut but it is overriding wrapper objects of complex
types. 


What I mean is, here is my wsdl file,

element name=MessageRequest
complexType
sequence
element name=transporter nillable=true
type=tns:Transporter/
   /sequence
/complexType
/element
  complexType abstract=true name=Transporter/
complexType name=ABCTransporter
complexContent
  extension base=tns:Transporter
  sequence
element name=StartDate nillable=true type=xsd:string/
element name=EndDate nillable=true
type=xsd:string/
  /sequence
  /extension
   /complexContent
 /complexType

Transporter is an Interface and ABCTransporter implementation class in
my
object model. But I want to modify corresponding wrapper objects
(Transporter  and ABCTransporter ) created by wsdl2java, so I did but
when I
run wsdl2java again, it creates new wrapper objects of Transporter and
ABCTransporter and I loose my changes.

Any ideas how would I do to not to override these wrapper objects.
Thanks.

  





Philipp Leitner-2 wrote:

you should pass a target package as argument to wsdl2java to prevent
it 
from overriding existing source files.


/philipp

Anil VVNN schrieb:

Hi,

Any option to not to override files if they are already present. As I
have
modified few classes (wrapper objects of complex types) and skeleton
code.

Here is my call in ant scripts,

  java classname=org.apache.axis2.wsdl.WSDL2Java fork=true
classpathref=axis.classpath
arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/
arg line=-ss/
arg line=-sd/
arg line=-ssi/
arg line=-d adb/
arg line=-g/
arg line=-p com.myprj.webservice/
arg line=-o ${basedir}/ws/src/java/
arg line=-S ./
  /java

Thanks.

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




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




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







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



Re: why 3 different wsdl:binding tags present in WSDL file?

2007-04-10 Thread Philipp Leitner
you don't need three different bindings, but these examples provide 
bindings for the 3 most common WS bindings. 1 is the standard SOAP 
binding, 2 is a SOAP 1.2 (hence the 12) binding, and three is a 
REST-style binding.


/philipp

Vikas schrieb:

Hi Friends,
 
Axis2 provides some sample codes with *axis2-1.1.1\samples* directory. 
When we deploy that web services, we can get wsdl files for all 
services, but in that WSDL files wsdl:binding tag is not making sense. 
Because in each WSDL file we are getting 3 wsdl:binding tags.
 
eg. *version.aar* web service
 
1) wsdl:binding name=VersionSOAP11Binding type=axis2:VersionPortType
soap:binding transport=http://schemas.xmlsoap.org/soap/http; 
style=document/

/wsdl:binding
 
2) wsdl:binding name=VersionSOAP12Binding type=axis2:VersionPortType
soap12:binding transport=http://schemas.xmlsoap.org/soap/http; 
style=document/

/wsdl:binding
 
3) wsdl:binding name=VersionHttpBinding type=axis2:VersionPortType

http:binding verb=POST/
/wsdl:binding
 
Here why do we required 3 different wsdl:binding tags. where in 1)  
2) there only name and *[soap*:*soap12*] difference present?
 
can some one give me more information on this bindings?
 
 
With best regards
 
From

Vikas R. Khengare


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



Re: why 3 different wsdl:binding tags present in WSDL file?

2007-04-10 Thread Philipp Leitner
No. You never /need/ three different bindings unless you want to use all 
of them. I reckon that they provided three different bindings in the 
examples for convinience only.


/philipp

Vikas schrieb:

Hi

Wsdl2Java utility, do we required all these 3 WS bindings?
If I am NOT using REST-style binding and SOAP 1.2.

With best regards

From
Vikas R. Khengare

- Original Message - 
From: Philipp Leitner [EMAIL PROTECTED]

To: axis-user@ws.apache.org
Sent: Tuesday, April 10, 2007 4:58 PM
Subject: Re: why 3 different wsdl:binding tags present in WSDL file?



you don't need three different bindings, but these examples provide
bindings for the 3 most common WS bindings. 1 is the standard SOAP
binding, 2 is a SOAP 1.2 (hence the 12) binding, and three is a
REST-style binding.

/philipp

Vikas schrieb:

Hi Friends,

Axis2 provides some sample codes with *axis2-1.1.1\samples* directory.
When we deploy that web services, we can get wsdl files for all
services, but in that WSDL files wsdl:binding tag is not making sense.
Because in each WSDL file we are getting 3 wsdl:binding tags.

eg. *version.aar* web service

1) wsdl:binding name=VersionSOAP11Binding

type=axis2:VersionPortType

soap:binding transport=http://schemas.xmlsoap.org/soap/http;
style=document/
/wsdl:binding

2) wsdl:binding name=VersionSOAP12Binding

type=axis2:VersionPortType

soap12:binding transport=http://schemas.xmlsoap.org/soap/http;
style=document/
/wsdl:binding

3) wsdl:binding name=VersionHttpBinding type=axis2:VersionPortType
http:binding verb=POST/
/wsdl:binding

Here why do we required 3 different wsdl:binding tags. where in 1) 
2) there only name and *[soap*:*soap12*] difference present?

can some one give me more information on this bindings?


With best regards

From
Vikas R. Khengare

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



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


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



Re: [Axis2] wsdl2java overriding my files

2007-04-10 Thread Philipp Leitner
you should pass a target package as argument to wsdl2java to prevent it 
from overriding existing source files.


/philipp

Anil VVNN schrieb:

Hi,

Any option to not to override files if they are already present. As I have
modified few classes (wrapper objects of complex types) and skeleton code.

Here is my call in ant scripts,

  java classname=org.apache.axis2.wsdl.WSDL2Java fork=true
classpathref=axis.classpath
arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/
arg line=-ss/
arg line=-sd/
arg line=-ssi/
arg line=-d adb/
arg line=-g/
arg line=-p com.myprj.webservice/
arg line=-o ${basedir}/ws/src/java/
arg line=-S ./
  /java

Thanks.


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



Re: [Axis2] wsdl2java overriding my files

2007-04-10 Thread Philipp Leitner
The thing is, you should let these files be generated into a /different/ 
package :-)


Try

arg line=-p com.myprj.webservice.generated/

This should do the trick.

/philipp

Anil VVNN schrieb:

Philipp,

Are you referring to arg line=-p com.myprj.webservice/ in my ant
script. if so, I removed this line but it is still overriding the files
under com.myprj.webservice directory. 


Observed that it is not overriding code of Stub, Skeleton and
MessageReceiverInOut but it is overriding wrapper objects of complex types. 


What I mean is, here is my wsdl file,

element name=MessageRequest
complexType
sequence
element name=transporter nillable=true 
type=tns:Transporter/
   /sequence
/complexType
/element
  complexType abstract=true name=Transporter/
complexType name=ABCTransporter
complexContent
  extension base=tns:Transporter
  sequence
element name=StartDate nillable=true type=xsd:string/
element name=EndDate nillable=true
type=xsd:string/
  /sequence
  /extension
   /complexContent
 /complexType

Transporter is an Interface and ABCTransporter implementation class in my
object model. But I want to modify corresponding wrapper objects
(Transporter  and ABCTransporter ) created by wsdl2java, so I did but when I
run wsdl2java again, it creates new wrapper objects of Transporter and
ABCTransporter and I loose my changes.

Any ideas how would I do to not to override these wrapper objects. Thanks.

  





Philipp Leitner-2 wrote:
you should pass a target package as argument to wsdl2java to prevent it 
from overriding existing source files.


/philipp

Anil VVNN schrieb:

Hi,

Any option to not to override files if they are already present. As I
have
modified few classes (wrapper objects of complex types) and skeleton
code.

Here is my call in ant scripts,

  java classname=org.apache.axis2.wsdl.WSDL2Java fork=true
classpathref=axis.classpath
arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/
arg line=-ss/
arg line=-sd/
arg line=-ssi/
arg line=-d adb/
arg line=-g/
arg line=-p com.myprj.webservice/
arg line=-o ${basedir}/ws/src/java/
arg line=-S ./
  /java

Thanks.

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







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



Re: [Axis2] wsdl2java overriding my files

2007-04-10 Thread Philipp Leitner
Hmm, I might be wrong, but I think that the package that wsdl2java 
generates the data objects to depend on the namespace of these objects 
in the WSDL file ... but I am quite sure that there is some way you can 
overwrite this with a parameter (can't check right now). Best if you dig 
into the wsdl2java source and look yourself.


/philipp

Anil VVNN schrieb:

Philipp,

Unfortunately, this did not work. This is what I did,

arg line=-p com.myprj.webservice.generated/

Actually its generating some of the files (Stub, Skeleton and
MessageReceiverInOut) to com.myprj.webservice.generated folder but other
wrapper objects of complex types are still writing to com.myprj.webservice
folder.

Did I miss anything. Thanks.



Philipp Leitner-2 wrote:
The thing is, you should let these files be generated into a /different/ 
package :-)


Try

arg line=-p com.myprj.webservice.generated/

This should do the trick.

/philipp

Anil VVNN schrieb:

Philipp,

Are you referring to arg line=-p com.myprj.webservice/ in my ant
script. if so, I removed this line but it is still overriding the files
under com.myprj.webservice directory. 


Observed that it is not overriding code of Stub, Skeleton and
MessageReceiverInOut but it is overriding wrapper objects of complex
types. 


What I mean is, here is my wsdl file,

element name=MessageRequest
complexType
sequence
element name=transporter nillable=true 
type=tns:Transporter/
   /sequence
/complexType
/element
  complexType abstract=true name=Transporter/
complexType name=ABCTransporter
complexContent
  extension base=tns:Transporter
  sequence
element name=StartDate nillable=true type=xsd:string/
element name=EndDate nillable=true
type=xsd:string/
  /sequence
  /extension
   /complexContent
 /complexType

Transporter is an Interface and ABCTransporter implementation class in my
object model. But I want to modify corresponding wrapper objects
(Transporter  and ABCTransporter ) created by wsdl2java, so I did but
when I
run wsdl2java again, it creates new wrapper objects of Transporter and
ABCTransporter and I loose my changes.

Any ideas how would I do to not to override these wrapper objects.
Thanks.

  





Philipp Leitner-2 wrote:
you should pass a target package as argument to wsdl2java to prevent it 
from overriding existing source files.


/philipp

Anil VVNN schrieb:

Hi,

Any option to not to override files if they are already present. As I
have
modified few classes (wrapper objects of complex types) and skeleton
code.

Here is my call in ant scripts,

  java classname=org.apache.axis2.wsdl.WSDL2Java fork=true
classpathref=axis.classpath
arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/
arg line=-ss/
arg line=-sd/
arg line=-ssi/
arg line=-d adb/
arg line=-g/
arg line=-p com.myprj.webservice/
arg line=-o ${basedir}/ws/src/java/
arg line=-S ./
  /java

Thanks.

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




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







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



Re: AXIS style

2007-04-03 Thread Philipp Leitner
what do you mean with turn my xml into DOM ? The Document Object Model 
(if this the meaning of DOM that you are referring to, since there are a 
few different ones) is just one possibility to represent XML, and afaik 
not one used by Axis. I guess what you mean with DOM is actually Axiom.


If that's what you meant ... no, I don't think there's any way to make 
Axis2 not use Axiom.


/philipp

Paul Mahoney schrieb:

I have used wsdl2java to generate stubs for a web service that specifies
document style. Consequently the stubs want me to turn my xml into DOM and I
need to turn the returned DOM back to XML :-(

Is there anyway I can tell wsdl2javs to use message style as I want to work
with xml not DOM? Is does seem strange that the web service appears to be
dictating the client use DOM.


-
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: java.lang.NoClassDefFoundError: org/apache/axiom/om/OMElement

2007-04-02 Thread Philipp Leitner
most probably you are missing the axiom jar in the classpath when 
running your servlet. try to copy the Axis2 jars into the lib 
directory of your application server.


/philipp

Vikas schrieb:

Hi Friends,
 
I have written a simple web service which returns Hello World string 
using AXIOM. I also wrote client which access that service using AXIOM. 
When I run my client program on console, it works very fine. But when 
tried to access client from JSP/Servlet I am getting 
java.lang.NoClassDefFoundError: org/apache/axiom/om/OMElement error.
 
I am confused that when i run same code on console it work fine but why 
not with JSP/Servlet?
 
 
With best regards
 
From

Vikas R. Khengare


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



Re: WebServices client

2007-04-02 Thread Philipp Leitner
wsdl2java should encapsulate the complex types for you, so you could 
call the WS as if it was a local object. you should not need to deal 
with SOAPElements in this case. If you are not experienced with WS this 
might be the easier starting point.


/philipp


Milan Tomic schrieb:
* my best guess is that you wanted to say that the service uses an 
IN-OUT MEP, and that it takes a parameter as complex type for IN and 
returns another complex type as OUT


Yes, that exactly describes what I wanted to say, using all those fancy words like 
MEP and complex type. :-)

As my service takes an complex type element as input, I need to pass 
SOAPElement and to receive SOAPElement. I don't know how to fill SOAPElement. I 
will try to use XFire for the client.

Thank you very much for your help,
Milan



- Original Message 
From: Philipp Leitner [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Friday, March 30, 2007 2:48:46 PM
Subject: Re: WebServices client

Although I have to confess that I lack any idea of what you mean by 
takes an XSD element and returns an XSD element* I think that the 
easiest way of testing a Web Service is to create client stubs using 
wsdl2java (comes along with your Axis2 distribution) and use this stubs 
to test the service. The whole process should not take  30 minutes in 
general.


Alternatively I have often used XFire (http://xfire.codehaus.org/) to 
quickly test services ...


/philipp

* my best guess is that you wanted to say that the service uses an 
IN-OUT MEP, and that it takes a parameter as complex type for IN and 
returns another complex type as OUT


Milan Tomic schrieb:

I would like to test my web service, so I need a client. My web service takes 
an XSD Element and returns an XSD Element. Is there some example of such a 
client? Since input argument is large XML, I would like to load it from a file, 
rather then building it in code.

Thank you in advance,
Milan




 


Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 


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






 


Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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


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



Re: How to make SOAP messages smaller?

2007-03-30 Thread Philipp Leitner
There's an XML compressor called XMill around since 1999 
(http://sourceforge.net/projects/xmill).


/philipp

Xinjun Chen schrieb:
Differential encoding indeed has better performance. But it is not 
really compressing SOAP message. Instead, it reduces both payload data 
and overhead in the SOAP message.
But as far as I know, currently no popular SOAP toolkit supports 
differential encoding.
 
Regards,

Xinjun
 
On 3/29/07, *Christian Poecher* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Spies, Brennan schrieb:
  This should be pretty easy to do...have the servlet filter check the
  Accept-Encoding before applying GZIP compression. Then, when
debugging,
  have the client turn off this header.

Thanks, good hint!

Does anyone know better compression techniques than gzip? I found a
paper claiming much better compression than gzip:

@inproceedings{Werner:CompressingSOAP,
   Author = {C. Werner and C. Buschmann and S. Fischer},
   Booktitle = {Proceedings of the IEEE International Conference
on Web
Services},
   Month = {July},
   Pages = {540-547},
   Title = {Compressing SOAP Messages by using Differential
Encoding},
   Year = {2004}}

If my mind serves me right, I have also heard for years now, that people
are researching XML compression. Is there any advanced compression
algorithm available for Axis?

Cheers,
Chris

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




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



Re: How to make SOAP messages smaller?

2007-03-30 Thread Philipp Leitner
Sorry, no actual experience ... but I guess integrating it with Axis or 
Axis2 should be rather easy to do. If you plan to do anything in this 
direction it would be nice to keep us on the run.


Perhaps you are interested in this USC paper:

http://dblab.usc.edu/Users/shkim/papers/cic.pdf

/philipp

Christian Poecher schrieb:

Philipp Leitner schrieb:
There's an XML compressor called XMill around since 1999 
(http://sourceforge.net/projects/xmill).


Interessting! Does anyone have experience in combining Axis and XMill?

Cheers,
Chris

-
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: RE: Sending Binary Data as response ....: Example please

2007-03-29 Thread Philipp Leitner
if it is just a small chunk of binary data you can think about transferring it 
as byte[] ? Axis2 wil then encode it as xsd:base64binary, and you can stay 
completely POJO ...

/philipp

 Original-Nachricht 
Datum: Thu, 29 Mar 2007 13:39:58 +0100
Von: Raghupathy, Gurumoorthy [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: RE: Sending Binary Data as response : Example please

 Hi, 
 
 Thanks for your reply. 
 
 However we cannot have any MTOM/XOP specific code in the
 service implementation (we need to be POJO centric). 
 
 We would (ideally) like to just use POJO and do not want
 attachment either  
 
 
 
 Any ideas welcome . 
 
  
 
 
 
  
 
 Regards
 
 Guru
 
  
 
 
 
 From: Punnoose, Roshan [mailto:[EMAIL PROTECTED] 
 Sent: 29 March 2007 13:26
 To: axis-user@ws.apache.org
 Subject: RE: Sending Binary Data as response : Example please 
 
  
 
 Check the MTOM/XOP examples for adding DataHandlers to OMText elements.
 That is what I am currently doing for this.
 
  
 
 Roshan Punnoose
 
 Phone: 301-497-6039
 
 
 
 From: Raghupathy, Gurumoorthy
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 29, 2007 5:44 AM
 To: axis-user@ws.apache.org
 Subject: Sending Binary Data as response : Example please 
 
  
 
 All,
 
 We would like to publish a web service in axis2 which sends
 response data as a complex object which in turn also contains binary
 data as property.
 
 Despite trying google and other searches I am not able to
 find a example.
 
  
 
 Please can any one help by proving me the server-side
 solution for the above issue?
 
  
 
  
 
 
 
  
 
 
 
  
 
 Regards
 
 Guru
 
  
 
 
 ---
 
 Gurumoorthy Raghupathy
 
 Email  :  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
 
 Internal Extn : 2337 
 
 External Phone  : 01483712337 
 
 Nielsen Book
 3rd Floor Midas House
 62 Goldsworth Road
 Woking Surrey GU21 6LQ
 
 Visit us at  : http://www.nielsenbookdata.co.uk/
 http://www.nielsenbookdata.co.uk/  
 
 
 ---
 
  
 

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



Re: Receiving complex return values when using ServiceClient.sendReceive(...)

2007-03-27 Thread Philipp Leitner
thank you for the info ... I would not have expected this to be a bug, 
but rather wrong usage on my side ...


/philipp

Cédric Girodengo schrieb:

Hi!

Unfortunately, I have no answer for you, but I just encountered the same
problem today. I opened an issue on Axis2 bugtracker :

https://issues.apache.org/jira/browse/AXIS2-2408

Wait and see...


Philipp Leitner-2 wrote:

Hi all,

let me apologize in advance for asking a very simple question on this
list:

I am using the Axis2 ServiceClient interface to do a blocking IN-OUT 
call to a Web Service:


snip
   ServiceClient sender = new ServiceClient();
   sender.setOptions(axis2Options);
   OMElement result = sender.sendReceive(axisOp);
   System.out.println(result);
/snip

This will print a result of

snip

getMyAddressResponse 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; 
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;

   getMyAddressReturn href=#id0 /
/getMyAddressResponse

/snip

. The obvious question now is: how do I get the actual response (the 
type with the id 'id0') from this OMElement?


What kind of surprises me is that an asynchronous call (using 
ServiceClient.sendReceiveNonBlocking(...) ) returns a full SOAP message 
as Axiom model, including the 'multiref' elements which contain the 
complex type responses. What is the reason for the blocking call 
behaving differently? The behavior of the non-blocking call seems a lot 
more natural to me ...


I am using Axis2 1.1.1 on the client side, and Axis1 (yes, the original 
Axis, not Axis2 1.0!) on the server side.


I would very much appreciate a little help or a documentation pointer on 
this issue (I would not call it a problem, since it is obviously just me 
not understanding how Axis2 works :-) )!


/philipp

--
Philipp Wolfgang Leitner, Bakk.rer.soc.oec.
0225511
Vienna University of Technology

Data Mining is the art of torturing the Enterprise Data until it 
confesses ... but if you torture the data long enough it will confess to 
anything.


-
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: What to return?

2007-03-25 Thread Philipp Leitner
Hmm, I currently have a similar problem. I would be interested in what 
communication style you are using in your client (assuming you are 
speaking from an Axis2 client). Do you use the sendReceive (i.e. the 
blocking) communication or the asynchronous sendReceiveNonBlocking ?


Interestingly enough I seem to have troubles with the blocking variant 
and complex return types, while the asychnchronous variant works without 
problems ...


/philipp

Marcos Vilela schrieb:

Phillipp, nice to have your point of view. Actually everything started
because I was trying to send an Array[] of Employee and in my client I was
getting only the first element on the array. So the natural way is return
the object right? I will try to make something to make my client works to
get all elements in the array.  



my Service has method that returns Employee[]

And I'm doing my client this way:

import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.rpc.client.RPCServiceClient;

// Getting Employee
QName opGetWeather =
new QName(http://service.pojo.sample/xsd;, testQuery);

Object[] opGetWeatherArgs = new Object[] { };
Class[] returnTypes = new Class[] { Employee.class };

Object[] response = serviceClient.invokeBlocking(opGetWeather,
opGetWeatherArgs, returnTypes);

response has always only one element. Probably there are other ways to do
the client. I'm looking to use OMElement.

Do you have any suggest?

thanks and best regards
Marcos Vilela






Philipp Leitner-2 wrote:
Returning an array or a list of objects is surely the more natural way 
to go, but may in some cases inflict a performance penalty.


I would go for the list of objects, and only if you run into severe 
performance troubles go for optimizing the solution.


/philipp

Marcos Vilela schrieb:

 Hello,

 I'm doing a service here that return rows from a database, like row
Employee with name and id for example. What is the suggestion of you all
to
return? It's better to return an Object[] Employee or a long string with
name../name , id ... /id of all rows in the database return? I
would
like to have clients in .NET and Java. Any help on my doubt?

thanks a lot,
Marcos Vilela

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