axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <dava...@gmail.com>
Subject Re: 2 WSDL2Java problems moving from 1.1 to 1.3
Date Thu, 03 Nov 2005 01:31:24 GMT
Allen,

i just realized Axis 1.1 was quite possibly silently ignoring
xml:specialAttrs and 1.3 does not support it...could u replace
xml:specialAttrs with say xml:lang? (which is ignored as per some of
the bug reports i have seen). Either way, please log a bug report with
your wsdl.

thanks,
dims

On 11/2/05, Allen Cronce <acronce@earthlink.net> wrote:
>  Thanks Davanum and Pratik.
>
>  I've installed the missing jars. Now the DataHandler and MimeMultipart
> warning is gone.
>
>  But I'm still getting the "specialAttrs is referenced but not defined"
> error, which is the real problem.
>
>  Any other suggestions for resolving this error?
>
>  Best regards,
>  --
>  Allen Cronce
>
>  Davanum Srinivas wrote:
>  JavaMail stuff - http://java.sun.com/products/javamail/
> Activation stuff -
> http://java.sun.com/products/javabeans/glasgow/jaf.html
>
>
> On 11/2/05, Parikh,Pratik <Pratik.Parikh@cerner.com> wrote:
>
>
>  Just get the latest sun jwsdp-1.6 and that should get you
> activation.jar, and you should have j2ee.jar if you have the j2ee
> installed.
>
> Thanks,
> Parikh, Pratik
>
>
>
> -----Original Message-----
> From: Allen Cronce [mailto:acronce@earthlink.net]
> Sent: Wednesday, November 02, 2005 11:00 AM
> To: axis-user@ws.apache.org
> Subject: Re: 2 WSDL2Java problems moving from 1.1 to 1.3
>
> Thanks for the response. I've seen this kind of recommendation in other
> posts. But I haven't added those jars because I thought that all it
> would do is get rid of the DataHandler and MimeMultipart warnings. As I
> indicated, I don't need attachment support.
>
> Honestly I don't see how adding jars specific to attachment support will
> address the "specialAttrs is referenced but not defined" error. But I'm
> willing to try it.
>
> I don't have these jars on my system so I will have to download them.
> Are there certain versions of these jars that I need for Axis 1.3? If
> anyone could provide some links to jars that are known to work, I'd
> appreciate it.
>
> Best regards,
> --
> Allen Cronce
>
> Parikh,Pratik wrote:
>
>
>  Add activation.jar and j2ee.jar in your classpath.
>
> Thanks,
> Parikh, Pratik
> -----Original Message-----
> From: Allen Cronce [mailto:acronce@earthlink.net]
> Sent: Wednesday, November 02, 2005 10:12 AM
> To: axis-user@ws.apache.org
> Subject: 2 WSDL2Java problems moving from 1.1 to 1.3
>
> Hi all,
>
> I ran into a bug in Axis 1.1 where if you have a combination of in,
> out and inout parameters, Axis gets confused and screws up the array
> of parameters delivered to the xxxImpl.java code. As a result, there's
>
>
>  a Java exception because the parameters don't match the method call
> signature.
>
> It looks like this bug is fixed in 1.3, so I'm trying to move to that
> version. But now with 1.3 I'm running into code generation problems.
>
> First, when I use the Axis 1.3 WSDL2Java to generate the server side
> classes, I get the following error:
>
> - Unable to find required classes (javax.activation.DataHandler and
> javax.mail.internet.MimeMultipart). Attachment support is
> disabled.
> Parsing XML file: axisprob.wsdl
> java.io.IOException: Type specialAttrs is referenced but not defined.
>  at
> org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolT
> ab
> le.java:665)
>  at
> org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
>  at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java
> :5
> 18)
>  at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java
> :4
> 95)
>  at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
>  at java.lang.Thread.run(Thread.java:552)
>
> The issue that that WSDL2Java's got a problem with specialAttrs, which
>
>
>  is an attribute group defined by the w3c. I'm importing the xml.xsd
> schema where specialAttrs is defined. I assume that the DataHandler
> and MimeMultipart warnings are just noise since I don't need
> attachment support.
>
> When I previously generated code with Axis 1.1, this error did not
> happen. Further, other validation tools think that the wsdl is fine.
>
> Rather than post my whole schema and wsdl, I've reproduced the problem
>
>
>  in a simple sample wsdl (appended below).
>
> As a test I removed line 30 of my wsdl (where I reference
> xml:specialAttrs), then the code generates. That's not a valid work
> around though because in the real world, this problem appears in an
> external schema file. In any case, even when I hack the wsdl, the
> generated code doesn't build, which is my second problem.
>
> It looks like when you're using document wrapped style and have more
> than one out or inout parameters, Axis wants to wrap any outputted
> class in a "holder" class. That makes sense.
>
> But in this case of my sample wsdl, the code generated passes a
> org.apache.axis.holders.NMTokenHolder to the
> AxisprobSOAPBindingImpl.problemMessage method. This causes
> build
> errors because there is no NMTokenHolder class. There is only a
> TokenHolder class.
>
> I suppose that I can manually edit the generated code to change the
> undefined NMTokenHolder to TokenHolder classes. But it's bothersome
> that Axis is generating code for classes that don't exist.
>
> Again, the problem wsdl can be found below. Also, I've posted a zip of
>
>
>  the wsdl and code generated here:
>
> http://homepage.mac.com/WebObjects/FileSharing.woa/wa/axis_1_3_problem
> .z
> ip.zip?a=downloadFile&user=paceap&path=Sites/axis_1_3_problem.zip
>
> Any suggestions for solving these problems would be welcome.
>
> Best regards,
> --
> Allen Cronce
>
> ---------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?> <definitions
> targetNamespace="axisprob.wsdl"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>  xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:wsdlns="axisprob.wsdl"
>  xmlns:xsdns="axisprob.xsd">
>  <!-- Imports -->
>  <xs:import
> namespace="http://www.w3.org/XML/1998/namespace"
>  schemaLocation="http://www.w3.org/2001/xml.xsd"/>
>  <types>
>  <xs:schema targetNamespace="axisprob.xsd"
> xmlns:xsdns="axisprob.xsd"
>  xmlns:xs="http://www.w3.org/2001/XMLSchema"
>  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>  <!-- Types -->
>  <!-- TextType -->
>  <xs:complexType name="TextType" mixed="true">
>  <xs:annotation>
>  <xs:documentation xml:lang="en"> This is a type
> definition for generic text in
>  XML. For maintenance reasons, it is preferable
>
>
>  to use something like this
>  rather than the built-in datatype string,
> unless you have an absolute
>  requirement to use a simple datatype.
> </xs:documentation>
>  </xs:annotation>
>  <xs:sequence>
>  <xs:any namespace="##any" minOccurs="0"
> maxOccurs="unbounded"
>  processContents="lax"/>
>  </xs:sequence>
>  <xs:attributeGroup ref="xml:specialAttrs"/>
>  <xs:anyAttribute namespace="##any"
> processContents="lax"/>
>  </xs:complexType>
>  <!-- GUIDType -->
>  <xs:simpleType name="GUIDType">
>  <xs:annotation>
>  <xs:documentation xml:lang="en"> This is a type
> definition for globally unique
>  identifiers. </xs:documentation>
>  </xs:annotation>
>  <xs:restriction base="xs:NMTOKEN">
>  <xs:pattern
>
> value="[0-9,A-F,a-f]{8}-[0-9,A-F,a-f]{4}-[0-9,A-F,a-f]{4}-[0-9,A-F,a-f
> ]{
> 4}-[0-9,A-F,a-f]{12}"
>  />
>  </xs:restriction>
>  </xs:simpleType>
>  <!-- RecordReferenceType -->
>  <xs:simpleType name="RecordReferenceType">
>  <xs:annotation>
>  <xs:documentation xml:lang="en"> This is a type
> definition for globally unique
>  identifiers. </xs:documentation>
>  </xs:annotation>
>  <xs:restriction base="xs:NMTOKEN"> </xs:restriction>
>  </xs:simpleType>
>  <!-- Methods signatures -->
>  <!-- problemMessage -->
>  <xs:element name="problemMessage">
>  <xs:annotation>
>  <xs:documentation xml:lang="en"> NEEDS COMMENT
> </xs:documentation>
>  </xs:annotation>
>  <xs:complexType>
>  <xs:sequence>
>  <xs:element name="customerGUID"
> type="xsdns:GUIDType"/>
>  <xs:element name="customerReference"
> type="xsdns:TextType" minOccurs="0"
>  maxOccurs="1"/>
>  </xs:sequence>
>  </xs:complexType>
>  </xs:element>
>  <!-- problemMessageResponse -->
>  <xs:element name="problemMessageResponse">
>  <xs:annotation>
>  <xs:documentation xml:lang="en"> NEEDS COMMENT
> </xs:documentation>
>  </xs:annotation>
>  <xs:complexType>
>  <xs:sequence>
>  <xs:element name="transactionRecordReference"
>  type="xsdns:RecordReferenceType"/>
>  <xs:element name="customerReference"
> type="xsdns:TextType" minOccurs="0"
>  maxOccurs="1"/>
>  <xs:element name="guid"
>
>  type="xsdns:GUIDType"/>
>
>
>  </xs:sequence>
>  </xs:complexType>
>  </xs:element>
>  </xs:schema>
>  </types>
>  <!-- Messages -->
>  <!-- problemMessage message -->
>  <message name="problemMessage">
>  <part name="parameters" element="xsdns:problemMessage"/>
>  </message>
>  <message name="problemMessageResponse">
>  <part name="parameters"
>
>  element="xsdns:problemMessageResponse"/>
>
>
>  </message>
>  <!-- Port type -->
>  <portType name="axisprobPortType">
>  <!-- problemMessage -->
>  <operation name="problemMessage">
>  <input message="wsdlns:problemMessage"/>
>  <output message="wsdlns:problemMessageResponse"/>
>  </operation>
>  </portType>
>  <!-- Binding for axisprob Web APIs - Document style, SOAP over
> HTTP
> -->
>  <binding name="axisprobSOAPBinding"
>
>  type="wsdlns:axisprobPortType">
>
>
>  <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>  <!-- problemMessage -->
>  <operation name="problemMessage">
>  <soap:operation soapAction="urn:axisprob2Action"/>
>  <input>
>  <soap:body use="literal" namespace="axisprob.wsdl"/>
>  </input>
>  <output>
>  <soap:body use="literal" namespace="axisprob.wsdl"/>
>  </output>
>  </operation>
>  </binding>
>  <!-- Endpoint for axisprob Web APIs -->
>  <service name="axisprob2">
>  <port name="axisprobPortType"
> binding="wsdlns:axisprobSOAPBinding">
>  <soap:address
>
>
> location="http://localhost:4310/WebObjects/axisprob2.woa/wa/axisprob2"/>
>
>
>  </port>
>  </service>
> </definitions>
>
>
> CONFIDENTIALITY NOTICE
>
> This message and any included attachments are from Cerner Corporation
> and are intended only for the addressee. The information contained in
> this message is confidential and may constitute inside or non-public
> information under international, federal, or state securities laws.
> Unauthorized forwarding, printing, copying, distribution, or use of
> such information is strictly prohibited and may be unlawful. If you
> are not the addressee, please promptly delete this message and notify
> the sender of the delivery error by e-mail or you may call Cerner's
> corporate offices in Kansas City, Missouri, U.S.A at (+1)
> (816)221-1024.
> ---------------------------------------- --
>
>
>
>  CONFIDENTIALITY NOTICE
>
> This message and any included attachments
> are from Cerner Corporation and are intended
> only for the addressee. The information
> contained in this message is confidential and
> may constitute inside or non-public information
> under international, federal, or state
> securities laws. Unauthorized forwarding,
> printing, copying, distribution, or use of such
> information is strictly prohibited and may be
> unlawful. If you are not the addressee, please
> promptly delete this message and notify the
> sender of the delivery error by e-mail or you
> may call Cerner's corporate offices in Kansas
> City, Missouri, U.S.A at (+1) (816)221-1024.
> ---------------------------------------- --
>
>
>
> --
> Davanum Srinivas : http://wso2.com/blogs/
>
>
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Mime
View raw message