Anne, can you clarify a couple of things for me, please? 1) What is the benefit of doc/literal on the wire using WRAPPED services? Why would one care what format is on the wire... 2) What do you mean "other clients won't be able to figure out how to access your service"? Thanks, Alex
[Irazabal, Alex] -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 10:22 AM To: [EMAIL PROTECTED] Subject: Re: WRAPPED services without wsdl 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 ----- From: Dimuthu Leelarathne <mailto:[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Sent: Monday, August 04, 2003 12:42 AM Subject: WRAPPED services without wsdl Hi all, I'm trying to write a wrapped web service without using wsdl. I have some simple basic questions, 1. Where should I put the xml schema ? Should it be inside wsdd or should I put a reference to it in the wsdd ? 2. I read something like this written by Anne ; The main reason that you want to use WRAPPED is so that you can invoke your service using something like this: string ResponseInfo = service.SubscriptionRequest( usedId, password ); If this is the case how can I provide it in the client without instantiating a call object ? Since wsdl is not used stubs, SDI and etc ..... won't be created. So should I just anyway go ahead and use the call object ? Thank you, Dimuthu.
