File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Axis Fault: Attempted to write duplicate schema element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis Fault: Attempted to write duplicate schema element" Watch "Axis Fault: Attempted to write duplicate schema element" New topic
Author

Axis Fault: Attempted to write duplicate schema element

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

I registered a web service with <service> element in server-config.wsdd and when I try to access the wsdl file for this
service I am getting below server error. I am using WSAD 5.1.2 and WAS 5.0 Test Environment available in WSAD. What am I missing here

faultDetail:
{http://xml.apache.org/axis/}stackTrace:Attempted to write duplicate schema element :
{http://www.dummy.com/schemas/myc/cardservice}getEnrolledCards





My complete server-config.wsdd file is :

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<parameter name="adminPassword" value="admin"/>
<parameter name="attachments.Directory" value="/home/dennis/tools/jakarta-tomcat-5.0.25/webapps/axis/WEB-INF/attachments"/>
<parameter name="disablePrettyXML" value="true"/>
<parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
<parameter name="sendXsiTypes" value="true"/>
<parameter name="sendMultiRefs" value="true"/>
<parameter name="sendXMLDeclaration" value="true"/>
<parameter name="axis.development.system" value="true"/>
<requestFlow>
<handler type="java rg.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler type="java rg.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
</requestFlow>
</globalConfiguration>
<handler name="LocalResponder" type="java rg.apache.axis.transport.local.LocalResponder"/>
<handler name="URLMapper" type="java rg.apache.axis.handlers.http.URLMapper"/>
<handler name="Authenticate" type="java rg.apache.axis.handlers.SimpleAuthenticationHandler"/>
<service name="CardService" provider="java:EJB" style="wrapped" use="literal">
<parameter name="beanJndiName" value="ejb/Card" />
<parameter name="homeInterfaceName" value="com.mycomp.as.card.ejb.CardServiceHome" />
<parameter name="remoteInterfaceName" value="com.mycomp.as.card.ejb.CardService" />
<parameter name="allowedMethods" value="getCard,getCardList,getConsistentAccountRepresentationMap,getControlAccountHierarchy,getControlAccountProfile,getCorporateCard,getEnrolledCardAccountNumbers,getEnrolledCards" />
<parameter name="className" value="com.mycomp.as.card.ejb.CardServiceBean" />
<parameter name="jndiURL" value="jnp://localhost:1099" />
<parameter name="jndiContextClass" value="org.jnp.interfaces.NamingContextFactory" />
<parameter name="wsdlPortType" value="CardServiceInterface"/>
<parameter name="wsdlServicePort" value="CardService"/>
<parameter name="wsdlTargetNamespace" value="http://ws.mycomp.com/wsdl/cardservice"/>
<namespace>http://www.mycomp.com/schemas/myca/cardservice</namespace>
</service>
<service name="CardJibx" provider="java:EJB" style="wrapped" use="literal">
<parameter name="beanJndiName" value="ejb/Card" />
<parameter name="homeInterfaceName" value="com.mycomp.as.card.ejb.CardServiceHome" />
<parameter name="remoteInterfaceName" value="com.mycomp.as.card.ejb.CardService" />
<parameter name="allowedMethods" value="getCard,getCardList,getConsistentAccountRepresentationMap,getControlAccountHierarchy,getControlAccountProfile,getCorporateCard,getEnrolledCardAccountNumbers,getEnrolledCards" />
<parameter name="className" value="com.mycomp.as.card.ejb.CardServiceBean" />
<parameter name="jndiURL" value="jnp://localhost:1099" />
<parameter name="jndiContextClass" value="org.jnp.interfaces.NamingContextFactory" />
<parameter name="wsdlPortType" value="CardServiceInterface"/>
<parameter name="wsdlServicePort" value="CardService"/>
<parameter name="wsdlTargetNamespace" value="http://ws.mycomp.com/wsdl/cardservice"/>
<namespace>http://ws.mycomp.com/wsdl/cardservice</namespace>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:vector"
type="java:java.util.Vector"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:card"
type="java:com.mycomp.as.card.shr.valuebean.Card"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:control-account-profile"
type="java:com.mycomp.as.card.shr.valuebean.ControlAccountProfile"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:list"
type="java:java.util.List"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:audit-map"
type="java:com.mycomp.as.cs.shr.AuditMap"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:consistent-account-representation-map"
type="java:com.mycomp.as.card.shr.valuebean.ConsistentAccountRepresentationMap"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:card-service"
type="java:com.mycomp.as.card.shr.valuebean.CardList"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:control-account-hierarchy"
type="java:com.mycomp.as.card.shr.valuebean.ControlAccountHierarchy"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:security-token"
type="java:com.mycomp.wss.shr.authorization.token.SecurityToken"
serializer="com.myp.wsaf.axis.jibx.JibxSerializerFactory"
deserializer="com.myp.wsaf.axis.jibx.JibxDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.mycomp.com/schemas/myca/cardservice"
qname="ns:CardServiceException"
type="java:com.mycomp.as.card.shr.exception.CardServiceException"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
</service>
<service name="AdminService" provider="java:MSG">
<parameter name="allowedMethods" value="AdminService"/>
<parameter name="enableRemoteAdmin" value="false"/>
<parameter name="className" value="org.apache.axis.utils.Admin"/>
<namespace>http://xml.apache.org/axis/wsdd/</namespace>
</service>
<service name="Version" provider="java:RPC">
<parameter name="allowedMethods" value="getVersion"/>
<parameter name="className" value="org.apache.axis.Version"/>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="java rg.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
<parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
<parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
</transport>
<transport name="local">
<responseFlow>
<handler type="LocalResponder"/>
</responseFlow>
</transport>
</deployment>


RR Kumaran
SCJP 1.4
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Dont know why? but a blunt suggestion, is your service working by removing getEnrolledCards from the allowedmethods attributes ?


Spritle Software Blogs
Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Yes Balaji ......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis Fault: Attempted to write duplicate schema element
 
Similar Threads
NullPointerException returned from webservice
Problem with Custom (De)Serializers with AXIS, WebSphere, EJB
beanMapping, typeMapping in Axis 1 (1.4) in server-config.wsdd generates complexType in wsdl
Problem with Custom (De)Serializers with AXIS, WebSphere, EJB
Axis Fault: Attempted to write duplicate schema element