I’m trying to generate java code from the wsdl 2.0 file below using axis2-1.5.1’s wsdl2java.sh. I’m running on ubuntu 9.10 (though I don’t think that matters). When I try I get an error as follows:
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: Sorry we do not support #other. We do only support #any, #none and #element as message content models.
at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.createAxisMessage(WSDL20ToAxisServiceBuilder.java:1121)
...
I think my problem is that I have an error in my wsdl (I’m quite new to wsdl first design). Here’s my wsdl 2.0 document:
<?xml version="1.0" encoding="utf-8" ?>
<description
xmlns="http://www.w3.org/ns/wsdl"
targetNamespace= "http://sky.example.com/authentication/wsdl"
xmlns:tns= "http://sky.example.com/authentication/wsdl"
xmlns:skyns = "http://sky.example.com/schemas/authentication"
xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsdlx= "http://www.w3.org/ns/wsdl-extensions">
<documentation>
I'm turning this into my authentication wsdl one step at a time and thus trying to learn what I need to create.
</documentation>
<types>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://sky.example.com/schemas/authentication"
xmlns="http://sky.example.com/schemas/authentication">
<xs:element name="pingResponse" type="xs:string" />
</xs:schema>
</types>
<interface name = "authenticationInterface" >
<operation name="opPing"
pattern="http://www.w3.org/ns/wsdl/in-out"
style="http://www.w3.org/ns/wsdl/style/iri"
wsdlx:safe = "true">
<!-- note - ping is a method that takes no arguments. Perhaps I should not be using in-out, but out only? Does that even exist? -->
<input messageLabel="In" />
<!-- element="skyns:ping" / -->
<output messageLabel="Out"
element="skyns:pingResponse" />
</operation>
</interface>
<binding name="authenticationSOAPBinding"
interface="tns:authenticationInterface"
type="http://www.w3.org/ns/wsdl/soap"
wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
<operation ref="tns:opPing"
wsoap:mep="http://www.w3.org/2003/05/soap/mep/soap-response"/>
</binding>
<service name="authenticationService"
interface="tns:authenticationInterface">
<endpoint name="authenticationEndpoint"
binding="tns:authenticationSOAPBinding"
address ="http://localhost/services/AuthenticationService"/>
</service>
</description>
Any thoughts? Obvious errors? etc.?
Thank you,