You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Thomas Naecker (JIRA)" <ji...@apache.org> on 2007/06/25 16:22:25 UTC
[jira] Created: (AXIS2-2852) Invalid number of parameters in method
toOM() after generating code with jaxbri
Invalid number of parameters in method toOM() after generating code with jaxbri
-------------------------------------------------------------------------------
Key: AXIS2-2852
URL: https://issues.apache.org/jira/browse/AXIS2-2852
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: codegen
Affects Versions: 1.2
Environment: AXIS2-1.2 and Eclipse WTP latest Version
Reporter: Thomas Naecker
I have generated Code with the jaxbri DataBinding. Now there is the Problem, that this Code has a invalid methodcall:
f.setDetail(toOM(e.getFaultMessage(), false));
in the MessageReceiver.
The existing methods are:
toOM(String, SOAPFactory, boolean)
toOM(CarsysServiceRequest, SOAPFactory, boolen)
toOM(CarsysServiceResponse, SOAPFactory, boolean)
The Parameter SOAPFactory is missing.
Any Idea how to fix it? Is it a Problem of the AntCodegenTask? I used the following (short) ant script:
<?xml version="1.0"?>
<project name="MyService Codegen" default="main" basedir=".">
<path id="axis2.classpath">
<fileset dir="C:\Apache\axis2-1.2\">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="declare">
<taskdef name="codegen" classname="org.apache.axis2.tool.ant.AntCodegenTask"
classpathref="axis2.classpath" />
</target>
<target name="main" depends="declare">
<codegen wsdlfilename="MyService.wsdl" output="."
serverside="true" serversideinterface="true" generateservicexml="true" databindingName="jaxbri"/>
</target>
</project>
The WSDL:
<wsdl:definitions xmlns:tns="http://localhost:8080/webservice/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:cst="http://localhost:8080/webservice/MyServiceSchema"
targetNamespace="http://localhost:8080/webservice/">
<wsdl:types>
<xsd:schema>
<xsd:import schemaLocation="MyServiceSchema.xsd"
namespace="http://localhost:8080/webservice/MyServiceSchema" />
</xsd:schema>
<xsd:schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://localhost:8080/webservice/">
<xsd:element name="FaultMessageString" nillable="true"
type="xsd:string" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="MyService_Request">
<wsdl:part name="part1" element="cst:MyServiceRequest" />
</wsdl:message>
<wsdl:message name="MyService_Response">
<wsdl:part name="part1" element="cst:MyServiceResponse" />
</wsdl:message>
<wsdl:message name="MyServiceFault">
<wsdl:part name="part1" element="tns:FaultMessageString" />
</wsdl:message>
<wsdl:portType name="MyServicePortType">
<wsdl:operation name="sendMyRequest">
<wsdl:input
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
message="tns:MyService_Request"
wsaw:Action="http://localhost:8080/webservice/MyService/MyService_Request" />
<wsdl:output
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
message="tns:MyService_Response"
wsaw:Action="http://localhost:8080/webservice/MyService/MyService_Response" />
<wsdl:fault
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
message="tns:MyServiceFault" name="MyServiceFault"
wsaw:Action="http://localhost:8080/webservice/MyService/sendMyRequest/Fault/MyServiceFault" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyServiceSOAP11Binding"
type="tns:MyServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="sendMyRequest">
<soap:operation
soapAction="http://localhost:8080/archiveengine/wsdl/MyService/MyService_Request"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="MyServiceFault">
<soap:fault name="MyServiceFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="MyServiceSOAP12Binding"
type="tns:MyServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="sendMyRequest">
<soap12:operation
soapAction="http://localhost:8080/archiveengine/wsdl/MyService/MyService_Request"
style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
<wsdl:fault name="MyServiceFault">
<soap12:fault use="literal" name="MyServiceFault" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="MyServiceSOAP11port_http"
binding="tns:MyServiceSOAP11Binding">
<soap:address
location="http://localhost:8080/axis2/services/MyService" />
</wsdl:port>
<wsdl:port name="MyServiceSOAP12port_http"
binding="tns:MyServiceSOAP12Binding">
<soap12:address
location="http://localhost:8080/axis2/services/MyService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The XML Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema elementFormDefault="unqualified"
xmlns="http://localhost:8080/webservice/MyServiceSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
targetNamespace="http://localhost:8080/webservice/MyServiceSchema">
<xsd:element name="MyServiceRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="operation_type"/>
<xsd:element ref="archive_area"/>
<xsd:choice>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" ref="docReq"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element ref="sql_where_statement"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="MyServiceResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="resultNumber"/>
<xsd:element minOccurs="0" maxOccurs="unbounded" ref="docRes"/>
<xsd:element minOccurs="0" ref="concatenated_document"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!-- SOURCE for Request AND Response -->
<xsd:element name="source">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="system"/>
<xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="system" type="xsd:string"/>
<xsd:element name="parameter">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="string_value" type="xsd:string"/>
<xsd:element name="date_value" type="xsd:dateTime"/>
<xsd:element name="int_value" type="xsd:unsignedInt"/>
<!-- DECLARATIONS FOR REQUEST MESSAGES -->
<!-- OPERATION_TYPE -->
<xsd:element name="operation_type">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="name"/>
<xsd:element ref="operation_by"/>
<xsd:element ref="return_metadata"/>
<xsd:element ref="concatenate_documents"/>
<xsd:element ref="limit_documents"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="name">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="queryDatabase"/>
<xsd:enumeration value="getDocuments"/>
<xsd:enumeration value="getResultNumber"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="operation_by">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ref"/>
<xsd:enumeration value="my_id"/>
<xsd:enumeration value="MY"/>
<xsd:enumeration value="attributes"/>
<xsd:enumeration value="sql"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="return_metadata">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:boolean"/>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="concatenate_documents">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:boolean"/>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="limit_documents">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:unsignedInt"/>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<!-- ARCHIVE_AREA -->
<xsd:element name="archive_area">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="my2"/>
<xsd:enumeration value="docudid"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<!-- DOCUMENT -->
<xsd:element name="docReq">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" ref="attributeReq"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="attributeReq">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element ref="between"/>
<xsd:element ref="equal"/>
<xsd:element ref="not_equal"/>
<xsd:element ref="like"/>
<xsd:element ref="in"/>
<xsd:element ref="not_in"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="between">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:sequence>
<xsd:element minOccurs="2" maxOccurs="2" ref="string_value"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element minOccurs="2" maxOccurs="2" ref="date_value"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element minOccurs="2" maxOccurs="2" ref="int_value"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="equal">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:sequence>
<xsd:element ref="string_value"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element ref="date_value"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element ref="int_value"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="not_equal">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:sequence>
<xsd:element ref="string_value"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element ref="date_value"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element ref="int_value"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="like">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="string_value"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="in">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:sequence>
<xsd:element minOccurs="2" maxOccurs="unbounded" ref="string_value"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element minOccurs="2" maxOccurs="unbounded" ref="int_value"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="not_in">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:sequence>
<xsd:element minOccurs="2" maxOccurs="unbounded" ref="string_value"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element minOccurs="2" maxOccurs="unbounded" ref="int_value"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!-- SQL_WHERE_STATEMENT -->
<xsd:element name="sql_where_statement" type="xsd:string"/>
<!-- DECLARATIONS FOR RESPONSE MESSAGES -->
<!-- RESULT_NUMBER -->
<xsd:element name="resultNumber" type="xsd:unsignedInt"/>
<!-- DOCUMENT -->
<xsd:element name="docRes">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" ref="attributeRes"/>
<xsd:element ref="base64Document" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="attributeRes">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element ref="string_value"/>
<xsd:element ref="date_value"/>
<xsd:element ref="int_value"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
<!-- CONCATENATED_DOCUMENT -->
<xsd:element name="concatenated_document">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="base64Document"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!-- Base64Document -->
<xsd:element name="base64Document" type="xsd:base64Binary"/>
</xsd:schema>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-2852) Invalid number of parameters in method
toOM() after generating code with jaxbri
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davanum Srinivas updated AXIS2-2852:
------------------------------------
Assignee: Amila Chinthaka Suriarachchi
> Invalid number of parameters in method toOM() after generating code with jaxbri
> -------------------------------------------------------------------------------
>
> Key: AXIS2-2852
> URL: https://issues.apache.org/jira/browse/AXIS2-2852
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.2
> Environment: AXIS2-1.2 and Eclipse WTP latest Version
> Reporter: Thomas Naecker
> Assignee: Amila Chinthaka Suriarachchi
>
> I have generated Code with the jaxbri DataBinding. Now there is the Problem, that this Code has a invalid methodcall:
> f.setDetail(toOM(e.getFaultMessage(), false));
> in the MessageReceiver.
> The existing methods are:
> toOM(String, SOAPFactory, boolean)
> toOM(CarsysServiceRequest, SOAPFactory, boolen)
> toOM(CarsysServiceResponse, SOAPFactory, boolean)
> The Parameter SOAPFactory is missing.
> Any Idea how to fix it? Is it a Problem of the AntCodegenTask? I used the following (short) ant script:
> <?xml version="1.0"?>
> <project name="MyService Codegen" default="main" basedir=".">
> <path id="axis2.classpath">
> <fileset dir="C:\Apache\axis2-1.2\">
> <include name="**/*.jar"/>
> </fileset>
> </path>
> <target name="declare">
> <taskdef name="codegen" classname="org.apache.axis2.tool.ant.AntCodegenTask"
> classpathref="axis2.classpath" />
> </target>
> <target name="main" depends="declare">
> <codegen wsdlfilename="MyService.wsdl" output="."
> serverside="true" serversideinterface="true" generateservicexml="true" databindingName="jaxbri"/>
> </target>
> </project>
> The WSDL:
> <wsdl:definitions xmlns:tns="http://localhost:8080/webservice/"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:cst="http://localhost:8080/webservice/MyServiceSchema"
> targetNamespace="http://localhost:8080/webservice/">
> <wsdl:types>
> <xsd:schema>
> <xsd:import schemaLocation="MyServiceSchema.xsd"
> namespace="http://localhost:8080/webservice/MyServiceSchema" />
> </xsd:schema>
> <xsd:schema attributeFormDefault="unqualified"
> elementFormDefault="qualified"
> targetNamespace="http://localhost:8080/webservice/">
> <xsd:element name="FaultMessageString" nillable="true"
> type="xsd:string" />
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="MyService_Request">
> <wsdl:part name="part1" element="cst:MyServiceRequest" />
> </wsdl:message>
> <wsdl:message name="MyService_Response">
> <wsdl:part name="part1" element="cst:MyServiceResponse" />
> </wsdl:message>
> <wsdl:message name="MyServiceFault">
> <wsdl:part name="part1" element="tns:FaultMessageString" />
> </wsdl:message>
> <wsdl:portType name="MyServicePortType">
> <wsdl:operation name="sendMyRequest">
> <wsdl:input
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="tns:MyService_Request"
> wsaw:Action="http://localhost:8080/webservice/MyService/MyService_Request" />
> <wsdl:output
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="tns:MyService_Response"
> wsaw:Action="http://localhost:8080/webservice/MyService/MyService_Response" />
> <wsdl:fault
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="tns:MyServiceFault" name="MyServiceFault"
> wsaw:Action="http://localhost:8080/webservice/MyService/sendMyRequest/Fault/MyServiceFault" />
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="MyServiceSOAP11Binding"
> type="tns:MyServicePortType">
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document" />
> <wsdl:operation name="sendMyRequest">
> <soap:operation
> soapAction="http://localhost:8080/archiveengine/wsdl/MyService/MyService_Request"
> style="document" />
> <wsdl:input>
> <soap:body use="literal" />
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal" />
> </wsdl:output>
> <wsdl:fault name="MyServiceFault">
> <soap:fault name="MyServiceFault" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:binding name="MyServiceSOAP12Binding"
> type="tns:MyServicePortType">
> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document" />
> <wsdl:operation name="sendMyRequest">
> <soap12:operation
> soapAction="http://localhost:8080/archiveengine/wsdl/MyService/MyService_Request"
> style="document" />
> <wsdl:input>
> <soap12:body use="literal" />
> </wsdl:input>
> <wsdl:output>
> <soap12:body use="literal" />
> </wsdl:output>
> <wsdl:fault name="MyServiceFault">
> <soap12:fault use="literal" name="MyServiceFault" />
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="MyService">
> <wsdl:port name="MyServiceSOAP11port_http"
> binding="tns:MyServiceSOAP11Binding">
> <soap:address
> location="http://localhost:8080/axis2/services/MyService" />
> </wsdl:port>
> <wsdl:port name="MyServiceSOAP12port_http"
> binding="tns:MyServiceSOAP12Binding">
> <soap12:address
> location="http://localhost:8080/axis2/services/MyService" />
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> The XML Schema:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema elementFormDefault="unqualified"
> xmlns="http://localhost:8080/webservice/MyServiceSchema"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
> targetNamespace="http://localhost:8080/webservice/MyServiceSchema">
> <xsd:element name="MyServiceRequest">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="source"/>
> <xsd:element ref="operation_type"/>
> <xsd:element ref="archive_area"/>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" ref="docReq"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="sql_where_statement"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> <xsd:element name="MyServiceResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="source"/>
> <xsd:element ref="resultNumber"/>
> <xsd:element minOccurs="0" maxOccurs="unbounded" ref="docRes"/>
> <xsd:element minOccurs="0" ref="concatenated_document"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> <!-- SOURCE for Request AND Response -->
> <xsd:element name="source">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="system"/>
> <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="system" type="xsd:string"/>
> <xsd:element name="parameter">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:string">
> <xsd:attribute name="name" type="xsd:string" use="required"/>
> </xsd:extension>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="string_value" type="xsd:string"/>
> <xsd:element name="date_value" type="xsd:dateTime"/>
> <xsd:element name="int_value" type="xsd:unsignedInt"/>
> <!-- DECLARATIONS FOR REQUEST MESSAGES -->
> <!-- OPERATION_TYPE -->
> <xsd:element name="operation_type">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="name"/>
> <xsd:element ref="operation_by"/>
> <xsd:element ref="return_metadata"/>
> <xsd:element ref="concatenate_documents"/>
> <xsd:element ref="limit_documents"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="name">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="queryDatabase"/>
> <xsd:enumeration value="getDocuments"/>
> <xsd:enumeration value="getResultNumber"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> <xsd:element name="operation_by">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="ref"/>
> <xsd:enumeration value="my_id"/>
> <xsd:enumeration value="MY"/>
> <xsd:enumeration value="attributes"/>
> <xsd:enumeration value="sql"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> <xsd:element name="return_metadata">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:boolean"/>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="concatenate_documents">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:boolean"/>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="limit_documents">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:unsignedInt"/>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
>
> <!-- ARCHIVE_AREA -->
> <xsd:element name="archive_area">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="my2"/>
> <xsd:enumeration value="docudid"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
>
> <!-- DOCUMENT -->
> <xsd:element name="docReq">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" ref="attributeReq"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="attributeReq">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:element ref="between"/>
> <xsd:element ref="equal"/>
> <xsd:element ref="not_equal"/>
> <xsd:element ref="like"/>
> <xsd:element ref="in"/>
> <xsd:element ref="not_in"/>
> </xsd:choice>
> </xsd:sequence>
> <xsd:attribute name="name" type="xsd:string" use="required"/>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="between">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="2" ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="2" ref="date_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="2" ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="equal">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="date_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="not_equal">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="date_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="like">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="string_value"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="in">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="unbounded" ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="unbounded" ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="not_in">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="unbounded" ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="unbounded" ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <!-- SQL_WHERE_STATEMENT -->
> <xsd:element name="sql_where_statement" type="xsd:string"/>
> <!-- DECLARATIONS FOR RESPONSE MESSAGES -->
> <!-- RESULT_NUMBER -->
> <xsd:element name="resultNumber" type="xsd:unsignedInt"/>
>
> <!-- DOCUMENT -->
> <xsd:element name="docRes">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element minOccurs="0" maxOccurs="unbounded" ref="attributeRes"/>
> <xsd:element ref="base64Document" minOccurs="0" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="attributeRes">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:element ref="string_value"/>
> <xsd:element ref="date_value"/>
> <xsd:element ref="int_value"/>
> </xsd:choice>
> </xsd:sequence>
> <xsd:attribute name="name" type="xsd:string" use="required"/>
> </xsd:complexType>
> </xsd:element>
>
> <!-- CONCATENATED_DOCUMENT -->
> <xsd:element name="concatenated_document">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="base64Document"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> <!-- Base64Document -->
> <xsd:element name="base64Document" type="xsd:base64Binary"/>
> </xsd:schema>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-2852) Invalid number of parameters in
method toOM() after generating code with jaxbri
Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Chinthaka Suriarachchi resolved AXIS2-2852.
-------------------------------------------------
Resolution: Fixed
fixed with the revision 550736.
> Invalid number of parameters in method toOM() after generating code with jaxbri
> -------------------------------------------------------------------------------
>
> Key: AXIS2-2852
> URL: https://issues.apache.org/jira/browse/AXIS2-2852
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.2
> Environment: AXIS2-1.2 and Eclipse WTP latest Version
> Reporter: Thomas Naecker
> Assignee: Amila Chinthaka Suriarachchi
>
> I have generated Code with the jaxbri DataBinding. Now there is the Problem, that this Code has a invalid methodcall:
> f.setDetail(toOM(e.getFaultMessage(), false));
> in the MessageReceiver.
> The existing methods are:
> toOM(String, SOAPFactory, boolean)
> toOM(CarsysServiceRequest, SOAPFactory, boolen)
> toOM(CarsysServiceResponse, SOAPFactory, boolean)
> The Parameter SOAPFactory is missing.
> Any Idea how to fix it? Is it a Problem of the AntCodegenTask? I used the following (short) ant script:
> <?xml version="1.0"?>
> <project name="MyService Codegen" default="main" basedir=".">
> <path id="axis2.classpath">
> <fileset dir="C:\Apache\axis2-1.2\">
> <include name="**/*.jar"/>
> </fileset>
> </path>
> <target name="declare">
> <taskdef name="codegen" classname="org.apache.axis2.tool.ant.AntCodegenTask"
> classpathref="axis2.classpath" />
> </target>
> <target name="main" depends="declare">
> <codegen wsdlfilename="MyService.wsdl" output="."
> serverside="true" serversideinterface="true" generateservicexml="true" databindingName="jaxbri"/>
> </target>
> </project>
> The WSDL:
> <wsdl:definitions xmlns:tns="http://localhost:8080/webservice/"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:cst="http://localhost:8080/webservice/MyServiceSchema"
> targetNamespace="http://localhost:8080/webservice/">
> <wsdl:types>
> <xsd:schema>
> <xsd:import schemaLocation="MyServiceSchema.xsd"
> namespace="http://localhost:8080/webservice/MyServiceSchema" />
> </xsd:schema>
> <xsd:schema attributeFormDefault="unqualified"
> elementFormDefault="qualified"
> targetNamespace="http://localhost:8080/webservice/">
> <xsd:element name="FaultMessageString" nillable="true"
> type="xsd:string" />
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="MyService_Request">
> <wsdl:part name="part1" element="cst:MyServiceRequest" />
> </wsdl:message>
> <wsdl:message name="MyService_Response">
> <wsdl:part name="part1" element="cst:MyServiceResponse" />
> </wsdl:message>
> <wsdl:message name="MyServiceFault">
> <wsdl:part name="part1" element="tns:FaultMessageString" />
> </wsdl:message>
> <wsdl:portType name="MyServicePortType">
> <wsdl:operation name="sendMyRequest">
> <wsdl:input
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="tns:MyService_Request"
> wsaw:Action="http://localhost:8080/webservice/MyService/MyService_Request" />
> <wsdl:output
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="tns:MyService_Response"
> wsaw:Action="http://localhost:8080/webservice/MyService/MyService_Response" />
> <wsdl:fault
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> message="tns:MyServiceFault" name="MyServiceFault"
> wsaw:Action="http://localhost:8080/webservice/MyService/sendMyRequest/Fault/MyServiceFault" />
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="MyServiceSOAP11Binding"
> type="tns:MyServicePortType">
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document" />
> <wsdl:operation name="sendMyRequest">
> <soap:operation
> soapAction="http://localhost:8080/archiveengine/wsdl/MyService/MyService_Request"
> style="document" />
> <wsdl:input>
> <soap:body use="literal" />
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal" />
> </wsdl:output>
> <wsdl:fault name="MyServiceFault">
> <soap:fault name="MyServiceFault" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:binding name="MyServiceSOAP12Binding"
> type="tns:MyServicePortType">
> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document" />
> <wsdl:operation name="sendMyRequest">
> <soap12:operation
> soapAction="http://localhost:8080/archiveengine/wsdl/MyService/MyService_Request"
> style="document" />
> <wsdl:input>
> <soap12:body use="literal" />
> </wsdl:input>
> <wsdl:output>
> <soap12:body use="literal" />
> </wsdl:output>
> <wsdl:fault name="MyServiceFault">
> <soap12:fault use="literal" name="MyServiceFault" />
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="MyService">
> <wsdl:port name="MyServiceSOAP11port_http"
> binding="tns:MyServiceSOAP11Binding">
> <soap:address
> location="http://localhost:8080/axis2/services/MyService" />
> </wsdl:port>
> <wsdl:port name="MyServiceSOAP12port_http"
> binding="tns:MyServiceSOAP12Binding">
> <soap12:address
> location="http://localhost:8080/axis2/services/MyService" />
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> The XML Schema:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema elementFormDefault="unqualified"
> xmlns="http://localhost:8080/webservice/MyServiceSchema"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
> targetNamespace="http://localhost:8080/webservice/MyServiceSchema">
> <xsd:element name="MyServiceRequest">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="source"/>
> <xsd:element ref="operation_type"/>
> <xsd:element ref="archive_area"/>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" ref="docReq"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="sql_where_statement"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> <xsd:element name="MyServiceResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="source"/>
> <xsd:element ref="resultNumber"/>
> <xsd:element minOccurs="0" maxOccurs="unbounded" ref="docRes"/>
> <xsd:element minOccurs="0" ref="concatenated_document"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> <!-- SOURCE for Request AND Response -->
> <xsd:element name="source">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="system"/>
> <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="system" type="xsd:string"/>
> <xsd:element name="parameter">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:string">
> <xsd:attribute name="name" type="xsd:string" use="required"/>
> </xsd:extension>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="string_value" type="xsd:string"/>
> <xsd:element name="date_value" type="xsd:dateTime"/>
> <xsd:element name="int_value" type="xsd:unsignedInt"/>
> <!-- DECLARATIONS FOR REQUEST MESSAGES -->
> <!-- OPERATION_TYPE -->
> <xsd:element name="operation_type">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="name"/>
> <xsd:element ref="operation_by"/>
> <xsd:element ref="return_metadata"/>
> <xsd:element ref="concatenate_documents"/>
> <xsd:element ref="limit_documents"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="name">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="queryDatabase"/>
> <xsd:enumeration value="getDocuments"/>
> <xsd:enumeration value="getResultNumber"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> <xsd:element name="operation_by">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="ref"/>
> <xsd:enumeration value="my_id"/>
> <xsd:enumeration value="MY"/>
> <xsd:enumeration value="attributes"/>
> <xsd:enumeration value="sql"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> <xsd:element name="return_metadata">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:boolean"/>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="concatenate_documents">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:boolean"/>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="limit_documents">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:unsignedInt"/>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
>
> <!-- ARCHIVE_AREA -->
> <xsd:element name="archive_area">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="my2"/>
> <xsd:enumeration value="docudid"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
>
> <!-- DOCUMENT -->
> <xsd:element name="docReq">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" ref="attributeReq"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="attributeReq">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:element ref="between"/>
> <xsd:element ref="equal"/>
> <xsd:element ref="not_equal"/>
> <xsd:element ref="like"/>
> <xsd:element ref="in"/>
> <xsd:element ref="not_in"/>
> </xsd:choice>
> </xsd:sequence>
> <xsd:attribute name="name" type="xsd:string" use="required"/>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="between">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="2" ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="2" ref="date_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="2" ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="equal">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="date_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="not_equal">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="date_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="like">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="string_value"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="in">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="unbounded" ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="unbounded" ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="not_in">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="unbounded" ref="string_value"/>
> </xsd:sequence>
> <xsd:sequence>
> <xsd:element minOccurs="2" maxOccurs="unbounded" ref="int_value"/>
> </xsd:sequence>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <!-- SQL_WHERE_STATEMENT -->
> <xsd:element name="sql_where_statement" type="xsd:string"/>
> <!-- DECLARATIONS FOR RESPONSE MESSAGES -->
> <!-- RESULT_NUMBER -->
> <xsd:element name="resultNumber" type="xsd:unsignedInt"/>
>
> <!-- DOCUMENT -->
> <xsd:element name="docRes">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element minOccurs="0" maxOccurs="unbounded" ref="attributeRes"/>
> <xsd:element ref="base64Document" minOccurs="0" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="attributeRes">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:choice>
> <xsd:element ref="string_value"/>
> <xsd:element ref="date_value"/>
> <xsd:element ref="int_value"/>
> </xsd:choice>
> </xsd:sequence>
> <xsd:attribute name="name" type="xsd:string" use="required"/>
> </xsd:complexType>
> </xsd:element>
>
> <!-- CONCATENATED_DOCUMENT -->
> <xsd:element name="concatenated_document">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="base64Document"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> <!-- Base64Document -->
> <xsd:element name="base64Document" type="xsd:base64Binary"/>
> </xsd:schema>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org