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 "Checa, Maria Carmen (Carmen)" <mc...@avaya.com> on 2007/03/05 19:21:29 UTC
Issue with code generated by wsdl2java when using a restriction on duration type
I am having problems compiling the code generated by wsdl2java when I
have an element defined as a restriction on a duration type.
I am using the nightly build from 3/2/07.
Here is a wsdl that shows the problem as well as the compilation error.
Any ideas?
Thank you
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:myns="http://MyNamespace" targetNamespace="http://MyNamespace">
<wsdl:types>
<xsd:schema elementFormDefault="qualified"
version="1.0.0.3" targetNamespace="http://MyNamespace">
<xsd:element
name="Operation1Content">
<xsd:simpleType>
<xsd:restriction base="xsd:duration">
<xsd:minInclusive value="P0Y0M0DT0H0M0S"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="Operation1Msg">
<wsdl:part name="body"
element="myns:Operation1Content"/>
</wsdl:message>
<wsdl:portType name="MyPortType">
<wsdl:operation name="Operation1">
<wsdl:input
message="myns:Operation1Msg"/>
<wsdl:output
message="myns:Operation1Msg"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyBinding" type="myns:MyPortType">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Operation1">
<wsdlsoap:operation
soapAction="MyOperation"/>
<wsdl:input>
<wsdlsoap:body
use="literal"/>
</wsdl:input>
<wsdl:output>
<wsdlsoap:body
use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="MyPort"
binding="myns:MyBinding">
<wsdlsoap:address
location="http://localhost:8080/MyService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Compilation error:
compile.src:
[javac] Compiling 2 source files to
C:\sdk\axis2build\generatedClient\build\classes
[javac]
C:\sdk\axis2build\generatedClient\src\mynamespace\MyServiceStub.java:686
: cannot find symbol
[javac] symbol : method
compare(org.apache.axis2.databinding.types.Duration,java.lang.String)
[javac] location: class
org.apache.axis2.databinding.utils.ConverterUtil
[javac] if
(org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "") >=
0){
[javac]
^
Re: Issue with code generated by wsdl2java when using a restriction on duration type
Posted by Amila Suriarachchi <am...@gmail.com>.
Seems to be a problem in handling xsd:duration in adb. please log a jira.
On 3/5/07, Checa, Maria Carmen (Carmen) <mc...@avaya.com> wrote:
>
> I am having problems compiling the code generated by wsdl2java when I
> have an element defined as a restriction on a duration type.
>
> I am using the nightly build from 3/2/07.
>
> Here is a wsdl that shows the problem as well as the compilation error.
>
> Any ideas?
>
> Thank you
>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsdlsoap
> ="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:ns="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:myns="http://MyNamespace"targetNamespace
> ="http://MyNamespace">
>
> <wsdl:types>
>
> <xsd:schema elementFormDefault="qualified" version
> ="1.0.0.3" targetNamespace="http://MyNamespace">
>
> <xsd:element name="Operation1Content">
>
> <xsd:simpleType>
>
> <
> xsd:restriction base="xsd:duration">
>
> <
> xsd:minInclusive value="P0Y0M0DT0H0M0S"/>
>
> </
> xsd:restriction>
>
> </xsd:simpleType>
>
> </xsd:element>
>
> </xsd:schema>
>
> </wsdl:types>
>
> <wsdl:message name="Operation1Msg">
>
> <wsdl:part name="body" element="
> myns:Operation1Content"/>
>
> </wsdl:message>
>
> <wsdl:portType name="MyPortType">
>
> <wsdl:operation name="Operation1">
>
> <wsdl:input message="
> myns:Operation1Msg"/>
>
> <wsdl:output message="
> myns:Operation1Msg"/>
>
> </wsdl:operation>
>
> </wsdl:portType>
>
> <wsdl:binding name="MyBinding" type="myns:MyPortType">
>
> <wsdlsoap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>
> <wsdl:operation name="Operation1">
>
> <wsdlsoap:operation soapAction="
> MyOperation"/>
>
> <wsdl:input>
>
> <wsdlsoap:body use="
> literal"/>
>
> </wsdl:input>
>
> <wsdl:output>
>
> <wsdlsoap:body use="
> literal"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> </wsdl:binding>
>
> <wsdl:service name="MyService">
>
> <wsdl:port name="MyPort" binding="myns:MyBinding">
>
> <wsdlsoap:address location="
> http://localhost:8080/MyService"/>
>
> </wsdl:port>
>
> </wsdl:service>
>
> </wsdl:definitions>
>
>
>
>
>
> Compilation error:
>
> compile.src:
>
> [javac] Compiling 2 source files to
> C:\sdk\axis2build\generatedClient\build\classes
>
> [javac]
> C:\sdk\axis2build\generatedClient\src\mynamespace\MyServiceStub.java:686:
> cannot find symbol
>
> [javac] symbol : method compare(
> org.apache.axis2.databinding.types.Duration,java.lang.String)
>
> [javac] location: class
> org.apache.axis2.databinding.utils.ConverterUtil
>
> [javac] if (
> org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "") >= 0){
>
>
> [javac]
> ^
>
>
>
--
Amila Suriarachchi,
WSO2 Inc.