Help with Web Services

W

Wendy S

I just can't seem to get started here. I have a requirement to be the back
end of a self-subscription service for a website. I know what "services" I
need to provide:

subscribe(String userId, String password)
login(String userid, String password, String ipAddress)
String verify(String token, String ipAddress)

I have them done as a .jws file in Axis, each returning a single String.
That's where I'm stuck. I don't like the way the response is formatted.
For the 'login' service, I need to return some XML describing the user--
some types and accessGroups, in addition to his name.

If I just form up the XML and send it back as the String return value of the
method, I get this:
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<loginResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<loginReturn xsi:type="xsd:string">
<user>
<name>wendy</name>
<groups><group>staff</group></groups>
</user>
</loginReturn>
</loginResponse>
</soapenv:Body>
</soapenv:Envelope>

What I *think* I want is to get rid of the <loginResponse> and <loginReturn>
tags and just have my XML as the <soapenv:Body>. But I'm just starting to
try to figure this out, so maybe that's not at all what should happen.

In addition, these web services will be consumed by people running IIS.
Presumably they'll have the latest and greatest, and I've heard .NET is
based on web services, so perhaps that won't be an issue. But they're newer
at this than I am, so I don't want to make a mistake on my end and make it
harder than it has to be for them.

I also don't want to do something that I'll regret and be stuck with
forever, since if I learn the error of my ways too late, it will require
coding changes on their end that will likely never happen.

Any advice is appreciated, I'm working my way through O'Reilly's "Java Web
Services" book so perhaps the lightbulb will come on soon.
 

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,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top