Web Services endpoint development

L

Lincoln Cooper

Hi,

I need to create a web service endpoint where the input data to the
endpoint is XML and was wondering how I can do this?

As I understand it, to write a 'standard' web service endpoint you
create a Java API and then run a tool against this to create a series
of stubs which interface with SOAP (maybe an over simplified
explanation!).

However, in my case, I can't create this Java API because I have an
XML string (which itself came from another system) and I don't want to
parse this to create Java classes before interfacing with SOAP. Is it
possible to use the XML input directly without passing through a Java
class layer? if so how can it be done?

Thanks for any help!
Lincoln.
 
I

iksrazal

Hi,

I need to create a web service endpoint where the input data to the
endpoint is XML and was wondering how I can do this?

As I understand it, to write a 'standard' web service endpoint you
create a Java API and then run a tool against this to create a series
of stubs which interface with SOAP (maybe an over simplified
explanation!).

However, in my case, I can't create this Java API because I have an
XML string (which itself came from another system) and I don't want to
parse this to create Java classes before interfacing with SOAP. Is it
possible to use the XML input directly without passing through a Java
class layer? if so how can it be done?

Thanks for any help!
Lincoln.

Try using Apache Axis if you have a choice. It sounds like you're
using JWSTK from sun, which I thought was much harder. Forget the
stubs if you can, you probably won't look back. The idea behind the
endpoint is wsdl . Using stubs to do that works, but painful.

Anyways, you should be able to simply pass the XML doc as a string,
right? I've been doing this alot for months. I'm not sure what the
question is. Please clarify and perhaps I could help.

iksrazal
 
L

Lincoln Cooper

Maybe I havn't explained my situation properly...

I have some data on the server side in an XML string - lets say
something like:

<root>
<name>fred</name>
<surname>bloggs</surname>
</root>

I would like to create a web service to make the name and surname
available to a client - maybe using two methods like getName() and
getSurname().

Can I use the above XML string directly, or do I need to do something
with it first?

I understand that if I had a Java Bean on the server side with 2
methods: getName() and getSurname() the situation would be relatively
simple, but I don't have a Java Bean - just the XML. Of course I could
parse the XML to create a Bean, but this seems like too much work
seeing as the Bean will later be reconverted to XML for the SOAP part.

I hope this explains the situation better.

Regards,
Lincoln
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top