This is a memo for me and others to investigate this problem.
there seems to be some issue in building up an internal schema model.
Concretely speaking, in this particular case, some namespace
attributes with their namespace URI part set to null instead of the
xmlns's namespace URI "http://www.w3.org/2000/xmlns/". As a result,
the serialization of this schema results in the above NAMESPACE_ERR.
The schema line hitting causing this error is:
<xs:attribute d7p1:arrayType="xs:int[]"
ref="soapenc:arrayType" xmlns:d7p1="http://schemas.xmlsoap.org/wsdl/"
/>
While processing this line, the two out of the bands extra attributes
xmlns:xs="http://www.w3.org/2001/XMLSchema" and
xmlns:http="xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" are
present (injected earlier). And these attributes have their namespace
URI part bound to null as mentioned above.
If this line is modified to
<xs:attribute ref="soapenc:arrayType" />
This problem does not occur.
I suspect the problem is lying somewhere in the schema processing
library use by CXF. But I couldn't get a whole picture.
Maybe Dan or someone might have a quick idea?
2014-06-10 16:52 GMT+02:00 Aki Yoshida <[email protected]>:
> hi Neela,
> you are right. There seems to be some problem when the wsdl is fetched
> over http.
> I need to look at it.
> thanks.
> regards, aki
>
> 2014-06-10 16:07 GMT+02:00 neela <[email protected]>:
>> Hi Aki,
>> I was able to reproduce the success you are getting.
>> when we use local wsdl file to create client it works with the
>> schemaLocation specification.
>> And with out that schemaLocation when using local wsdl file it shows proper
>> error message like below.
>>
>> java.lang.RuntimeException: Error compiling schema from WSDL at
>> {C:\Users\Documents\Neela\CXF-TestProjects\view-source 172.20.85.141
>> NetStubs RpcEncoded.asmx wsdl.xml}:
>> undefined simple or complex type 'soapenc:Array'
>>
>> but when I create the SOAP UI project mock service using that proper wsdl
>> with schemaLocation defined and try to access it via http url, it throws the
>> NAMESPACE_ERR.
>>
>> so in my case it goes in side the !file check and calls serializeSchema and
>> it fails inside that. when we use local wsdl file it will skip this part,
>> that's why it works fine.
>>
>> *DynamicClientFactory.java Line#485*
>>
>> * if (!key.startsWith("file:") && !key.startsWith("jar:")) {*
>> XmlSchemaSerializer xser = new XmlSchemaSerializer();
>> xser.setExtReg(schemaCollection.getExtReg());
>> Document[] docs;
>> try {
>> *docs = xser.serializeSchema(schema, false);*
>> } catch (XmlSchemaSerializerException e) {
>> throw new RuntimeException(e);
>> }
>> .
>> .
>> .
>>
>> I am not sure if I could provide a live wsdl url because the sample is a
>> .Net webservice.
>> I have attached the soapUI project with mock service. but the schemaLocation
>> shown in mockservice wsdl is auto generated and come different.
>>
>> If you import the soapUI project to SoapUI and run the mockservice you can
>> access the service via
>> http://localhost:8080/?WSDL
>>
>> Test-NameSpace-Err-soapui-project.xml
>> <http://cxf.547215.n5.nabble.com/file/n5744932/Test-NameSpace-Err-soapui-project.xml>
>>
>> Thanks for your patience.
>>
>> Thanks & Regards,
>> Neela
>>
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/NAMESPACE-ERR-with-DynamicClientFactory-createClient-tp5744708p5744932.html
>> Sent from the cxf-user mailing list archive at Nabble.com.