Author |
Message
|
hornbeam123 |
Posted: Thu Feb 21, 2008 2:56 pm Post subject: soap creation wbimb 5 arrays |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
My new problem is SOAP request from wbimb 5 flow looks ok but WS response says validation error. How do you code to reflect SOAP-ENC array as shown below? Please can you shed some light on this one.[/b]
Maybe the absence of code to do this is the reason the web service call is not responding correctly? I’ve not yet checked with WS provider.
I have marked out some fields to reflect corporate sensitivity.
Oh for a tool to consume wsdl and build esql from it !!
Expected SOAP request supplied by WS provider
+++++++++++++++++++++++++++++++
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://devgateway.XXXplatform.groupe-llp.com/StoreCollection" xmlns:ns2="http://xml.apache.org/xml-soap"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:updateCostCentre>
<costCentreUpdateRequest SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array"><item xsi:type="ns2:Map"><item><key xsi:type="xsd:string">CostCentreCode</key><value xsi:type="xsd:string">1234</value></item><item><key xsi:type="xsd:string">CostCentreName</key><value xsi:type="xsd:string">Test center</value></item>
several more elements until ..
</costCentreUpdateRequest>
</ns1:updateCostCentre>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ESQL extract
++++++++++
--myNS1 is soapAction
DECLARE myNS1 NAMESPACE 'http://ws-uat.XXXplatform.YYYYYY.com/StoreCollection/updateCostCentre';
--myNS2 is namespace defining input and output methods
DECLARE myNS2 NAMESPACE 'http://ws-uat.XXXplatform.YYYYYY.com/StoreCollection';
......many lines to set envelope and body are not shown as I think they are correct
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--Populate Input elements and set to xsi type string
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS2:updateCostCentre.costCentreUpdateRequest.CostCentreCode.(XML.Attribute)myXSI:type =
'xsd:string';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS2:updateCostCentre.costCentreUpdateRequest.CostCentreCode =
Environment.myVariables.InputMsg.myXML.CostCentreCode ;
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS2:updateCostCentre.costCentreUpdateRequest.CostCentreName.(XML.Attribute)myXSI:type =
'xsd:string';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS2:updateCostCentre.costCentreUpdateRequest.CostCentreName =
Environment.myVariables.InputMsg.myXML.CostCentreName ;
………..Etc many more of above for each element
Produces - SOAP request below looks ok but get format error on response from WS
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://devgateway.XXXplatform.groupe-llp.com/StoreCollection" xmlns:ns2="http://xml.apache.org/xml-soap"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:updateCostCentre
xmlns:ns1="http://ws-uat.XXXplatform.YYYYYYcom/StoreCollection" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<costCentreUpdateRequest xmlns:ns2="http://ws-uat.XXXplatform.YYYYYY.com/StoreCollection">
<CostCentreCode>07468</CostCentreCode>
<CostCentreName>A Building</CostCentreName>
….other elements produced ok until…….
</costCentreUpdateRequest>
</ns1:updateCostCentre |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 21, 2008 3:01 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Use the search key.
I thought I saw somewhere in the last 6 months that the arrayType (SOAP-ENC:arrayType) was not supported... There might as well have been some workaround instructions with the post...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
hornbeam123 |
Posted: Thu Feb 21, 2008 3:24 pm Post subject: soap creation wbimb 5 arrays |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
Thanks for the quick response. You must be based USA perhaps? Sounds like an ouch possibly. I'll do a search. I'm sure the WS can be modified if need be. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 21, 2008 3:33 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should be using at least v6 for proper Web Services support, and really looking very hard at v6.1.
You're almost certainly half-crippled using v5. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
hornbeam123 |
Posted: Tue Mar 11, 2008 4:03 am Post subject: soap creation wbimb 5 arrays |
|
|
Centurion
Joined: 01 Nov 2003 Posts: 101
|
Things have moved on here. WS is now being invoked by wbimb (5) flow. SOAP arrays were not an issue after all on the request side but they are when dealing with the response.
I have used the search button and found nothing that helps.
Wbimb 6.1 may well become a prerequsite of this projects rollout but for now development is under wbimb 5. However if it is possible to use esql to navigate SOAP-ENC arrays in the XMLNS domain in wbimb 6.1 only and somebody could confirm this by illustrating the esql needed, this would change our stance on wbimb 6.1 upgrade.
As one of two strings are returned indicating success, I could parse in blob domain for now.
SOAP body follows.
<SOAP-ENV:Body>
<ns1:updateCostCentreResponse>
<costCentreUpdateReturn SOAP-ENC:arrayType="ns2:Map[1]"
xsi:type="SOAP-ENC:Array">
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">ValidationError</key>
<value xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">ErrorTypeCode</key>
<value xsi:type="xsd:string">07</value>
</item>
<item>
<key xsi:type="xsd:string">ErrorMessage</key>
<value xsi:type="xsd:string">Cost center Update
successful</value>
</item>
</value>
</item>
</item>
</costCentreUpdateReturn>
</ns1:updateCostCentreResponse>
</SOAP-ENV:Body> |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Mar 11, 2008 4:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
|