[Users] Managing multi parts and multi ref SOAP messages with Petals

seb.wytt sebastien.trivella at veoliaeau.fr
Wed Mar 16 10:59:51 CET 2011


Hi,

I made some new tests on this BC-SOAP multi-ref functionnality:

Config:
- Ubuntu
- BC-SOAP 4.0.3-SNAPSHOT ==> "petals-bc-soap-4.0.3-20100608.120000-3"

I get the following response when calling the WS directly:


Code:
<soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<soapenv:Body>
		<ns1:createEventsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
		   xmlns:ns1="http://ws.praxedo.com/2008_07_01/businessEvent/service">
			<createEventsReturn href="#id0"/>
		</ns1:createEventsResponse>
		<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:BusinessEventsCreationResult"
		   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
		   xmlns:ns2="http://ws.praxedo.com/2008_07_01/businessEvent">
			<message xsi:type="xsd:string">BusinessEventManager.createEvents : An internal error occured. Events not created.</message>
			<resultCode xsi:type="xsd:int">1</resultCode>
			<results xsi:type="ns3:ArrayOf_tns1_BusinessEventCreationResult" xsi:nil="true" xmlns:ns3="http://ws.praxedo.com/2008_07_01/businessEvent/service"/>
		</multiRef>
	</soapenv:Body>
</soapenv:Envelope>



When calling it through the bus I now get the following response:


Code:
<soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Body>
		<ns1:createEventsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
		   xmlns:ns1="http://ws.praxedo.com/2008_07_01/businessEvent/service"
		   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
		   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<createEventsReturn id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:BusinessEventsCreationResult"
			   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
				<message xsi:type="xsd:string" 
				   xmlns:ns2="http://ws.praxedo.com/2008_07_01/businessEvent">
					BusinessEventManager.createEvents : An internal error occured. Events not created.
				</message>
				<resultCode xsi:type="xsd:int"
                                   xmlns:ns2="http://ws.praxedo.com/2008_07_01/businessEvent">
                                        1
                                </resultCode>
				<results xsi:type="ns3:ArrayOf_tns1_BusinessEventCreationResult" xsi:nil="true"
				   xmlns:ns2="http://ws.praxedo.com/2008_07_01/businessEvent" 
				   xmlns:ns3="http://ws.praxedo.com/2008_07_01/businessEvent/service"/>
			</createEventsReturn>
		</ns1:createEventsResponse>
	</soapenv:Body>
</soapenv:Envelope>



The multi-ref part is now well processed by the BC-SOAP. 

However there's still a little error on namespace's prefix that's not well declared leading to an invalid returned message. 
Indeed the namespace with prefix "ns2" is defined on the multi-ref part by the service. The BC-SOAP transformes it by adding this namespace declaration in all children of the element corresponding to the multi-part, but not on the element itself (createEventsReturn) leading the usage of this prefix in the element ("xsi:type="ns2:BusinessEventsCreationResult"" --> encoding style) to be unrecognized and so on the response to be invalid.

Regards,
Sebastien.




-------------------- m2f --------------------

Subscribe/Unsubscribe emails notifications.

Response to this email will be posted on the Petals forum.
Please delete the existing text before responding :)

Read the topic online:
http://forum.petalslink.com/viewtopic.php?p=31106#31106

-------------------- m2f --------------------






More information about the Users mailing list