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 Pranay Parsatwar <pr...@mphasis.com> on 2004/10/19 12:40:10 UTC
?wsdl Problem
Dear All,
I should first be explaining my requirement. It is a very normal
requirement I have it here, but anyways to be specific. Friends can
point out if something me doing differently. The following explains the
step:
1. Created a very complex schema file.
2. This XSD file is imported in my WSDL.
3. Created the WSDL file for my service.
4. Generated service classes using WSDL2JAVA utility.
5. Deployed the service.
6. The client service call - running. Client is getting the output
and the service is called properly, No Exceptions. Great.
7. Now I wanna see the WSDL being exposed for the same service. So
I use ?wsdl utility n boom, there comes the error.
Now of the same exception, I have found the solution. It is something to
do with the Types which I have created in the XSD file.
The error occurs when I have a element declared in a complex type which
is of simple type declared locally for that element. E.g.
<xs:complexType name="pdSimulatorInputType">
<xs:choice>
<xs:element name="baseCurrency" type="xs:string"/>
<xs:element name="responsefields" default="All"
nillable="false" minOccurs="0" maxOccurs="5">
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration
value="currencyCollection"/>
<xs:enumeration
value="distance"/>
<xs:enumeration value="tenure"/>
<xs:enumeration
value="interestRate"/>
<xs:enumeration
value="baseCurencyValueCube"/>
<xs:enumeration value="All"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:choice>
</xs:complexType>
For the above responsefields element, I have declared its type locally
as a simple type, which is local to the element. So the exception with
this, when I use ?wsdl, I get pdSimulatorInputType_responsefields type
not declared and so so...
Now when I change the same complex type with the below changes, ?wsdl
works fine:
<xs:complexType name="pdSimulatorInputType">
<xs:choice>
<xs:element name="baseCurrency" type="xs:string"/>
<xs:element name="responsefields"
type="eTs:responsefieldsType" default="All" nillable="false"
minOccurs="0" maxOccurs="5"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="responsefieldsType">
<xs:restriction base="xs:NCName">
<xs:enumeration value="currencyCollection"/>
<xs:enumeration value="distance"/>
<xs:enumeration value="tenure"/>
<xs:enumeration value="interestRate"/>
<xs:enumeration value="baseCurencyValueCube"/>
<xs:enumeration value="All"/>
</xs:restriction>
</xs:simpleType>
I can move ahead with the solution which I stumbled on, but that would
mean a very big change for me, as there are 100s of complex/simple types
and their elements with the same case.
So now I need explanation for same, and want any fix axis has come up
with, for the problem.
Thanks in advance.
Attaching the exception which I get, for guys who understand it as
follows:
[10/19/04 13:18:45:648 IST] 25dda525 SystemOut O JSSEContext:
handleConnection[Socket[addr=/172.32.73.195,port=3862,localport=9043]]
[10/19/04 13:19:11:508 IST] 35652525 enterprise I
org.apache.axis.enterprise Mapping Exception to AxisFault
[10/19/04 13:19:11:523 IST] 35652525 enterprise I
org.apache.axis.enterprise TRAS0014I: The following exception was
logged AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: makeTypeElement() was told to create a type
"{http://webservices.tw.oscar.citigroup.com}CustomerProfileType>
cardNumber", with no containing element
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: makeTypeElement() was told to create a type
&quot;{http://webservices.tw.oscar.citigroup.com}CustomerProfileType
&gt;cardNumber&quot;, with no containing element
faultActor:
faultNode:
faultDetail:
makeTypeElement() was told to create a type
"{http://webservices.tw.oscar.citigroup.com}CustomerProfileType>
cardNumber", with no containing element
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1285)
at
org.apache.axis.wsdl.fromJava.Types.writeType(Types.java:737)
at
org.apache.axis.wsdl.fromJava.Types.writeType(Types.java:716)
at
org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.ja
va:437)
at
org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.j
ava:392)
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1332)
at
org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:326)
at
org.apache.axis.wsdl.fromJava.Emitter.createTypes(Emitter.java:643)
at
org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:379)
at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:262)
at
org.apache.axis.providers.java.JavaProvider.generateWSDL(JavaProvider.ja
va:494)
at
org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:72
)
at
org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at
org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:137)
at
org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:
375)
at
org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:499)
at
org.apache.axis.transport.http.AxisServlet.processWsdlRequest(AxisServle
t.java:484)
at
org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:285)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j
ava:339)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
19)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
618)
at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
makeTypeElement() was told to create a type
"{http://webservices.tw.oscar.citigroup.com}CustomerProfileType>cardNumb
er", with no containing element
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1285)
at
org.apache.axis.wsdl.fromJava.Types.writeType(Types.java:737)
at
org.apache.axis.wsdl.fromJava.Types.writeType(Types.java:716)
at
org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.ja
va:437)
at
org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.j
ava:392)
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1332)
at
org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:326)
at
org.apache.axis.wsdl.fromJava.Emitter.createTypes(Emitter.java:643)
at
org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:379)
at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:262)
at
org.apache.axis.providers.java.JavaProvider.generateWSDL(JavaProvider.ja
va:494)
at
org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:72
)
at
org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at
org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:137)
at
org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:
375)
at
org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:499)
at
org.apache.axis.transport.http.AxisServlet.processWsdlRequest(AxisServle
t.java:484)
at
org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:285)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j
ava:339)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
19)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
618)
at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
.
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: makeTypeElement() was told to create a type
"{http://webservices.tw.oscar.citigroup.com}CustomerProfileType>
cardNumber", with no containing element
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: makeTypeElement() was told to create a type
&quot;{http://webservices.tw.oscar.citigroup.com}CustomerProfileType
&gt;cardNumber&quot;, with no containing element
faultActor:
faultNode:
faultDetail:
makeTypeElement() was told to create a type
"{http://webservices.tw.oscar.citigroup.com}CustomerProfileType>
cardNumber", with no containing element
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1285)
at
org.apache.axis.wsdl.fromJava.Types.writeType(Types.java:737)
at
org.apache.axis.wsdl.fromJava.Types.writeType(Types.java:716)
at
org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.ja
va:437)
at
org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.j
ava:392)
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1332)
at
org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:326)
at
org.apache.axis.wsdl.fromJava.Emitter.createTypes(Emitter.java:643)
at
org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:379)
at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:262)
at
org.apache.axis.providers.java.JavaProvider.generateWSDL(JavaProvider.ja
va:494)
at
org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:72
)
at
org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at
org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:137)
at
org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:
375)
at
org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:499)
at
org.apache.axis.transport.http.AxisServlet.processWsdlRequest(AxisServle
t.java:484)
at
org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:285)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j
ava:339)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
19)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
618)
at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
makeTypeElement() was told to create a type
"{http://webservices.tw.oscar.citigroup.com}CustomerProfileType>cardNumb
er", with no containing element
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1285)
at
org.apache.axis.wsdl.fromJava.Types.writeType(Types.java:737)
at
org.apache.axis.wsdl.fromJava.Types.writeType(Types.java:716)
at
org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.ja
va:437)
at
org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.j
ava:392)
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1332)
at
org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:326)
at
org.apache.axis.wsdl.fromJava.Emitter.createTypes(Emitter.java:643)
at
org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:379)
at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:262)
at
org.apache.axis.providers.java.JavaProvider.generateWSDL(JavaProvider.ja
va:494)
at
org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:72
)
at
org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at
org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:137)
at
org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:
375)
at
org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:499)
at
org.apache.axis.transport.http.AxisServlet.processWsdlRequest(AxisServle
t.java:484)
at
org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:285)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j
ava:339)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
19)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
618)
at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
[10/19/04 13:19:37:039 IST] 779da526 SystemOut O JSSEContext:
handleConnection[Socket[addr=/172.32.73.195,port=3873,localport=9043]]
Thanks & Regards
Pranay Parsatwar
MphasiS India
2nd Floor,, The Leela Business Park
Andheri Kurla Road,
Andheri (East)
Mumbai - 400 059
Tel: (91)-22-56777777
http://www.mphasis.com/ <http://www.mphasis.com/>