[Xml-compile] parsing SOAP Faults

Gert Doering gert at space.net
Wed Dec 18 14:54:23 GMT 2013


Hi,

On Wed, Dec 18, 2013 at 03:46:14PM +0100, Mark Overmeer wrote:
> Ouch, this is totally confused.

Sorry :-) - this whole namespace thing indeed confuses me (I use 
XML::Compile because someone said it's the way to do XML without having
to fight XML... ;-) ).

> You have the <schema> keyword in the Axis namespace!
>   'http://www.w3.org/2001/XMLSchema'
> 
> You should not change the schema unless you know what is wrong: it's too
> easy to introduce namespace mistakes.  Your example should more like
> 
>  <xs:schema
>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
>     xmlns:me="http://xml.apache.org/axis/"
>     targetNamespace="http://xml.apache.org/axis/"
>     elementFormDefault="qualified"
>     attributeFormDefault="qualified">
>        <simpleType name="hostname" type="string"/>
>  </xs:schema>
> 
> But there must also be a
>      <element name="hostname" type="me:hostname" />
> in there.

It's complaining that "<simpleType>" and "<element>" are not in the
Scheme namespace.  If I add "xs:" to both:

<?xml version="1.0" encoding="UTF-8"?>^M
<xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:me="http://xml.apache.org/axis/"
    targetNamespace="http://xml.apache.org/axis/"
    elementFormDefault="qualified"
    attributeFormDefault="qualified">
       <xs:simpleType name="hostname" type="string"/>
    <xs:element name="hostname" type="me:hostname" />
 </xs:schema>

the schema loads ($wsdl->importDefinitons()), but the parser is still 
unhappy with the SOAP reply...

XML::Compile Error:
    error: decode error: simpleType must have exactly one child at {http://xml.apache.org/axis/}hostname


I'm not sure if we're getting close or not?

thanks anyway for your help so far!

Gert Doering
        -- NetMaster
-- 
have you enabled IPv6 on something today...?

SpaceNet AG                        Vorstand: Sebastian v. Bomhard
Joseph-Dollinger-Bogen 14          Aufsichtsratsvors.: A. Grundner-Culemann
D-80807 Muenchen                   HRB: 136055 (AG Muenchen)
Tel: +49 (0)89/32356-444           USt-IdNr.: DE813185279
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 826 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20131218/29ba151f/attachment.pgp


More information about the Xml-compile mailing list