Mike,

I didn't see any responses to your question about how to get Axis to map from 
Java bean property names to the XML element names.  I ran into what may be the 
same problem a couple of weeks ago; from reading the Axis documentation, I 
found that the generated classes should have type-mapping code inside them.

http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL

In my case, it turned out that the type mapping code didn't exist because I had 
IBM's WSAD installed on my machine, and its older WSDL2Java classes were 
earlier in my classpath--I was generating very old code!  Starting with a clean 
classpath fixed that problem.

Hopefully this information helps you,

Meghan Pietila
Granite Consulting


------Begin message from Mike Pilone ([EMAIL PROTECTED]), 08/24/2005 09:21 PM

Hello all,
 
I am attempting to use Axis 1.2.1 to generate a client stub to the Systinet 
UDDI registry. For most of the API I used the OASIS WSDLs and WSDL2Java. Aside 
from some minor problems, it appeared to work.
 
However now that I am using the client stub, I am running into a problem. UDDI 
defines the type tModel in the schema. There are many operations that return 
tModels. For example, in a Taxonomy object, there is a tModel. What this means 
is that Axis is generating a Taxonomy class that looks like:
 
Taxonomy
{
            public void setTModel(…) { … }
            public TModel getTModel() { … }
            …
}
 
The problem comes when a response message comes back from the UDDI server in 
which the tModel element is ‘<tModel>’. The BeanDeserializer on the client side 
is throwing an exception that the tModel element was unexpected. After stepping 
through the code, I found that the tModel property in Taxonomy is getting 
returned as TModel by bean introspection, therefore not matching the element 
with name ‘tModel’. Looking at the JavaBeans spec, the introspection and 
property name are correct.
 
Is there some way around this with Axis? It seems like a major problem, since 
and field with a second capital letter will not match the XML elements defined 
in the schema because of bean introspection. Note that this is the standard 
UDDI WSDL. I’m a bit worried that Axis can’t properly talk to UDDI, one of the 
leading technologies in web service registration and discovery.
 
Thanks for any help,
-mike

Reply via email to