simple webservice
Hello I want to build a simple Webservice which returns a custom Object. Object is very simple: public class Luc { public String name; public String nachname; public int alter; public Luc(String name, String nachname, int alter) { this.name = name; this.nachname = nachname; this.alter = alter; } } services.xml is like (only relevant lines) class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> Public relevant line of Webservice is like: public Luc getObject() throws Exception { return new Luc("luc", "Fischer", 23); } WSDL: I can see that there is a namespace ns1:Luc. As a client I use C# (VisualStudio). The client produces a class called Luc but of course without any attributes, because they are not provided/specified in the wsdl! How can I solve that? Do I need to write my own axis2-Receiver? Where is the problem? btw. The client works fine if the webservice just offers a simple String, vgl. getVersion-sample! But with an object ... http://org.apache.axis2/xsd"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="http://org.apache.axis2/"; targetNamespace="http://org.apache.axis2/";>http://www.w3.org/2001/XMLSchema"; xmlns:ns1="http://org.apache.axis2/xsd"; targetNamespace="http://org.apache.axis2/xsd"; elementFormDefault="unqualified" attributeFormDefault="unqualified"> http://schemas.xmlsoap.org/soap/http"; style="document" />http://www.org.apache.axis2"; />http://www.org.apache.axis2"; />http://www.org.apache.axis2"; />http://www.org.apache.axis2"; />http://localhost:8080/axis2/services/version"; /> Thank you in advance for any help. Greets luc
Re: Axis2/C# Compatibility
Ok, but we expect Axis produces a WSDL file. I think if we give service.xml and related class with public methods to axis, that axis will produce the correct WSDL file. Thanks for any information luc Anne Thomas Manes schrieb: Your WSDL isn't valid. You didn't declare any namespaces. Anne On 3/16/06, *Lukas Fischer / HTA* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Hello there I work on a application with a Webservice-Component (Java/Axis2) and a client C# (Visual Studio 2005). The software is in a very early phase, so we still evaluate what we should use. If we add a Webservice in Visual Studio, I get the following output The document at the url http://localhost:8080/axis2/services/baas?wsdl was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'system.web.services.discovery.discoverydocumentreference' is 'Discovery document at the URL http://localhost:8080/axis2/services/baas?wsdl could not be found.'. - The document format is not recognized. - Report from 'system.web.services.discovery.contractreference' is 'There is an error in the XML document.'. - The required attribute 'name' is missing. - Report from 'system.web.services.discovery.schemareference' is 'Expected Schema root. Make sure the root element is and the namespace is 'http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema>' for an XSD schema or 'urn:schemas-microsoft-com:xml-data' for an XDR schema.'. services.xml is test baas.webservice.Test When I access through the Browser, the response seems to be ok. Like this: http://org.apache.axis2/";> - - http://org.apache.axis2/xsd";> - - - - - - - - - http://schemas.xmlsoap.org/soap/http <http://schemas.xmlsoap.org/soap/http>" style="document"/> - - http://www.org.apache.axis2"/> - http://www.org.apache.axis2"/> - - http://localhost:8080/axis2/services/baas"/> mmmh, hope you can help me. I'm very new to axis and webservices at all. If there you know some links to related articles, ... would be wonderful. Thanks in advance, luc
Axis2/C# Compatibility
Hello there I work on a application with a Webservice-Component (Java/Axis2) and a client C# (Visual Studio 2005). The software is in a very early phase, so we still evaluate what we should use. If we add a Webservice in Visual Studio, I get the following output The document at the url http://localhost:8080/axis2/services/baas?wsdl was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'system.web.services.discovery.discoverydocumentreference' is 'Discovery document at the URL http://localhost:8080/axis2/services/baas?wsdl could not be found.'. - The document format is not recognized. - Report from 'system.web.services.discovery.contractreference' is 'There is an error in the XML document.'. - The required attribute 'name' is missing. - Report from 'system.web.services.discovery.schemareference' is 'Expected Schema root. Make sure the root element is and the namespace is 'http://www.w3.org/2001/XMLSchema' for an XSD schema or 'urn:schemas-microsoft-com:xml-data' for an XDR schema.'. services.xml is test locked="xsd:false">baas.webservice.Test When I access through the Browser, the response seems to be ok. Like this: http://org.apache.axis2/";> - - ns0:attributeFormDefault="unqualified" ns2:targetNamespace="http://org.apache.axis2/xsd";> - - - - - - - - - http://schemas.xmlsoap.org/soap/http"; style="document"/> - - http://www.org.apache.axis2"/> - http://www.org.apache.axis2"/> - - http://localhost:8080/axis2/services/baas"/> mmmh, hope you can help me. I'm very new to axis and webservices at all. If there you know some links to related articles, ... would be wonderful. Thanks in advance, luc