ws-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lutz Wischmann <>
Subject Re: HELP - when my service returns an domElement
Date Fri, 07 Jul 2000 09:34:09 GMT
Octav Chipara wrote:
> service and I did not have much success. I was able to get my service to
> work when it returns a java class but when I try to return an Element I
> have a java exception telling the it cannot instantiate the
> org.w3c.domElement. I guess that it has to do something with the mapping
> but now I'm a little bit lost... Do you guys have any ideas.


you have to make sure that you mapped your return type correctly to
NS_URI_LITERAL_XML. Just have a look at the GetAddress - Sample, which
in fact handles XML Elements. 
	// Build the call.
    Call call = new Call ();
    call.setTargetObjectURI ("urn:ems-clp-profile");
    call.setMethodName (op);
    call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML); // this is
the magic...
    Vector params = new Vector ();
    params.addElement (...);
    call.setParams (params);
    Response resp = call.invoke (/* router URL */ url, /* actionURI */
"" );
    Parameter result = resp.getReturnValue ();
    Element siteProfile = (Element)result.getValue();


View raw message