[
https://issues.apache.org/jira/browse/AXISCPP-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479631
]
Wayne Johnson commented on AXISCPP-1026:
----------------------------------------
OK, forgive me if this is a little pedantic. Just want to make sure I include
enough info...
With the current (516429) version from SVN, I'm getting the error back:
Exception: org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to deserialize.
The SOAP generated was:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:saveModifiedGroup xmlns:ns1="urn:SWS">
<SWSToken xsi:type="ns1:SWSToken">
<token
xsi:type="xsd:string">38FA16EDEA6A30B86C0B5A48D7D00920D7E1BA0E</token>
</SWSToken>
<SWSGroup xsi:type="ns1:SWSGroup">
<DN xsi:nil="true"/>
<description xsi:type="xsd:string">TestGroup1</description>
<gid xsi:type="xsd:int">999</gid>
<members enc:arrayType="xsd:string[2]"
xmlns:enc="http://www.w3.org/2001/06/soap-encoding">
<members>xxx</members>
<members>yyy</members>
</members>
<name xsi:type="xsd:string">TestGroup1</name>
<properties enc:arrayType="ns3:properties[2]"
xmlns:enc="http://www.w3.org/2001/06/soap-encoding">
<SWSProperty>
<property xsi:type="xsd:string">color</property>
<value xsi:type="xsd:string">red</value>
</SWSProperty>
<SWSProperty>
<property xsi:type="xsd:string">size</property>
<value xsi:type="xsd:string">large</value>
</SWSProperty>
</properties>
<rights enc:arrayType="ns4:rights[2]"
xmlns:enc="http://www.w3.org/2001/06/soap-encoding">
<SWSRight>
<right xsi:type="xsd:string">expression</right>
</SWSRight>
<SWSRight>
<right xsi:type="xsd:string">speech</right>
</SWSRight>
</rights>
<toBeDeleted xsi:type="xsd:boolean">false</toBeDeleted>
</SWSGroup>
</ns1:saveModifiedGroup>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I then replaced the code as (I think) you suggested:
Index: c/src/common/Param.cpp
===================================================================
--- c/src/common/Param.cpp (revision 516429)
+++ c/src/common/Param.cpp (working copy)
@@ -104,7 +104,7 @@
else
{
pSZ.serialize (" xmlns:enc", NULL);
- pSZ.serialize
("=\"http://www.w3.org/2001/06/soap-encoding\"", NULL);
+ pSZ.serialize
("=\"http://www.w3.org/2001/06/soap-encoding/Array\" ", NULL);
if (m_Value.pArray->m_type == USER_TYPE &&
!m_Value.pArray->m_URI.empty())
In effect, adding /Array to the URL?
After building and deploying, I still get the same error:
Exception: org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to deserialize.
The soap was:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:saveModifiedGroup xmlns:ns1="urn:SWS">
<SWSToken xsi:type="ns1:SWSToken">
<token
xsi:type="xsd:string">C11D02D93CC71869C1EA81BC1CE9DE969A4B3980</token>
</SWSToken>
<SWSGroup xsi:type="ns1:SWSGroup">
<DN xsi:nil="true"/>
<description xsi:type="xsd:string">TestGroup1</description>
<gid xsi:type="xsd:int">999</gid>
<members enc:arrayType="xsd:string[2]"
xmlns:enc="http://www.w3.org/2001/06/soap-encoding/Array">
<members>xxx</members>
<members>yyy</members>
</members>
<name xsi:type="xsd:string">TestGroup1</name>
<properties enc:arrayType="ns3:properties[2]"
xmlns:enc="http://www.w3.org/2001/06/soap-encoding/Array">
<SWSProperty>
<property xsi:type="xsd:string">color</property>
<value xsi:type="xsd:string">red</value>
</SWSProperty>
<SWSProperty>
<property xsi:type="xsd:string">size</property>
<value xsi:type="xsd:string">large</value>
</SWSProperty>
</properties>
<rights enc:arrayType="ns4:rights[2]"
xmlns:enc="http://www.w3.org/2001/06/soap-encoding/Array">
<SWSRight>
<right xsi:type="xsd:string">expression</right>
</SWSRight>
<SWSRight>
<right xsi:type="xsd:string">speech</right>
</SWSRight>
</rights>
<toBeDeleted xsi:type="xsd:boolean">false</toBeDeleted>
</SWSGroup>
</ns1:saveModifiedGroup>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Is it complaining about a missing xsi:type="xsd:Array"? I'll try adding that
to see.
> Seversal issues in generating soap from complex arrays
> ------------------------------------------------------
>
> Key: AXISCPP-1026
> URL: https://issues.apache.org/jira/browse/AXISCPP-1026
> Project: Axis-C++
> Issue Type: Bug
> Components: SOAP
> Affects Versions: 1.6 Beta
> Environment: Windows VC++ and Axis 1.4 (Java) server
> Reporter: Wayne Johnson
> Priority: Critical
> Fix For: current (nightly)
>
> Attachments: AxisCPP-1026.patch, SWS.wsdl
>
>
> (this is a weeks worth of changes from memory, so I might have missed
> something).
> 1) does not generate xsi:nil when needed.
> 2) Missing enc:arrayType=
> 3) Generates xmlns:nsX="". This causes Xerces to barf with
> org.xml.sax.SAXParseException: The value of the attribute "prefix="xm
> lns",localpart="ns3",rawname="xmlns:ns3"" is invalid. Prefixed namespace
> binding s may not be empty.
> 4) Generated complex object serializer uses URI of NULL, causes crash in
> ArrayBean.cpp
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]