[Xml-compile] Daemon Errors
Tobias Henoeckl
hoeni-xmlcompile at sisyphus.de
Mon Oct 13 14:50:43 BST 2008
Hi there,
when I was trying to become acquainted with XML::Compile::SOAP (for a
Catalyst::Controller::SOAP Module) there rose some questions:
1. Do I need to declare a special constructs in my WSDL file to transmit
SOAP fault messages?
When I return a fault value like this in my Catalyst::Controller::SOAP module
---- 8<---- SCHNIPP ------------------------------------------------
$c->stash->{soap}->fault({
code => 'Client',
reason => 'reason...',
detail => 'detail...'});
return;
---- 8<---- SCHNAPP ------------------------------------------------
I get "error: cannot find port for fault undef"
2. When I was trying to model a test application with
XML::Compile::SOAP::Daemon to avoid the additional Catalyst Layer
for learning how to deal with that kind of trouble I used the daemon
template from the XML::Compile::SOAP::Daemon distribution, but when I
fire up the daemon I get
trace: importDefinitions for filestamp soap-envelope.xsd-1223644370-6062
trace: parsing XML from file /usr/local/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP11/xsd/soap-envelope.xsd
trace: importDefinitions for filestamp soap-encoding.xsd-1223644370-18467
trace: parsing XML from file /usr/local/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP11/xsd/soap-encoding.xsd
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/}Fault
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/}Fault
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/}Envelope
trace: importDefinitions for filestamp 2003-soap-envelope.xsd-1223644370-5618
trace: parsing XML from file /usr/local/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP12/xsd/2003-soap-envelope.xsd
trace: importDefinitions for filestamp 2003-soap-encoding.xsd-1223644370-17192
trace: parsing XML from file /usr/local/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP12/xsd/2003-soap-encoding.xsd
trace: importDefinitions for filestamp 2003-soap-rpc.xsd-1223644370-1090
trace: parsing XML from file /usr/local/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP12/xsd/2003-soap-rpc.xsd
Can't use an undefined value as a HASH reference at /usr/local/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP.pm line 58.
Both use following WSDL code:
---- 8<---- SCHNIPP ------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:y="http://space.net/ttt"
targetNamespace="http://space.net/ttt">
<types>
<xs:schema elementFormDefault="qualified" targetNamespace="http://space.net/ttt">
<xs:element name="PingRequest">
<xs:simpleType>
<xs:restriction base="xs:integer"/>
</xs:simpleType>
</xs:element>
<xs:element name="PingResponse">
<xs:simpleType>
<xs:restriction base="xs:integer"/>
</xs:simpleType>
</xs:element>
</xs:schema>
</types>
<message name="pingRequest">
<part name="ping" element="y:PingRequest"/>
</message>
<message name="pingResponse">
<part name="pong" element="y:PingResponse"/>
</message>
<portType name="TTTport">
<operation name="ping">
<input message="y:pingRequest"/>
<output message="y:pingResponse"/>
</operation>
</portType>
<binding name="TTTbinding" type="y:TTTport">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="ping">
<soap:operation soapAction="urn:#ping"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="TTTservice">
<port name="TTTport" binding="y:TTTbinding">
<soap:address location="http://lie.space.net:3333/soap"/>
</port>
</service>
</definitions>
---- 8<---- SCHNAPP ------------------------------------------------
I'd be glad for every hint on this.
Regards, Tobias "Hoeni" Henoeckl
More information about the Xml-compile
mailing list