[Xml-compile] parsing SOAP Faults

Gert Doering gert at space.net
Wed Dec 18 15:58:56 GMT 2013


Hi,

On Wed, Dec 18, 2013 at 04:00:15PM +0100, Mark Overmeer wrote:
> * Gert Doering (gert at space.net) [131218 14:54]:
> > 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 do not need to fight schema's and XML, but you need to configure
> it correctly.

Well, I try to do my best :-) - anyway:

> > XML::Compile Error:
> >     error: decode error: simpleType must have exactly one child at {http://xml.apache.org/axis/}hostname
> 
> Ah,  of cause... simpleType doesn't work like that.  Did you really
> found that in the schema (I only added the element)  

I made that up, because I didn't know better.


> You can replace both with
> 
>       <xs:element name="hostname" type="xs:string" />

Changed that, works! :-)


This is what I have now (mainly "for the records as conclusion"):

 - WSDL file which lacks a definition of "hostname"
 - an "extra.xsd" file which contains just this:

<?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:element name="hostname" type="xs:string" />
 </xs:schema>

 - this is used with $wsdl->importDefinions("extra.xsd")


> > I'm not sure if we're getting close or not?
> I do not know yet ;-)

... and we're there!  Yay :-)

Now I have a nice and shiny fault in $answer...

$VAR1 = \{
    'Fault' => {
	'detail' => {
	     '{http://xml.apache.org/axis/}hostname' => 'solr-663'
	   },
	'_NAME' => '{http://xml.apache.org/axis/}hostname',
	'faultcode' => '{http://www.telefoncia.de/kts}10002',
	'faultstring' => 'ARERR [10002] Could not transmit data to TDe (See Error Queue for detailed information). (User \'XXXXX\' has no company set)'
    }
};

(interesting enough, the remote end has fixed part of the authentication
issue in the meantime and added the "unknown user", now it's just "we
know the user but some config is missing", heh :-) )


Thanks a lot for your help, and for XML::Compile, of course.

Since you were complaining about the lack of company funding for your perl 
work, please let me know (off-list) some way to transfer some monetary
thank you for today's help.

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/58f90d10/attachment-0001.pgp


More information about the Xml-compile mailing list