Yes, my return value is of type java.lang.String and the original wsdl indicates document/literal. Jeff, in an earlier post indicated that Axis is able to generate and parse the XML for you. Are you sure I have to parse myself?
Jan -----Original Message----- From: Rajesh Nair [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 5:20 PM To: [email protected] Subject: RE: Passing an xml string as a parameter Hi Janet, If I am not wrong you are getting an xml string. That is u are getting a return value of type java.lang.String. Correct me if I am wrong here. If this is the case, then U will have to parse that string and accordingly generate your objects. -Rajesh -----Original Message----- From: Miller, Janet [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 5:16 PM To: [email protected] Subject: RE: Passing an xml string as a parameter I've already used wsdl2java to create a web service from a remote wsdl file that I've received. My web service is working and I have a client that is succesfully accessing it and retrieving data. But how would wsdl2java know my schema definition? It didn't generate a class that represents the data model. It just generated 6 java files: TZCService, TZCServiceLocator, TZCServiceSoap, TZCServiceSoapImpl, TZCServiceSoapSkeleton, and TZCServiceSoapStub. There is nothing that contains the xml return document elements. Do I need to put an xsd file somewhere? In my xml namespace or target namespace? If someone could provide some step-by-step process on how to do this, I would GREATLY appreciate it. Jan -----Original Message----- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 3:33 AM To: [email protected] Subject: Re: Passing an xml string as a parameter Don't feel foolish, we are not born knowing this stuff! Start with a WSDL document then the WSDL2Java tool (part of Axis) can be used to generate a data model in the form of classes with persistence methods (serialization/deserialization). Consequently, Axis is able to generate and parse the XML for you. Alternatively or additionally, if you like, you can handle the SOAP payload as a document. Documents have the advantage of being something more tangible than mere parameters. Originators can sign documents, for instance. Documents can be stored in a variety of places, e.g. a search engine or a database. Jeff ----- Original Message ----- From: "Miller, Janet" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, July 08, 2005 2:52 PM Subject: RE: Passing an xml string as a parameter Yup, I'm a newbie and feel foolish now, but I need to ask some more questions about this. I've looked at the Axis user guide and some other sites and I'm still confused about how to map the returned xml document to a Java object. How do you do this? Will Axis do this automatically for me or do I have to parse the returned xml string myself? Thanks for your help, Jan -----Original Message----- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 2:17 AM To: [email protected] Subject: Re: Passing an xml string as a parameter Find out about document-literal, Jan. ----- Original Message ----- From: "Miller, Janet" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, July 08, 2005 2:14 PM Subject: Passing an xml string as a parameter I was just wondering if anyone had any thoughts on this. I am going to access another company's web service and the input parameter to the web service is an xml string that represents a query request for data. The response that I get back is also an xml string. So, instead of passing multiple parameters, we are just passing on xml string parameter. So I guess the soap packet would be xml within xml which seems kind of odd. I guess it will probably work, but is this an ok way to do things? Just curious about people's thoughts on something like this. Thanks, Jan
