Re: Streaming Soap with Attachments

2007-07-10 Thread Thilina Gunarathne

See the deprecated MTOMSample.It is not in the dist.. You will need to
check out from svn.. I'm not sure whether it is in working
condition... But a little bit of tweaking would make it work...
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/samples/deprecated/mtomsample

I'm hoping to do little bit of testing on attachment streaming if I
managed to find some time..
thanks,
Thilina

On 7/10/07, Peter Makoi <[EMAIL PROTECTED]> wrote:

Hi
This approach is quite new to me, so if you could provide an example
code I would be very grateful
I have always preferred the lazy way of generating client stubs from a
wsdl file
 thanks
-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2007 2:26 PM
To: axis-user@ws.apache.org
Subject: Re: Streaming Soap with Attachments

Hi,
IIRC calling getDataHandler makes Axis2 to read the whole MIME part
corresponding to that DataHandler.. Axis2 MIME parser is a lazy parser
which reads the MIME parts only when needed..It'll read only till the
end of the requested MIME part, but accessing it will cause Axis2 read
the whole message if the requested MIME part is the last part of a
multipart message.

I think the culprit for the time delay you are seeing is the time
which Axis2 takes to read the content of the MIME part.. IMHO you
won't be able to do streaming using the above logic. But you can dig
in to a bit deeper level and use the
MessageContext.getIncomingAttachmentStreams() to access the underlying
raw data streams of the message.. Please make sure to test the
getIncomingAttachmentStreams() a bit before use, as it's one of the
least tested parts in Axis2..
Your scenario seems to use MTOM, but "Accessing the MessageContext"
sub topic in Using SwA with Axis2[1] article would help you to figure
out how to access the message context for a response message..

Also looks like you are using databinding in the client side... Which
data binding mechanism are you using... I'm not sure whether you can
use the getIncomingAttachmentStreams() together with DataBinding.. I
would recommend you to  try out the above using a RawXMLClient...[2]

Thanks,
Thilina

[1] http://wso2.org/library/1148
[2] http://ws.apache.org/axis2/1_2/dii.html


On 7/10/07, Peter Makoi <[EMAIL PROTECTED]> wrote:
> Hi Thilina
> Thanks for replying
> Here is a piece of the client code
> It is a in a unit test case
>
> public class AttachmentsService_ServiceWernerTestCase extends
> junit.framework.TestCase {
> ...
> ...
> }
>
> private class StreamListener extends Thread {
>
> private int time;
> private ByteArrayOutputStream outputStream;
>
> public StreamListener(int time) {
> this.time = time;
> }
>
> public void run() {
> try {
> //Write
> DataHandler[] ret =
> binding.returnStreamingByteArray(time);
>
> assertNotNull("Expected non-null value to be
> returned",ret);
> assertEquals("Expected length of DataHandler array to be 1", 1,
> ret.length);
>
> //Read
> DataHandler handler = ret[0];
>
> InputStream is = handler.getInputStream();
> int value;
> outputStream = new ByteArrayOutputStream();
> try {
> while ((value = is.read()) != -1) {
> outputStream.write(value);
> }
> } finally {
> outputStream.close();
> }
> } catch (Exception e) {
> fail("Unexpected exception: " + e);
> }
> }
>
> public int getNrBytesRead() {
> return outputStream == null ? 0 : outputStream.size();
> }
>
> public byte[] getBytes() {
> return outputStream == null ? new byte[0] :
> outputStream.toByteArray();
> }
> }
>
> public void testAttachmentsServiceReturnStreamingByteArray()
throws
> Exception {
> // Test operation
> long start = System.currentTimeMillis();
>
> StreamListener listener = new StreamListener(1);
> listener.start();
> int nrOfBytesRead = 0;
> int previousNrOfBytesRead = 0;
>
> while (System.currentTimeMillis() < start + 1) {
> Thread.sleep(1000);
> nrOfBytesRead = listener.getNrBytesRead();
> assertTrue("Expected number of bytes read to have
> incremented", nrOfBytesRead > previousNrOfBytesRead);
> previousNrOfBytesRead = nrOfBytesRead;
> }
> listener.join();
>
>   byte[] returnedBytes = listener.getBytes();
>
> assertTrue("Expected streaming to have lasted more than 10 seconds",
> System.currentTimeMillis() - start > 1);
>
>assertTrue("Expected byte array to be filled", returnedBytes.length
>
> 0);
>
> }
>
> -Original Message-
> From: Thilina Gunarathne [mailto:[EMAIL PROT

Re: Axis2: RESTful implementation with Axis2

2007-07-10 Thread riis

Hi Keith,

An example would be very nice. ;-)
An example where you format the URL in a RESTish style would be perfect.
Maybe with both GET & POST if it isn't too much trouble.

Thanks a lot.

Regards
Multi-Support A/S

Torben Riis

Phone +45 96 600 600, Fax +45 96 600 601
E-mail: [EMAIL PROTECTED]
http://www.multi-support.com


   
 "keith chapman"   
 <[EMAIL PROTECTED] 
 ail.com>   To 
   axis-user@ws.apache.org 
 11-07-2007 07:40   cc 
   
   Subject 
 Please respond to Re: Axis2: RESTful implementation   
 [EMAIL PROTECTED] with Axis2  
  he.org   
   
   
   
   
   




The WSDL 2.0 primer  is a good starting place. It takes you through the
concepts of WSDL 2.0 very nicely (without making things too complex). WSDL
2.0 is a whole lot clean and easy to understand. If you like I can write a
sample WSDL 2.0 doc for you if you have an example in mind :).

And yes you can use the http methods GET, POST, PUT & DELETE in the same
service. Its just that you cant use them on the same operation.

Thanks,
Keith.

On 7/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

  Hi Keith,

  Thank you for answering.

  When I earlier talked about using the http methods GET, POST, PUT &
  DELETE,
  I actually meant using them in the same service.

  WSDL 2.0 really sounds interesting.

  I have a little knowledge about WSDL 1.1/1.2, because I'm studying
  for the
  SCDJWS exam, but I doesn't know anything about WSDL 2.0.
  I guess a lot has changed since it is possible to describe how the
  URL
  should be formatted and whether  to use http methods GET, POST, PUT
  or
  DELETE.

  Do you have or know a place where I can find simple example WSDL
  describing
  such a service?
  Or would it be best just start reading WSDL 2.0 HTTPBinding.


  Regards
  Multi-Support A/S

  Torben Riis
  
  Phone +45 96 600 600, Fax +45 96 600 601
  E-mail: [EMAIL PROTECTED]
  http://www.multi-support.com



   "keith chapman"
   < [EMAIL PROTECTED]
   ail.com>
  To
 axis-user@ws.apache.org
   11-07-2007 06:45
  cc


  Subject
   Please respond to Re: Axis2: RESTful
  implementation
   [EMAIL PROTECTED] with Axis2
he.org









  See comments inline.

  On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:

Hi,

I have some questions regarding implementing a RESTfull
  service.
After
reading a lot of previous RESTish threads I got quite confused.
So I hope someone can help me straightened it out.

If I want to create a RESTful service with Axis2 would it then
require that
the service is implemented as RPC, or can other message
  receivers be
used?


Is it possible to create a RESTful service with Axis2 that can
  be
reached
in the following way:
http://www.boeing.com/rest/aircraft/747
instead of

  http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747

  Yes this can be done. REST support in Axis2 was achieved  via the
  WSDL 2.0
  HTTPBinding (If you are not familiar with WSDL this might sound a bit
  strange). The kind of question you asked can easily be done by
  deploying
  your service via a WSDL 2.0 description. Please have a look at the
  primer
  it has some easy to understand examples.

First i actually thought that a RESTful service should
  implement some
sort
of interface with methods corresponding to GET, POST, PUT &
  DELETE.
But I read in some of the other 

Re: Axis2: RESTful implementation with Axis2

2007-07-10 Thread keith chapman

The WSDL 2.0 primer 
is a good starting place. It takes you through the concepts of WSDL 2.0 very
nicely (without making things too complex). WSDL 2.0 is a whole lot clean
and easy to understand. If you like I can write a sample WSDL 2.0 doc for
you if you have an example in mind :).

And yes you can use the http methods GET, POST, PUT & DELETE in the same
service. Its just that you cant use them on the same operation.

Thanks,
Keith.

On 7/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



Hi Keith,

Thank you for answering.

When I earlier talked about using the http methods GET, POST, PUT &
DELETE,
I actually meant using them in the same service.

WSDL 2.0 really sounds interesting.

I have a little knowledge about WSDL 1.1/1.2, because I'm studying for the
SCDJWS exam, but I doesn't know anything about WSDL 2.0.
I guess a lot has changed since it is possible to describe how the URL
should be formatted and whether  to use http methods GET, POST, PUT or
DELETE.

Do you have or know a place where I can find simple example WSDL
describing
such a service?
Or would it be best just start reading WSDL 2.0 HTTPBinding.


Regards
Multi-Support A/S

Torben Riis

Phone +45 96 600 600, Fax +45 96 600 601
E-mail: [EMAIL PROTECTED]
http://www.multi-support.com



 "keith chapman"
 <[EMAIL PROTECTED]
 ail.com>   To
   axis-user@ws.apache.org
 11-07-2007 06:45   cc

   Subject
 Please respond to Re: Axis2: RESTful implementation
 [EMAIL PROTECTED] with Axis2
  he.org









See comments inline.

On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:

  Hi,

  I have some questions regarding implementing a RESTfull service.
  After
  reading a lot of previous RESTish threads I got quite confused.
  So I hope someone can help me straightened it out.

  If I want to create a RESTful service with Axis2 would it then
  require that
  the service is implemented as RPC, or can other message receivers be
  used?


  Is it possible to create a RESTful service with Axis2 that can be
  reached
  in the following way:
  http://www.boeing.com/rest/aircraft/747
  instead of
  http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747

Yes this can be done. REST support in Axis2 was achieved  via the WSDL 2.0
HTTPBinding (If you are not familiar with WSDL this might sound a bit
strange). The kind of question you asked can easily be done by deploying
your service via a WSDL 2.0 description. Please have a look at the primer
it has some easy to understand examples.

  First i actually thought that a RESTful service should implement
some
  sort
  of interface with methods corresponding to GET, POST, PUT & DELETE.
  But I read in some of the other threads that a RESTful service
should
  only
  have one method. Isn't that a problem if you try to accomplice the
  syntax
  that the following articles describes.

Yes you can use all 4 HTTP methods described above, depending on your
requirement. Its all about using the appropriate method (Not that you must
use just one method)


http://www.innoq.com/blog/st/2006/06/30/rest_vs_soap_oh_no_not_again.html

  http://www.xfront.com/REST-Web-Services.html

  Where the same url has different functionality depending on how it
is

  called (GET, POST).
  GET   /order/{id} Get order details
  POST  /order/{id} Add item

the current version of Axis2 does not support this (But it can be
included,
I will file a JIRA on this and try to get it into the 1.3 release.)

Please let us know if you need more help (Can even assist you in writing
down the WSDL 2.0 description)

Thanks,
Keith.

  Regards
  Multi-Support A/S

  Torben Riis
  
  Phone +45 96 600 600, Fax +45 96 600 601
  E-mail: [EMAIL PROTECTED]
  http://www.multi-support.com



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




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


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





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


Re: Axis2: RESTful implementation with Axis2

2007-07-10 Thread riis

Hi Keith,

Thank you for answering.

When I earlier talked about using the http methods GET, POST, PUT & DELETE,
I actually meant using them in the same service.

WSDL 2.0 really sounds interesting.

I have a little knowledge about WSDL 1.1/1.2, because I'm studying for the
SCDJWS exam, but I doesn't know anything about WSDL 2.0.
I guess a lot has changed since it is possible to describe how the URL
should be formatted and whether  to use http methods GET, POST, PUT or
DELETE.

Do you have or know a place where I can find simple example WSDL describing
such a service?
Or would it be best just start reading WSDL 2.0 HTTPBinding.


Regards
Multi-Support A/S

Torben Riis

Phone +45 96 600 600, Fax +45 96 600 601
E-mail: [EMAIL PROTECTED]
http://www.multi-support.com


   
 "keith chapman"   
 <[EMAIL PROTECTED] 
 ail.com>   To 
   axis-user@ws.apache.org 
 11-07-2007 06:45   cc 
   
   Subject 
 Please respond to Re: Axis2: RESTful implementation   
 [EMAIL PROTECTED] with Axis2  
  he.org   
   
   
   
   
   




See comments inline.

On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:

  Hi,

  I have some questions regarding implementing a RESTfull service.
  After
  reading a lot of previous RESTish threads I got quite confused.
  So I hope someone can help me straightened it out.

  If I want to create a RESTful service with Axis2 would it then
  require that
  the service is implemented as RPC, or can other message receivers be
  used?


  Is it possible to create a RESTful service with Axis2 that can be
  reached
  in the following way:
  http://www.boeing.com/rest/aircraft/747
  instead of
  http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747

Yes this can be done. REST support in Axis2 was achieved  via the WSDL 2.0
HTTPBinding (If you are not familiar with WSDL this might sound a bit
strange). The kind of question you asked can easily be done by deploying
your service via a WSDL 2.0 description. Please have a look at the primer
it has some easy to understand examples.

  First i actually thought that a RESTful service should implement some
  sort
  of interface with methods corresponding to GET, POST, PUT & DELETE.
  But I read in some of the other threads that a RESTful service should
  only
  have one method. Isn't that a problem if you try to accomplice the
  syntax
  that the following articles describes.

Yes you can use all 4 HTTP methods described above, depending on your
requirement. Its all about using the appropriate method (Not that you must
use just one method)

  http://www.innoq.com/blog/st/2006/06/30/rest_vs_soap_oh_no_not_again.html

  http://www.xfront.com/REST-Web-Services.html

  Where the same url has different functionality depending on how it is

  called (GET, POST).
  GET   /order/{id} Get order details
  POST  /order/{id} Add item

the current version of Axis2 does not support this (But it can be included,
I will file a JIRA on this and try to get it into the 1.3 release.)

Please let us know if you need more help (Can even assist you in writing
down the WSDL 2.0 description)

Thanks,
Keith.

  Regards
  Multi-Support A/S

  Torben Riis
  
  Phone +45 96 600 600, Fax +45 96 600 601
  E-mail: [EMAIL PROTECTED]
  http://www.multi-support.com


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




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


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



Re: issues with https?

2007-07-10 Thread Dimuthu
Hi,

When you give the HTTPS url and it should work.

If it is doesn't work, most probably it is not a well known root
certificate. In this case add the following properties to the System in
client code.
System.setProperty("javax.net.ssl.trustStore","path to keystore" )
System.setProperty("javax.net.ssl.trustStorePassword","apache")


Cheers,
Dimuthu

On Tue, 2007-07-10 at 14:38 -0400, [EMAIL PROTECTED]
wrote:
> Hi,
> 
> If I deploy a service using https, then is there anything special I need to 
> do on the client side, or does the built-in http library take care of the 
> certificate stuff?
> 
> thanks
> Michael Davis
> 
> -
> 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: RESTful implementation with Axis2

2007-07-10 Thread keith chapman

See comments inline.

On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



Hi,

I have some questions regarding implementing a RESTfull service. After
reading a lot of previous RESTish threads I got quite confused.
So I hope someone can help me straightened it out.

If I want to create a RESTful service with Axis2 would it then require
that
the service is implemented as RPC, or can other message receivers be used?


Is it possible to create a RESTful service with Axis2 that can be reached
in the following way:
http://www.boeing.com/rest/aircraft/747
instead of
http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747



Yes this can be done. REST support in Axis2 was achieved  via the WSDL
2.0
HTTPBinding(If
you are not familiar with WSDL this might sound a bit strange). The
kind
of question you asked can easily be done by deploying your service via a WSDL
2.0  description. Please have a look at the
primer it has some easy to understand examples.

First i actually thought that a RESTful service should implement some sort

of interface with methods corresponding to GET, POST, PUT & DELETE.
But I read in some of the other threads that a RESTful service should only
have one method. Isn't that a problem if you try to accomplice the syntax
that the following articles describes.



Yes you can use all 4 HTTP methods described above, depending on your
requirement. Its all about using the appropriate method (Not that you must
use just one method)

http://www.innoq.com/blog/st/2006/06/30/rest_vs_soap_oh_no_not_again.html

http://www.xfront.com/REST-Web-Services.html

Where the same url has different functionality depending on how it is
called (GET, POST).
GET   /order/{id} Get order details
POST  /order/{id} Add item



the current version of Axis2 does not support this (But it can be included,
I will file a JIRA on this and try to get it into the 1.3 release.)

Please let us know if you need more help (Can even assist you in writing
down the WSDL 2.0 description)

Thanks,
Keith.

Regards

Multi-Support A/S

Torben Riis

Phone +45 96 600 600, Fax +45 96 600 601
E-mail: [EMAIL PROTECTED]
http://www.multi-support.com


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





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


RE: call Axis2 Ws taking multiple parameters

2007-07-10 Thread Raghu Upadhyayula
Hi Zakaria,
 
  To pass multiple parameters to your method using the 'invoke' method 
you do it like this.
 
  this.result = (String) call.invoke(new Object[] { msg, msg1, msg2 } );
  
  In this way, you can pass as many parameters you want based on how 
many parameters your webservice accepts.
 
Thanks
Raghu



From: zakaria ghandour [mailto:[EMAIL PROTECTED]
Sent: Tue 7/10/2007 6:33 AM
To: axis-user@ws.apache.org
Subject: call Axis2 Ws taking multiple parameters




Hi,

i use 'invoke' method to call WS(1 parameter input) created in axis2.
this.result = (String)call.invoke( new Object[] { msg } );

how to call WS taking 2 parameters using the same method,

thanks



code client
---
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(uri) );
call.addParameter(new QName("http://www.intalio.com/";, "start"), new
QName("http://www.w3.org/2001/XMLSchema";, "string"), String.class,
ParameterMode.IN);
call.setOperationName(method);
call.setOperationStyle(org.apache.axis.constants.Style.DOCUMENT);
call.setOperationUse(org.apache.axis.constants.Use.LITERAL);
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
this.result = (String)call.invoke( new Object[] { msg } );

--
View this message in context: 
http://www.nabble.com/call-Axis2--Ws-taking-multiple-parameters-tf4055873.html#a11520978
Sent from the Axis - User mailing list archive at Nabble.com.


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



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

Re: [Axis2] wsdl2java problem with HTTPS

2007-07-10 Thread keith chapman

I havent tried this out. But I guess that this should help. Its a remedy to
your problem.

http://wso2.org/blog/dims/1906

Thanks,
Keith.

On 7/11/07, Wah Yim <[EMAIL PROTECTED]> wrote:


Thanks Jennifer.  Actually, I found out that I forgot to set the
environment variables "https.proxyHost" and "https.proxyPort" as well.
Once I've set these variables my wsdl2java is running fine =)

However, I'm running into the same "No route to host: connect" error again
when I actually tried connecting to the web service over HTTPS.  Despite
setting the related environment variables using "System.setProperty(...)"
and adding the lines that you have suggested, I'm still getting the same
error.  It seems like Axis2 is ignoring those system variables.  I've also
tried the ProxyProperties code as suggested in the documentation (my sample
code uses XMLBeans binding):

HttpTransportProperties.ProxyProperties proxyProperties = new
HttpTransportProperties.ProxyProperties();
proxyProperties.setProxyName("...");   // my proxy hostname
proxyProperties.setProxyPort(...);   // my proxy port

stub._getServiceClient().getOptions().setTransportInProtocol(
Constants.TRANSPORT_HTTP);
stub._getServiceClient().getOptions().setProperty(
HTTPConstants.PROXY, proxyProperties);

But I still get the same error.  Any suggestions?

Thanks,
-wah


- Original Message 
From: "Ford, Jennifer M." <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Tuesday, July 10, 2007 2:00:39 PM
Subject: RE: [Axis2] wsdl2java problem with HTTPS

Have you tried adding the lines:

System.setProperty( "java.protocol.handler.pkgs", "
com.sun.net.ssl.internal.www.protocol");

Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider() );

System.setProperty("javax.net.ssl.trustStore", path/to/your/java/keystore);
//Path is usually HOME_DIRECTORY/.keystore

You would also need to use the java keytool to add the site's certificate
to the keystore.

 --
*From:* Wah Yim [mailto:[EMAIL PROTECTED]
*Sent:* Tuesday, July 10, 2007 11:54 AM
*To:* axis-user@ws.apache.org
*Subject:* [Axis2] wsdl2java problem with HTTPS

 Hello,

I have been having this issue with wsdl2java over HTTPS for a few days
now, I have searched through some of the older posts regarding to this
topic, but my problem is a little bit different, so hopefully someone can
help me with this.

Basically, when I run wsdl2java on a WSDL over HTTP, it works fine.
However, when I run it over HTTPS, some give me "No trusted certificate
found" (a common problem based on the archived posts I've seen), but the
actual WSDL that I'm interested in always give me "No route to host:
connect" error.  I'm able to find a similar WSDL on HTTPS that gives me the
same "No route to host: connect" problem:

https://adcenterapi.microsoft.com/v4/Reporting/Reporting.asmx?wsdl

Now, here are a few additional piece of information about my issue:

1) I'm running wsdl2java behind a company firewall, but I have already
passed in the environment variables "http.proxyHost" and "http.proxyPort"
and this is working based on the results I'm getting with wsdl2java when
running against a WSDL over HTTP.

2) The WSDL over HTTPS that are giving me "No route to host: connect"
error are all .NET services.

3) I know that these services are working because I'm able to view the
WSDL through IE, and the HTML version of the web service works (for the
Microsoft Ad Center example shown above, I can type in the URL in IE without
the "?wsdl" suffix to access the HTML version of the web service).

Any help is greatly appreciated, thanks!!

-wah





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


[AXIS2] [WS:Addressing] Example of using Addressing

2007-07-10 Thread Sanoran Triamesh

Hello,
 I have searched through the various documents but am unable to find an
example of how to use addressing (i know how to engage the module
addressing.mar).

Is it simply a matter of adding 'replyTo' etc tags to the SOAP header ?

Do I need to have access to the messagecontext to get the header ?

A simple example would be very very helpful. If it is in the documents
already, I seem to have missed it, -a pointer to the documentation would be
very helpful in that case.

Thanks

S.


Re: [Axis2]How to invoke web service from another

2007-07-10 Thread vittal nangunoori
Thankyou for the resolution.
I will try with the SAAJ and get back with the result.

Thanking you,
Vittal

--- Joe Nathan <[EMAIL PROTECTED]> wrote:

> 
> Use SAAJ for client side. You do not need stub in
> SAAJ!
> The following is a fully-tested code example. You
> can copy it and
> change for your purpose;
> ===
> SOAPConnectionFactory connectionFactory =
> SOAPConnectionFactory.newInstance(); 
> SOAPConnection connection =
> connectionFactory.createConnection(); 
> 
> MessageFactory mf = MessageFactory.newInstance(); 
> SOAPMessage smsg = mf.createMessage(); 
> SOAPBody body = smsg.getSOAPBody(); 
> 
> QName bodyName = new
> QName("http://ws.apache.org/axis2/xsd";, 
>   "YourServiceMethodName", "m"); 
> SOAPBodyElement bodyElement =
> body.addBodyElement(bodyName); 
> 
> // build arguments: three in this case;
> QName name = new QName("inputarg"); 
> SOAPElement symbol =
> bodyElement.addChildElement(name); 
> symbol.addTextNode("your input data"); 
>   
> name = new QName("user"); 
> symbol = bodyElement.addChildElement(name); 
> symbol.addTextNode("your userid"); 
>   
> name = new QName("password"); 
> symbol = bodyElement.addChildElement(name); 
> symbol.addTextNode("blashblah"); 
> 
> // call the service;
> URL endpoint = new
>
URL("http://localhost/axis2/services/YOURsoapServiceName";);
> 
>   SOAPMessage sresponse = connection.call(smsg,
> endpoint); 
> connection.close();
>   
> // Get the return text;
> SOAPBody soapBody = sresponse.getSOAPBody();
> SOAPElement node =
>
(SOAPElement)soapBody.getFirstChild().getFirstChild();
> String msg = node.getValue();
> 
> -- 
> View this message in context:
>
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11530555
> Sent from the Axis - User mailing list archive at
> Nabble.com.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



  

Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

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



Re: [Axis2]How to invoke web service from another

2007-07-10 Thread Joe Nathan

PS;

Add the following imports if necessary;
==
import javax.xml.soap.*;
import javax.xml.namespace.QName;
import java.net.URL;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.*;

import com.sun.org.apache.xml.internal.serialize.OutputFormat;
import com.sun.org.apache.xml.internal.serialize.XMLSerializer;

-- 
View this message in context: 
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11530590
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: [Axis2]How to invoke web service from another

2007-07-10 Thread Joe Nathan

Use SAAJ for client side. You do not need stub in SAAJ!
The following is a fully-tested code example. You can copy it and
change for your purpose;
===
SOAPConnectionFactory connectionFactory =
SOAPConnectionFactory.newInstance(); 
SOAPConnection connection = connectionFactory.createConnection(); 

MessageFactory mf = MessageFactory.newInstance(); 
SOAPMessage smsg = mf.createMessage(); 
SOAPBody body = smsg.getSOAPBody(); 

QName bodyName = new QName("http://ws.apache.org/axis2/xsd";, 
"YourServiceMethodName", "m"); 
SOAPBodyElement bodyElement = body.addBodyElement(bodyName); 

// build arguments: three in this case;
QName name = new QName("inputarg"); 
SOAPElement symbol = bodyElement.addChildElement(name); 
symbol.addTextNode("your input data"); 

name = new QName("user"); 
symbol = bodyElement.addChildElement(name); 
symbol.addTextNode("your userid"); 

name = new QName("password"); 
symbol = bodyElement.addChildElement(name); 
symbol.addTextNode("blashblah"); 

// call the service;
URL endpoint = new
URL("http://localhost/axis2/services/YOURsoapServiceName";); 
SOAPMessage sresponse = connection.call(smsg, endpoint); 
connection.close();

// Get the return text;
SOAPBody soapBody = sresponse.getSOAPBody();
SOAPElement node = (SOAPElement)soapBody.getFirstChild().getFirstChild();
String msg = node.getValue();

-- 
View this message in context: 
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11530555
Sent from the Axis - User mailing list archive at Nabble.com.


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



Error in Axis SOAP web service in Axis 1.4

2007-07-10 Thread Ashish Kulkarni

Hi
I am getting following error when returning a web service call
Any Ideas


AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: java.io.IOException: java.io.IOException:
java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
   {http://xml.apache.org/axis/}stackTrace:java.io.IOException:
java.io.IOException: java.io.IOException: java.lang.NullPointerException
   at org.apache.axis.encoding.ser.BeanSerializer.serialize(
BeanSerializer.java:275)
   at org.apache.axis.encoding.SerializationContext.serializeActual(
SerializationContext.java:1502)
   at org.apache.axis.encoding.SerializationContext.serialize(
SerializationContext.java:978)
   at org.apache.axis.encoding.SerializationContext.serialize(
SerializationContext.java:799)
   at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
   at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
   at org.apache.axis.message.MessageElement.output(MessageElement.java
:1208)
   at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
   at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java
:478)
   at org.apache.axis.message.MessageElement.output(MessageElement.java
:1208)
   at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
   at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
   at org.apache.axis.Message.writeTo(Message.java:539)
   at org.apache.axis.transport.http.AxisServlet.sendResponse(
AxisServlet.java:902)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java
:777)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   at org.apache.axis.transport.http.AxisServletBase.service(
AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
   at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
   at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:534)

   {http://xml.apache.org/axis/}hostname:PGMPPKLKULKARA

java.io.IOException: java.io.IOException: java.io.IOException:
java.lang.NullPointerException
   at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
   at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:317)
   at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
   at org.apache.axis.Message.writeTo(Message.java:539)
   at org.apache.axis.transport.http.AxisServlet.sendResponse(
AxisServlet.java:902)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java
:777)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   at org.apache.axis.transport.http.AxisServletBase.service(
AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
   at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
   at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
   at org.

Re: Reverse Direction Messaging Over Persistent HTTP Connection

2007-07-10 Thread chaoticinc

Thanks Doug for the spec. This given me some idea for future directions.
However, I still need to understand what I can do from the standpoint of the
technology within Axis2. An example of some sort to show how the client and
servers actually generate and send the messages is necessary.

Is anyone familiar with the API usage required to reverse the direction of
messaging over the HTTP connection as described below?

Jayke


Doug Davis wrote:
> 
> checkout:   WS-MakeConnection 
> http://docs.oasis-open.org/ws-rx/wsmc/200702
> 
> thanks
> -Doug
> __
> STSM  |  Web Services Architect  |  IBM Software Group
> (919) 254-6905  |  IBM T/L 444-6905  |  [EMAIL PROTECTED]
> 
> 
> 
> chaoticinc <[EMAIL PROTECTED]> 
> 07/08/2007 02:25 PM
> Please respond to
> axis-user@ws.apache.org
> 
> 
> To
> axis-user@ws.apache.org
> cc
> 
> Subject
> Reverse Direction Messaging Over Persistent HTTP Connection
> 
> 
> 
> 
> 
> 
> 
> Hello,
> 
> I am trying to implement some code to the TR-069 standard
> (http://www.dslforum.org/techwork/tr/TR-069%20Amendment%201.pdf) 
> that requires messages to be originated from the SOAP Server to the SOAP
> Client after initial message exchange. The sequence of messaging is as
> follows:
> 
> Client  Server
> inform()   -->
>   <- informResponse
> empty HTTP Post   --> 
>   <-- 
> getParameterValues()
> getParameterValuesResponse   -->
> 
> Thus the getParameterValues() and getParameterValuesResponse are in a
> reverse direction to normal messaging.
> 
> Thus, my question is:
> 1) Is there a standard SOAP and Axis2 means to send an empty HTTP Post
> message to effectively hand over control to the server for it to make
> requests?
> 2) Is there a way, a MEP of some sort, for sending back an HTTP response
> with a SOAP request in it with expectation of a subsequent HTTP request 
> that
> will contain the SOAP response?
> 
> So far I have looked at ServiceClient, OperationClient and MessageContexts
> without anything that indicates this might be possible. I am comfortable
> with the standard request-response messaging, but am at a loss for any 
> sort
> of bidirectional messaging initiation.
> 
> Any suggestions would be appreciated.
> 
> Jayke
> -- 
> View this message in context: 
> http://www.nabble.com/Reverse-Direction-Messaging-Over-Persistent-HTTP-Connection-tf4045431.html#a11491282
> 
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Reverse-Direction-Messaging-Over-Persistent-HTTP-Connection-tf4045431.html#a11529588
Sent from the Axis - User mailing list archive at Nabble.com.


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



RE: Writing a Axis client program...

2007-07-10 Thread Kumar, Amit {PBSG}
> Hi,
> 
> I am trying to write my first webservice using Axis 2.
> 
> I have a webservice deployed on TIBCO Businessworks. I need to access
> this webservice using an Axis client. I have download the wsdl and
> created the stubs using WSDL2Java utility. This stub class contains
> 5000 lines of code. I am having hard time understanding which method
> to instantiate for sending a SOAP request from client. Is there any
> relationship between the method name in the stub and the request /
> response elements of WSDL.
> 
> I am using Axis ADB style to create the client.
> 
> Any help will be greatly appreciated
> 
> Thanks in advance
> 
> Best regards
> 
> Below is my wsdl:
> 
> 
> 
> 
> http://schemas.xmlsoap.org/wsdl/";
> xmlns:tns="http://xmlns.example.com/1181831940453/GetAAA2OwnerImpl/Pro
> cesses" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:ns0="http://www.Co.com/NorthAmerica/AA/AAA2/Request";
> xmlns:ns1="http://www.ABC.com/NorthAmerica/AA/AAA2/Owner";
> targetNamespace="http://xmlns.example.com/1181831940453/GetAAA2OwnerIm
> pl/Processes">
> 
> http://www.w3.org/2001/XMLSchema";
> xmlns="http://www.ABC.com/NorthAmerica/AA/AAA2/Owner";
> targetNamespace="http://www.ABC.com/NorthAmerica/AA/AAA2/Owner";
> elementFormDefault="unqualified" attributeFormDefault="unqualified">
> 
> 
> 
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
>  type="xsd:string"/>
> 
> 
> 
> 
> 
> 
> 
>  maxOccurs="unbounded"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> http://www.w3.org/2001/XMLSchema";
> xmlns="http://www.ABC.com/NorthAmerica/AA/AAA2/Request";
> targetNamespace="http://www.ABC.com/NorthAmerica/AA/AAA2/Request";
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> 
> 
> 
> 
>  minOccurs="0"/>
>  minOccurs="0"/>
>  minOccurs="0"/>
>  minOccurs="0"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  transport="http://schemas.xmlsoap.org/soap/http"/>
> 
>  soapAction="/Processes/ProvideAAA2Owner"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  binding="tns:SOAPEventSourceBinding">
>  location="http://localhost:7989/Processes/ProvideAAA2Owner"/>
> 
> 
> 

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



Re: [Axis2] wsdl2java problem with HTTPS

2007-07-10 Thread Wah Yim
Thanks Jennifer.  Actually, I found out that I forgot to set the environment 
variables "https.proxyHost" and "https.proxyPort" as well.  Once I've set these 
variables my wsdl2java is running fine =)

However, I'm running into the same "No route to host: connect" error again when 
I actually tried connecting to the web service over HTTPS.  Despite setting the 
related environment variables using "System.setProperty(...)" and adding the 
lines that you have suggested, I'm still getting the same error.  It seems like 
Axis2 is ignoring those system variables.  I've also tried the ProxyProperties 
code as suggested in the documentation (my sample code uses XMLBeans binding):

HttpTransportProperties.ProxyProperties proxyProperties = new 
HttpTransportProperties.ProxyProperties();
proxyProperties.setProxyName("...");// my proxy hostname
proxyProperties.setProxyPort(...);// my proxy port


stub._getServiceClient().getOptions().setTransportInProtocol(Constants.TRANSPORT_HTTP);

stub._getServiceClient().getOptions().setProperty(HTTPConstants.PROXY, 
proxyProperties);

But I still get the same error.  Any suggestions?

Thanks,
-wah


- Original Message 
From: "Ford, Jennifer M." <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Tuesday, July 10, 2007 2:00:39 PM
Subject: RE: [Axis2] wsdl2java problem with HTTPS



 
DIV {
MARGIN:0px;}



Have you tried adding the lines:


System.setProperty( "java.protocol.handler.pkgs", 
"com.sun.net.ssl.internal.www.protocol");

Security.addProvider( new 
com.sun.net.ssl.internal.ssl.Provider() );

System.setProperty("javax.net.ssl.trustStore", path/to/your/java/keystore);  
//Path is usually 
HOME_DIRECTORY/.keystore

You would also need to use the 
java keytool to add the site's certificate to the 
keystore.





From: Wah Yim [mailto:[EMAIL PROTECTED] 

Sent: Tuesday, July 10, 2007 11:54 AM
To: 
axis-user@ws.apache.org
Subject: [Axis2] wsdl2java problem with 
HTTPS





Hello,

I 
have been having this issue with wsdl2java over HTTPS for a few days now, I 
have 
searched through some of the older posts regarding to this topic, but my 
problem 
is a little bit different, so hopefully someone can help me with 
this.

Basically, when I run wsdl2java on a WSDL over HTTP, it works 
fine.  However, when I run it over HTTPS, some give me "No trusted 
certificate found" (a common problem based on the archived posts I've seen), 
but 
the actual WSDL that I'm interested in always give me "No route to host: 
connect" error.  I'm able to find a similar WSDL on HTTPS that gives me the 
same "No route to host: connect" problem:

https://adcenterapi.microsoft.com/v4/Reporting/Reporting.asmx?wsdl

Now, 
here are a few additional piece of information about my issue:

1) I'm 
running wsdl2java behind a company firewall, but I have already passed in the 
environment variables "http.proxyHost" and "http.proxyPort" and this is working 
based on the results I'm getting with wsdl2java when running against a WSDL 
over 
HTTP.

2) The WSDL over HTTPS that are giving me "No route to host: 
connect" error are all .NET services.

3) I know that these services are 
working because I'm able to view the WSDL through IE, and the HTML version of 
the web service works (for the Microsoft Ad Center example shown above, I can 
type in the URL in IE without the "?wsdl" suffix to access the HTML version of 
the web service).

Any help is greatly appreciated, 
thanks!!

-wah






issues with https?

2007-07-10 Thread Michael.Davis
Hi,

If I deploy a service using https, then is there anything special I need to do 
on the client side, or does the built-in http library take care of the 
certificate stuff?

thanks
Michael Davis

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



Service Locator URL Encoding

2007-07-10 Thread Ekmekcioglu, Lerna \(IT\)
When I try to bind to my service locator url at
https://:@:/path/to/service with a pwd that has
'/' in it, I fail to bind to the backend.  I encode the url prior to
attempting to bind to the service.   I can see that encoding of '/' into
%2F works properly. The binding is successful with other uid/pwd that do
not include '/'.   If I try to go to
https://:@:/path/to/service in my browser with '/'
replaced with '%2F'  that also works fine and I get in successfully.
Can you shed some light into what might be happening ?  I was suspecting
may be an issue with service locator url encoding and axis ?
 
Lerna Ekmekcioglu


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

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



RE: [Axis2] wsdl2java problem with HTTPS

2007-07-10 Thread Ford, Jennifer M.
Have you tried adding the lines:
System.setProperty( "java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");

Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider() );

System.setProperty("javax.net.ssl.trustStore",
path/to/your/java/keystore);  //Path is usually HOME_DIRECTORY/.keystore

You would also need to use the java keytool to add the site's
certificate to the keystore.




From: Wah Yim [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 10, 2007 11:54 AM
To: axis-user@ws.apache.org
Subject: [Axis2] wsdl2java problem with HTTPS


Hello,

I have been having this issue with wsdl2java over HTTPS for a few days
now, I have searched through some of the older posts regarding to this
topic, but my problem is a little bit different, so hopefully someone
can help me with this.

Basically, when I run wsdl2java on a WSDL over HTTP, it works fine.
However, when I run it over HTTPS, some give me "No trusted certificate
found" (a common problem based on the archived posts I've seen), but the
actual WSDL that I'm interested in always give me "No route to host:
connect" error.  I'm able to find a similar WSDL on HTTPS that gives me
the same "No route to host: connect" problem:

https://adcenterapi.microsoft.com/v4/Reporting/Reporting.asmx?wsdl

Now, here are a few additional piece of information about my issue:

1) I'm running wsdl2java behind a company firewall, but I have already
passed in the environment variables "http.proxyHost" and
"http.proxyPort" and this is working based on the results I'm getting
with wsdl2java when running against a WSDL over HTTP.

2) The WSDL over HTTPS that are giving me "No route to host: connect"
error are all .NET services.

3) I know that these services are working because I'm able to view the
WSDL through IE, and the HTML version of the web service works (for the
Microsoft Ad Center example shown above, I can type in the URL in IE
without the "?wsdl" suffix to access the HTML version of the web
service).

Any help is greatly appreciated, thanks!!

-wah



[Axis2] wsdl2java problem with HTTPS

2007-07-10 Thread Wah Yim
Hello,

I have been having this issue with wsdl2java over HTTPS for a few days now, I 
have searched through some of the older posts regarding to this topic, but my 
problem is a little bit different, so hopefully someone can help me with this.

Basically, when I run wsdl2java on a WSDL over HTTP, it works fine.  However, 
when I run it over HTTPS, some give me "No trusted certificate found" (a common 
problem based on the archived posts I've seen), but the actual WSDL that I'm 
interested in always give me "No route to host: connect" error.  I'm able to 
find a similar WSDL on HTTPS that gives me the same "No route to host: connect" 
problem:

https://adcenterapi.microsoft.com/v4/Reporting/Reporting.asmx?wsdl

Now, here are a few additional piece of information about my issue:

1) I'm running wsdl2java behind a company firewall, but I have already passed 
in the environment variables "http.proxyHost" and "http.proxyPort" and this is 
working based on the results I'm getting with wsdl2java when running against a 
WSDL over HTTP.

2) The WSDL over HTTPS that are giving me "No route to host: connect" error are 
all .NET services.

3) I know that these services are working because I'm able to view the WSDL 
through IE, and the HTML version of the web service works (for the Microsoft Ad 
Center example shown above, I can type in the URL in IE without the "?wsdl" 
suffix to access the HTML version of the web service).

Any help is greatly appreciated, thanks!!

-wah


[Axis2_1.3_RC1] ServiceClient sendReceiveNonBlocking

2007-07-10 Thread Bjoern Krueger

Hi,

i have a Problem sending async Soapmessages. I am using the 
sendReceiveNonBlocking method of the ServiceClient.

I?m receiving the following NullPointerException:

NullPointerException at 
org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:420)

..

I had a look at the source code an noticed that the callback of the 
former version is still used. Is this the problem?


thanks and regards

Björn Krüger

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



axis m_pCall->checkMessage failing

2007-07-10 Thread tminifie


Hi 

I am new to web services programming. I just downloaded IBM's MQC2: Web
Services Client for C++ and have installed it. I created some C++ stubs from
a wsdl provided to me from another department at my company. I have
successfully compiled the stubs with our application. The problem I'm facing
is that when I call the authenticateUser() method the m_pCall->checkMessage
call is failing and I don't know why. Here are the details of our
environment:

Server: AIX 5.2 
Compiler: IBM C++ 8.0

I highlighted the offending line of code below:

xsd__int ILDAPUtilsPortType::authenticateUser(xsd__string Value0,
xsd__string Value1)
{
xsd__int Ret = 0;
const char* pcCmplxFaultName;
pcCmplxFaultName = NULL;
try
{   if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER))
return Ret;
if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
{
m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
}
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("authenticateUser",
"http://ldap.reportrepository.msuite.cgi.com";);
includeSecure();
applyUserPreferences();
char cPrefixAndParamName0[13];
sprintf( cPrefixAndParamName0, "%s:in0",
m_pCall->getNamespacePrefix("http://ldap.reportrepository.msuite.cgi.com";));
m_pCall->addParameter((void*)Value0, cPrefixAndParamName0,
XSD_STRING);
char cPrefixAndParamName1[13];
sprintf( cPrefixAndParamName1, "%s:in1",
m_pCall->getNamespacePrefix("http://ldap.reportrepository.msuite.cgi.com";));
m_pCall->addParameter((void*)Value1, cPrefixAndParamName1,
XSD_STRING);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS ==
m_pCall->checkMessage("authenticateUserResponse",
"http://ldap.reportrepository.msuite.cgi.com";))
{
xsd__int * pReturn = m_pCall->getElementAsInt("out",
0);
if(pReturn)
{
Ret = *pReturn;
Axis::AxisDelete( (void *) pReturn,
XSD_INT);
}
}
}
m_pCall->unInitialize();
return Ret;


Please respond,
Thanks
-- 
View this message in context: 
http://www.nabble.com/axis-m_pCall-%3EcheckMessage-failing-tf4056585.html#a11523419
Sent from the Axis - User mailing list archive at Nabble.com.


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



java.lang.NoSuchMethodError when accessing happyaxis.jsp

2007-07-10 Thread Delimon, Alan
I am getting a weird error when trying to access happyaxis.jsp on my test 
server installation that I need to start using.

The Axis admin console works fine, but instead of the services pointing to 
http://server:port/axis2/services/ServiceName, they point to 
http://server:port/axis2/null/ServiceName.  

I think that this is related to a problem I have when I try to access 
happyaxis.jsp.  It gets a 500 error and the localhost_log shows this error:
2007-07-10 11:03:36 StandardWrapperValve[jsp]: Servlet.service() for servlet 
jsp 
 threw exception
java.lang.NoSuchMethodError: 
org.apache.axis2.context.ConfigurationContext.getSe 

rvicePath()Ljava/lang/String;
at 
org.apache.jsp.axis2_002dweb.HappyAxis_jsp.invokeTheService(HappyAxis   

  _jsp.java:332)
at 
org.apache.jsp.axis2_002dweb.HappyAxis_jsp._jspService(HappyAxis_jsp.   

  java:511)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper   

  .java:324)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2   

  92)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl   

  icationFilterChain.java:237)

I suspect the two are related but I don't know how.

Alan Delimon
Senior Software Engineer
Software Integration Group
PAETEC 
[EMAIL PROTECTED]
585-413-2127



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



Re: [Axis2]How to invoke web service from another

2007-07-10 Thread vittal nangunoori
In the second web service (pojo) method, i have
intialised the stub(adb) of the first service and
invoked its method.
Can you provide me code for invoking web service in
the second web service


Here is the web service method of the second web
service


public OrderResponse_Type102[]
submitRefillOrder(RefillOrder_Type101[]
refillOrderArray)
{
System.out.println("Inside the refillOrderRequest
FIRST"+refillOrderArray);   

String rxNumber = null;
String storeNumber = null;
String lastName = null;
String phoneNumber = null;
String pickupDateTime = null;
String message = "Not OK";

OrderResponse_Type102[] responseArray = new
OrderResponse_Type102[refillOrderArray.length];


for(int i=0;ihttp://sameera-jayasoma.blogspot.com/
> http://www.flickr.com/photos/sameera-jayasoma
> 



   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

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



Re: [Rampart] Ignore Timestamp and Addressing from client

2007-07-10 Thread Ruchith Fernando

Rampart certainly does process timestamp at
org.apache.rampart.PolicyBasedResultsValidator#verifyTimestamp()

Also WSS4J org.apache.ws.security.processor.TimestampProcessor#handleTimestamp()
verifies the timstamp before control reaches Rampart level validation.

Thanks,
Ruchith

On 7/10/07, Tony Dean <[EMAIL PROTECTED]> wrote:

Rampart does not do any processing with the Timestamp information, does it?  
However, you do make a valid point.  The client should not send a Timestamp if 
service is not expecting it.  Unfortunately, WSSE 3.0 sends one by default with 
a UsernameToken. ;-(

> -Original Message-
> From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 10, 2007 10:59 AM
> To: axis-user@ws.apache.org
> Subject: Re: [Rampart] Ignore Timestamp and Addressing from client
>
> Hmm ... this is not possible with Rampart-1.0 style configuration!
> (Using configuration parameters). IMHO we must validate all
> elements in the wsse:Security header of the incoming message
> and I don't think it is correct to let random unknown
> elements in. We express exactly what we expect in the
> security header in the security policy of the service and the
> client MUST send exactly as expected by the service.
> Otherwise it is the client's problem.
>
> Thanks,
> Ruchith
>
> On 7/10/07, stlecho <[EMAIL PROTECTED]> wrote:
> >
> > I completely agree with you Tony. If the client sends on top of the
> > required UsernameToken some additional and unwanted information
> > (timestamp, addressing, ...), Rampart should still be happy that it
> > finds the UsernameToken information.
> >
> > Regards, Stefan.
> >
> >
> > Tony Dean wrote:
> > >
> > > As an example suppose you want Rampart to expect and
> always process
> > > a UsernameToken.  You would set
> > > UsernameToken.  However,
> by default
> > > .net clients always send a Timestamp.  So even though the .net
> > > client sends a UsernameToken, a mismatch occurs because
> it sends a
> > > Timestamp as well.  Is there a way to configure Rampart to just
> > > ignore a Timestamp since it is not expected?  I think
> this is what
> > > Stefan is saying also.  Maybe this is against ws-security
> guidelines.  I don't know.  Thanks.
> > >
> > >> -Original Message-
> > >> From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
> > >> Sent: Tuesday, July 10, 2007 5:37 AM
> > >> To: axis-user@ws.apache.org
> > >> Subject: Re: [Rampart] Ignore Timestamp and Addressing
> from client
> > >>
> > >> The actions mismatch error occurs when you configure rampart to
> > >> expect security actions different to what the incoming message
> > >> contains. When you configure Rampart to process all security
> > >> operations performed on the message you will able to get rid of
> > >> this error.
> > >>
> > >> Thanks,
> > >> Ruchith
> > >>
> > >> On 7/2/07, stlecho <[EMAIL PROTECTED]> wrote:
> > >> >
> > >> > All,
> > >> >
> > >> > Is there a solution or workaround for this issue ?
> > >> >
> > >> > Regards, Stefan Lecho.
> > >> >
> > >> >
> > >> > stlecho wrote:
> > >> > >
> > >> > > Hi,
> > >> > >
> > >> > > I have configured the InflowSecurity parameter (extracted
> > >> > > included
> > >> > > underneath) on the server side with the "Signature" item.
> > >> > >
> > >> > > One of our clients is using a C# client. The SOAP
> request that
> > >> > > is received from this client contains Timestamp and
> > >> Addressing related
> > >> > > elements. This results in an "WSDoAllReceiver: security
> > >> processing
> > >> > > failed (actions mismatch)" AxisFault.
> > >> > >
> > >> > > Is there a way to "ignore" the Timestamp and
> Addressing related
> > >> > > elements on the server ?
> > >> > >
> > >> > > Extract axis2.xml:
> > >> > > 
> > >> > >   
> > >> > > Signature
> > >> > >
> interopin.properties
> > >> > >
> > >> DirectReference
> > >> > >
> > >> > >
> > >> {Element}{http://schemas.xmlsoap.org/soap/enve
> > >> lope/}Body
> > >> > >   
> > >> > > 
> > >> > >
> > >> > >
> > >> > > Regards, Stefan Lecho.
> > >> > >
> > >> >
> > >> > --
> > >> > View this message in context:
> > >> >
> > >>
> http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-fro
> > >> m-c
> > >> > lient-tf3882252.html#a11392800 Sent from the Axis - User
> > >> mailing list
> > >> > archive at Nabble.com.
> > >> >
> > >> >
> > >> >
> > >>
> ---
> > >> --
> > >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> > For additional commands, e-mail: [EMAIL PROTECTED]
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> www.ruchith.org
> > >> www.wso2.org
> > >>
> > >>
> ---
> > >> -- 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 PROTE

RE: [Rampart] Ignore Timestamp and Addressing from client

2007-07-10 Thread Tony Dean
Rampart does not do any processing with the Timestamp information, does it?  
However, you do make a valid point.  The client should not send a Timestamp if 
service is not expecting it.  Unfortunately, WSSE 3.0 sends one by default with 
a UsernameToken. ;-(

> -Original Message-
> From: Ruchith Fernando [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 10, 2007 10:59 AM
> To: axis-user@ws.apache.org
> Subject: Re: [Rampart] Ignore Timestamp and Addressing from client
> 
> Hmm ... this is not possible with Rampart-1.0 style configuration!
> (Using configuration parameters). IMHO we must validate all 
> elements in the wsse:Security header of the incoming message 
> and I don't think it is correct to let random unknown 
> elements in. We express exactly what we expect in the 
> security header in the security policy of the service and the 
> client MUST send exactly as expected by the service.
> Otherwise it is the client's problem.
> 
> Thanks,
> Ruchith
> 
> On 7/10/07, stlecho <[EMAIL PROTECTED]> wrote:
> >
> > I completely agree with you Tony. If the client sends on top of the 
> > required UsernameToken some additional and unwanted information 
> > (timestamp, addressing, ...), Rampart should still be happy that it 
> > finds the UsernameToken information.
> >
> > Regards, Stefan.
> >
> >
> > Tony Dean wrote:
> > >
> > > As an example suppose you want Rampart to expect and 
> always process 
> > > a UsernameToken.  You would set 
> > > UsernameToken.  However, 
> by default 
> > > .net clients always send a Timestamp.  So even though the .net 
> > > client sends a UsernameToken, a mismatch occurs because 
> it sends a 
> > > Timestamp as well.  Is there a way to configure Rampart to just 
> > > ignore a Timestamp since it is not expected?  I think 
> this is what 
> > > Stefan is saying also.  Maybe this is against ws-security 
> guidelines.  I don't know.  Thanks.
> > >
> > >> -Original Message-
> > >> From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
> > >> Sent: Tuesday, July 10, 2007 5:37 AM
> > >> To: axis-user@ws.apache.org
> > >> Subject: Re: [Rampart] Ignore Timestamp and Addressing 
> from client
> > >>
> > >> The actions mismatch error occurs when you configure rampart to 
> > >> expect security actions different to what the incoming message 
> > >> contains. When you configure Rampart to process all security 
> > >> operations performed on the message you will able to get rid of 
> > >> this error.
> > >>
> > >> Thanks,
> > >> Ruchith
> > >>
> > >> On 7/2/07, stlecho <[EMAIL PROTECTED]> wrote:
> > >> >
> > >> > All,
> > >> >
> > >> > Is there a solution or workaround for this issue ?
> > >> >
> > >> > Regards, Stefan Lecho.
> > >> >
> > >> >
> > >> > stlecho wrote:
> > >> > >
> > >> > > Hi,
> > >> > >
> > >> > > I have configured the InflowSecurity parameter (extracted 
> > >> > > included
> > >> > > underneath) on the server side with the "Signature" item.
> > >> > >
> > >> > > One of our clients is using a C# client. The SOAP 
> request that 
> > >> > > is received from this client contains Timestamp and
> > >> Addressing related
> > >> > > elements. This results in an "WSDoAllReceiver: security
> > >> processing
> > >> > > failed (actions mismatch)" AxisFault.
> > >> > >
> > >> > > Is there a way to "ignore" the Timestamp and 
> Addressing related 
> > >> > > elements on the server ?
> > >> > >
> > >> > > Extract axis2.xml:
> > >> > > 
> > >> > >   
> > >> > > Signature
> > >> > > 
> interopin.properties
> > >> > >
> > >> DirectReference
> > >> > >
> > >> > >
> > >> {Element}{http://schemas.xmlsoap.org/soap/enve
> > >> lope/}Body
> > >> > >   
> > >> > > 
> > >> > >
> > >> > >
> > >> > > Regards, Stefan Lecho.
> > >> > >
> > >> >
> > >> > --
> > >> > View this message in context:
> > >> >
> > >> 
> http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-fro
> > >> m-c
> > >> > lient-tf3882252.html#a11392800 Sent from the Axis - User
> > >> mailing list
> > >> > archive at Nabble.com.
> > >> >
> > >> >
> > >> >
> > >> 
> ---
> > >> --
> > >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> > For additional commands, e-mail: [EMAIL PROTECTED]
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> www.ruchith.org
> > >> www.wso2.org
> > >>
> > >> 
> ---
> > >> -- To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> > >
> > > 
> 
> > > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > --
> > View this message in context: 
> > 
> http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-from-c
> > lient-tf3882252.html#a11521124 Sent from the Axis - User 
> mailing list 
> > archive at Nabble.com.
> >
> >
> > 
> 

Re: [Axis2]How to invoke web service from another

2007-07-10 Thread Sameera Jayasoma

Hi vittal,

You can invoke a Web service from another Web service.

Can you provide some more information regarding this issue. Such as some
code that you have tried.

Regards,
Sameera

--
Sameera Jayasoma
http://sameera-jayasoma.blogspot.com/
http://www.flickr.com/photos/sameera-jayasoma


Re: [Rampart] Ignore Timestamp and Addressing from client

2007-07-10 Thread Ruchith Fernando

Hmm ... this is not possible with Rampart-1.0 style configuration!
(Using configuration parameters). IMHO we must validate all elements
in the wsse:Security header of the incoming message and I don't think
it is correct to let random unknown elements in. We express exactly
what we expect in the security header in the security policy of the
service and the client MUST send exactly as expected by the service.
Otherwise it is the client's problem.

Thanks,
Ruchith

On 7/10/07, stlecho <[EMAIL PROTECTED]> wrote:


I completely agree with you Tony. If the client sends on top of the required
UsernameToken some additional and unwanted information (timestamp,
addressing, ...), Rampart should still be happy that it finds the
UsernameToken information.

Regards, Stefan.


Tony Dean wrote:
>
> As an example suppose you want Rampart to expect and always process a
> UsernameToken.  You would set
> UsernameToken.  However, by default .net
> clients always send a Timestamp.  So even though the .net client sends a
> UsernameToken, a mismatch occurs because it sends a Timestamp as well.  Is
> there a way to configure Rampart to just ignore a Timestamp since it is
> not expected?  I think this is what Stefan is saying also.  Maybe this is
> against ws-security guidelines.  I don't know.  Thanks.
>
>> -Original Message-
>> From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, July 10, 2007 5:37 AM
>> To: axis-user@ws.apache.org
>> Subject: Re: [Rampart] Ignore Timestamp and Addressing from client
>>
>> The actions mismatch error occurs when you configure rampart
>> to expect security actions different to what the incoming
>> message contains. When you configure Rampart to process all
>> security operations performed on the message you will able to
>> get rid of this error.
>>
>> Thanks,
>> Ruchith
>>
>> On 7/2/07, stlecho <[EMAIL PROTECTED]> wrote:
>> >
>> > All,
>> >
>> > Is there a solution or workaround for this issue ?
>> >
>> > Regards, Stefan Lecho.
>> >
>> >
>> > stlecho wrote:
>> > >
>> > > Hi,
>> > >
>> > > I have configured the InflowSecurity parameter (extracted included
>> > > underneath) on the server side with the "Signature" item.
>> > >
>> > > One of our clients is using a C# client. The SOAP request that is
>> > > received from this client contains Timestamp and
>> Addressing related
>> > > elements. This results in an "WSDoAllReceiver: security
>> processing
>> > > failed (actions mismatch)" AxisFault.
>> > >
>> > > Is there a way to "ignore" the Timestamp and Addressing related
>> > > elements on the server ?
>> > >
>> > > Extract axis2.xml:
>> > > 
>> > >   
>> > > Signature
>> > > interopin.properties
>> > >
>> DirectReference
>> > >
>> > >
>> {Element}{http://schemas.xmlsoap.org/soap/enve
>> lope/}Body
>> > >   
>> > > 
>> > >
>> > >
>> > > Regards, Stefan Lecho.
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-from-c
>> > lient-tf3882252.html#a11392800 Sent from the Axis - User
>> mailing list
>> > archive at Nabble.com.
>> >
>> >
>> >
>> -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>>
>> --
>> www.ruchith.org
>> www.wso2.org
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
View this message in context: 
http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-from-client-tf3882252.html#a11521124
Sent from the Axis - User mailing list archive at Nabble.com.


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





--
www.ruchith.org
www.wso2.org

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



Re: [Rampart] Ignore Timestamp and Addressing from client

2007-07-10 Thread Ruchith Fernando

There's no way to ignore the Timestamp if it is sent. In that case you
should update Rampart configuration to expect the timestamp or fix the
to behave correctly according to the policy expressed by the service.

Thanks,
Ruchith

On 7/10/07, Tony Dean <[EMAIL PROTECTED]> wrote:

As an example suppose you want Rampart to expect and always process a UsernameToken.  You would set 
UsernameToken.  However, by default .net 
clients always send a Timestamp.  So even though the .net client sends a UsernameToken, a mismatch 
occurs because it sends a Timestamp as well.  Is there a way to configure Rampart to just ignore a 
Timestamp since it is not expected?  I think this is what Stefan is saying also.  Maybe this is against 
ws-security guidelines.  I don't know.  Thanks.

> -Original Message-
> From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 10, 2007 5:37 AM
> To: axis-user@ws.apache.org
> Subject: Re: [Rampart] Ignore Timestamp and Addressing from client
>
> The actions mismatch error occurs when you configure rampart
> to expect security actions different to what the incoming
> message contains. When you configure Rampart to process all
> security operations performed on the message you will able to
> get rid of this error.
>
> Thanks,
> Ruchith
>
> On 7/2/07, stlecho <[EMAIL PROTECTED]> wrote:
> >
> > All,
> >
> > Is there a solution or workaround for this issue ?
> >
> > Regards, Stefan Lecho.
> >
> >
> > stlecho wrote:
> > >
> > > Hi,
> > >
> > > I have configured the InflowSecurity parameter (extracted included
> > > underneath) on the server side with the "Signature" item.
> > >
> > > One of our clients is using a C# client. The SOAP request that is
> > > received from this client contains Timestamp and
> Addressing related
> > > elements. This results in an "WSDoAllReceiver: security
> processing
> > > failed (actions mismatch)" AxisFault.
> > >
> > > Is there a way to "ignore" the Timestamp and Addressing related
> > > elements on the server ?
> > >
> > > Extract axis2.xml:
> > > 
> > >   
> > > Signature
> > > interopin.properties
> > >
> DirectReference
> > >
> > >
> {Element}{http://schemas.xmlsoap.org/soap/enve
> lope/}Body
> > >   
> > > 
> > >
> > >
> > > Regards, Stefan Lecho.
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-from-c
> > lient-tf3882252.html#a11392800 Sent from the Axis - User
> mailing list
> > archive at Nabble.com.
> >
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> www.ruchith.org
> www.wso2.org
>
> -
> 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]





--
www.ruchith.org
www.wso2.org

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



RE: Is wss4j still an active project? (was: Rampart configuration question)

2007-07-10 Thread Michael.Davis
Thanks!

cheers,
md
 

> -Original Message-
> From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 10, 2007 5:25 AM
> To: axis-user@ws.apache.org
> Subject: Re: Is wss4j still an active project? (was: Rampart
> configuration question)
> 
> 
> Hi,
> 
> On 7/9/07, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I didn't see any replies to the question below, so I 
> started digging through the rampart/wss4j code. I found a 
> workaround that will allow me to hard-code the private key 
> into my client and server, and not have to have absolute 
> paths to key files. This involves making a small change to 
> one of the wss4j classes.
> >
> > I got the wss4j source code and tried to build it. 
> Unfortunately it was build with axis version 1, and I'm using 
> axis2. It's trying to import org.apache.axis packages whereas 
> the new version's package names begin with org.apache.axis2. 
> Moreover, some classes from the old version have moved since 
> the new one. For example, wss4j tries to import 
> org.apache.axix.Message, but there is no such class 
> org.apache.axis2.Message, so I can't just change the package names.
> >
> 
> WSS4J project contains Axis 1.x handlers and we have the Axis jars in
> the lib dir [1]. You can include these in the classpath to fix
> compilation issues.
> 
> WS-Sec* support for Axis2 is available in Apache Rampart[2] and
> Rampart depends on WSS4J.
> 
> And yes WSS4J is still active!
> 
> Thanks,
> Ruchith
> 
> [1] https://svn.apache.org/repos/asf/webservices/wss4j/trunk/lib
> [2] https://svn.apache.org/repos/asf/webservices/rampart/trunk/java
> > Anyway, is wss4j still in active development? It doesn't 
> look like it. Has anyone moved the source to be compatible with axis2?
> >
> > cheers,
> > md
> >
> >
> > > -Original Message-
> > > From: Davis, Michael
> > > Sent: Friday, July 06, 2007 2:28 PM
> > > To: 'axis-user@ws.apache.org'
> > > Subject: Rampart configuration question
> > >
> > >
> > > Hi,
> > >
> > > I'm trying to use Rampart to encrypt my message body using a
> > > symetric secret key.
> > >
> > > Sample 9, included with the Rampart distibution, does just
> > > this. The actual key is hard-coded in a callback function
> > > both on the client and the server. My understanding is that
> > > the key is the only piece of data needed to encode the message.
> > >
> > > I was wondering why this part of the client config file:
> > >
> > > 
> > > Encrypt
> > > client
> > >
> > > EmbeddedKeyName
> > >
> > > org.apache.rampart.samples.sample09.
> > > PWCBHandler
> > > 
> client.properties
> > > SessionKey
> > > 
> > >
> > > contains the encryptionPropFile property. The said property
> > > file contains this:
> > >
> > > org.apache.ws.security.crypto.provider=org.apache.ws.security.
> > > components.crypto.Merlin
> > > org.apache.ws.security.crypto.merlin.keystore.type=jks
> > > org.apache.ws.security.crypto.merlin.keystore.password=apache
> > > org.apache.ws.security.crypto.merlin.file=client.jks
> > >
> > > Now, I can see why we need to configure the provider class.
> > > But why does Rampart need the keystore? I'm not using
> > > public/private keys or certificates, just one secret key.
> > >
> > > The code works, but I'd like to simplify it as much as
> > > possible. The properties and keystore files shouldn't be
> > > necessary, unless I'm misunderstanding something.
> > >
> > > Many thanks
> > > Michael Davis
> > >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> www.ruchith.org
> www.wso2.org
> 
> -
> 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: wss4j and axis2?

2007-07-10 Thread Michael.Davis
Thanks Paul,

Yes, the wss4j code does contain 
org.apache.ws.axis* 
packages, but three classes in wss4j depend on 
org.apache.axis.*
classes.

I just realized that only 3 classes in wss4j depend on the old axis, and the 
code I was running through Rampart didn't use those classes, which is why I 
didn't get the error.

cheers,
md
 

> -Original Message-
> From: Paul Fremantle [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 09, 2007 7:05 PM
> To: axis-user@ws.apache.org
> Subject: Re: wss4j and axis2?
> 
> 
> Michael
> 
> WSS4J really contains the security handling code, based on a DOM view
> of the SOAP messages. Rampart contains the bridging logic from the
> Axis2 module/handler model to that code. And something called DOOM
> (DOM over Axiom) provides the DOM interface to the Axis2 messages.
> 
> Paul
> 
> PS the code in wss4j is org.apache.ws.axis.* which is actually
> something different to org.apache.axis.* AFAIK
> 
> On 7/9/07, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I've been digging around the source code of wss4j (the 
> WS-Security library used by Rampart), and there's something 
> very fundamental I don't understand.
> >
> > As far as I know, I've got the most recent versions of 
> these (axis2 1.2, wss4j 1.5.2). The strange thing is, wss4j 
> seems to use the older axis 1 libraries, with package names 
> like org.apache.axis.*, whereas axis2 has package names like 
> org.apache.axis2.*.
> >
> > I would expect to get a lot of ClassNotFound exceptions, 
> but it seems to work fine. Is there some strange trickery 
> going on, or am I just confused?
> >
> > Thanks
> > Michael Davis
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
> 
> blog: http://pzf.fremantle.org
> [EMAIL PROTECTED]
> 
> "Oxygenating the Web Service Platform", www.wso2.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: Rampart configuration question

2007-07-10 Thread Michael.Davis
Thanks Ruchith,

Sorry everyone for crossposting, but I just now became aware that there is a 
rampart mailing list. I also realize that the source of the problem is in wss4j 
code. So I won't post further replies to the axis list. And for the people on 
the rampart and wss4j lists: should I post replies to both lists? 

Anyway, I did try removing the encryptionPropFile entry, and it threw an 
exception.

org.apache.rampart.handler.WSDoAllHander 
extends 
org.apache.ws.security.handler.WSHandler 
from wss4j, and in that file, at around line 420 is this code:

else if ((crypto = reqData.getSigCrypto()) == null) {
   throw new WSSecurityException(
   "WSHandler: Encryption: no crypto property file");
}

I tried to comment out that code and rebuild wss4j, but some of that library's 
classes depend on axis1, and I'm trying to compile against axis2, so I'm 
running into problems.

cheers,
md
 

> -Original Message-
> From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 10, 2007 5:07 AM
> To: axis-user@ws.apache.org
> Subject: Re: Rampart configuration question
> 
> 
> I agree we should not require the
> "client.properties" entry.
> 
> Can you please try removing it?
> 
> Thanks,
> Ruchith
> 
> On 7/6/07, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm trying to use Rampart to encrypt my message body using 
> a symetric secret key.
> >
> > Sample 9, included with the Rampart distibution, does just 
> this. The actual key is hard-coded in a callback function 
> both on the client and the server. My understanding is that 
> the key is the only piece of data needed to encode the message.
> >
> > I was wondering why this part of the client config file:
> >
> > 
> > Encrypt
> > client
> > 
> EmbeddedKeyName
> > 
> org.apache.rampart.samples.sample09.
> PWCBHandler
> > 
> client.properties
> > SessionKey
> > 
> >
> > contains the encryptionPropFile property. The said property 
> file contains this:
> >
> > 
> org.apache.ws.security.crypto.provider=org.apache.ws.security.
> components.crypto.Merlin
> > org.apache.ws.security.crypto.merlin.keystore.type=jks
> > org.apache.ws.security.crypto.merlin.keystore.password=apache
> > org.apache.ws.security.crypto.merlin.file=client.jks
> >
> > Now, I can see why we need to configure the provider class. 
> But why does Rampart need the keystore? I'm not using 
> public/private keys or certificates, just one secret key.
> >
> > The code works, but I'd like to simplify it as much as 
> possible. The properties and keystore files shouldn't be 
> necessary, unless I'm misunderstanding something.
> >
> > Many thanks
> > Michael Davis
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> www.ruchith.org
> www.wso2.org
> 
> -
> 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: Streaming Soap with Attachments

2007-07-10 Thread Peter Makoi
Hi
This approach is quite new to me, so if you could provide an example
code I would be very grateful
I have always preferred the lazy way of generating client stubs from a
wsdl file 
 thanks 
-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 10, 2007 2:26 PM
To: axis-user@ws.apache.org
Subject: Re: Streaming Soap with Attachments

Hi,
IIRC calling getDataHandler makes Axis2 to read the whole MIME part
corresponding to that DataHandler.. Axis2 MIME parser is a lazy parser
which reads the MIME parts only when needed..It'll read only till the
end of the requested MIME part, but accessing it will cause Axis2 read
the whole message if the requested MIME part is the last part of a
multipart message.

I think the culprit for the time delay you are seeing is the time
which Axis2 takes to read the content of the MIME part.. IMHO you
won't be able to do streaming using the above logic. But you can dig
in to a bit deeper level and use the
MessageContext.getIncomingAttachmentStreams() to access the underlying
raw data streams of the message.. Please make sure to test the
getIncomingAttachmentStreams() a bit before use, as it's one of the
least tested parts in Axis2..
Your scenario seems to use MTOM, but "Accessing the MessageContext"
sub topic in Using SwA with Axis2[1] article would help you to figure
out how to access the message context for a response message..

Also looks like you are using databinding in the client side... Which
data binding mechanism are you using... I'm not sure whether you can
use the getIncomingAttachmentStreams() together with DataBinding.. I
would recommend you to  try out the above using a RawXMLClient...[2]

Thanks,
Thilina

[1] http://wso2.org/library/1148
[2] http://ws.apache.org/axis2/1_2/dii.html


On 7/10/07, Peter Makoi <[EMAIL PROTECTED]> wrote:
> Hi Thilina
> Thanks for replying
> Here is a piece of the client code
> It is a in a unit test case
>
> public class AttachmentsService_ServiceWernerTestCase extends
> junit.framework.TestCase {
> ...
> ...
> }
>
> private class StreamListener extends Thread {
>
> private int time;
> private ByteArrayOutputStream outputStream;
>
> public StreamListener(int time) {
> this.time = time;
> }
>
> public void run() {
> try {
> //Write
> DataHandler[] ret =
> binding.returnStreamingByteArray(time);
>
> assertNotNull("Expected non-null value to be
> returned",ret);
> assertEquals("Expected length of DataHandler array to be 1", 1,
> ret.length);
>
> //Read
> DataHandler handler = ret[0];
>
> InputStream is = handler.getInputStream();
> int value;
> outputStream = new ByteArrayOutputStream();
> try {
> while ((value = is.read()) != -1) {
> outputStream.write(value);
> }
> } finally {
> outputStream.close();
> }
> } catch (Exception e) {
> fail("Unexpected exception: " + e);
> }
> }
>
> public int getNrBytesRead() {
> return outputStream == null ? 0 : outputStream.size();
> }
>
> public byte[] getBytes() {
> return outputStream == null ? new byte[0] :
> outputStream.toByteArray();
> }
> }
>
> public void testAttachmentsServiceReturnStreamingByteArray()
throws
> Exception {
> // Test operation
> long start = System.currentTimeMillis();
>
> StreamListener listener = new StreamListener(1);
> listener.start();
> int nrOfBytesRead = 0;
> int previousNrOfBytesRead = 0;
>
> while (System.currentTimeMillis() < start + 1) {
> Thread.sleep(1000);
> nrOfBytesRead = listener.getNrBytesRead();
> assertTrue("Expected number of bytes read to have
> incremented", nrOfBytesRead > previousNrOfBytesRead);
> previousNrOfBytesRead = nrOfBytesRead;
> }
> listener.join();
>
>   byte[] returnedBytes = listener.getBytes();
>
> assertTrue("Expected streaming to have lasted more than 10 seconds",
> System.currentTimeMillis() - start > 1);
>
>assertTrue("Expected byte array to be filled", returnedBytes.length
>
> 0);
>
> }
>
> -Original Message-
> From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 10, 2007 7:18 AM
> To: axis-user@ws.apache.org
> Subject: Re: Streaming Soap with Attachments
>
> Hi,
> Sorry being late to reply... But better late than never :)..
>
> > But what I got is an overhead equivalent to the time spend to
transmit
> the
> > whole file to the client before the streaming begins(my conclusion
was
> that
> > the data is received in a one-go and because of it's large size it
> take's
> > the processor 

RE: [Rampart] Ignore Timestamp and Addressing from client

2007-07-10 Thread stlecho

I completely agree with you Tony. If the client sends on top of the required
UsernameToken some additional and unwanted information (timestamp,
addressing, ...), Rampart should still be happy that it finds the
UsernameToken information.

Regards, Stefan.


Tony Dean wrote:
> 
> As an example suppose you want Rampart to expect and always process a
> UsernameToken.  You would set
> UsernameToken.  However, by default .net
> clients always send a Timestamp.  So even though the .net client sends a
> UsernameToken, a mismatch occurs because it sends a Timestamp as well.  Is
> there a way to configure Rampart to just ignore a Timestamp since it is
> not expected?  I think this is what Stefan is saying also.  Maybe this is
> against ws-security guidelines.  I don't know.  Thanks.
> 
>> -Original Message-
>> From: Ruchith Fernando [mailto:[EMAIL PROTECTED] 
>> Sent: Tuesday, July 10, 2007 5:37 AM
>> To: axis-user@ws.apache.org
>> Subject: Re: [Rampart] Ignore Timestamp and Addressing from client
>> 
>> The actions mismatch error occurs when you configure rampart 
>> to expect security actions different to what the incoming 
>> message contains. When you configure Rampart to process all 
>> security operations performed on the message you will able to 
>> get rid of this error.
>> 
>> Thanks,
>> Ruchith
>> 
>> On 7/2/07, stlecho <[EMAIL PROTECTED]> wrote:
>> >
>> > All,
>> >
>> > Is there a solution or workaround for this issue ?
>> >
>> > Regards, Stefan Lecho.
>> >
>> >
>> > stlecho wrote:
>> > >
>> > > Hi,
>> > >
>> > > I have configured the InflowSecurity parameter (extracted included
>> > > underneath) on the server side with the "Signature" item.
>> > >
>> > > One of our clients is using a C# client. The SOAP request that is 
>> > > received from this client contains Timestamp and 
>> Addressing related 
>> > > elements. This results in an "WSDoAllReceiver: security 
>> processing 
>> > > failed (actions mismatch)" AxisFault.
>> > >
>> > > Is there a way to "ignore" the Timestamp and Addressing related 
>> > > elements on the server ?
>> > >
>> > > Extract axis2.xml:
>> > > 
>> > >   
>> > > Signature
>> > > interopin.properties
>> > > 
>> DirectReference
>> > >
>> > > 
>> {Element}{http://schemas.xmlsoap.org/soap/enve
>> lope/}Body
>> > >   
>> > > 
>> > >
>> > >
>> > > Regards, Stefan Lecho.
>> > >
>> >
>> > --
>> > View this message in context: 
>> > 
>> http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-from-c
>> > lient-tf3882252.html#a11392800 Sent from the Axis - User 
>> mailing list 
>> > archive at Nabble.com.
>> >
>> >
>> > 
>> -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> 
>> 
>> --
>> www.ruchith.org
>> www.wso2.org
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-from-client-tf3882252.html#a11521124
Sent from the Axis - User mailing list archive at Nabble.com.


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



call Axis2 Ws taking multiple parameters

2007-07-10 Thread zakaria ghandour

Hi,

i use 'invoke' method to call WS(1 parameter input) created in axis2.
this.result = (String)call.invoke( new Object[] { msg } ); 

how to call WS taking 2 parameters using the same method, 

thanks



code client
---
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(uri) );
call.addParameter(new QName("http://www.intalio.com/";, "start"), new
QName("http://www.w3.org/2001/XMLSchema";, "string"), String.class,
ParameterMode.IN);
call.setOperationName(method);
call.setOperationStyle(org.apache.axis.constants.Style.DOCUMENT);
call.setOperationUse(org.apache.axis.constants.Use.LITERAL);
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
this.result = (String)call.invoke( new Object[] { msg } ); 

-- 
View this message in context: 
http://www.nabble.com/call-Axis2--Ws-taking-multiple-parameters-tf4055873.html#a11520978
Sent from the Axis - User mailing list archive at Nabble.com.


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



Axis2: RESTful implementation with Axis2

2007-07-10 Thread riis

Hi,

I have some questions regarding implementing a RESTfull service. After
reading a lot of previous RESTish threads I got quite confused.
So I hope someone can help me straightened it out.

If I want to create a RESTful service with Axis2 would it then require that
the service is implemented as RPC, or can other message receivers be used?


Is it possible to create a RESTful service with Axis2 that can be reached
in the following way:
http://www.boeing.com/rest/aircraft/747
instead of
http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747


First i actually thought that a RESTful service should implement some sort
of interface with methods corresponding to GET, POST, PUT & DELETE.
But I read in some of the other threads that a RESTful service should only
have one method. Isn't that a problem if you try to accomplice the syntax
that the following articles describes.

http://www.innoq.com/blog/st/2006/06/30/rest_vs_soap_oh_no_not_again.html
http://www.xfront.com/REST-Web-Services.html

Where the same url has different functionality depending on how it is
called (GET, POST).
GET   /order/{id} Get order details
POST  /order/{id} Add item

Regards
Multi-Support A/S

Torben Riis

Phone +45 96 600 600, Fax +45 96 600 601
E-mail: [EMAIL PROTECTED]
http://www.multi-support.com


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



Re: Streaming Soap with Attachments

2007-07-10 Thread Thilina Gunarathne

Hi,
IIRC calling getDataHandler makes Axis2 to read the whole MIME part
corresponding to that DataHandler.. Axis2 MIME parser is a lazy parser
which reads the MIME parts only when needed..It'll read only till the
end of the requested MIME part, but accessing it will cause Axis2 read
the whole message if the requested MIME part is the last part of a
multipart message.

I think the culprit for the time delay you are seeing is the time
which Axis2 takes to read the content of the MIME part.. IMHO you
won't be able to do streaming using the above logic. But you can dig
in to a bit deeper level and use the
MessageContext.getIncomingAttachmentStreams() to access the underlying
raw data streams of the message.. Please make sure to test the
getIncomingAttachmentStreams() a bit before use, as it's one of the
least tested parts in Axis2..
Your scenario seems to use MTOM, but "Accessing the MessageContext"
sub topic in Using SwA with Axis2[1] article would help you to figure
out how to access the message context for a response message..

Also looks like you are using databinding in the client side... Which
data binding mechanism are you using... I'm not sure whether you can
use the getIncomingAttachmentStreams() together with DataBinding.. I
would recommend you to  try out the above using a RawXMLClient...[2]

Thanks,
Thilina

[1] http://wso2.org/library/1148
[2] http://ws.apache.org/axis2/1_2/dii.html


On 7/10/07, Peter Makoi <[EMAIL PROTECTED]> wrote:

Hi Thilina
Thanks for replying
Here is a piece of the client code
It is a in a unit test case

public class AttachmentsService_ServiceWernerTestCase extends
junit.framework.TestCase {
...
...
}

private class StreamListener extends Thread {

private int time;
private ByteArrayOutputStream outputStream;

public StreamListener(int time) {
this.time = time;
}

public void run() {
try {
//Write
DataHandler[] ret =
binding.returnStreamingByteArray(time);

assertNotNull("Expected non-null value to be
returned",ret);
assertEquals("Expected length of DataHandler array to be 1", 1,
ret.length);

//Read
DataHandler handler = ret[0];

InputStream is = handler.getInputStream();
int value;
outputStream = new ByteArrayOutputStream();
try {
while ((value = is.read()) != -1) {
outputStream.write(value);
}
} finally {
outputStream.close();
}
} catch (Exception e) {
fail("Unexpected exception: " + e);
}
}

public int getNrBytesRead() {
return outputStream == null ? 0 : outputStream.size();
}

public byte[] getBytes() {
return outputStream == null ? new byte[0] :
outputStream.toByteArray();
}
}

public void testAttachmentsServiceReturnStreamingByteArray() throws
Exception {
// Test operation
long start = System.currentTimeMillis();

StreamListener listener = new StreamListener(1);
listener.start();
int nrOfBytesRead = 0;
int previousNrOfBytesRead = 0;

while (System.currentTimeMillis() < start + 1) {
Thread.sleep(1000);
nrOfBytesRead = listener.getNrBytesRead();
assertTrue("Expected number of bytes read to have
incremented", nrOfBytesRead > previousNrOfBytesRead);
previousNrOfBytesRead = nrOfBytesRead;
}
listener.join();

  byte[] returnedBytes = listener.getBytes();

assertTrue("Expected streaming to have lasted more than 10 seconds",
System.currentTimeMillis() - start > 1);

   assertTrue("Expected byte array to be filled", returnedBytes.length >
0);

}

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2007 7:18 AM
To: axis-user@ws.apache.org
Subject: Re: Streaming Soap with Attachments

Hi,
Sorry being late to reply... But better late than never :)..

> But what I got is an overhead equivalent to the time spend to transmit
the
> whole file to the client before the streaming begins(my conclusion was
that
> the data is received in a one-go and because of it's large size it
take's
> the processor sometime to allocate some memory space to save it before
the
> streaming even begins) Does anyone have any explanation? Thanks in
>advance
Are you using Axis2 file caching on the client side.. It would be
great if you can post us your client (receiving) side code..
With Axis2 you also have the ability to directly grab the incoming
stream for your use..

Thanks,
Thilina

--
Thilina Gunarathne  -  http://www.wso2.com -
http://thilinag.blogspot.com

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

RE: [Rampart] Ignore Timestamp and Addressing from client

2007-07-10 Thread Tony Dean
As an example suppose you want Rampart to expect and always process a 
UsernameToken.  You would set UsernameToken.  
However, by default .net clients always send a Timestamp.  So even though the 
.net client sends a UsernameToken, a mismatch occurs because it sends a 
Timestamp as well.  Is there a way to configure Rampart to just ignore a 
Timestamp since it is not expected?  I think this is what Stefan is saying 
also.  Maybe this is against ws-security guidelines.  I don't know.  Thanks.

> -Original Message-
> From: Ruchith Fernando [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 10, 2007 5:37 AM
> To: axis-user@ws.apache.org
> Subject: Re: [Rampart] Ignore Timestamp and Addressing from client
> 
> The actions mismatch error occurs when you configure rampart 
> to expect security actions different to what the incoming 
> message contains. When you configure Rampart to process all 
> security operations performed on the message you will able to 
> get rid of this error.
> 
> Thanks,
> Ruchith
> 
> On 7/2/07, stlecho <[EMAIL PROTECTED]> wrote:
> >
> > All,
> >
> > Is there a solution or workaround for this issue ?
> >
> > Regards, Stefan Lecho.
> >
> >
> > stlecho wrote:
> > >
> > > Hi,
> > >
> > > I have configured the InflowSecurity parameter (extracted included
> > > underneath) on the server side with the "Signature" item.
> > >
> > > One of our clients is using a C# client. The SOAP request that is 
> > > received from this client contains Timestamp and 
> Addressing related 
> > > elements. This results in an "WSDoAllReceiver: security 
> processing 
> > > failed (actions mismatch)" AxisFault.
> > >
> > > Is there a way to "ignore" the Timestamp and Addressing related 
> > > elements on the server ?
> > >
> > > Extract axis2.xml:
> > > 
> > >   
> > > Signature
> > > interopin.properties
> > > 
> DirectReference
> > >
> > > 
> {Element}{http://schemas.xmlsoap.org/soap/enve
> lope/}Body
> > >   
> > > 
> > >
> > >
> > > Regards, Stefan Lecho.
> > >
> >
> > --
> > View this message in context: 
> > 
> http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-from-c
> > lient-tf3882252.html#a11392800 Sent from the Axis - User 
> mailing list 
> > archive at Nabble.com.
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> www.ruchith.org
> www.wso2.org
> 
> -
> 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] How to forward a SOAP message

2007-07-10 Thread Asankha C. Perera




Michele

I meant it in terms of enforcing hard modularity. You would not want
your firewall to go down because your FTP server crashed right?
Similarly you may not want to compromise your ESB that handles [all of]
your enterprise traffic in the same VM as your service implementations
- as a badly written or compromised service could crash or render the
VM useless or kill the entire process.

asankha

Michele Mazzucco wrote:

  Asankha,

could you explain me why? Don't services run in isolation?

Michele

On Tue, 2007-07-10 at 09:39 +0530, Asankha C. Perera wrote:
  
  
It would be a better implementation to keep your intermediary running
on a separate VM/process if you are using an instance of Axis2 to host
"other" service implementations for your clients at B anyway.

  
  

-
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]How to invoke web service from another

2007-07-10 Thread vittal nangunoori
hi All,
Please let me know how to invoke web service from
another service.
I have client stub generated using wsdl2java for the
first service.
I have written second web service and trying to invoke
the first web service using generated client stub.
I am getting exception in main
AxisFault exception.
I unable to trace back and debug the exception.

Advance thanks for the help.

Vittal



  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

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



Timeout Request Problem

2007-07-10 Thread Sez Sez
Hi people!

I am working with Axis 1.3. I am testing timeouts with my project.

I tried to send a request to unknow Ip. Axis response timeout correct, in 30 
seconds. I defined setTimeout(3); in the Stub Class.

But, I write a small server, that read all request and it doesn't response 
never. I run my application with axis, and the timeout was 10 minutes!

Where can I change this request timeout???

Thanks!
Sergi





__ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

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



Axis2.war service deployment issues

2007-07-10 Thread Fatima
Hi

I am new to web services, I have installed tomcat6.0.13 and axis2 1.2
(war) on my fedora machine. They both pass the validation test. But when
I try to run the version service for axis2, i get the following error

"This XML file does not appear to have any style information
associated with it. The document tree is shown below. "


The paths are set correctly for axis2 and tomcat. Can anyone please let
me know what I could be doing wrong.


Thanks



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



Re: [Rampart] Ignore Timestamp and Addressing from client

2007-07-10 Thread Ruchith Fernando

The actions mismatch error occurs when you configure rampart to expect
security actions different to what the incoming message contains. When
you configure Rampart to process all security operations performed on
the message you will able to get rid of this error.

Thanks,
Ruchith

On 7/2/07, stlecho <[EMAIL PROTECTED]> wrote:


All,

Is there a solution or workaround for this issue ?

Regards, Stefan Lecho.


stlecho wrote:
>
> Hi,
>
> I have configured the InflowSecurity parameter (extracted included
> underneath) on the server side with the "Signature" item.
>
> One of our clients is using a C# client. The SOAP request that is received
> from this client contains Timestamp and Addressing related elements. This
> results in an "WSDoAllReceiver: security processing failed (actions
> mismatch)" AxisFault.
>
> Is there a way to "ignore" the Timestamp and Addressing related elements
> on the server ?
>
> Extract axis2.xml:
> 
>   
> Signature
> interopin.properties
> DirectReference
>
> 
{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body
>   
> 
>
>
> Regards, Stefan Lecho.
>

--
View this message in context: 
http://www.nabble.com/-Rampart--Ignore-Timestamp-and-Addressing-from-client-tf3882252.html#a11392800
Sent from the Axis - User mailing list archive at Nabble.com.


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





--
www.ruchith.org
www.wso2.org

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



Re: Is wss4j still an active project? (was: Rampart configuration question)

2007-07-10 Thread Ruchith Fernando

Hi,

On 7/9/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

Hi,

I didn't see any replies to the question below, so I started digging through 
the rampart/wss4j code. I found a workaround that will allow me to hard-code 
the private key into my client and server, and not have to have absolute paths 
to key files. This involves making a small change to one of the wss4j classes.

I got the wss4j source code and tried to build it. Unfortunately it was build 
with axis version 1, and I'm using axis2. It's trying to import org.apache.axis 
packages whereas the new version's package names begin with org.apache.axis2. 
Moreover, some classes from the old version have moved since the new one. For 
example, wss4j tries to import org.apache.axix.Message, but there is no such 
class org.apache.axis2.Message, so I can't just change the package names.



WSS4J project contains Axis 1.x handlers and we have the Axis jars in
the lib dir [1]. You can include these in the classpath to fix
compilation issues.

WS-Sec* support for Axis2 is available in Apache Rampart[2] and
Rampart depends on WSS4J.

And yes WSS4J is still active!

Thanks,
Ruchith

[1] https://svn.apache.org/repos/asf/webservices/wss4j/trunk/lib
[2] https://svn.apache.org/repos/asf/webservices/rampart/trunk/java

Anyway, is wss4j still in active development? It doesn't look like it. Has 
anyone moved the source to be compatible with axis2?

cheers,
md


> -Original Message-
> From: Davis, Michael
> Sent: Friday, July 06, 2007 2:28 PM
> To: 'axis-user@ws.apache.org'
> Subject: Rampart configuration question
>
>
> Hi,
>
> I'm trying to use Rampart to encrypt my message body using a
> symetric secret key.
>
> Sample 9, included with the Rampart distibution, does just
> this. The actual key is hard-coded in a callback function
> both on the client and the server. My understanding is that
> the key is the only piece of data needed to encode the message.
>
> I was wondering why this part of the client config file:
>
> 
> Encrypt
> client
>
> EmbeddedKeyName
>
> org.apache.rampart.samples.sample09.
> PWCBHandler
> client.properties
> SessionKey
> 
>
> contains the encryptionPropFile property. The said property
> file contains this:
>
> org.apache.ws.security.crypto.provider=org.apache.ws.security.
> components.crypto.Merlin
> org.apache.ws.security.crypto.merlin.keystore.type=jks
> org.apache.ws.security.crypto.merlin.keystore.password=apache
> org.apache.ws.security.crypto.merlin.file=client.jks
>
> Now, I can see why we need to configure the provider class.
> But why does Rampart need the keystore? I'm not using
> public/private keys or certificates, just one secret key.
>
> The code works, but I'd like to simplify it as much as
> possible. The properties and keystore files shouldn't be
> necessary, unless I'm misunderstanding something.
>
> Many thanks
> Michael Davis
>

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





--
www.ruchith.org
www.wso2.org

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



Re: Rampart configuration question

2007-07-10 Thread Ruchith Fernando

I agree we should not require the
"client.properties" entry.

Can you please try removing it?

Thanks,
Ruchith

On 7/6/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

Hi,

I'm trying to use Rampart to encrypt my message body using a symetric secret 
key.

Sample 9, included with the Rampart distibution, does just this. The actual key 
is hard-coded in a callback function both on the client and the server. My 
understanding is that the key is the only piece of data needed to encode the 
message.

I was wondering why this part of the client config file:


Encrypt
client
EmbeddedKeyName

org.apache.rampart.samples.sample09.PWCBHandler
client.properties
SessionKey


contains the encryptionPropFile property. The said property file contains this:

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=apache
org.apache.ws.security.crypto.merlin.file=client.jks

Now, I can see why we need to configure the provider class. But why does 
Rampart need the keystore? I'm not using public/private keys or certificates, 
just one secret key.

The code works, but I'd like to simplify it as much as possible. The properties 
and keystore files shouldn't be necessary, unless I'm misunderstanding 
something.

Many thanks
Michael Davis

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





--
www.ruchith.org
www.wso2.org

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



Re: [Axis2] How to forward a SOAP message

2007-07-10 Thread Michele Mazzucco
Asankha,

could you explain me why? Don't services run in isolation?

Michele

On Tue, 2007-07-10 at 09:39 +0530, Asankha C. Perera wrote:
> It would be a better implementation to keep your intermediary running
> on a separate VM/process if you are using an instance of Axis2 to host
> "other" service implementations for your clients at B anyway.


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



Re: Axis 1.4 WSDL4J wrong arguments sequence in generated classes

2007-07-10 Thread Alexey Zavizionov

Looks like a bug in axis1 1.4

The class MimeResponse generated correctly with attribute
"ccppProfileWarning" as last parameter in constructor, but
MarkupContext generated wrong, IMHO, because MarkupContext call super
constructor with first (should be last) parameter "ccppProfileWarning"

Any approvement from axis team?

Regards,
Alexey

On 7/9/07, Max Shaposhnik <[EMAIL PROTECTED]> wrote:


Hello,
trying to use Axis 1.4 for implementing some web service, but
got compile error as follows:

part of wsdl schema:
~~
  

  
  
  
  
  
  
  
  


  
  

  

  

  

  

  
  




Output code ( look for super() constructor ):


public class MarkupContext  extends
org.mycompany.services.wsrp.type.MimeResponse  implements
java.io.Serializable {
private java.lang.String preferredTitle;

public MarkupContext() {
}

public MarkupContext(
   java.lang.String ccppProfileWarning,
   java.lang.Boolean useCachedItem,
   java.lang.String mimeType,
   java.lang.String itemString,
   byte[] itemBinary,
   java.lang.String locale,
   java.lang.Boolean requiresRewriting,
   org.exoplatform.services.wsrp.type.CacheControl cacheControl,
   org.exoplatform.services.wsrp.type.Extension[] extensions,
   java.lang.String preferredTitle) {
super(
ccppProfileWarning,
useCachedItem,
mimeType,
itemString,
itemBinary,
locale,
requiresRewriting,
cacheControl,
extensions);
this.preferredTitle = preferredTitle;
}



and  here is MimeResponse constructor:

 public MimeResponse(
   java.lang.Boolean useCachedItem,
   java.lang.String mimeType,
   java.lang.String itemString,
   byte[] itemBinary,
   java.lang.String locale,
   java.lang.Boolean requiresRewriting,
   org.exoplatform.services.wsrp.type.CacheControl cacheControl,
   org.exoplatform.services.wsrp.type.Extension[] extensions,
   java.lang.String ccppProfileWarning) {
   this.useCachedItem = useCachedItem;
   this.mimeType = mimeType;
   this.itemString = itemString;
   this.itemBinary = itemBinary;
   this.locale = locale;
   this.requiresRewriting = requiresRewriting;
   this.cacheControl = cacheControl;
   this.extensions = extensions;
   this.ccppProfileWarning = ccppProfileWarning;
}



As you can see,  the sequence of arguments is not match. Is it inheritance
problem?
Tnx for any suggestions.


--
View this message in context: 
http://www.nabble.com/Axis-1.4-WSDL4J-wrong-arguments-sequence-in-generated-classes-tf4049803.html#a11503152
Sent from the Axis - User mailing list archive at Nabble.com.


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




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



[Axis2] Session "destroy(ServiceContext srvCtx)"-Method never called

2007-07-10 Thread Oliver Hirschi

Hi there

I have a axis2-webservice implemented which has as scope 
"transportsession". In my service-class I have defined the 
"intit(ServiceContext serviceContext)" and the "destroy(ServiceContext 
serviceContext)" method. The init-Method is called well, if a session 
is generated, but the destroy-Method is never be called!?!?


The sessin-timeout of tomcat is set to 1 minute. So if a client calls 
the service, the init-method is invoked. If the service is called again 
within one minute, the init-Method is not called again, but if the 
service is called after longer than a minute, the init-Method is called 
again...So, I think session-timout and service-initialization is 
running well.
But why is the destroy-Method never be called? In my opinion, the 
destroy-method should be called automatically after the session-timeout 
for each session


Great thanks& Kind Regards,
--
Oliver Hirschi
http://www.FamilyHirschi.ch 




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



RE: Streaming Soap with Attachments

2007-07-10 Thread Peter Makoi
Hi Thilina
Thanks for replying
Here is a piece of the client code
It is a in a unit test case 

public class AttachmentsService_ServiceWernerTestCase extends
junit.framework.TestCase {
...
...
}

private class StreamListener extends Thread {

private int time;
private ByteArrayOutputStream outputStream;

public StreamListener(int time) {
this.time = time;
}

public void run() {
try {
//Write
DataHandler[] ret =
binding.returnStreamingByteArray(time);

assertNotNull("Expected non-null value to be
returned",ret);
assertEquals("Expected length of DataHandler array to be 1", 1,
ret.length);

//Read
DataHandler handler = ret[0];

InputStream is = handler.getInputStream();
int value;
outputStream = new ByteArrayOutputStream();
try {
while ((value = is.read()) != -1) {
outputStream.write(value);
}
} finally {
outputStream.close();
}
} catch (Exception e) {
fail("Unexpected exception: " + e);
}
}

public int getNrBytesRead() {
return outputStream == null ? 0 : outputStream.size();
}

public byte[] getBytes() {
return outputStream == null ? new byte[0] :
outputStream.toByteArray();
}
}

public void testAttachmentsServiceReturnStreamingByteArray() throws
Exception {
// Test operation
long start = System.currentTimeMillis();

StreamListener listener = new StreamListener(1);
listener.start();
int nrOfBytesRead = 0;
int previousNrOfBytesRead = 0;

while (System.currentTimeMillis() < start + 1) {
Thread.sleep(1000);
nrOfBytesRead = listener.getNrBytesRead();
assertTrue("Expected number of bytes read to have
incremented", nrOfBytesRead > previousNrOfBytesRead);
previousNrOfBytesRead = nrOfBytesRead;
}
listener.join();

  byte[] returnedBytes = listener.getBytes();

assertTrue("Expected streaming to have lasted more than 10 seconds",
System.currentTimeMillis() - start > 1);

   assertTrue("Expected byte array to be filled", returnedBytes.length >
0);

}

-Original Message-
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 10, 2007 7:18 AM
To: axis-user@ws.apache.org
Subject: Re: Streaming Soap with Attachments

Hi,
Sorry being late to reply... But better late than never :)..

> But what I got is an overhead equivalent to the time spend to transmit
the
> whole file to the client before the streaming begins(my conclusion was
that
> the data is received in a one-go and because of it's large size it
take's
> the processor sometime to allocate some memory space to save it before
the
> streaming even begins) Does anyone have any explanation? Thanks in
>advance
Are you using Axis2 file caching on the client side.. It would be
great if you can post us your client (receiving) side code..
With Axis2 you also have the ability to directly grab the incoming
stream for your use..

Thanks,
Thilina

-- 
Thilina Gunarathne  -  http://www.wso2.com -
http://thilinag.blogspot.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]