|
I don't understand why you would try to create a WRAPPED web
service without using WSDL? It doesn't make any sense. The whole point behind
WRAPPED is to let you generate a client proxy object using WSDL2Java so
that you can invoke the service using an RMI-style invocation (method name with
parameters). From the client developer's point of view, WRAPPED makes the
service look and feel like rpc/encoded, but on the wire it's
doc/literal.
But if you aren't using WSDL2Java, then you'll have to use the
call object.
I don't think that Axis provides a mechanism to reference a
schema file. It only supports WSDL. Besides, Axis will always create a WSDL file
for you when you deploy the service. The problem is that right now, the
generated WSDL will have errors in it, which means that other clients won't be
able to figure out how to access your service.
Here's some sample client code for a typical WRAPPED service.
It should look pretty much identical to client code for an RPC
service:
package test.axis.wrapped.client;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; import java.net.URL; import test.axis.wrapped.iface; public class AxisWrappedClient
{ public static void main(String[]args) throws Exception { String UrlString = "wsdl-url"; String nameSpaceUri = "urn:axis.wrapped" String serviceName = "WrappedService"; String portName = "WrappedServicePort"; URL currWsdlUrl =
new URL(UrlString);
ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service currService = serviceFactory.createService(currWsdlUrl, new QName(nameSpaceUri, serviceName)); Curr myProxy =
(Curr)
currService.getPort(
new QName(nameSpaceUri, portName), test.axis.wrapped.iface.class); string return =
myProxy.methodName( arg[0], arg[1]
);
} } Note that test.axis.wrapped.iface is the interface generated by WSDL2Java. Anne
----- Original Message -----
|
- WRAPPED services without wsdl Dimuthu Leelarathne
- RE: WRAPPED services without wsdl Anne Thomas Manes
- RE: WRAPPED services without wsdl Irazabal, Alex
- Re: WRAPPED services without wsdl Anne Thomas Manes
- RE: WRAPPED services without wsdl Mike Perham
- RE: WRAPPED services without wsdl Irazabal, Alex
- Re: WRAPPED services without wsdl Anne Thomas Manes
- Re: WRAPPED services without wsdl Balaji D L
- RE: WRAPPED services without wsdl Irazabal, Alex
- Re: WRAPPED services without wsdl Anne Thomas Manes
- Re: WRAPPED services without wsdl Stuart Barlow
- Re: WRAPPED services without wsdl Anne Thomas Manes
