aspose file tools*
The moose likes Web Services and the fly likes wsdl schema import problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsdl schema import problem" Watch "wsdl schema import problem" New topic
Author

wsdl schema import problem

Ranadhir Nag
Ranch Hand

Joined: Mar 09, 2006
Posts: 138
Please indicate if this is not a proper forum for this.
But I get compilation errors when i run wsdlc against this wsdl.
I am using weblogic 10.3,if that is of relevance.

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="PriceListService"
targetNamespace="http://www.ecerami.com/wsdl/PriceListService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.ecerami.com/wsdl/PriceListService.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="http://www.ecerami.com/schema">

<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.ecerami.com/schema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">


<complexType name="ArrayOfString">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="string[]"/>
</restriction>
</complexContent>
</complexType>
......
......
......

[wsdlc] [WARNING] src-resolve.4.2: Error resolving component 'soapenc:Array'
. It was detected that 'soapenc:Array' is in namespace 'http://schemas.xmlsoap.o
rg/soap/encoding/', but components from this namespace are not referenceable fro
m schema document 'file:/C:/Documents%20and%20Settings/compaq/Local%20Settings/T
emp/_ckr59b/PriceListService.wsdl#types?schema1'. If this is the incorrect names
pace, perhaps the prefix of 'soapenc:Array' needs to be changed. If this is the
correct namespace, then an appropriate 'import' tag should be added to 'file:/C:
/Documents%20and%20Settings/compaq/Local%20Settings/Temp/_ckr59b/PriceListServic
e.wsdl#types?schema1'.


Any ideas on how to resolve this namespace issue will be appreciated.

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
You can resolve the issue and make your service more interoperable by not using the soapenc:Array type and instead using a construct with maxOccurs="unbounded", for instance.
Please refer to the following link for an example: http://www.ws-i.org/Profiles/BasicProfile-1.1.html#soapenc_Array
Best wishes!
Ranadhir Nag
Ranch Hand

Joined: Mar 09, 2006
Posts: 138
Thanks for ther recommendation.
But at a broader level,my concern was why i landed into this namespace issue at the first place.
It seems I am needed to import some namespace - and i may well face this problem for any other namespace too.

Any help in clarify this namespace conflict will be quite helpful
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi again!
In your case, specifying a schemaLocation for the namespace in question should solve your problem, but be aware that:
In a WSDL document that conforms to the WS-I Basic Profile, importing another WSDL and importing an XML schema containing type declarations are done in two different ways:
Import of WSDL documents must be done using the <wsdl:import> element, while importing an XML schema is to be done using the <xsd:import> element inside a <xsd:schema> element in the <wsdl:types> element.
Examples:

Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsdl schema import problem