Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 85827 invoked from network); 20 Jun 2006 05:20:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jun 2006 05:20:34 -0000 Received: (qmail 83580 invoked by uid 500); 20 Jun 2006 05:20:33 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 83344 invoked by uid 500); 20 Jun 2006 05:20:33 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 83332 invoked by uid 500); 20 Jun 2006 05:20:33 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 83328 invoked by uid 99); 20 Jun 2006 05:20:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 22:20:32 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 22:20:31 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C8C291A983A; Mon, 19 Jun 2006 22:20:11 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r415506 - in /webservices/axis2/trunk/c/woden/samples/wsdl10: ./ CalculatorDoc.wsdl Makefile.am test_wsdl1.c Date: Tue, 20 Jun 2006 05:20:11 -0000 To: axis2-cvs@ws.apache.org From: damitha@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060620052011.C8C291A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: damitha Date: Mon Jun 19 22:20:10 2006 New Revision: 415506 URL: http://svn.apache.org/viewvc?rev=415506&view=rev Log: added wsdl1 sample Added: webservices/axis2/trunk/c/woden/samples/wsdl10/ webservices/axis2/trunk/c/woden/samples/wsdl10/CalculatorDoc.wsdl webservices/axis2/trunk/c/woden/samples/wsdl10/Makefile.am webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c Added: webservices/axis2/trunk/c/woden/samples/wsdl10/CalculatorDoc.wsdl URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/samples/wsdl10/CalculatorDoc.wsdl?rev=415506&view=auto ============================================================================== --- webservices/axis2/trunk/c/woden/samples/wsdl10/CalculatorDoc.wsdl (added) +++ webservices/axis2/trunk/c/woden/samples/wsdl10/CalculatorDoc.wsdl Mon Jun 19 22:20:10 2006 @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: webservices/axis2/trunk/c/woden/samples/wsdl10/Makefile.am URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/samples/wsdl10/Makefile.am?rev=415506&view=auto ============================================================================== --- webservices/axis2/trunk/c/woden/samples/wsdl10/Makefile.am (added) +++ webservices/axis2/trunk/c/woden/samples/wsdl10/Makefile.am Mon Jun 19 22:20:10 2006 @@ -0,0 +1,20 @@ +prgbindir=$(prefix)/bin/samples/woden +prgbin_PROGRAMS = test_wsdl1 +check_PROGRAMS = test_wsdl1 +test_wsdl1_SOURCES = \ + test_wsdl1.c + +test_wsdl1_LDADD = \ + -laxis2_util \ + -laxis2_axiom \ + -laxis2_xml_schema \ + -laxis2_parser \ + -lwoden_wsdl10 \ + -lwoden_wsdl20 \ + $(GUTHTHILA_LIBS) \ + $(LIBXML2_LIBS) + +INCLUDES = -I$(top_builddir)/include \ + @AXIOMINC@ \ + @UTILINC@ \ + @XMLSCHEMAINC@ Added: webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c?rev=415506&view=auto ============================================================================== --- webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c (added) +++ webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c Mon Jun 19 22:20:10 2006 @@ -0,0 +1,105 @@ +/* + * Copyright 2004,2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static axiom_document_t* +get_root_element_from_filename( + const axis2_env_t *env, + axis2_char_t *filename); + +int main(int argc, char *argv[]) +{ + axis2_env_t *env = NULL; + axiom_document_t *om_doc = NULL; + axis2_char_t *doc_base_uri = NULL; + axis2_char_t *axis2c_home = NULL; + woden_reader_t *reader = NULL; + void *desc = NULL; + void *intface = NULL; + axis2_array_list_t *intfaces = NULL; + axis2_qname_t *intface_qname = NULL; + axis2_char_t *filename = NULL; + axis2_array_list_t *svc_list = NULL; + + if(argc > 1) + { + filename = argv[1]; + printf("filename:%s\n", filename); + } + else + { + printf("Give a wsdl2 file name and continue\n"); + return 0; + } + + env = axis2_env_create_all("test.log", 1); + + om_doc = get_root_element_from_filename(env, filename); + axis2c_home = AXIS2_GETENV("AXIS2C_HOME"); + doc_base_uri = AXIS2_STRACAT (axis2c_home, "/woden", env); + reader = woden_reader_create(env); + + desc = (void *)WODEN_READER_READ_WSDL(reader, env, om_doc, doc_base_uri); + intfaces = WODEN_WSDL10_DESC_GET_INTERFACES(desc, env); + intface = AXIS2_ARRAY_LIST_GET(intfaces, env, 0); + intface_qname = WODEN_INTERFACE_GET_QNAME(intface, env); + printf("Interface qname is %s\n", AXIS2_QNAME_TO_STRING(intface_qname, env)); + svc_list = WODEN_WSDL10_DESC_ELEMENT_GET_SVC_ELEMENTS(desc, env); + if (svc_list) + { + void *svc = NULL; + svc = AXIS2_ARRAY_LIST_GET(svc_list, env, 0); + if (svc) + { + axis2_qname_t *svc_qname = WODEN_SVC_GET_QNAME(svc, env); + if (svc_qname) + { + printf("First service qname is %s\n", AXIS2_QNAME_TO_STRING(svc_qname, env)); + } + } + } + return 0; +} + +static axiom_document_t* +get_root_element_from_filename( + const axis2_env_t *env, + axis2_char_t *filename) +{ + axiom_xml_reader_t *reader = NULL; + axiom_stax_builder_t *om_builder = NULL; + axiom_document_t *doc = NULL; + + reader = axiom_xml_reader_create_for_file(env, filename, NULL); + om_builder = axiom_stax_builder_create(env, reader); + doc = axiom_document_create(env, NULL, om_builder); + AXIOM_DOCUMENT_BUILD_ALL(doc, env); + + return doc; +} + --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org