PS.
    it seems no use even if I compile by wsdl2h -s -o a.h  a.wsdl 
b.wsdl exceptions.wsdl

--- In gsoap@yahoogroups.com, "sunbeacher_243" <[EMAIL PROTECTED]> 
wrote:
>
> Thank you very much for your helpful advice. Now I overcame the 
first 
> trouble. 
> 
> Now I'm trapped in another trouble. 
> A Fault management Service is divided into 3 wsdl files under the 
> same namespace-"tmf854.v1.ws", 
> a.wsdl describes message and porttypes, b.wsdl defines the bindings 
> and c.wsdl contains the services definitions.
> An additional Exceptions.wsdl defining the fault message is 
imported 
> by a.wsdl under the same namespace.
> When I compile a and b by "wsdl2h -s -o a.h  a.wsdl b.wsdl" , I get 
> the errors shown below:
> 
> ===============================================
> "Warning: no soap:fault message in WSDL definitions '' 
> operation 'getActiveAlarmsCount' namespace
> Error: no wsdl:definitions/binding/operation/fault/soap:fault"
> ===============================================
> 
> The following porttype is defined in a.wsdl:
>  <wsdl:portType name="AlarmRetrieval">
>     <wsdl:operation name="getActiveAlarmsCount">
>       <wsdl:input message="tmf854WS:getActiveAlarmsCount"/>
>       <wsdl:output message="tmf854WS:getActiveAlarmsCountResponse"/>
>       <wsdl:fault name="ProcessingFailureException" 
> message="tmf854WS:ProcessingFailureException"/>
>     </wsdl:operation>
> </wsdl:portType>
> 
> The following binding is defined in b.wsdl
> <wsdl:binding name="AlarmRetrievalSoapHTTPBinding" 
> type="tmf854WS:AlarmRetrieval">
>     ...               
>    <wsdl:operation name="getActiveAlarmsCount">
>       <soap:operation soapAction="getActiveAlarmsCount" 
> style="document"/>
>       <wsdl:input>...                 </wsdl:input>
>       <wsdl:output>...                </wsdl:output>
>       <wsdl:fault name="ProcessingFailureException">
>         <soap:fault name="ProcessingFailureException" 
use="literal" />
>       </wsdl:fault>
>    </wsdl:operation>
> </wsdl:binding>
> 
> If I mask the wsdl:fault in binding definition file (that's 
b.wsdl), 
> the warning and error will disappear.
> The ProcessingFailureException definition is defined in 
> Exceptions.wsdl,and I'm sure this file is read by wsdl2h.
> If I only compile a.wsdl, no errors occur.
> 
> What shall I do now? any help will be appreciated.
> 
> --- In gsoap@yahoogroups.com, "Robert van Engelen" <engelen@> 
> wrote:
> >
> > 
> > IMO the probable reason for this is that Exceptions.wsdl already 
> defines the tmf854.v1 
> > schema. Use wsdl2h -v to trace the actions and find out. The 
wsdl2h 
> tool does import 
> > schemas with identical targetNamespaces under most conditions, 
but 
> I always felt there is 
> > something really wrong with that approach (shouldn't a schema 
> define its content once 
> > and for all? Unless xs:redefine is used of course).
> > 
> > To force wsdl2h to read all schemas (and WSDLs), put them on the 
> command line:
> > 
> > wsdl2h [...] ../../xsd/interfaces/AlarmRetrieval.xsd
> > 
> > Again, normally this would never be needed but it works even when 
> multiple (different) 
> > XSDs have the same targetNamespace.
> > 
> > - Robert
> > 
> > --- In gsoap@yahoogroups.com, "sunbeacher_243" <sunbeacher_243@> 
> wrote:
> > >
> > > --- In gsoap@yahoogroups.com, "sunbeacher_243" 
<sunbeacher_243@> 
> > > wrote:
> > > >
> > > > I'm a newbie to gsoap. I get in trouble when compiling wsdl 
> files.
> > > > I get some wsdl file, in wich the following setences are 
> included:
> > > > <!-- ============== Import Type Definitions ============= -->
> > > >   <wsdl:types>
> > > >     <xsd:schema targetNamespace="tmf854.v1.ws">
> > > >       <xsd:import namespace="tmf854.v1" 
> > > > schemaLocation="../../xsd/interfaces/AlarmRetrieval.xsd"/>
> > > >     </xsd:schema>
> > > >   </wsdl:types>  
> > > > <!-- =============== Import Exception Definitions ======== -->
> > > >   <wsdl:import location="Exceptions.wsdl" 
> > > namespace="tmf854.v1.ws"/>  
> > > > 
> > > > When I compile this file by "wsdl2h -s -o %fileName%_Common.h 
%
> > > > fileName%.wsdl",I found that wsdl2h only read the XML Schema 
> files 
> > > > included in the Exceptions.wsdl, and dosen't read 
> > > > the "AlarmRetrieval.xsd" included directly in this wsdl file. 
> > > > In result I get warnings such as:
> > > > "Warning: no part 'mtosiBody' 
> > > > element '"tmf854.v1":getActiveAlarmsCount' in WSDL 
> > > > definitions 'TMF854-FaultService' namespace tmf854.v1.ws"
> > > >         
> > > > "tmf854.v1":getActiveAlarmsCount is an element defined in 
> > > > AlarmRetrieval.xsd. And I can't go on with the generated 
header 
> > > file.
> > > > 
> > > > If I mask the imported wsdl file,that's delete the 
> sentence,such as 
> > > > this:
> > > >   "<!-- <wsdl:import location="Exceptions.wsdl" 
> > > > namespace="tmf854.v1.ws"/>  -->"
> > > > then WSDL2H will read the directly imported xsd files and the 
> > > > warnings will disappear.
> > > > 
> > > > 
> > > > I wonder how I can instruct WSDL2H to read both directly 
> imported 
> > > > wsdl files and xsd files.
> > > > 
> > > > Your help is appreciated.
> > > > 
> > > > P.S.
> > > > (1)the following is the simplified output of wsdl2h with 
> unmasked 
> > > > imported wsdl file.
> > > > Reading file '..\wsdl\common\FaultService.wsdl'...
> > > > Reading file '..\wsdl\common/Exceptions.wsdl'...(wsdl2h do 
read 
> the 
> > > > imported wsdl file)
> > > > Reading schema 
> > > > file '..\wsdl\common/../../xsd/interfaces/Exceptions.xsd'... 
> (this 
> > > > schema file is included in Exceptions.wsdl)
> > > > 
> > > > ... (here,output is omitted)
> > > > 
> > > > done reading '../../xsd/interfaces/Exceptions.xsd'
> > > > done reading 'Exceptions.wsdl'
> > > > done reading '..\wsdl\common\FaultService.wsdl'
> > > > 
> > > > (here, the directly imported XSD files don't be read )
> > > > 
> > > > Warning: no part 'mtosiBody' 
> > > > element '"tmf854.v1":getActiveAlarmsCount' in WSDL
> > > > definitions 'TMF854-FaultService' namespace tmf854.v1.ws
> > > > 
> > > > 
> > > > (2)Here is the simplified output of wsdl2h with masked 
imported 
> > > wsdl 
> > > > file.
> > > > Reading file '..\wsdl\common\FaultService.wsdl'...
> > > > Reading schema 
> > > > 
> file '..\wsdl\common/../../xsd/interfaces/AlarmRetrieval.xsd'... 
> > > > (wsdl2h do read the imported xsd file)
> > > > 
> > > > ... (here,output is omitted)
> > > > 
> > > > done reading '../../xsd/interfaces/AlarmRetrieval.xsd' 
> (finished 
> > > > reading the xsd file)
> > > > done reading '..\wsdl\common\FaultService.wsdl' 
> > > > 
> > > > (the warnings mentioned above do disappear. Of course there 
are 
> > > some 
> > > > other problems according to the missed imported wsdl file.)
> > > >
> > > Is there anyone can help? or this is a bug within gsoap
> > >
> >
>


Reply via email to