Author |
Message
|
MizukiYamato |
Posted: Tue Nov 06, 2012 6:44 pm Post subject: How can I process SOAP Fault with xml:lang |
|
|
 Apprentice
Joined: 16 Dec 2009 Posts: 45 Location: Japan
|
Hi, all.
We need to process SOAP Fault with xml:lang.
But, an error occured while using SOAP Request Node.
The SOAP Fault message which SOAP Request Node received:
Code: |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring xml:lang="ja">An probrem is occured.</faultstring>
<detail>
<abc/>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope> |
ExceptionList:
Code: |
( ['MQROOT' : 0x2833fc48]
(0x01000000:Name):RecoverableException = (
(0x03000000:NameValue):File = 'F:\build\slot1\S800_P\src\DataFlowEngine\TemplateNodes\ImbRequestTemplateNode.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 532 (INTEGER)
(0x03000000:NameValue):Function = 'ImbRequestTemplateNode::processMessageAssemblyToFailure' (CHARACTER)
(0x03000000:NameValue):Type = 'ImbRequestTemplateNode' (CHARACTER)
(0x03000000:NameValue):Name = 'PROTO01#FCMComposite_1_10' (CHARACTER)
(0x03000000:NameValue):Label = 'PROTO01.SOAP Request_Operation1_OpA' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPmsgs' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 2230 (INTEGER)
(0x03000000:NameValue):Text = 'Caught exception and rethrowing' (CHARACTER)
(0x01000000:Name ):ParserException = (
(0x03000000:NameValue):File = 'F:\build\slot1\S800_P\src\DataFlowEngine\ImbRootParser.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 815 (INTEGER)
(0x03000000:NameValue):Function = 'ImbRootParser::parseNextItem' (CHARACTER)
(0x03000000:NameValue):Type = 'ComIbmSOAPInputNode' (CHARACTER)
(0x03000000:NameValue):Name = 'PROTO01#FCMComposite_1_1' (CHARACTER)
(0x03000000:NameValue):Label = 'PROTO01.SOAP Input' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPmsgs' (CHARACTER)
(0x03000000:NameValue):Severity = 2 (INTEGER)
(0x03000000:NameValue):Number = 5902 (INTEGER)
(0x03000000:NameValue):Text = 'Exception whilst parsing' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'Root' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'SOAP' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = '18015d23' (CHARACTER)
)
(0x01000000:Name ):ParserException = (
(0x03000000:NameValue):File = 'F:\build\slot1\S800_P\src\WebServices\WSLibrary\ImbSOAPParser.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 2062 (INTEGER)
(0x03000000:NameValue):Function = 'ImbSOAPParser::createSoapShapedTree' (CHARACTER)
(0x03000000:NameValue):Type = '' (CHARACTER)
(0x03000000:NameValue):Name = '' (CHARACTER)
(0x03000000:NameValue):Label = '' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPmsgs' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 3614 (INTEGER)
(0x03000000:NameValue):Text = 'problem creating SOAP tree from bitstream' (CHARACTER)
(0x01000000:Name ):ParserException = (
(0x03000000:NameValue):File = 'F:\build\slot1\S800_P\src\MTI\MTIforBroker\GenXmlParser4\ImbXMLNSCParser.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 1038 (INTEGER)
(0x03000000:NameValue):Function = 'ImbXMLNSCParser::parseLastChild' (CHARACTER)
(0x03000000:NameValue):Type = '' (CHARACTER)
(0x03000000:NameValue):Name = '' (CHARACTER)
(0x03000000:NameValue):Label = '' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPmsgs' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 5009 (INTEGER)
(0x03000000:NameValue):Text = 'XML Parsing Errors have occurred' (CHARACTER)
(0x01000000:Name ):ParserException = (
(0x03000000:NameValue):File = 'F:\build\slot1\S800_P\src\MTI\MTIforBroker\GenXmlParser4\ImbXMLNSCDocHandler.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 702 (INTEGER)
(0x03000000:NameValue):Function = 'ImbXMLNSCDocHandler::handleParseErrors' (CHARACTER)
(0x03000000:NameValue):Type = 'ComIbmSOAPInputNode' (CHARACTER)
(0x03000000:NameValue):Name = 'PROTO01#FCMComposite_1_1' (CHARACTER)
(0x03000000:NameValue):Label = 'PROTO01.SOAP Input' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPmsgs' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 5025 (INTEGER)
(0x03000000:NameValue):Text = 'A schema validation error has occurred while parsing the XML document' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 2 (INTEGER)
(0x03000000:NameValue):Text = '5012' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 2 (INTEGER)
(0x03000000:NameValue):Text = '1' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 2 (INTEGER)
(0x03000000:NameValue):Text = '5' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 2 (INTEGER)
(0x03000000:NameValue):Text = '34' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'cvc-complex-type.3.2: Attribute "xml:lang" is not allowed to appear in element "faultstring".' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = '/XMLNSC/http://schemas.xmlsoap.org/soap/envelope/:Envelope/http://schemas.xmlsoap.org/soap/envelope/:Body/http://schemas.xmlsoap.org/soap/envelope/:Fault' (CHARACTER)
)
)
)
)
)
)
) |
Middleware version:
Message Broker V8.0.0.1 (iFix001) Win 32bit
Message Broker Toolkit V8.0.0.1 (iFIx001) Win 32bit
How can I process it?
Regards for any comment. |
|
Back to top |
|
 |
broker_new |
Posted: Tue Nov 06, 2012 7:26 pm Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
Weird...I would try with the HTTP Request Node and see what happens..
And also open a PMR with IBM in parallel...I am curious to know what they recommend. _________________ IBM ->Let's build a smarter planet |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Nov 07, 2012 12:56 am Post subject: Re: How can I process SOAP Fault with xml:lang |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
MizukiYamato wrote: |
We need to process SOAP Fault with xml:lang.
But, an error occured while using SOAP Request Node. |
The SOAP 1.1 schema does not declare an xml:lang attribute for <faultstring>, so using the attribute causes a schema validation error.
Either remove the xml:lang attribute, or disable schema validation, or use SOAP 1.2 instead (which does declare xml:lang).
[Edit: The SOAP 1.1 schema did not originally declare an xml:lang attribute for <faultstring>, but the latest version now does.]
Last edited by rekarm01 on Wed Nov 07, 2012 6:44 pm; edited 1 time in total |
|
Back to top |
|
 |
MizukiYamato |
Posted: Wed Nov 07, 2012 4:35 am Post subject: |
|
|
 Apprentice
Joined: 16 Dec 2009 Posts: 45 Location: Japan
|
|
Back to top |
|
 |
goffinf |
Posted: Wed Nov 07, 2012 9:20 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
You could try importing the XSD for XML which includes lang (which is what the SOAP 1.2 XSD does). Here's what it looks like :-
HTHs
Fraser.
Code: |
<?xml version="1.0"?>
<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/XML/1998/namespace" xml:lang="en">
<xs:annotation>
<xs:documentation>
See http://www.w3.org/XML/1998/namespace.html and
http://www.w3.org/TR/REC-xml for information about this namespace.
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>This schema defines attributes and an attribute group
suitable for use by
schemas wishing to allow xml:base, xml:lang or xml:space attributes
on elements they define.
To enable this, such a schema must import this schema
for the XML namespace, e.g. as follows:
<schema . . .>
. . .
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
Subsequently, qualified reference to any of the attributes
or the group defined below will have the desired effect, e.g.
<type . . .>
. . .
<attributeGroup ref="xml:specialAttrs"/>
will define a type which will schema-validate an instance
element with any of those attributes</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>In keeping with the XML Schema WG's standard versioning
policy, this schema document will persist at
http://www.w3.org/2001/03/xml.xsd.
At the date of issue it can also be found at
http://www.w3.org/2001/xml.xsd.
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XML Schema
itself. In other words, if the XML Schema namespace changes, the version
of this document at
http://www.w3.org/2001/xml.xsd will change
accordingly; the version at
http://www.w3.org/2001/03/xml.xsd will not change.
</xs:documentation>
</xs:annotation>
<xs:attribute name="lang" type="xs:language">
<xs:annotation>
<xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
codes as the enumerated possible values . . .</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="space" default="preserve">
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration value="default"/>
<xs:enumeration value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:anyURI">
<xs:annotation>
<xs:documentation>See http://www.w3.org/TR/xmlbase/ for
information about this attribute.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup name="specialAttrs">
<xs:attribute ref="xml:base"/>
<xs:attribute ref="xml:lang"/>
<xs:attribute ref="xml:space"/>
</xs:attributeGroup>
</xs:schema>
|
|
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Nov 07, 2012 8:29 pm Post subject: Re: How can I process SOAP Fault with xml:lang |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
MizukiYamato wrote: |
I raised this question to PMR. |
The IBM-supplied SOAP 1.1 Message Model (xsd) seems to be out of date, so a PMR is probably the best way to resolve it. (Although for message set projects, the IBM-supplied Message Definition (mxsd) seems to be okay).
MizukiYamato wrote: |
WS-I 1.1 Basic Profile :
Quote: |
R1016 A RECEIVER MUST accept faults that carry an xml:lang attribute on the faultstring element. |
|
The latest version of the SOAP 1.1 schema does in fact declare xml:lang, according to both of the schemas provided by w3c and ws-i:- http://schemas.xmlsoap.org/soap/envelope/2004-01-21.xsd
- http://ws-i.org/profiles/basic/1.1/soap-envelope-2004-01-21.xsd
In the interim, it may be possible to edit the local copy of soapenv11.xsd in the workspace, using one of the xsds referenced above, but don't attempt this without a clear understanding of how to edit schema files. |
|
Back to top |
|
 |
MizukiYamato |
Posted: Sat Feb 02, 2013 10:14 am Post subject: Resolved. |
|
|
 Apprentice
Joined: 16 Dec 2009 Posts: 45 Location: Japan
|
|
Back to top |
|
 |
|