|
Re: Change web service response [message #985643 is a reply to message #985445] |
Thu, 15 November 2012 15:12 |
|
On 11/15/2012 4:56 AM, Alan Farroll wrote:
> Hi all,
>
> I wish to change the output of a web service response where a particular
> XML tag is currently <worker_name>Joe Bloggs</worker_name> and I want to
> change it to <name>Joe Bloggs</name>
>
> In the XML schema document that the WSDL uses I changed the relevant tag
> from this;
> <xs:element name="worker_name" type="xs:string" minOccurs="0" />
> to this;
> <xs:element type="xs:string" name="name" maxOccurs="1"
> minOccurs="1"/>
>
> Then in the relevant class in Eclipse I changed the code below;
>
> private String worker_name; public void setWorker_name(String
> worker_name) { this.worker_name = worker_name; }
> @javax.jws.WebResult(name="WorkerName") public String
> getWorker_name() { return worker_name; }
> to the following below. But when I test it in SoapUI it still did not
> work. I receive an exception and the message in the console is that
> there is a java.lang.NullPointerException
>
> private String name; public void setName(String worker_name) {
> this.name = worker_name; }
> @javax.jws.WebResult(name="Name") public String getName() {
> return name; }
>
> What am I doing wrong? Any help would be appreciated. Quite new to
> Java, Eclipse and web services. Unix background.
> [snip]
Alan,
You are so not going to get a response to this in this forum. It's not a
forum for web services, SOAP/WSDL, etc. help.
I'd try http://www.coderanch.com/forums/f-51/Web-Services .
Russ
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08077 seconds