Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 81756 invoked from network); 11 Aug 2005 23:21:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Aug 2005 23:21:16 -0000 Received: (qmail 21095 invoked by uid 500); 11 Aug 2005 23:21:14 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 21065 invoked by uid 500); 11 Aug 2005 23:21:14 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 21052 invoked by uid 99); 11 Aug 2005 23:21:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2005 16:21:14 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_50_60,HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of Tony.Dean@sas.com designates 149.173.6.5 as permitted sender) Received: from [149.173.6.5] (HELO merc95.na.sas.com) (149.173.6.5) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2005 16:21:35 -0700 Received: from MERC27.na.sas.com ([10.16.9.92]) by merc95.na.sas.com with InterScan Messaging Security Suite; Thu, 11 Aug 2005 19:21:11 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C59ECB.5C0CB8D0" Subject: RE: [AXIS2] Admin Tools Date: Thu, 11 Aug 2005 19:21:06 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [AXIS2] Admin Tools Thread-Index: AcWeLepzHd0Uva/kRo6FZNcVb0GGQQAmxtVA From: "Tony Dean" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C59ECB.5C0CB8D0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Thanks for the update. =20 1) Works good. When doing the code generation on the server, is it = appropriate to create a scratch area somewhere underneath the axis2 web = app for creating the intermediate web service artifacts. I know that = WEB-INF/services is not the place since you monitor this area for = hot-deployment/updates. I guess I could just use some configurable area = outside the container's space altogether. That's probably more = appropriate. =20 2) I figured out how to programatically perform hot-deployment by = looking at the RepositoryListenerImpl class. But, why should I do it if = the scheduler will call the listener on a timely manner to do this = automatically by monitoring the WEB-INF/services folder? Are there any = benificial reasons to do it programatically? How often is the refresh = done automatically? I didn't see that this refresh time was = configurable. =20 Thanks. ________________________________ From: Ajith Ranabahu [mailto:ajith.ranabahu@gmail.com]=20 Sent: Thursday, August 11, 2005 12:34 AM To: axis-dev@ws.apache.org Subject: Re: [AXIS2] Admin Tools Hi Tony, To me it seems that you need to run the code generator on the fly, = compile the code and then host a service.(all within some code) Here are some hints that you'll find useful. 1. Code generator can be easily invoked programmatically. See the = WSDL2JavaTest.java in the wsdl module for an example. 2. Once the classes are available, you can host the service = programmatically (by invoking the deployment) or for an easier solution = generate a service archive and copy it to the repositiry directory. We still don't have anything resembling jws yet. Hmmm... Seems to me that XMLBeans finds something confusing in the = schema part. I will check, thanks for pointing out the problem On 8/11/05, Tony Dean wrote:=20 Hi, =09 I'm trying to prototype a couple of things with the axis2 engine to see = how it works (I down loaded 0.9). In particular, I want to start with a = wsdl and generate the necessary artifacts. I'd like to do this from a = web service (e.g. use a web service to generate other web services). I = can generate the wsdl on the fly. Can I then use your = org.apache.axis2.deployment classes to generate the artifacts and then = hot deploy them in the current engine on the server? Are the admin = classes ready to be poked? I didn't see any samples and the javadoc is = sparse in this area. Do you still have the notion of jws file in axis2? = I didn't know if that was still an alternative to generating the wsdl. =09 I also want to include attachments in my generated web services. I = took the doc-lit SwA sample from WS-I BP Attachment document and tried = to use wsdl2java to create the service deployment code and I'm getting = the following error: =09 Exception in thread "main" java.lang.RuntimeException: = org.apache.xmlbeans.XmlException: error: cvc-complex-type.2.4a: Expected = elements 'annotation@http://www.w3.org/2001/XMLSchema simpleType@http:// www.w3.org/2001/XMLSchema complexType@http://www.w3.org/2001/XMLSchema = group@http://www.w3.org/2001/XMLSchema = attributeGroup@http://www.w3.org/2001/XMLSchema = element@http://www.w3.org/2001/XMLSchema a ttribute@http://www.w3.org/2001/XMLSchema = notation@http://www.w3.org/2001/XMLSchema' instead of 'complexType' here = in element schema@http://www.w3.org/2001/XMLSchema at = org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeans= Extension.java:103) at = org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGeneratio= nEngine.java:79) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java :22) Caused by: org.apache.xmlbeans.XmlException: error: = cvc-complex-type.2.4a: Expected elements = 'annotation@http://www.w3.org/2001/XMLSchema = simpleType@http://www.w3.org/2001/XMLSchema complexType@http:/ /www.w3.org/2001/XMLSchema group@http://www.w3.org/2001/XMLSchema = attributeGroup@http://www.w3.org/2001/XMLSchema = element@http://www.w3.org/2001/XMLSchema = attribute@http://www.w3.org/2001/XMLSchema no tation@http://www.w3.org/2001/XMLSchema' instead of 'complexType' here = in element schema@http://www.w3.org/2001/XMLSchema at = org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTy= peSystemCompiler.java:225) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke = (NativeMethodAccessorImpl.java:39) at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java = :641) at = org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeans= Extension.java:69) ... 3 more =09 It seems to not like attachment types of "base64Binary". Are you aware = of this problem? =09 Here's the wsdl from the WS-I page: =09 " = xmlns:soapbind=3D"http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl=3D" http://schemas.xmlsoap.org/wsdl/ = " xmlns:mime=3D"http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace=3D" http://example.com/mimewsdl = " xmlns:tns=3D"http://example.com/mimewsdl"> =09 =09 =20 =09 =20 =09 =09 =20 =20 =09 =20 =20 =09 Thank you for your efforts. =09 =09 Tony Dean SAS Institute Inc.=20 919.531.6704 tony.dean@sas.com =09 SAS... The Power to Know http://www.sas.com =09 =09 --=20 Ajith Ranabahu=20 ------_=_NextPart_001_01C59ECB.5C0CB8D0 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
Thanks for the update.
 
1) Works good.  When doing the code = generation on=20 the server, is it appropriate to create a scratch area somewhere = underneath the=20 axis2 web app for creating the intermediate web service artifacts.  = I know=20 that WEB-INF/services is not the place since you monitor this area for=20 hot-deployment/updates.  I guess I could just use some configurable = area=20 outside the container's space altogether.  That's probably more=20 appropriate.
 
2) I figured out how to = programatically perform=20 hot-deployment by looking at the RepositoryListenerImpl class.  = But, why=20 should I do it if the scheduler will call the listener on a timely = manner=20 to do this automatically by monitoring the WEB-INF/services = folder?  Are=20 there any benificial reasons to do it programatically?  How often = is the=20 refresh done automatically?  I didn't see that this refresh = time was=20 configurable.
 
Thanks.

From: Ajith Ranabahu=20 [mailto:ajith.ranabahu@gmail.com]
Sent: Thursday, August 11, = 2005=20 12:34 AM
To: axis-dev@ws.apache.org
Subject: Re: = [AXIS2]=20 Admin Tools

Hi Tony,
To me it seems that you need to run the code = generator on=20 the fly, compile the code and then host a service.(all within some = code)
Here=20 are some hints that you'll find useful.
1. Code generator can be = easily=20 invoked programmatically. See the WSDL2JavaTest.java in the wsdl module = for an=20 example.
2. Once the classes are available, you can host the service=20 programmatically (by invoking the deployment) or for an easier solution = generate=20 a service archive and copy it to the repositiry directory.

We = still don't=20 have anything resembling jws yet.

Hmmm... Seems to me that = XMLBeans finds=20 something confusing in the schema part. I will check, thanks for = pointing out=20 the problem


On 8/11/05, Tony Dean=20 <Tony.Dean@sas.com> = wrote:
Hi,

I'm=20 trying to prototype a couple of things with the axis2 engine to see = how it=20 works (I down loaded 0.9).  In particular, I want to start = with a=20 wsdl and generate the necessary artifacts.  I'd like to do = this from=20 a web service (e.g. use a web service to generate other web=20 services).  I can generate the wsdl on the = fly.  Can I=20 then use your org.apache.axis2.deployment classes to generate the = artifacts=20 and then hot deploy them in the current engine on the = server?  Are=20 the admin classes ready to be poked?  I didn't see any = samples and=20 the javadoc is sparse in this area.  Do you still have the = notion of=20 jws file in axis2?  I didn't know if that was still an = alternative=20 to generating the wsdl.

I also want to include attachments in = my=20 generated web services.  I took the doc-lit SwA sample from = WS-I BP=20 Attachment document and tried to use wsdl2java to create the service=20 deployment code and I'm getting the following error:

Exception = in=20 thread "main" java.lang.RuntimeException: = org.apache.xmlbeans.XmlException:=20 error: cvc-complex-type.2.4a: Expected elements 'annotation@http://www.w3.org/2001/XMLSchem= a=20 simpleType@http://
www.w3.org/2001/XMLSchema=20 complexType@http://www.w3.org/2001/XMLSchem= a=20 group@http://www.w3.org/2001/XMLSchem= a=20 attributeGroup@http://www.w3.org/2001/XMLSchem= a=20 element@http://www.w3.org/2001/XMLSchem= a=20 a
ttribute@http://www.w3.org/2001/XMLSchem= a=20 notation@http://www.w3.org/2001/XMLSche= ma'=20 instead of 'complexType' here in element schema@http://www.w3.org/2001/XMLSchem= a
        at=20 = org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeans= Extension.java:103)
        at= =20 = org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGeneratio= nEngine.java:79)
        at=20 = org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28)
  &n= bsp;     at=20 org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java :22)
Caused by: = org.apache.xmlbeans.XmlException: error: cvc-complex-type.2.4a: = Expected=20 elements 'annotation@http://www.w3.org/2001/XMLSchem= a=20 simpleType@http://www.w3.org/2001/XMLSchem= a=20 complexType@http:/
/www.w3.org/2001/XMLSchema group@http://www.w3.org/2001/XMLSchem= a=20 attributeGroup@http://www.w3.org/2001/XMLSchem= a=20 element@http://www.w3.org/2001/XMLSchem= a=20 attribute@http://www.w3.org/2001/XMLSchem= a=20 no
tation@http://www.w3.org/2001/XMLSche= ma'=20 instead of 'complexType' here in element schema@http://www.w3.org/2001/XMLSchem= a
        at=20 = org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTy= peSystemCompiler.java:225)
       &= nbsp;at=20 sun.reflect.NativeMethodAccessorImpl.invoke0(Native=20 Method)
        at=20 sun.reflect.NativeMethodAccessorImpl.invoke=20 = (NativeMethodAccessorImpl.java:39)
      = ;  at=20 = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25)
        at=20 = java.lang.reflect.Method.invoke(Method.java:324)
   &nb= sp;    at=20 org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java=20 :641)
        at=20 = org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeans= Extension.java:69)
        ...= =20 3 more

It seems to not like attachment types of=20 "base64Binary".  Are you aware of this = problem?

Here's the=20 wsdl from the WS-I page:

<?xml version=3D"1.0" = encoding=3D"utf-8"=20 ?>
<wsdl:definitions xmlns:types=3D"http://example.com/mimetypes=20 = "
          &nbs= p;       xmlns:ref=3D"http://ws-i.org/profiles/= basic/1.1/xsd"
        &nb= sp;         xmlns:xsd=3D"=20 = http://www.w3.org/2001/XMLSchema"
     &n= bsp;           &nb= sp;xmlns:soapbind=3D"http://schemas.xmlsoap.org= /wsdl/soap/"
         = ;         xmlns:wsdl=3D"=20 = http://schemas.xmlsoap.org/wsdl/"
     &n= bsp;           &nb= sp;xmlns:mime=3D"http://schemas.xmlsoap.org= /wsdl/mime/"
         = ;         targetNamespace=3D= "=20 = http://example.com/mimewsdl"
      &= nbsp;           xm= lns:tns=3D"http://example.com/mimewsdl">= ;

    <wsdl:types>
   =      <xsd:schema=20 targetNamespace=3D" http://example.com/mimetypes"            = ;    xmlns:xsd=3D"http://www.w3.org/2001/XMLSche= ma">

         =    <xsd:import=20 namespace=3D"http://ws-i.org/profiles/= basic/1.1/xsd"=20 = />
          &nbs= p; <xsd:element=20 name=3D"ClaimDetail"=20 = type=3D"types:ClaimDetailType"/>
     &nbs= p;      <xsd:complexType=20 = name=3D"ClaimDetailType">
       = ;         <xsd:sequence&g= t;
           &= nbsp;        <xsd:element=20 name=3D"Name"=20 = type=3D"xsd:string"/>
       &nb= sp;           &nbs= p;<xsd:element=20 name=3D"ClaimForm"=20 = type=3D"ref:swaRef"/>
       &nb= sp;        </xsd:sequence><= BR>           &nbs= p;</xsd:complexType>
       &= nbsp;    <xsd:element=20 name=3D"ClaimRefNo" type=3D"xsd:string"/>=20 =
        </xsd:schema>    </wsdl:types>

   &n= bsp;<wsdl:message=20 = name=3D"ClaimIn">
        &= lt;wsdl:part=20 name=3D"body"=20 = element=3D"types:ClaimDetail"/>
      = ;  <wsdl:part=20 name=3D"ClaimPhoto" type=3D"xsd:base64Binary"/>=20 =
    </wsdl:message>

  &nbs= p; <wsdl:message=20 = name=3D"ClaimOut">
        = <wsdl:part=20 name=3D"out"=20 = element=3D"types:ClaimRefNo"/>
    </wsdl:me= ssage>

    <wsdl:portType=20 name=3D"ClaimPortType">=20
        <wsdl:operation = = name=3D"SendClaim">
        = ;    <wsdl:input=20 = message=3D"tns:ClaimIn"/>
       = ;     <wsdl:output=20 = message=3D"tns:ClaimOut"/>
      &nbs= p; </wsdl:operation>=20 =
    </wsdl:portType>

  &nb= sp; <wsdl:binding=20 name=3D"ClaimBinding"=20 = type=3D"tns:ClaimPortType">
      &nb= sp; <soapbind:binding=20 = style=3D"document"
        &nb= sp;           &nbs= p;     transport=3D"=20 http://schemas.xmlsoap.or= g/soap/http"/>
        = <wsdl:operation=20 = name=3D"SendClaim">
        = ;    <soapbind:operation=20 soapAction=3D"http://example.com/soapaction"/<= /A>>
          &n= bsp; <wsdl:input>
       = ;         <mime:multipart= Related>
         &nbs= p;          <mime:pa= rt>=20 =
           &nb= sp;           &nbs= p;<soapbind:body=20 parts=3D"body"=20 = use=3D"literal"/>
        &= nbsp;           &l= t;/mime:part>
         = ;           <mi= me:part>
         &nbs= p;            = ;  <mime:content=20 part=3D"ClaimPhoto"=20 = type=3D"image/jpeg"/>
       &nb= sp;           &nbs= p;</mime:part>
        &= nbsp;       </mime:multipartRelated= >
           = ; </wsdl:input>
       &= nbsp;    <wsdl:output>=20 =
           &nb= sp;    <soapbind:body=20 use=3D"literal"=20 = />
          &nbs= p; </wsdl:output>
       = ; </wsdl:operation>
    </wsdl:bindi= ng>
</wsdl:definitions>

Thank=20 you for your efforts.


Tony Dean
SAS Institute Inc.=20
919.531.6704
tony.dean@sas.com

SAS... = The Power=20 to Know
http://www.sas.com



--
Ajith Ranabahu ------_=_NextPart_001_01C59ECB.5C0CB8D0--