axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: WSDL Crimson vs. Xerces parser problem.
Date Fri, 30 Nov 2001 13:50:45 GMT
Tom,

If you pick up the latest code from CVS, you will see the parsing errors with FileGen.wsdl
whether
you use crimson or xerces. How do you want to handle this? Should we get rid of FileGen.wsdl
from
the testing process? It's upto you.

Thanks,
dims

--- Davanum Srinivas <dims@yahoo.com> wrote:
> Edwin,
> 
> We ran into a problem with crimson. Here's a test case (test.java and FileGen.wsdl).
Can you
> please take a look. I was able to recreate the problem with latest crimson from cvs.
Also see
> below a stack trace.
> 
> Thanks,
> dims
> 
> ===================================================================================
> Exception in thread "main" org.apache.crimson.tree.DomEx: NAMESPACE_ERR: Attempt to create
or
> change an object in a way which is incorrect with regard to namespaces.
>         at
> org.apache.crimson.tree.XmlDocumentBuilderNS.startElement(XmlDocumentBuilderNS.java:111)
>         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1488)
>         at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
>         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
>         at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
>         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
>         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
>         at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
>         at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
>         at test.main(test.java:9)
> ===================================================================================
> 
> 
> --- Tom Jordahl <tomj@macromedia.com> wrote:
> > Hello,
> > 
> > I just submitted a WSDL file (test/filegen/FileGen.wsdl) which seems to
> > cause Wsdl2java to crash when used with crimson.jar instead of xerces.jar.
> > This is a problem because ant uses the crimson.jar in ant/lib when running
> > the tests.  You have to remove this jar file and replace it with xerces in
> > order for 'ant functional-tests' to run at 100%. Otherwise the
> > 'test.filegen.FileGenTestCase' will fail.
> > 
> > The offending piece of XML is the non-SOAP binding:
> > 
> >   <!-- Non-soap binding, no code should be emitted for it -->
> >   <binding name="ReferenceHttpGet" type="serviceNS:PortTypeNotSoap">
> >     <http:binding verb="GET" />
> >     <operation name="myop">
> >       <http:operation location="/GetReference" />
> >       <input>
> >         <http:urlEncoded />
> >       </input>
> >       <output>
> >         <mime:mimeXml part="Body" />
> >       </output>
> >     </operation>
> >    </binding>
> > 
> > 
> > I am not sure what to do about this, as the test case needs a non-SOAP
> > binding to verify that we do not in fact emit code for this binding.  Anyone
> > have any idea or thoughts on this?
> > 
> > Thanks.
> > 
> > --
> > Tom Jordahl
> > Macromedia Server Development
> > 
> > 
> 
> 
> =====
> Davanum Srinivas - http://jguru.com/dims/
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1

> ATTACHMENT part 2 application/x-javascript name=test.java
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions targetNamespace="http://test.com/reference" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>     xmlns:serviceNS="http://test.com/reference" 
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
>     xmlns="http://schemas.xmlsoap.org/wsdl/">
>  
>   <!-- type defs -->
>   <!-- None of these types are referenced, so there shuold be no code emitted -->
>   <types>
>     <xsd:schema targetNamespace="http://test.com/reference"
>                 xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> 
>       <xsd:simpleType name="stateType">
>         <xsd:restriction base="xsd:string">
>             <xsd:enumeration value="TX"/>                      
>             <xsd:enumeration value="IN"/>                    
>             <xsd:enumeration value="OH"/>                    
>         </xsd:restriction>
>       </xsd:simpleType>
> 
>       <xsd:complexType name="address">
>         <xsd:all>
>             <xsd:element name="streetNum" type="xsd:int"/>
>             <xsd:element name="streetName" type="xsd:string"/>
>             <xsd:element name="city" type="xsd:string"/>
>             <xsd:element name="state" type="typens:stateType"/>
>             <xsd:element name="zip" type="xsd:int"/>
>         </xsd:all>
>       </xsd:complexType>
>     </xsd:schema>
>   </types>
>   
>   <!-- Messages for the SOAP operation -->
>   <message name="myopRequest">
>     <part name="argument" type="xsd:string"/>
>   </message>
>   <message name="myopResponse">
>     <part name="myopResult" type="xsd:float"/>
>   </message>
>   <!-- We should Emit an opFault Exception class -->
>   <message name="opFault">
>     <part name="info" type="xsd:string"/>
>   </message>
> 
>   <!-- messages for the HTTP operation -->
>   <message name="otheropHttpGetIn">
>     <part name="ISBN" type="xsd:string" />
>   </message>
>   <message name="otheropHttpGetOut">
>     <part name="Body" element="xsd:string" />
>   </message>
> 
>   <!-- unused fault, should not be emitted -->
>   <message name="InvalidTickerFaultMessage">
>     <part name="tickerSymbol" type="xsd:string"/>
>   </message>
> 
> 
>   <!-- SOAP portType -->
>   <portType name="PortTypeSoap">
>     <operation name="myop">
>       <input message="serviceNS:myopRequest"/>
>       <output message="serviceNS:myopResponse"/>
>       <fault message="serviceNS:opFault"/>
>     </operation>
>   </portType>
> 
>   <!-- non-Soap portType, code should not be emitted for it -->
>   <portType name="PortTypeNotSoap">
>     <operation name="otherop">
>       <input message="serviceNS:otheropHttpGetIn"/>
>       <output message="serviceNS:otheropHttpGetOut"/>
>       <fault message="serviceNS:InvalidTickerFaultMessage"/>
>     </operation>
>   </portType>
> 
>   <!-- SOAP binding -->
>   <binding name="ReferenceSoapBinding" type="serviceNS:PortTypeSoap">
>     <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="myop">
>       <soap:operation soapAction="" style="rpc"/>
>       <input>
>         <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace=""/>
>       </input>
>       <output>
>         <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace=""/>
>       </output>
>       <fault>
>         <soap:fault name="opFault" use="encoded"/>
>       </fault>
>     </operation>
>   </binding>
> 
>   <!-- Non-soap binding, no code should be emitted for it -->
>   <binding name="ReferenceHttpGet" type="serviceNS:PortTypeNotSoap">
>     <http:binding verb="GET" />
>     <operation name="myop">
>       <http:operation location="/GetReference" />
>       <input>
>         <http:urlEncoded />
>       </input>
>       <output>
>         <mime:mimeXml part="Body" />
>       </output>
>     </operation>
>    </binding>
> 
> 
>   <service name="ReferenceService">
>     <!-- SOAP port -->
>     <port name="ReferenceService" binding="serviceNS:ReferenceSoapBinding">
>       <soap:address location="http://localhost:8080/axis/services/ReferenceService"/>
>     </port>
> 
>     <!-- non-Soap port, no code should be emitted for it -->
>     <port name="ReferenceHttpGet" binding="serviceNS:ReferenceHttpGet">
>       <http:address location="http://test.com/foo/bar" />
>     </port>
> 
>   </service>
> </definitions>
> 


=====
Davanum Srinivas - http://jguru.com/dims/

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

Mime
View raw message