Re: [Axis2] Abstract types and ADB

2009-12-11 Thread Jens Rutschmann

Amila Suriarachchi wrote on 11.12.2009 07:34:

use -g option to generate inherited classes.

to other problem it seems to be a bug with Axis2. so either
1. try without -uw option
2. try with a build from the current trunk.


Thanks, that did the trick. I think the help text for the -g switch is a bit 
misleading:

Generates all the classes. Valid only with -ss.
I thought it is only required when creating server side classes.

For the problem with the syntax errors the -uw switch was to blame. Without 
unwrapping it works. Is that a bug?


I will try axis2 from trunk later, as unwrapping is quite comfortable :-)

Thanks and best regards,
Jens



thanks,
Amila.


On Thu, Dec 10, 2009 at 8:21 PM, Jens Rutschmann
jens.rutschm...@gmx.infowrote:


Hi all,

currently I'm trying to generate a client stub for this WSDL:

https://hosted.datascopeapi.reuters.com/datascopeapi/v1/extractionservice.asmx?wsdl

The SOAP 1.2 Binding in this WSDL seems to contain a few errors, so I
removed it and the respective port before calling wsdl2java. The WSDL still
contains a valid SOAP 1.1 binding as well as a port using it.

I'm using axis2 1.5.1 and use the following command line:

jens:~/tmpfs /home/jens/tools/axis2-1.5.1/bin/wsdl2java.sh -uw -u -uri
extractionservice.wsdl
 Using AXIS2_HOME:   /home/jens/tools/axis2-1.5.1
 Using JAVA_HOME:   /home/jens/.gentoo/java-config-2/current-user-vm
Retrieving document at 'extractionservice.wsdl'.
[WARN] Type {
http://reuters.com/datascopeselect/ExtractionService/v1/}anyTypehttp://reuters.com/datascopeselect/ExtractionService/v1/%7DanyTypemissing!
jens:~/tmpfs


After that there are only classes for the abstract types, but not for the
complex types inheriting from the abstract types.

Example (from the WSDL, lines 680-695):
 s:complexType name=InstrumentSearchRequest abstract=true
   s:sequence
 s:element minOccurs=0 maxOccurs=1
name=PreferredIdentifierType type=s:string /
   /s:sequence
 /s:complexType
 s:complexType name=InstrumentSearchRequestAll
   s:complexContent mixed=false
 s:extension base=tns:InstrumentSearchRequest
   s:sequence
 s:element minOccurs=0 maxOccurs=1
name=IdentifierSearchValue type=s:string /
 s:element minOccurs=0 maxOccurs=1 name=IdentifierType
type=s:string /
 s:element minOccurs=0 maxOccurs=1 name=InstrumentTypes
type=tns:ArrayOfString /
   /s:sequence
 /s:extension
   /s:complexContent
 /s:complexType

wsdl2java only generated a class for InstrumentSearchRequest but not for
InstrumentSearchRequestAll.

Furthermore the generated stub interface contains errors:
(ExtractionService.java, lines 29-32)

public
com.reuters.datascopeselect.extractionservice.v1.ArrayOfValueInfo
getInstrumentTypes(


,com.reuters.datascopeselect.extractionservice.v1.CredentialsHeaderE
credentialsHeader44)
   throws java.rmi.RemoteException

Obviously that won't compile.


Is there anything i can do to create a functional client stub for that
service using axis2 ?

Thanks a lot in advance,
Jens









[Axis2] Abstract types and ADB

2009-12-10 Thread Jens Rutschmann

Hi all,

currently I'm trying to generate a client stub for this WSDL:
https://hosted.datascopeapi.reuters.com/datascopeapi/v1/extractionservice.asmx?wsdl

The SOAP 1.2 Binding in this WSDL seems to contain a few errors, so I removed it 
and the respective port before calling wsdl2java. The WSDL still contains a 
valid SOAP 1.1 binding as well as a port using it.


I'm using axis2 1.5.1 and use the following command line:

jens:~/tmpfs /home/jens/tools/axis2-1.5.1/bin/wsdl2java.sh -uw -u -uri 
extractionservice.wsdl

 Using AXIS2_HOME:   /home/jens/tools/axis2-1.5.1
 Using JAVA_HOME:   /home/jens/.gentoo/java-config-2/current-user-vm
Retrieving document at 'extractionservice.wsdl'.
[WARN] Type {http://reuters.com/datascopeselect/ExtractionService/v1/}anyType 
missing!

jens:~/tmpfs


After that there are only classes for the abstract types, but not for the 
complex types inheriting from the abstract types.


Example (from the WSDL, lines 680-695):
  s:complexType name=InstrumentSearchRequest abstract=true
s:sequence
  s:element minOccurs=0 maxOccurs=1 name=PreferredIdentifierType 
type=s:string /

/s:sequence
  /s:complexType
  s:complexType name=InstrumentSearchRequestAll
s:complexContent mixed=false
  s:extension base=tns:InstrumentSearchRequest
s:sequence
  s:element minOccurs=0 maxOccurs=1 
name=IdentifierSearchValue type=s:string /
  s:element minOccurs=0 maxOccurs=1 name=IdentifierType 
type=s:string /
  s:element minOccurs=0 maxOccurs=1 name=InstrumentTypes 
type=tns:ArrayOfString /

/s:sequence
  /s:extension
/s:complexContent
  /s:complexType

wsdl2java only generated a class for InstrumentSearchRequest but not for 
InstrumentSearchRequestAll.


Furthermore the generated stub interface contains errors:
(ExtractionService.java, lines 29-32)

 public 
com.reuters.datascopeselect.extractionservice.v1.ArrayOfValueInfo 
getInstrumentTypes(



,com.reuters.datascopeselect.extractionservice.v1.CredentialsHeaderE 
credentialsHeader44)

throws java.rmi.RemoteException

Obviously that won't compile.


Is there anything i can do to create a functional client stub for that service 
using axis2 ?


Thanks a lot in advance,
Jens



How to create an asynchronous in-out operation with WS-Addressing

2009-07-08 Thread Jens Rutschmann

Hi all,

I'd like to create a WebService using axis with asynchronous operations that 
have an output. I already read some documentation about asynchronous WS in Axis 
but I still don't know to which extent axis supports users there.


Currently I'm following the top-down approach, modeling the WSDL in Eclipse, 
then creating the server skeleton using wsdl2java.


The client of the service will be the Apache ODE Workflow Engine, which should 
provide an EPR when calling WS asynchronously.


For asynchronous operations I think there are two possibilities:

1. Create an in-only operation, as well as a second in-only operation in another 
WSDL, which represents the return path of the first operation's out message.


2. Create an in-out operation using an asynchronous message receiver in 
service.xml.


Is it even possible to provide an in-out operation that can be called either 
synchronous or asynchronous (without providing two version in the WSDL), 
depending on the client supplying an EPR or not?


Best regards,
Jens


POJO deployment and faults

2009-06-25 Thread Jens Rutschmann

Hi all,

currently I'm using POJO deployment with a single service class.
I'd like the generated WSDL to contain proper fault definitions, but when I'm 
using classes like the following then the WSDL contains far too much type 
definitions for all sort of Axis-internal classes.


Service class:
public class WSTest {
public void moveFile(String src, String dst) throws IOFault {
throw new IOFault(Error occurred when moving file.);
}
}

IOFault class:
public class IOFault extends org.apache.axis2.AxisFault {
public IOFault(String message) {
super(message);
super.setFaultCode(Fault code); // for testing
super.setFaultType(15);
}
}

service.xml:
service name=Test-WS
messageReceiver=org.apache.axis2.rpc.receivers.RPCMessageReceiver
descriptionTest-WS/description
parameter name=ServiceClass locked=false
test.WSTest
/parameter
operation name=moveFile
messageReceiver
class=org.apache.axis2.rpc.receivers.RPCMessageReceiver 
/
/operation
/service


The generated class now contains a *lot* of schema types for ContextManager, 
TransactionConfiguration, ThreadFactory and other axis classes.



Is it possible to use faults like in the faulthandling sample but with pojo 
deployment and a bottom-up approach (i.e. manually created fault classes and 
auto-generated WSDL)?


Or would the proper approach be top-down in this case? I.e. create the WSDL with 
at least the faults and then create Java classes of those using wsdl2java.


Best regards,
Jens


Re: Axis2: map generic method to multiple operations in service.xml

2009-06-18 Thread Jens Rutschmann

Caristi, Joe wrote on 17.06.2009 22:47:
You might be pleasantly surprised by Synapse.  With just a small amount of XML you could get the forwarding accomplished.  It also supports script languages right in the configuration, so you could do your pre-processing as well. 


Thanks for the pointer, I'll have a look at it!

Best regards,
Jens


Axis2: map generic method to multiple operations in service.xml

2009-06-17 Thread Jens Rutschmann

Hi all,

I'm looking for a way to reuse a generic java method for multiple web service 
operations. The reason for this is that I need to create a component that 
forwards the client's request to another web service. Since the additional steps 
this component needs to do are always the same I'd like to use a single generic 
implementation using AXIOM.


In service.xml when defining an operation I can only specify the name of 
existing methods in the service class. Is there any way to map an arbitrary name 
to a single method multiple times?


I'd like to avoid creating new classes with stub methods that call the generic 
method since that would mean compiling and deploying of new code at runtime.



Best regards any many thanks in advance,
Jens


Re: Axis2: map generic method to multiple operations in service.xml

2009-06-17 Thread Jens Rutschmann

Deepal Jayasinghe wrote on 17.06.2009 16:43:

You could do something like below, where you can add a number of
action mapping for the operation and client can send the different
action based on the call. And then at the service you can get the
action that client sends (from the msgctx), and then I hope you can do
the rest based on the action.


Thanks for you answer!

I forgot to mention something in my last email. I planning to create a custom 
deployer that creates new operations based on the operations defined in the WSDL 
of the actual server (the one my component forwards to). I need to add a 
parameter for correlation to the already existing parameters.


The bottom line is that the parameters of these methods are not always the same 
and by replacing the structured parameters with some sort of generic xml string 
parameter I'd loose type safety etc.


So I guess I won't be able to solve this by only evaluating the action value.

On second thought, perhaps I won't need the service.xml at all when using a 
custom deployer. I'm only starting to find my way through the axis internals so 
my ideas may sound weird


I'd also appreciate comments on the idea with the deployer :-)


On Wed, Jun 17, 2009 at 10:34 AM, Jens
Rutschmannjens.rutschm...@gmx.info wrote:

Hi all,

I'm looking for a way to reuse a generic java method for multiple web
service operations. The reason for this is that I need to create a component
that forwards the client's request to another web service. Since the
additional steps this component needs to do are always the same I'd like to
use a single generic implementation using AXIOM.

In service.xml when defining an operation I can only specify the name of
existing methods in the service class. Is there any way to map an arbitrary
name to a single method multiple times?

I'd like to avoid creating new classes with stub methods that call the
generic method since that would mean compiling and deploying of new code at
runtime.


Best regards any many thanks in advance,
Jens





Re: Axis2: map generic method to multiple operations in service.xml

2009-06-17 Thread Jens Rutschmann

Caristi, Joe schrieb am 17.06.2009 21:33:

You need: a component that forwards the client's request to another web 
service

This sounds like an Enterprise Service Bus!  Check out Apache Synapse -

http://synapse.apache.org/


Thanks for your response.

I think an ESB is a bit too much and bit too little in my case :-)

I don't need as much capabilities as an ESB provides but I do need some custom 
code inside the forwarding component which is run before forwarding the request.


Implementing this inside an ESB is probably more effort than implementing it 
using Axis and I don't need the additional capabilities of an ESB in this 
specific case.


Best regards,
Jens




-Original Message-
From: Jens Rutschmann [mailto:jens.rutschm...@gmx.info]
Sent: Wednesday, June 17, 2009 10:35 AM
To: axis-user@ws.apache.org
Subject: Axis2: map generic method to multiple operations in service.xml

Hi all,

I'm looking for a way to reuse a generic java method for multiple web service
operations. The reason for this is that I need to create a component that
forwards the client's request to another web service. Since the additional steps
this component needs to do are always the same I'd like to use a single generic
implementation using AXIOM.

In service.xml when defining an operation I can only specify the name of
existing methods in the service class. Is there any way to map an arbitrary name
to a single method multiple times?

I'd like to avoid creating new classes with stub methods that call the generic
method since that would mean compiling and deploying of new code at runtime.


Best regards any many thanks in advance,
Jens

STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at g...@whisolutions.com,
and destroy all copies of this message and any attachments.