You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Martin Phillips1 <mp...@uk.ibm.com> on 2007/02/08 18:11:41 UTC

SOAP encodingStyle not recognised by XMLHelper

Hello all,

I'm having a little problem with SDO, loading SOAP messages in using the 
XMLHelper.


Loading the following message generates the exception below. 

 <SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
       <m:GetLastTradePrice xmlns:m="Some-URI">
           <symbol>DIS</symbol>
       </m:GetLastTradePrice>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This is a bit confusing as the encodingStyle type does exist, I have 
directly accessed the Type.

        Type encodingStyle = typehelper.getType(
"http://schemas.xmlsoap.org/soap/envelope/","encodingStyle");

        The encodingStyle Type looks like this
        (Type:Header@http://schemas.xmlsoap.org/soap/envelope/) {
          any:EFeatureMapEntry
          anyAttribute:EFeatureMapEntry
        }

Removing the encodingStyle from the SOAP message gets rid of the 
exception, but I'm fairly sure that it being there should be valid and 
work.

Does anyone have any thoughts?  The Namespace listed in the exception (
http:///temp.xml) seems a little strange, but I don't know what the EMF 
stuff is doing.
I am using the M2 binary (tuscany-sdo-1.0-incubator-M2-bin.zip)


org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature 
'encodingStyle' not found. (http:///temp.xml, 3, 70)
Message=Feature 'encodingStyle' not found. (http:///temp.xml, 3, 70)
Cause=org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 
'encodingStyle' not found. (http:///temp.xml, 3, 70)
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature 
'encodingStyle' not found. (http:///temp.xml, 3, 70)
        at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(
XMLLoadImpl.java:80)
        at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(
XMLLoadImpl.java:274)
        at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(
XMLResourceImpl.java:666)
        at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(
XMLResourceImpl.java:634)
        at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
XMLDocumentImpl.java:238)
        at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
XMLDocumentImpl.java:216)
        at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
XMLHelperImpl.java:75)
        at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
XMLHelperImpl.java:69)
        at MyTest.wsmessage(MyTest.java:83)
        at MyTest.main(MyTest.java:51)
Caused by: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 
'encodingStyle' not found. (http:///temp.xml, 3, 70)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.reportUnknownFeature(
XMLHandler.java:1739)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleUnknownFeature(
XMLHandler.java:1703)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(
XMLHandler.java:2438)
        at 
org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(
SAXXMLHandler.java:72)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(
XMLHandler.java:1983)
        at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(
XMLHandler.java:1891)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(
XMLHandler.java:1783)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(
XMLHandler.java:1561)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(
XMLHandler.java:1229)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(
XMLHandler.java:1157)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(
XMLHandler.java:1239)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(
XMLHandler.java:877)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(
XMLHandler.java:860)
        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(
XMLHandler.java:627)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown 
Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown 
Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(
XMLLoadImpl.java:264)
        ... 8 more

Martin.
___________________________________

WebSphere ESB Foundation Technologies
Mail Point 211
IBM United Kingdom Limited
Hursley    SO21 2JN

Phone    : 01962 817395 (247395)
Notes ID : Martin Phillips1/UK/IBM@IBMGB
INTERNET : mphillip@uk.ibm.com





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






Re: SOAP encodingStyle not recognised by XMLHelper

Posted by Yang ZHONG <le...@gmail.com>.
XML can be loaded into DataObject as either modeled such as EnvelopeType
instance, or not modeled such as AnyType instance.

Which one do you need?


On 2/8/07, Martin Phillips1 <mp...@uk.ibm.com> wrote:
>
> Hello all,
>
> I'm having a little problem with SDO, loading SOAP messages in using the
> XMLHelper.
>
>
> Loading the following message generates the exception below.
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>   <SOAP-ENV:Body>
>       <m:GetLastTradePrice xmlns:m="Some-URI">
>           <symbol>DIS</symbol>
>       </m:GetLastTradePrice>
>   </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> This is a bit confusing as the encodingStyle type does exist, I have
> directly accessed the Type.
>
>        Type encodingStyle = typehelper.getType(
> "http://schemas.xmlsoap.org/soap/envelope/","encodingStyle");
>
>        The encodingStyle Type looks like this
>        (Type:Header@http://schemas.xmlsoap.org/soap/envelope/) {
>          any:EFeatureMapEntry
>          anyAttribute:EFeatureMapEntry
>        }
>
> Removing the encodingStyle from the SOAP message gets rid of the
> exception, but I'm fairly sure that it being there should be valid and
> work.
>
> Does anyone have any thoughts?  The Namespace listed in the exception (
> http:///temp.xml) seems a little strange, but I don't know what the EMF
> stuff is doing.
> I am using the M2 binary (tuscany-sdo-1.0-incubator-M2-bin.zip)
>
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature
> 'encodingStyle' not found. (http:///temp.xml, 3, 70)
> Message=Feature 'encodingStyle' not found. (http:///temp.xml, 3, 70)
> Cause=org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
> 'encodingStyle' not found. (http:///temp.xml, 3, 70)
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature
> 'encodingStyle' not found. (http:///temp.xml, 3, 70)
>        at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(
> XMLLoadImpl.java:80)
>        at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(
> XMLLoadImpl.java:274)
>        at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(
> XMLResourceImpl.java:666)
>        at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(
> XMLResourceImpl.java:634)
>        at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
> XMLDocumentImpl.java:238)
>        at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
> XMLDocumentImpl.java:216)
>        at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
> XMLHelperImpl.java:75)
>        at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
> XMLHelperImpl.java:69)
>        at MyTest.wsmessage(MyTest.java:83)
>        at MyTest.main(MyTest.java:51)
> Caused by: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
> 'encodingStyle' not found. (http:///temp.xml, 3, 70)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.reportUnknownFeature(
> XMLHandler.java:1739)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleUnknownFeature(
> XMLHandler.java:1703)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(
> XMLHandler.java:2438)
>        at
> org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(
> SAXXMLHandler.java:72)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(
> XMLHandler.java:1983)
>        at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(
> XMLHandler.java:1891)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(
> XMLHandler.java:1783)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(
> XMLHandler.java:1561)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(
> XMLHandler.java:1229)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(
> XMLHandler.java:1157)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(
> XMLHandler.java:1239)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(
> XMLHandler.java:877)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(
> XMLHandler.java:860)
>        at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(
> XMLHandler.java:627)
>        at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement
> (Unknown
> Source)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement
> (Unknown
> Source)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook
> (Unknown
> Source)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch
> (Unknown
> Source)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
> (Unknown
> Source)
>        at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> (Unknown
> Source)
>        at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> (Unknown
> Source)
>        at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>        at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>        at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(
> XMLLoadImpl.java:264)
>        ... 8 more
>
> Martin.
> ___________________________________
>
> WebSphere ESB Foundation Technologies
> Mail Point 211
> IBM United Kingdom Limited
> Hursley    SO21 2JN
>
> Phone    : 01962 817395 (247395)
> Notes ID : Martin Phillips1/UK/IBM@IBMGB
> INTERNET : mphillip@uk.ibm.com
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>
>
>
>
>


-- 

Yang ZHONG

Re: SOAP encodingStyle not recognised by XMLHelper

Posted by Dan Murphy <dm...@googlemail.com>.
Hi Martin,

I'm assuming that the stream you're loading the XML from contains more than
just the SOAP_ENV.... part that you pasted here... please can you attach the
whole file. I suspect that there may be some missing definitions or
something in the xml that can't be resolved (for example the m: in
<m:GetLastTradePrice doesn't seem to be defined in the extract you give). I
can then also try it against the latest build of SDO incase it's been fixed
since M2 (which was some time ago last year).

Cheers,
Dan

On 08/02/07, Martin Phillips1 <mp...@uk.ibm.com> wrote:
>
> Hello all,
>
> I'm having a little problem with SDO, loading SOAP messages in using the
> XMLHelper.
>
>
> Loading the following message generates the exception below.
>
> <SOAP-ENV:Envelope
>   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>    <SOAP-ENV:Body>
>        <m:GetLastTradePrice xmlns:m="Some-URI">
>            <symbol>DIS</symbol>
>        </m:GetLastTradePrice>
>    </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> This is a bit confusing as the encodingStyle type does exist, I have
> directly accessed the Type.
>
>         Type encodingStyle = typehelper.getType(
> "http://schemas.xmlsoap.org/soap/envelope/","encodingStyle");
>
>         The encodingStyle Type looks like this
>         (Type:Header@http://schemas.xmlsoap.org/soap/envelope/) {
>           any:EFeatureMapEntry
>           anyAttribute:EFeatureMapEntry
>         }
>
> Removing the encodingStyle from the SOAP message gets rid of the
> exception, but I'm fairly sure that it being there should be valid and
> work.
>
> Does anyone have any thoughts?  The Namespace listed in the exception (
> http:///temp.xml) seems a little strange, but I don't know what the EMF
> stuff is doing.
> I am using the M2 binary (tuscany-sdo-1.0-incubator-M2-bin.zip)
>
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature
> 'encodingStyle' not found. (http:///temp.xml, 3, 70)
> Message=Feature 'encodingStyle' not found. (http:///temp.xml, 3, 70)
> Cause=org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
> 'encodingStyle' not found. (http:///temp.xml, 3, 70)
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature
> 'encodingStyle' not found. (http:///temp.xml, 3, 70)
>         at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(
> XMLLoadImpl.java:80)
>         at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(
> XMLLoadImpl.java:274)
>         at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(
> XMLResourceImpl.java:666)
>         at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(
> XMLResourceImpl.java:634)
>         at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
> XMLDocumentImpl.java:238)
>         at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
> XMLDocumentImpl.java:216)
>         at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
> XMLHelperImpl.java:75)
>         at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
> XMLHelperImpl.java:69)
>         at MyTest.wsmessage(MyTest.java:83)
>         at MyTest.main(MyTest.java:51)
> Caused by: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
> 'encodingStyle' not found. (http:///temp.xml, 3, 70)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.reportUnknownFeature(
> XMLHandler.java:1739)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleUnknownFeature(
> XMLHandler.java:1703)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(
> XMLHandler.java:2438)
>         at
> org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(
> SAXXMLHandler.java:72)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(
> XMLHandler.java:1983)
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(
> XMLHandler.java:1891)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(
> XMLHandler.java:1783)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(
> XMLHandler.java:1561)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(
> XMLHandler.java:1229)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(
> XMLHandler.java:1157)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(
> XMLHandler.java:1239)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(
> XMLHandler.java:877)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(
> XMLHandler.java:860)
>         at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(
> XMLHandler.java:627)
>         at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement
> (Unknown
> Source)
>         at
>
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement
> (Unknown
> Source)
>         at
>
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook
> (Unknown
> Source)
>         at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch
> (Unknown
> Source)
>         at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
> (Unknown
> Source)
>         at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> (Unknown
> Source)
>         at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> (Unknown
> Source)
>         at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>         at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
>         at javax.xml.parsers.SAXParser.parse(Unknown Source)
>         at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(
> XMLLoadImpl.java:264)
>         ... 8 more
>
> Martin.
> ___________________________________
>
> WebSphere ESB Foundation Technologies
> Mail Point 211
> IBM United Kingdom Limited
> Hursley    SO21 2JN
>
> Phone    : 01962 817395 (247395)
> Notes ID : Martin Phillips1/UK/IBM@IBMGB
> INTERNET : mphillip@uk.ibm.com
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>
>
>
>
>