I am trying to save to disk a binary file from a .NET webservice. This service is
simply a pilot so I wrote the .NET webservice to reply with a base64binary element
(byte[]) instead of DIME or SWA.
<s:element minOccurs="0" maxOccurs="1" name="GetApplicationResult"
type="s:base64Binary" />
However, when I go to get the GetApplicationResult element using SAAJ:
...
Iterator sbes = child.getChildElements(nameApplicationExistsResult);
while(sbes.hasNext()){
child = (SOAPElement)sbes.next();
sLogger.debug("Name: " + sName + " | Value: " + child.getValue());
}
...
I am only returned the binary string data until the first carriage return.
[java] 12:59:54,565 DEBUG [CHL_Appender]
Name: GetApplicationResult
Value: JVBERi0xLjMNJeLjz9MNCjE5OCAwIG9iag08PCANL0xpbmVhcml6ZWQgMSANL08gMjAwIA0vSCBb
Here is the entire serialized response message i was parsing:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetApplicationResponse xmlns="urn:chl">
<GetApplicationResult>JVBERi0xLjMNJeLjz9MNCjE5OCAwIG9iag08PCANL0xpbmVhcml6ZWQgMSANL08gMjAwIA0vSCBb
IDEyMDggNTcxIF0gDS9MIDI1MTUxNTMgDS9FIDg3NDQwIA0vTiA2MCANL1QgMjUxMTA3NCANPj4g
CjAwMDI1MDk0MDYgMDAwMDAgbg0KMDAwMjUwOTU2NSAwMDAwMCBuDQowMDAyNTA5NzI0IDAwMDAw
IG4NCjAwMDI1MDk5NTAgMDAwMDAgbg0KdHJhaWxlcg08PA0vU2l6ZSAxOTgNL0lEWzxkNWU0MWIx
YmQ4MzRkYmI1NWQ3NmRhZjNiOGQ0OTQxZj48NWJmMzcxMmU1NjZhYmZkNDhlMGZhNTBmZDNmOGU3
NTg+XQ0+Pg1zdGFydHhyZWYNMTczDSUlRU9GDQ==
</GetApplicationResult>
</GetApplicationResponse>
</soap:Body>
</soap:Envelope>
Do I need to make changes on the .NET side? What should I use instead of getValue on
the SOAP Element to obtain the entire binary data? Note that the Encoding Style is
initially null, but when I set it to: xs:base64Binary on the JAVA side before I call
get value it does not help.
Thanks,
Kent
sorry for double posts, this section seems more appropriate.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849005#3849005
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849005
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development