RE: Beanserializers and Namespaces (Axis1 1.3)

2006-07-07 Thread Jansen Werner



Hallo there, 
 
there is another option, I think. If I understood this thing right, you 
can add something like a descriptor for your Bean to the BeanSerializer. Within 
this descriptor, you can map properties to different names for XML tags and so 
on. And there's a property fiddling with namespaces. So perhaps you can manually 
assign the namespace to every property. But this solution would be very ugly as 
well. Why would I use a BeanSerializer if I have to map properties by myself, 
just to correct a (in my eyes) stupid behaviour concerning namespaces? Custom 
type mapping isn't more complex than this ...
 
But like you said, I as well don't give up hope that Axis isn't this 
primitive. :)
 
Werner

  
  
  From: Chris List [mailto:[EMAIL PROTECTED] 
  Sent: Friday, July 07, 2006 2:44 AMTo: 
  axis-user@ws.apache.orgSubject: Re: Beanserializers and Namespaces 
  (Axis1 1.3)
  I'd like the answer to this one as well.  So far I have come 
  up with two options that I don't like so much.  I am hoping Axis isn't 
  this primitive...1) Tweak the WSDL so all complex types use the 
  default namespace.2) Cut and paste the Axis generated client side bean 
  code into your server side value object.I don't like either but that 
  is how I solved it until someone has a better answer.Jansen 
  Werner <[EMAIL PROTECTED]> wrote:
  Hi 
everybody,I still have this open issue with Axis concerning 
BeanSerializers andnamespaces. Classes serialized with this serializer 
do not have anamespace associated to their elements (=properties) and I 
don't why and- what's even more important - how to make the 
BeanSerializer use thenamespace.There is a simple class, 
UserInfo for example. It only consists of two"properties", userName and 
userDescription that are accessible via thestandard getter/setter pairs. 
The parameterless default constructor ispresent as well.Since 
this class is so simple, I decided to serialize it 
usingBeanSerializer:(call is an axis client call 
object)call.registerTypeMapping(UserInfo.class, new 
QName(Constants.PRS_NAMESPACE_URI, "UserInfo"), new 
BeanSerializerFactory(UserInfo.class, new 
QName(Constants.PRS_NAMESPACE_URI, "UserInfo")),new 
BeanDeserializerFactory(UserInfo.class, new 
QName(Constants.PRS_NAMESPACE_URI, "UserInfo")));A call to the 
Web Service, however does not look like I expected it tobe. This is what 
goes over the wire (abbreviated):usernameuserdescriptionThe 
XML tag corresponding to the serialized class has its namespace, butnot 
the properties of the serialized tags (i.e. the tags 
below). Where's my mistake? What do I 
miss?Thanks in 
advance,Werner-To 
unsubscribe, e-mail: [EMAIL PROTECTED]For additional 
commands, e-mail: 
  [EMAIL PROTECTED]
  
  
  Do you Yahoo!?Everyone is raving about the all-new 
  Yahoo! Mail Beta.


Beanserializers and Namespaces (Axis1 1.3)

2006-07-05 Thread Jansen Werner
Hi everybody,

I still have this open issue with Axis concerning BeanSerializers and
namespaces. Classes serialized with this serializer do not have a
namespace associated to their elements (=properties) and I don't why and
- what's even more important - how to make the BeanSerializer use the
namespace.

There is a simple class, UserInfo for example. It only consists of two
"properties", userName and userDescription that are accessible via the
standard getter/setter pairs. The parameterless default constructor is
present as well.

Since this class is so simple, I decided to serialize it using
BeanSerializer:

(call is an axis client call object)

call.registerTypeMapping(UserInfo.class, 
new QName(Constants.PRS_NAMESPACE_URI, "UserInfo"), 
new BeanSerializerFactory(UserInfo.class, 
  new QName(Constants.PRS_NAMESPACE_URI, "UserInfo")),
new BeanDeserializerFactory(UserInfo.class, 
  new QName(Constants.PRS_NAMESPACE_URI, "UserInfo")));


A call to the Web Service, however does not look like I expected it to
be. This is what goes over the wire (abbreviated):


username
userdescription


The XML tag corresponding to the serialized class has its namespace, but
not the properties of the serialized tags (i.e. the tags below
). 

Where's my mistake? What do I miss?

Thanks in advance,

Werner

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



RE: Adding own handler in Java Code? [SOLVED]

2006-07-05 Thread Jansen Werner
Hi again :)

My handlers are working. But I gave up the initial idea. This is how it works:

- The handler is included in client-config.wsdd ("hardcoded")
- The handler checks for itself if it should do anything. So I can activate and 
deactivate handlers "on the fly". (or, better, activate and deactivate 
functionality provided by those handlers)

But there's still an open issue: BeanSerializers and Namespaces. But I will 
post that in another mail to this list, so the subject doesn't get confused.

Have a nice day! :)

CU
Werner 

> -Original Message-
> From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 04, 2006 3:02 PM
> To: axis-user@ws.apache.org
> Subject: Re: Adding own handler in Java Code?
> 
> Ok, what I described you allows you to configure your chain in a 
> per-call basis. If you just need it per-execution, it becomes 
> simpler :-)
> 
> But... why do you want to do this programmatically? Is it for 
> usability 
> reasons?
> 
> If you want to select the set of handlers to use before starting your 
> application, you can implement a standalone tool that could allow you
> to "visually" edit your client-config.wsdd, and show a 
> simplified GUI to 
> select among the available handlers. I would like a copy of 
> such a tool :-D
> 
> If you know which handlers you will need before starting to use Axis, 
> you can generate your client-config.wsdd from within your 
> application, 
> and use the generated WSDD as the configuration for your Axis engine.
> 
> If you want to go through the Axis API and modify the 
> configuration once 
> all has started, the quick answer is "you can't". Axis is not 
> prepared 
> to let you add and remove handlers as you like. There are several 
> conditions that will change what you need to call/do in order to make 
> things work.
> 
> First, you cannot remove handlers from chains. They have no 
> methods for 
> this.
> 
> Second, handlers (and chains) can optionally be deployed as 
> singletons. 
> When in singleton mode, changes to the WSDD deployment 
> descriptor will 
> not affect an existing instance, and you will have to directly modify 
> the instance itself. When not in this mode, Axis will create a new 
> instance each time the "get" method is called, and so, any change you 
> make to an instance will not have effect on the actual flow.
> 
> Third, you can only add handlers to the end of a chain, but usually 
> handlers must be deployed in different order depending on 
> which flow you 
> are adding them to. The response flow uses a reversed order 
> with respect 
> to the request one. This means that you must add all 
> necessary handlers 
> at once. Adding them incrementally will not work.
> 
> And fourth, the things you need to do require using several internal 
> classes that are not considered part of the Axis stable API. 
> This means 
> that you may have severe problems whenever you want to 
> upgrade the Axis 
> version.
> 
> Although it may seem too complex, I still think that the approach I 
> proposed you before is the best one. You can make 
> DynamicChain get the 
> list of active handlers from a Singleton class of your own, 
> and use that 
> class to specify which handlers you add or remove. This way your 
> application code is kept simple.
> 
> 
> Hope this helps,
> Rodrigo Ruiz
> 
> 
> Jansen Werner wrote:
> > Hi Rodrigo,
> > 
> > is it really that complicated to include a handler? Within 
> server-config.wsdd, it's just a single line to include the 
> (example) LogHandler, why is it so complicated to inject it via API? 
> > 
> > As a resumee, this is what I want to do:
> > 
> > - add a Handler to Message Processing. Nothing complicated. 
> Complexity similar to the org.apache.axis.handlers.LogHandler 
> provided by Axis.
> > - do this in client and server
> > - within the server, this is easy using -Tags in 
> server-config.wsdd, because the handler is needed always. 
> This works already.
> > - within the client, client-config.wsdd is inappropriate, 
> because the handler isn't used on every run of the client.
> > - How is it possible to inject a (simple) Handler via Java 
> Calls the way it would be in client-config.wsdd or 
> server-config.wsdd. As an example, I'm still trying to use 
> the LogHandler provided by Axis (which extends 
> org.apache.axis.handlers.BaseHandler, which itself implements 
> org.apache.axis.Handler (which does only extend Serializable, 
> and no javax.rpc-Interface).
> >  
> > I thought this must be a very simple thing to do. What you 
> wrote sounds profound but i

RE: Adding own handler in Java Code?

2006-07-04 Thread Jansen Werner
Hi Rodrigo,

is it really that complicated to include a handler? Within server-config.wsdd, 
it's just a single line to include the (example) LogHandler, why is it so 
complicated to inject it via API? 

As a resumee, this is what I want to do:

- add a Handler to Message Processing. Nothing complicated. Complexity similar 
to the org.apache.axis.handlers.LogHandler provided by Axis.
- do this in client and server
- within the server, this is easy using -Tags in server-config.wsdd, 
because the handler is needed always. This works already.
- within the client, client-config.wsdd is inappropriate, because the handler 
isn't used on every run of the client.
- How is it possible to inject a (simple) Handler via Java Calls the way it 
would be in client-config.wsdd or server-config.wsdd. As an example, I'm still 
trying to use the LogHandler provided by Axis (which extends 
org.apache.axis.handlers.BaseHandler, which itself implements 
org.apache.axis.Handler (which does only extend Serializable, and no 
javax.rpc-Interface).
 
I thought this must be a very simple thing to do. What you wrote sounds 
profound but is very complicated for a (in my eyes) simple thing: adding a 
Handler to message Processing.

... hoping for an answer ... :)

CU
Werner

> -Original Message-
> From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 04, 2006 11:06 AM
> To: axis-user@ws.apache.org
> Subject: Re: Adding own handler in Java Code?
> 
> Hi Jansen,
> 
> Ideally you should be able to create a custom chain and deploy it in 
> your client-config.wsdd as an actual chain. Unfortunately, Axis WSDD 
> syntax does not allow to deploy custom chains. When you put a  
> tag, it always creates a SimpleChain instance.
> 
> I would create a JIRA report to ask for the ability to specify a 
> different class name for the Chain implementation. Something 
> similar to 
> the type attribute for handlers.
> 
> In the meantime, you could try to write your own custom chain 
> and deploy 
> it as any other regular handler. Your chain would allow you 
> to configure 
> the list of handlers to be included, *before* performing the call, 
> through the MessageContext, or any other appropriate channel. If I am 
> not wrong, setting a property on the service client stub makes it 
> available from the MessageContext during handlers invocation.
> 
> Configuring the handlers within your custom chain should be straight 
> forward once the WSDD syntax is extended. With the current syntax you 
> have two options:
> 
> 1. Use a secondary WSDD file with the contained handler 
> configurations 
> and parse it from your chain init() method.
> 
> 2. Define all your handlers in your wsdd configuration file 
> with unique 
> names, set a property for your chain containing a list of 
> handler names, 
> and obtain the handler instances from the init() method.
> 
> Instead of adding/removing handlers, it is easier to enable/disable 
> them. This way, you can initialise all the handlers once, and specify 
> its ordering at configuration time. At runtime you will just have to 
> supply a list(or set) of the handlers that must be enabled for a call.
> 
> I attach a simple template class that may be of help. It 
> implements the 
> second option mentioned above.
> 
> Regards,
> Rodrigo Ruiz
> 
> Jansen Werner wrote:
> > Thanks for you reply! 
> > 
> >> -Original Message-
> >> From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] 
> >> Sent: Monday, July 03, 2006 3:57 PM
> >> To: axis-user@ws.apache.org
> >> Subject: Re: Adding own handler in Java Code?
> >>
> >> Hi Jansen,
> >>
> >> The answer depends on what you mean be "add dynamically". :-)
> >>
> >> If you mean "add a jar at runtime and have it automatically 
> >> recognized", 
> >> the answer is that it is very hard. You will need Axis 2 
> to have this 
> >> feature built in, or implement yourself a dynamic 
> >> class-loader like the 
> >> one used by Axis 2, and a handler with the ability to detect 
> >> the changes 
> >> at runtime, and call these "dynamic" handlers when appropriate.
> > 
> > No, I'm lucky, this is not what I meant :)
> > 
> > 
> >> If you mean "selecting a subset among an already well-known set of 
> >> available handlers", the answer is that it is easier :-)
> >>
> >> You will have to create a handler that could act as a 
> >> "handler chain", 
> >> and put into it the logic to take the decision about what 
> handlers to 
> >> actually call when invoked. Depending on what you need, 

RE: Adding own handler in Java Code?

2006-07-04 Thread Jansen Werner
Good morning Dies,

thanks for your help! I tried what you wrote and couldn't get it
working.

This is my code (service is an instance of
org.apache.axis.client.Service, Loghandler is
org.apache.axis.handlers.LogHandler, the rest is like you wrote it):

private static void registerHandlers(Service service)
{
HandlerRegistry hr = service.getHandlerRegistry();

List hl = new ArrayList();
hl.add(new HandlerInfo(LogHandler.class, null, null));
hr.setHandlerChain(new QName(
"http://www.eon-is.com/namespaces/soap/1.0";, "log"),
hl);
} 

service is initialized using its default constructor before calling
registerHandlers (Service service = new Service();). After calling
registerHandlers and registerTypeMappings (adding Classes, Serializers
and so on), this instance is used to create a call (call = (Call)
service.createCall();) that is filled with parameters, values, endpoint,
... and then executed.

When I run my SOAP call that calls registerHandlers before executing,
nothing happens. At least nothing different from when the Handler was
not included. What did I do wrong? If there's any information needed for
further help, let me know. I'm stuck, I feel like finding lost contact
lenses in a dark alley if you had quite a few beers. Not that I know how
this feels like, but it must be similar to this :)

Greetings from Munich,

Werner





> -Original Message-
> From: Dies Koper [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 04, 2006 1:55 AM
> To: axis-user@ws.apache.org
> Subject: Re: Adding own handler in Java Code?
> 
> Hello Werner,
> 
> Refer to the JAX-RPC1.1 spec to see how to use a client handler in a 
> portable way. I believe it goes something like this:
> 
>sf = javax.xml.rpc.ServiceFactory.newInstance();
>SEIService si = (SEIService)sf.loadService(SEIService.class);
> 
>// register client handler
>javax.xml.rpc.handler.HandlerRegistry hr = si.getHandlerRegistry();
>java.util.List hl = new java.util.ArrayList();
>hl.add(new 
> javax.xml.rpc.handler.HandlerInfo(YourHandler.class,null,null));
>hr.setHandlerChain(new 
> QName("http://localhost/xxx/","yourPort";),hl);
> 
>SEI sei = si.getSEIPort();
> 
> YourHandler should implement javax.xml.rpc.handler.Handler.
> I don't know whether the LogHandler you are referring to is a JAX-RPC 
> compliant one..
> 
> Hope that helps,
> Dies
> 
> 
> Jansen Werner wrote:
> >> If you mean "selecting a subset among an already well-known set of 
> >> available handlers", the answer is that it is easier :-)
> >>
> >> You will have to create a handler that could act as a 
> >> "handler chain", 
> >> and put into it the logic to take the decision about what 
> handlers to 
> >> actually call when invoked. Depending on what you need, 
> this handler 
> >> will have the information needed to find out the handlers to 
> >> call (for 
> >> example, by parsing a policy), or you may have to include the 
> >> mechanisms 
> >> to communicate with it from the service implementations or 
> >> other points, 
> >> and configure it at runtime.
> > 
> > OK, this sounds like my problem.
> > 
> > For an example, let's take the LogHandler packaged with 
> axis. How can I
> > add this (simple, easy) Handler to Axis at runtime? (And 
> remove it later
> > ...).
> > 
> > I have found a way to access the HandlerRegistry
> > (Service.getHandlerRegistry()). But - without deeper 
> knowledge of the
> > HandlerChains available - how do I add my Handler (or the LogHandler
> > mentioned above)?
> > 
> >> Just keep in mind that you need to respect the handlers 
> >> interface, and 
> >> call their methods in the appropriate order. That is, to 
> >> initialise them 
> >> before invoking them, and the like.
> > 
> > This is something I will concentrate on when I managed to add the
> > LogHandler provided by Axis :)
> > 
> > Ah, before I forget it again, our Axis version is 1.3 :)
> > 
> > Thanks in advance :)
> > 
> > CU
> > Werner
> 
> 
> -
> 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: Adding own handler in Java Code?

2006-07-03 Thread Jansen Werner
Thanks for you reply! 

> -Original Message-
> From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 03, 2006 3:57 PM
> To: axis-user@ws.apache.org
> Subject: Re: Adding own handler in Java Code?
> 
> Hi Jansen,
> 
> The answer depends on what you mean be "add dynamically". :-)
> 
> If you mean "add a jar at runtime and have it automatically 
> recognized", 
> the answer is that it is very hard. You will need Axis 2 to have this 
> feature built in, or implement yourself a dynamic 
> class-loader like the 
> one used by Axis 2, and a handler with the ability to detect 
> the changes 
> at runtime, and call these "dynamic" handlers when appropriate.

No, I'm lucky, this is not what I meant :)


> If you mean "selecting a subset among an already well-known set of 
> available handlers", the answer is that it is easier :-)
> 
> You will have to create a handler that could act as a 
> "handler chain", 
> and put into it the logic to take the decision about what handlers to 
> actually call when invoked. Depending on what you need, this handler 
> will have the information needed to find out the handlers to 
> call (for 
> example, by parsing a policy), or you may have to include the 
> mechanisms 
> to communicate with it from the service implementations or 
> other points, 
> and configure it at runtime.

OK, this sounds like my problem.

For an example, let's take the LogHandler packaged with axis. How can I
add this (simple, easy) Handler to Axis at runtime? (And remove it later
...).

I have found a way to access the HandlerRegistry
(Service.getHandlerRegistry()). But - without deeper knowledge of the
HandlerChains available - how do I add my Handler (or the LogHandler
mentioned above)?

> 
> Just keep in mind that you need to respect the handlers 
> interface, and 
> call their methods in the appropriate order. That is, to 
> initialise them 
> before invoking them, and the like.

This is something I will concentrate on when I managed to add the
LogHandler provided by Axis :)

Ah, before I forget it again, our Axis version is 1.3 :)

Thanks in advance :)

CU
Werner


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



RE: Adding own handler in Java Code?

2006-07-03 Thread Jansen Werner
Ah, always the same thing I forget to mention: We're _not_ using Axis2.
:) 

> -Original Message-
> From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 03, 2006 2:52 PM
> To: axis-user@ws.apache.org
> Subject: Re: Adding own handler in Java Code?
> 
> Maybe ServiceClient.engageModule() is what you are looking for (if
> you're using Axis2).
> 
> Michele
> 
> Jansen Werner wrote:
> > Hallo everybody,
> > 
> > I need to add handlers to Axis dynamically in Java Code. I found
> > examples of adding handlers (logHandlers, for example) to
> > server-config.wsdd. But I need to add them dynamically and 
> on the client
> > side of the SOAP call.
> > 
> > Could anyone give me a hint? 
> > 
> > Thanks in advance, 
> > 
> > Werner Jansen
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Adding own handler in Java Code?

2006-07-03 Thread Jansen Werner
Hallo everybody,

I need to add handlers to Axis dynamically in Java Code. I found
examples of adding handlers (logHandlers, for example) to
server-config.wsdd. But I need to add them dynamically and on the client
side of the SOAP call.

Could anyone give me a hint? 

Thanks in advance, 

Werner Jansen

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



Namespace for attributes in serialized beans?

2006-07-03 Thread Jansen Werner
Hallo everybody,

After all of the complex Java/SOAP mapping is done, we have some beans
to serialize. 
I wrote some code that registers my bean class for serialization:


TypeMappingRegistry registry = (TypeMappingRegistry) service
.getTypeMappingRegistry();
TypeMapping tm = (TypeMapping) registry
.getOrMakeTypeMapping(Constants.URI_SOAP11_ENC);

tm.register(ClientCallMetaData.class, new
QName(Constants.PRS_NAMESPACE_URI, "ClientCallMetaData"), new
BeanSerializerFactory(
ClientCallMetaData.class, new
QName(Constants.PRS_NAMESPACE_URI,"ClientCallMetaData")),
new BeanDeserializerFactory(ClientCallMetaData.class,new
QName(Constants.PRS_NAMESPACE_URI,"ClientCallMetaData")));


That's all I do. Now when I call a web service using ClientCallMetaData
as parameter, ClientCallMetaData is using the right namespace
(Constants.PRS_NAMESPACE_URI as mentioned above) for the "object" itself
. But attributes (= bean properties) are not
qualified, no namespace here. I assumed that the BeanSerializer would
use the same namespace as the containing object.

What am I doing wrong?

Thanks in advance,

Werner Jansen

PS: This is what ethereal tells me about the message sent over the wire.
As you can see, clientCallMetaData is namespace-qualified, whereas its
attributes (clazz, clientHost, clientName) are not.


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

http://schemas.xmlsoap.org/soap/encoding/";

xmlns:ns1="http://www.eon-is.com/namespaces/prs/1.0";>

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

de.eonis.[...].soap.ws.WsCommonServiceTest

http://schemas.xmlsoap.org/soap/encoding/";>
[ip address]

http://schemas.xmlsoap.org/soap/encoding/";>
[name of client library used]



[...]


http://schemas.xmlsoap.org/soap/encoding/";>
INFO


This is the message.




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



RE: Howto add schema definition of type to wsdl?

2006-06-30 Thread Jansen Werner
I found it! It was too close to be easy to discover. What I was looking
for is the method writeSchema() contained in every Serializer
implementataion.

Speaking of, I have another question:

How do I specify the type in -Tags correctly in this method?
Something like setAttribute("type","xsd:dateTime") is fine but what if
the namespace of XML Schema is mapped onto another prefix? As far as I
understood namespaces and prefixes is that the prefix can change while
referring to the same namespace. But where can the actual prefix for the
namespace be found?

Thanks in advance,

Werner Jansen 

> -Original Message-
> From: Jansen Werner [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 30, 2006 10:13 AM
> To: axis-user@ws.apache.org
> Subject: RE: Howto add schema definition of type to wsdl?
> 
> Hallo there, 
>  
> thanks for you response :)
>  
> ScheduleMetaData is not defined as a JavaBean, it's mapped using a
>  in the axis configuration and using our own Serializers
> and Deserializers.
>  
> I did not run java2wsdl, but I'll try that right away :)
> The wsdl file I examined is the one generated by axis on the fly by
> specifying ?wsdl at the end of the URL.
>  
> This is how the service is defined in server-config.wsdd:
>  
> [... namespace definitions ...]
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> 
>   
> value="de.eonis.prs.romeo.comm.ve.schedule.soap.ws.WsScheduleN
> otifyServi
> ce" />
> 
> 
> 
> http://www.eon-is.com/namespaces/prs/1.0/schedule/v
> e ce>
> 
> 
>  ScheduleMetaData, schedule:Result for example ] />
> 
>   languageSpecificType="java:de.eonis.[...].ScheduleMetaData"
>  serializer="de.eonis.[..].axis.VEScheduleMetaDataSerFactory"
>  deserializer="de.eonis.[...].axis.VEScheduleMetaDataDeserFactory"
> />
> 
>   qname="schedule:scheduleNotify">
> 
>   qname="schedule:scheduleMetaData" 
> type="schedule:ScheduleMetaData"
>  mode="IN" />
> 
>   type="schedule:Result" mode="OUT" />
> 
> 
> 
> 
> 
> And yes, we're using Axis1 1.3
> 
> Thanks for any help!
> 
> 
>   From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
>   Sent: Thursday, June 29, 2006 5:32 PM
>   To: axis-user@ws.apache.org
>   Subject: Re: Howto add schema definition of type to wsdl?
>   
>   
>   Is ScheduleMetaData defined as a JavaBean? 
>   Did you run java2wsdl?
>   
>   Or did you perhaps try to deploy the service using the .jws
> option?
>   If you are using complex types, then you can't use the .jws
> option.
>   
>   (I'm assuming that you're using Axis 1.)
>   
>   Anne
>   
>   
>   On 6/29/06, Jansen Werner <[EMAIL PROTECTED] > wrote: 
> 
>   Hallo everybody,
>   
>   I have a web service called ScheduleNotifyService. It
> has a single 
>   operation called "scheduleNotify". This operation needs
> a parameter of
>   java type ScheduleMetaData. So I wrote a
> Serializer/Deserializer pair
>   with their corresponding factories. This works.
>   
>   But: When I call my wsdl using
> ScheduleNotifyService?wsdl, it defines a 
>   part
>   
>type="tns1:ScheduleMetaData"/>
>   
>   without defining ScheduleMetaData in the document. Is it
> possible to
>   automatically include the definition for my java types
> somehow? Axis 
>   could - i suppose - extract the definition from the
> serializer. Do I
>   need to manually include the definition?
>   
>   I hope I made myself clear. :) If not, don't hesitate to
> ask for further
>   information ... :)
>   
>   Greetings from Munich,
>   
>   Werner Jansen
>   
>   
>   
> -
>   To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> 
>   For additional commands, e-mail:
> [EMAIL PROTECTED]
>   
>   
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Howto add schema definition of type to wsdl?

2006-06-30 Thread Jansen Werner
Hallo there, 
 
thanks for you response :)
 
ScheduleMetaData is not defined as a JavaBean, it's mapped using a
 in the axis configuration and using our own Serializers
and Deserializers.
 
I did not run java2wsdl, but I'll try that right away :)
The wsdl file I examined is the one generated by axis on the fly by
specifying ?wsdl at the end of the URL.
 
This is how the service is defined in server-config.wsdd:
 
http://www.w3.org/2001/XMLSchema";>





http://www.eon-is.com/namespaces/prs/1.0/schedule/ve
















And yes, we're using Axis1 1.3

Thanks for any help!


From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 5:32 PM
To: axis-user@ws.apache.org
Subject: Re: Howto add schema definition of type to wsdl?


Is ScheduleMetaData defined as a JavaBean? 
Did you run java2wsdl?

Or did you perhaps try to deploy the service using the .jws
option?
If you are using complex types, then you can't use the .jws
option.

(I'm assuming that you're using Axis 1.)

Anne
    

On 6/29/06, Jansen Werner <[EMAIL PROTECTED] > wrote: 

Hallo everybody,

I have a web service called ScheduleNotifyService. It
has a single 
operation called "scheduleNotify". This operation needs
a parameter of
java type ScheduleMetaData. So I wrote a
Serializer/Deserializer pair
with their corresponding factories. This works.

But: When I call my wsdl using
ScheduleNotifyService?wsdl, it defines a 
part



without defining ScheduleMetaData in the document. Is it
possible to
automatically include the definition for my java types
somehow? Axis 
could - i suppose - extract the definition from the
serializer. Do I
need to manually include the definition?

I hope I made myself clear. :) If not, don't hesitate to
ask for further
information ... :)

Greetings from Munich,

Werner Jansen



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





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



Howto add schema definition of type to wsdl?

2006-06-29 Thread Jansen Werner
Hallo everybody,

I have a web service called ScheduleNotifyService. It has a single
operation called "scheduleNotify". This operation needs a parameter of
java type ScheduleMetaData. So I wrote a Serializer/Deserializer pair
with their corresponding factories. This works.

But: When I call my wsdl using ScheduleNotifyService?wsdl, it defines a
part 

 

without defining ScheduleMetaData in the document. Is it possible to
automatically include the definition for my java types somehow? Axis
could - i suppose - extract the definition from the serializer. Do I
need to manually include the definition?

I hope I made myself clear. :) If not, don't hesitate to ask for further
information ... :)

Greetings from Munich,

Werner Jansen


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



adding handler into client

2006-06-23 Thread Jansen Werner
Hallo everybody,

I need to add a log handler to my axis client. I don't want to use
client-config.wsdd but want to include the handler in the code.

What I figured out, is that I can use service.getHandlerRegistry() to
get the registry.

But: Which chain needs to be modified? Which one has to include my Log
Handler? And how is it called (QName)?

No idea  :)

Thanks in advance,

Werner

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



RE: WSDL2Java through Proxy

2006-05-03 Thread Jansen Werner
Title: WSDL2Java through Proxy



Hey there :)
 
2 ideas:
 
1. your maven configuration does include your proxy? (I suppose so, 
otherwise you won't be able to download maven plugins)
 
2. Did you try to use the java system properties that specify Proxy and 
stuff? they can be appended to your command line using 
-Dhttp.proxyHost=proxyhost.com -Dhttp.proxyPort=8080 (change to reflect your 
environment). For further information, see http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html
 
I hope I could help you. 
 
CU
Werner

  
  
  From: Caron, Michael R 
  [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 02, 2006 6:07 
  PMTo: axis-user@ws.apache.orgSubject: WSDL2Java through 
  Proxy
  
  Hi, 
  I just started using Axis2 and tried to generate 
  Java classes for the Amazon Alexa Web Service at http://awis.amazonaws.com/AWSAlexa/AWSAlexa.wsdl. WSDL2Java fails with a connection timeout because of the 
  proxy server that our web traffic goes through. I checked the documentation on 
  the Axis2 project site and found no help. I checked the mail archives and also 
  found no help. I checked the commandline help and there was nothing about a 
  proxy. Can anyone provide details about how one might use WSDL2Java through a 
  proxy?
  Thanks! 
  Michael Caron Software Development, Lockheed Martin Corp. 
  IR&D - MS2 Tactical Systems 
  


using alternate server config file

2006-04-18 Thread Jansen Werner
Hi everybody,

how can I use an alternate configuration file for axis instead of
server-config.wsdd?

I read about the tag  in web.xml, but no matter what I put
there, my file is not found.

my file is located in WEB-INF and named axis-config.wsdd

So I put WEB-INF/axis-config.wsdd in init-param:


configFile
WEB-INF/axis-config.wsdd


the name of the file is not that important. However, I want to figure
out how this works, because I want to use 2 servlet mappings with
different config files. 

How do I use a different config file without specifing the full
qualified path in my file system? Because I don't know the path in
production environment and I don't want to change it for every
environment, it would be better to use relative path names. (relative to
"webapps" for example).

Thanks in advance!

CU
Werner


Problems getting data into the header

2006-04-10 Thread Jansen Werner
Hey folks,

this is my first post to this list, I hope I don't ask something
discussed over a thousand times before. At least aunt Google said, it's
new to the list (as I am to axis and Web services) :)

I wrote a simple web service for playing with web services. The
corresponding Java class on the server side looks like this:

public void logMessage(ClientCallMetaData ccMetaData, LogLevel level,
String message)
{
...
}

this is an excerpt of server-config.wsdd:







I managed to (de-)serialize LogLevel and ClientCallMetaData as
parameters. All three parameters of this method are transmitted as
children of  in . So far, my web service runs
really fine.

But: I want to move the ClientCallMetaData into the soap:header-Section,
since it's not part of the business logic but technical metadata.

So this is what I did:

1. added an attribute inHeader="true" in my server-config.wsdd (in the
line )

2. changed call.addParameter(..) to call.addParameterAsHeader(..) on the
client side.

After compiling and deploying, I started my Client an got an error I
don't unterstand:

org.xml.sax.SAXException: Found instance data for clientCallMetaData in
the soap:body instead of the soap:header.

When using a network sniffer (ethereal) I found out that
clientCallMetaData is actually part of the header in the request as it's
supposed to be. So what does this error message mean? I have no idea
where to look for a mistake.

I hope I'm not talking to confused stuff here. If more information is
needed, please let me know.

Anybody got a hint for me?

Thanks in advance,

CU
Werner

PS: I'm not using a WSDL for now, but I attached the "operation" part of
the web service generated by calling http:///CommonServer?wsdl,
which looks fine for me:


   
 
  http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://www.eon-is.com/namespaces/prs/1.0"; parts="level
message" use="encoded" /> 
  http://schemas.xmlsoap.org/soap/encoding/";
message="impl:logMessageRequest"
namespace="http://www.eon-is.com/namespaces/prs/1.0/schedule/eon";
part="clientCallMetaData" use="encoded" /> 
  
 
  http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://www.eon-is.com/namespaces/prs/1.0/schedule/eon";
use="encoded" />