Hi Yogender Singh,
As far as I know this WSDL is incorrect in two places.
1st the operation name of the porttype and the binding parts of the
wsd have to be same. (The both have to be either getname or getarray).
2nd it still complains saying "RPC-literal type message part parm
should have a type attribute".
So If you want a document style wsdl rename the style attribute just
inside the wsdl:binding element as in attached file "name_doc.wsdl"
and it works.
Or to have a 'rpc' style wsdl, you have to give names to the types in
the schema and associate message parts to it as in the
"name_rpc.wsdl".
Regards
Dimuthu
On 5/21/07, Yogender Singh01 <[EMAIL PROTECTED]> wrote:
<<name.wsdl>>
Hi all,
I have written a wsdl file but when I am running WSDL2C on it its giving
error.
I have attached the wsdl file.
Is it written correctly?
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:137)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:28)
Caused by: org.apache.axis2.AxisFault
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:377)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:296)
at
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
llServices(WSDL11ToAllAxisServicesBuilder.java:100)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:131)
... 2 more
Caused by: java.lang.NullPointerException
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.createSchemaF
orPorttype(WSDL11ToAxisServiceBuilder.java:1250)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.generateWrapp
erSchema(WSDL11ToAxisServiceBuilder.java:1196)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:252)
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are
not to copy, disclose, or distribute this e-mail or its contents to any other
person and any such actions are unlawful. This e-mail may contain viruses.
Infosys has taken every reasonable precaution to minimize this risk, but is not
liable for any damage you may sustain as a result of any virus in this e-mail.
You should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content of all
messages sent to or from this e-mail address. Messages sent to or from this
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost/axis/array"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost/axis/array"
xmlns:intf="http://localhost/axis/array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://localhost/axis/array" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost/axis/array" xmlns:intf="http://localhost/axis/array" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<element name="echoStringArray">
<complexType>
<sequence>
<element maxOccurs="unbounded" name="arg0" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="echoStringArrayResponse">
<complexType>
<sequence>
<element maxOccurs="unbounded" name="echoStringArrayReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="echoStringArrayRequest">
<wsdl:part element="impl:echoStringArray" name="parm"/>
</wsdl:message>
<wsdl:message name="echoStringArrayResponse">
<wsdl:part element="impl:echoStringArrayResponse" name="out"/>
</wsdl:message>
<wsdl:portType name="array">
<wsdl:operation name="getname" parameterOrder="parm">
<wsdl:input message="impl:echoStringArrayRequest" name="echoStringArrayRequest"/>
<wsdl:output message="impl:echoStringArrayResponse" name="echoStringArrayResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="array_Binding" type="impl:array">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getname">
<wsdl:input>
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="array">
<wsdl:port binding="impl:array_Binding" name="array">
<wsdlsoap:address location="http://localhost/axis/array"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost/axis/array"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost/axis/array"
xmlns:intf="http://localhost/axis/array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://localhost/axis/array" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost/axis/array" xmlns:intf="http://localhost/axis/array" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!--<element name="echoStringArray"> --> <!-- This is Removed -->
<complexType name="echoStringArrayType">
<sequence>
<element maxOccurs="unbounded" name="arg0" type="xsd:string"/>
</sequence>
</complexType>
<!-- </element> -->
<!-- <element name="echoStringArrayResponse"> -->
<complexType name="echoStringArrayResponseType">
<sequence>
<element maxOccurs="unbounded" name="echoStringArrayReturn" type="xsd:string"/>
</sequence>
</complexType>
<!-- </element> -->
</schema>
</wsdl:types>
<wsdl:message name="echoStringArrayRequest">
<wsdl:part type="impl:echoStringArrayType" name="parm"/>
</wsdl:message>
<wsdl:message name="echoStringArrayResponse">
<wsdl:part type="impl:echoStringArrayResponseType" name="out"/>
</wsdl:message>
<wsdl:portType name="array">
<wsdl:operation name="getname" parameterOrder="parm">
<wsdl:input message="impl:echoStringArrayRequest" name="echoStringArrayRequest"/>
<wsdl:output message="impl:echoStringArrayResponse" name="echoStringArrayResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="array_Binding" type="impl:array">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getname">
<wsdl:input>
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="array">
<wsdl:port binding="impl:array_Binding" name="array">
<wsdlsoap:address location="http://localhost/axis/array"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]