How can we get XML message over HTTP by setting interface return type as string in WID 7.0 (WESB 7.0)?
Created a HTTP service which will return following XML message:
From WID 7.0(WESB 7.0), I am calling a HTTP service which will return above XML file. This is working, when I set the interface return type as XML schema type. But if I set interface return type as string, in the WID (7.0) I can see only “123” as a message (which is part number). How can we get the entire above XML message by setting interface return type as string? Because same HTTP service will return different XML messages on different conditions.
Please help us how could we resolve this. Any help would be greatly appreciated.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
2 replies Latest Post - 2012-03-27T17:07:26Z by CDSR
Pinned topic Get XML message over HTTP by setting interface return type as string-WID7.0
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-03-27T17:07:26Z at 2012-03-27T17:07:26Z by CDSR
TrushkinAndrey 270003U6WV112 PostsACCEPTED ANSWER
Re: Get XML message over HTTP by setting interface return type as string-WID7.02012-03-27T06:46:08Z in response to CDSRHello, CDSR.
I think, your problem is based on DataHandler and string return type mixing. You have XML DataHandler, it parses your input message to XML format, and String return type indicates it return the first string from XML. This is "123".
You should clear your DataHandler class. In this case you will get only string. And after this you can deserialize it with BOXMLSerializer. BOXMLSerializer usage example is listed: http://www.ibm.com/developerworks/webservices/library/ws-boxml/
CDSR 270005450S5 PostsACCEPTED ANSWER
Re: Get XML message over HTTP by setting interface return type as string-WID7.02012-03-27T17:07:26Z in response to TrushkinAndreyThank you Andrey for your replay.
when I clear the datahandler class,I was getting following error:
"No output data binding is available for the getDetail method on the HTTP_String component.
And No InPut data binding is available for the getDetail method on the HTTP_String component.
Here "HTTP_String" is Import primitive name. this is synchronous call.
I am very new to WESB. Not sure whether I am missing something? Please help me.