You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Houman Moshtagh <de...@yahoo.de> on 2002/08/15 21:14:06 UTC
AW: AW: The Final step ? (yeahhh)
Hi Laurent,
It works, It works! Yeahhh :-)
Thanks a lot for everything. You were right, if I load the xml file
with DOMDoc.Load(C:\test.xml) somehow it wont work. But if I build
the Nodes it works. Hehe
Something disturbs it while loading but its not so important. At least
it works.
Besides as I have tried to build the Client as youve showed me the last
time, it still didnt work. The new error message was could not
deserilize name .
At this point Ive put these lines at the end of _MyBeanRes line:
Deserializer deserial3=new StringDeserializer();
smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("","name"),null,null,deserial3);
smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("","sex"),null,null,deserial3);
smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("","adress"),null,null,deserial3);
Then it could deserilize it! Somehow Its weird, since when it has the
Bean, so why asking again? But maybe if I built the type:string in the
nodes these lines might not needed anymore.
Its so amazing! Now it can be said that this little bubble SOAP is
really interoperatable. ;o)
Damn I have no time to play more with SOAP. My professor warned me to
stop the experiences and start with my thesis since there wouldnt be
enough time anymore. Bah now I have to read theoretical stuff about
SOAP. :-)
So long
Cheers
Houman
-----Ursprüngliche Nachricht-----
Von: Laurent Bouis [mailto:lbouis@napster.com]
Gesendet: Dienstag, 13. August 2002 23:07
An: 'soap-user@xml.apache.org'
Betreff: RE: AW: The Final step ?
I don't know why you get this error.
I am not reading the xml from a file, but simply building it on the fly
for each request.
Also I think you should really try to build a custom deserializer, it's
not very difficult (take the example of the Vector or the Hastable
serializer).
Here is what it looks like on the MS server side:
Public Function ProcessMp3Work(ByVal programName As String, ByVal
version As String, ByVal inputMp3 As Mp3work) As IXMLDOMNodeList
Dim Dom As New DOMDocument30
Dim Elm As IXMLDOMElement
Dim Elm2 As IXMLDOMElement
Dim Elm3 As IXMLDOMElement
Dim MyNode As IXMLDOMNode
Dim MyNode2 As IXMLDOMNode
Dim namedNodeMap As IXMLDOMNamedNodeMap
Set Dom.documentElement = Dom.createElement("Addr")
Set Elm2 = Dom.createElement("item")
Rem Elm2.Text = ""
Set MyNode = Dom.createNode(NODE_ATTRIBUTE, "xsi:type",
"http://www.w3.org/2001/XMLSchema-instance")
MyNode.Text = "ns3:_Mp3workRes"
Set MyNode2 = Dom.createNode(NODE_ATTRIBUTE, "xmlns:ns3", "")
MyNode2.Text = "http://tempuri.org/DocSample8/type/"
Set namedNodeMap = Elm2.Attributes
namedNodeMap.setNamedItem MyNode2
namedNodeMap.setNamedItem MyNode
Set Elm = Dom.createElement("admincae")
Elm.Text = "mycae"
Elm2.appendChild Elm
.....
Dom.documentElement.appendChild Elm2
Set Elm3 = Elm2.cloneNode(True)
Dom.documentElement.appendChild Elm3
Set ProcessMp3Work = Dom.documentElement.childNodes
End Function