I'm having problems trying to call findPartiesById using a java 6 client
and also with a C# 3.5 client. I am getting a valid SOAP response from the server from the client call (shown below the code), but the generated client code doesn't appear to be able to re-use the IN object for storing the OUT value. This is the same problem I had experience with the java code. Has anyone managed to generate a SOAP client against the ofbiz generated wsdl and successfully make a call? Can you spot where I am going wrong? Many thanks in advance, Chris ------------ C# code --------------- using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; using ConsoleApplication1.ServiceReference1; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { findPartiesByIdPortTypeClient client = new findPartiesByIdPortTypeClient(); mapEntry[] mapEntryArray = new mapEntry[3]; mapEntryArray[0] = makeMap("idToFind", "admin"); mapEntryArray[1] = makeMap("login.username", "admin"); mapEntryArray[2] = makeMap("login.password", "ofbiz"); client.findPartiesById(ref mapEntryArray); Console.WriteLine(mapEntryArray.Length); // is 0, but should be 3 Console.Read(); } static mapEntry makeMap(String keyString, String valString) { stdString mapKeyString = new stdString(); stdString mapValString = new stdString(); mapKeyString.value = keyString; mapValString.value = valString; mapKey key = new mapKey(); key.stdString = mapKeyString; mapValue val = new mapValue(); val.Item = mapValString; val.ItemElementName = ItemChoiceType.stdString; mapEntry entry = new mapEntry(); entry.mapKey = key; entry.mapValue = val; return entry; } } } -------------- SOAP Response ---------------- Date: Wed, 30 Dec 2009 12:00:38 GMT Set-Cookie: JSESSIONID=018C937189AF33CDD44D2C69862E5CE1.jvm1; Path=/webtools Set-Cookie: OFBiz.Visitor=11818; Expires=Thu, 30-Dec-2010 12:00:38 GMT; Path=/ Content-Type: text/xml;charset=utf-8 Vary: Accept-Encoding Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked 4e4 <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><axis2ns7:findPartiesByIdResponse xmlns:axis2ns7="http://ofbiz.apache.org/service/"><map-Map> <map-Entry> <map-Key> <std-String value="responseMessage"></std-String> </map-Key> <map-Value> <std-String value="success"></std-String> </map-Value> </map-Entry> <map-Entry> <map-Key> <std-String value="party"></std-String> </map-Key> <map-Value> <eeval-Party createdStamp="2009-12-24 16:13:30.949" createdTxStamp="2009-12-24 16:13:30.946" lastUpdatedStamp="2009-12-24 16:13:31.892" lastUpdatedTxStamp="2009-12-24 16:13:31.553" partyId="admin" partyTypeId="PERSON"></eeval-Party> </map-Value> </map-Entry> <map-Entry> <map-Key> <std-String value="partiesFound"></std-String> </map-Key> <map-Value> <col-Collection></col-Collection> </map-Value> </map-Entry> </map-Map></axis2ns7:findPartiesByIdResponse></soapenv:Body></soapenv:Envelope> 0 |
Free forum by Nabble | Edit this page |