hello
i have a class which extends with AbstractDomPayloadEndpoint and override the method
protected Element invokeInternal(Element RootElement, Document document)
{
last return Dom Element as response..
responseElement = document.createElement("getNodeListResponse");
....
...
return responseElement;
}
now i facing a problem when i Marshall my object with JaxB
---------------
My Marshall Response which i want to send
<?xml version="1.0" encoding="UTF-8"?><Nodes><Nodename>telenor</Nodename><Nodename>Warid</Nodename><Nodename>Paktell</Nodename><nodename>telenor</nodename><nodename>Warid</nodename><nodename>Paktell</nodename></Nodes>
---------------
now i create my response Element in invokeInternal() and get the Marshall data as a child in that response Element
responseElement = document.createElement("getNodeListResponse");
JAXBContext context = JAXBContext.newInstance(Nodes.class);
Marshaller marshaller = context.createMarshaller();
marshaller.marshal(Nodename, responseElement);
}
catch(Exception t)
{
t.printStackTrace();
}
now i get the xml which look like that
---------------------------------
resultant response Element on client side...
<?xml version="1.0" encoding="UTF-8"?><getNodeListResponse><Nodes><Nodename>telen or</Nodename><Nodename>Warid</Nodename><Nodename>Paktell</Nodename><nodename>telenor</nodename><nodename>Warid</nodename><nodename>Paktell</nodename></Nodes></getNodeListResponse>
----------------------
now there is <getNodeListResponse> root element which added there so this not easy to unmarshall it on client side..
i know i do mistake there i himself include the Marshall data as a child of ResponseElement but i have no way because Invokeinternal method take DOM.Element only
so please Guide me how i only send my Marshall data as a response from my Webservice Endpoint class which use Invokeinternal method
please that realy hard to understand me the sample example so just clue me how i do that
hope somone help me
waiting fr response


Reply With Quote
