You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "DealRaider.com" <lo...@uhmc.biz> on 2003/10/20 02:00:58 UTC
Error trying to do typemapping and deploy
Hello,
I'm fairly new to Axis, and thought I had figured it out until I got
to the typemapping. Since I have been unable to find a DTD/XSD for the
WSDD file, I've had to try and use others' examples. This has consumed
10+ hours of my day now, so I would greatly appreciate any help. Please
reply to my email address as well.
In any case, no matter what I've tried, I am getting an error. I've
attached the WSDL file that was used to generate Java classes with
WSDL2Java. Each of those complex types has a serializer/deserializer in
the code, so I thought you could specify them as the serializer or
deserializer in the type mapping.
I'm trying to just get one method of the web service working. I tried
creating a test client, but it failed with a ClassNotFound trying to
find org/apache/axis/Deserializer. I then realized I need to do
typemapping since my parameters are not primitive types.
For example, look at GetOutstandingOrders type. I've tried setting my
deploy.wsdd as follows:
<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:ns="urn:LibraryDemo\\srvcGeneral\\srvcdoc">
<service name="ElectronicMarketService" provider="java:EJB">
<parameter name="beanJndiName"
value="ElectronicMarketServiceLocal"/>
<parameter name="homeInterfaceName"
value="edu.uiuc.cs427.j2e3.service.ElectronicMarketServiceLocalHome"/>
<parameter name="remoteInterfaceName"
value="edu.uiuc.cs427.j2e3.service.ElectronicMarketServiceLocal"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="jndiURL" value="jnp://localhost:1099"/>
<parameter name="jndiContextClass"
value="org.jnp.interfaces.NamingContextFactory"/>
<wsdlFile>ElectronicMarket.wsdl</wsdlFile>
<!-- This type mapping I believe is causing the problem not
allowing a client to connect -->
<!-- Can only get to complete target if type is set to
"classname" -->
<!-- Serializer is not letting me put my class, deserializer is -->
<!--
<typeMapping
qname="ns:GetOutstandingOrders"
classname="java:edu.uiuc.cs427.soap.CollectionOfOrder"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="edu.uiuc.cs427.soap.CollectionOfOrder"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
-->
<beanMapping
qname="ns:GetOutstandingOrders"
xmlns:ns="urn:LibraryDemo\\srvcGeneral\\srvcdoc"
languageSpecificType="java:edu.uiuc.cs427.soap.CollectionOfOrder"/>
</service>
</deployment>
I've tried several combinations of typeMapping and beanMapping yet none
work. What I'd like to do is something like:
<typeMapping
qname="ns:GetOutstandingOrders"
classname="java:edu.uiuc.cs427.soap.CollectionOfOrder"
serializer="edu.uiuc.cs427.soap.CollectionOfOrder"
deserializer="edu.uiuc.cs427.soap.CollectionOfOrder"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
However, I get a variety of errors depending on which attempt I make:
One error if I use the first typeMapping example with classname and with
the BeanSerializerFactory serializer I get:
19:56:58,453 ERROR [WSDDDeployableItem] Unable to deploy typemapping:
{urn:LibraryDemo\\srvcGeneral\\srvcdoc}GetOutstandingOrders
java.lang.ClassNotFoundException: Found languageSpecificType namespace
'', expected 'http://xml.apache.org/axis/wsdd/providers/java'
at
org.apache.axis.deployment.wsdd.WSDDTypeMapping.getLanguageSpecificType(WSDDTypeMapping.java:213)
at
org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:549)
at
org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:267)
at
org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:247)
at
org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:243)
at
org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:118)
If I try one of the other combinations, I often get an
InvocationTargetException when trying to execute the axis-admin Ant task.
If I try putting the java: in front of the serializer/deserializer, it
gives me another error.
If anyone can see something obvious here, or can show me better
documentation on this besides example 5 of the user guide, please help
me out.
I've also attached the source code for the generated CollectionOfOrder type.
If you need any more info from me, let me know.
Thanks