Re: Error Running WSDLToJava: No symbol table entry found

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Error Running WSDLToJava: No symbol table entry found

Anne Thomas Manes
Eric,

Your error is caused by an unqualified message reference in this
<input> binding definition (which appears in all three of your
operations):

  <input>
     <soap:header message="tns:equipment" part="body"
         namespace="http://www.starviewtechnology.com/schema/2.2/collector"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="literal">
        <soap:headerfault message="EquipmentNotRegistered" part="errorString"
            namespace="http://www.starviewtechnology.com/schema/2.2/collector"
            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="literal" />
     </soap:header>
     <soap:body
namespace="http://www.starviewtechnology.com/schema/2.2/collector"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="literal" />
  </input>

This line:

   <soap:headerfault message="EquipmentNotRegistered" part="errorString"

should be:

   <soap:headerfault message="tns:EquipmentNotRegistered" part="errorString"

But meanwhile, there are a number of errors in your WSDL:

1- When using document style, all message parts must reference
elements, not types, therefore the following message definition is
wrong:

  <message name="EquipmentNotRegistered">
    <part name="errorString" type="xsd:string" />
  </message>

You must define an element in your schema called "errorString":
 
   <xsd:element name="errorString" type="xsd:string/>

And you should change the message definition to this:

  <message name="EquipmentNotRegistered">
    <part name="errorString" element="sv:errorString" />
  </message>

or better yet:

  <message name="EquipmentNotRegistered">
    <part name="headerfault" element="sv:errorString" />
  </message>

2- when defining a document/literal soap:header, soap:headerfault, or
soap:body binding, you must specify only the use="literal" attribute.
You must not specify the namespace attribute (used only for
style="rpc") or the encodingStyle attribute (used only for
use="encoded"). All of your current bindings are wrong. For example,
this input message:

  <input>
     <soap:header message="tns:equipment" part="body"
         namespace="http://www.starviewtechnology.com/schema/2.2/collector"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="literal">
        <soap:headerfault message="EquipmentNotRegistered" part="errorString"
            namespace="http://www.starviewtechnology.com/schema/2.2/collector"
            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="literal" />
     </soap:header>
     <soap:body
namespace="http://www.starviewtechnology.com/schema/2.2/collector"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="literal" />
  </input>

Should be:

  <input>
     <soap:header message="tns:equipment" part="body" use="literal">
        <soap:headerfault message="tns:EquipmentNotRegistered"
part="headerfault"
            use="literal" />
     </soap:header>
     <soap:body use="literal" />
  </input>

3- On a more basic level, it doesn't make sense to define a
headerfault for one-way message operations. You can only return a
fault when using the request/response message exchange pattern.

I also have to ask why you've named your header parts "body". This
won't cause an error, but it's makes it much more confusing to the
reader.

I've attached an updated WSDL. It fixes the first two problems, but it
doesn't address problem #3. To fix that, either remove the headerfault
binding definition, or define response messages.

Regards,

Anne

On 5/6/05, eogreen <[hidden email]> wrote:

> Here's the WSDL obtained from service URL.
>
> Thanks,
> Eric
>
>
> --- Anne Thomas Manes <[hidden email]> wrote:
> > I think you have a namespace problem in your WSDL. The tool is
> > rejecting this element:
> > http://schemas.xmlsoap.org/wsdl/}EquipmentNotRegistered
> >
> > What that says is that you defined an element in the WSDL namespace,
> > but you can't do that. I suspect one of two things. Either you set
> > your targetNamespace to be http://schemas.xmlsoap.org/wsdl/ (can't do
> > that), or you refer to wsdl:EquipmentNotRegistered.
> >
> > If you provide your WSDL, I'd be happy to take a look at it.
> >
> > Anne
> >
> > (ps -- in the future, please send this type of user question to the
> > axis-user list)
> >
> > On 5/5/05, eogreen <[hidden email]> wrote:
> > > Hi,
> > >
> > > May I humbly ask for assistance..?  I am trying to build my WSDLToJava
> > emitter
> > > classes for a new client proxy.  I am getting the following error on the
> > > command line.  I'm not sure which symbol table is being referred to in the
> > > message.
> > >
> > > <sample>
> > >
> > > C:\Documents and Settings\egreen\bench\src>java -cp
> > > org.apache.axis.wsdl.WSDL2Java RTDM-collector-wsdl.xml
> > >
> > > log4j:WARN No appenders could be found for logger
> > > (org.apache.axis.i18n.ProjectResourceBundle).
> > > log4j:WARN Please initialize the log4j system properly.
> > > java.io.IOException: No symbol table entry found for message
> > > {http://schemas.xmlsoap.org/wsdl/}EquipmentNotRegistered
> > >         at
> > org.apache.axis.wsdl.symbolTable.FaultInfo.<init>(FaultInfo.java:99)
> > >         at
> > >
> >
> org.apache.axis.wsdl.symbolTable.SymbolTable.fillInBindingInfo(SymbolTable.java:2568)
> > >         at
> > >
> >
> org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2480)
> > >         at
> > > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:735)
> > >         at
> > > org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:534)
> > >         at
> > > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:509)
> > >         at
> > > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:486)
> > >         at
> > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
> > >         at java.lang.Thread.run(Unknown Source)
> > >
> > > Thanks in advance,
> > > Eric Green
> > >
> > > _____________
> > >
> > >
> > > __________________________________
> > > Yahoo! Mail Mobile
> > > Take Yahoo! Mail with you! Check email on your mobile phone.
> > > http://mobile.yahoo.com/learn/mail
> > >
> >
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>

RTDM-collector-wsdl-ATM.wsdl (14K) Download Attachment