Your WSDL looks incomplete to me. You may try this and let me know -
1. Add (define) the elements QuoteConfigRequest and QuoteConfigResponse within your <wsdl:types> tags.
Something like :
<xs:element name="QuoteConfigRequest ">
<xs:element name="requestID" type="xs:long"/>
<xs:element name="return" type="xs:string"/>
be sure to mention the targetNamespace value properly in the <xsd:schema> tag.
2. Your <wsdl:message> tags seem wrong (are you validating this WSDL file before running through wsdl2java??).
Change it to look something like:
<s0:message name="QuoteConfigRequest ">
<s0:part element="s1:QuoteConfigRequest " name="parameters"/>
<s0:part element="s1:QuoteConfigResponse" name="parameters"/>
Hope this solves you issues and I was able to understand and explain your problems correctly.
Axis2 wsdl2java is pretty error proof for simple WSDLs like yours. Have your WSDL validated once before you send it to wsdl2java (if you are not already doing it) and you should not have any errors.
I am sorry, I overlooked the schemaLocation="../schema/QM.xsd" entry in your WSDL and assume that your type declarations in the xsd are proper.
In that case, disregard my point #1. You can have a look at point #2 and try it.
I think the XSD file is defined correctly - Here's a snippet.
When I validate the WSDL file, this is the error message I am seeing.
As far as your #2 suggestion, are you saying that the <wsdl:message> is incorrect The "wsdl" prefix is defined in the WSDL as -xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/", Perhaps I am missing something here.
The weird thing is Axis 1.4 doesn't seem to complain about this WSDL while AXIS2 1.5 has trouble parsing the file
posted 11 years ago
Just consider the "s0" that I mention as NS to be "wsdl" in your case (i did a copy-paste without find-replace)
What i wanted to say was change your code *based* on the entries in my point #2. So even the s1 NS prefix in my code should correspond to what you have.
Coming back to your issue, so the WSDL is definitely not validated, at least not to the liking of Axis2 v1.5.
We need to focus on that - But the WSDL validation error you are receiving certainly beats me!
One thing I can see in common with both the errors you have received is that some how v1.5 does not like the xsd defined externally ... can you try making the xsd declarations inline (as I have mentioned in my point#1) and give it a shot.
Changing the "wsdl" prefix to "s0" didn't really help, still seeing the same error. However, I did go ahead and a qualifier(qm) for the message names
That seemed to help. I am able to generate the Java code, still haven't looked into the code to see if any mappings are different due to this new prefix.
Any idea why adding this prefix makes a difference to AXIS?
posted 11 years ago
I have never tried this, but most probably, because you have both the NS "qm" and "qbm" pointing to the same location there might have been an ambiguity with Axis2. When you specifically mentioned the NS "qm" to it, Axis2 was OK with it and it generated the Java code.
Go ahead and work out with the client stub generated - I dont think there will be any major issues just by changing the NS which are the same anyways.
So I guess your issue is resolved?