Hello all,
I was hoping someone might be able to answer a question about Web
Service generation using Axis WSDL2Java. Here is my situation:
I've created a web service (wsdl) that imports a couple of schemas. One
of the imported xsd performs its own import of the "XML Digital
Signature schema". The <element> used in a <message> of my WSDL is
defined in the imported xsd using a <complexType>. This complex type
has a <sequence> of elements. One of these elements is a <ds:Signature>
where the "ds" namespace is "http://www.w3.org/200/09/xmldsig#" (aka the
XML Digital Signature architecture). Here is where my question begins....
When I generate the web service using WSDL2Java all the elements of the
"ds" namespace are generated.
What I'd like to do is take one of the "Publically Available Code,
Tookits or SDKs" from "http://www.w3.org/Signature", include it in my
project, and use that as the implementation for the <ds:Signature>
element of the <complexType> <sequence>.
With that said, I'm having a hard time finding any information on Google
regarding this matter. Does anyone have some information, pointers,
tips, etc, etc... about how to do this??
Below is an example WSDL and XSD that illustrates the basic concept of
what i'm explaining above. Here there is a WSDL file that includes a
schema with a namespace "http://myschema.com". This schema then defines
a <complexType> that is constructed using a <sequence> of elements. One
of the elements in the sequence is the "ds:Signature" element. So here
the import of the "ds" namespace would end up generating all the java
classes for the "XML Digital Signature" schema because the namespace and
XSD is imported in the "http://myschema.com" XSD. This is where I'd
like to be able to include the third party "XML Digital Signature"
implementation jar into the WSDL2Java generation process, thus
eliminating the generation of the "ds" files and replacing all
references to the "ds:Signature" with the package/class of the third
party implementation.
Any help would be greatly appreciated. Thanks for your time in
advance. Hope to hear from the AXIS community members soon.
Example WSDL snippet (not the real one but given for a depiction):
<wsdl:definitions
targetnamespace="http://mywsdl.com"
xmlns:tns="http://mywsdl.com"
xmlns:imdschema="http://myschema.com"
...
>
<wsdl:types>
<xsd:schema
....
<xsd:import namespace="http://myschema.com"
schemaLocaiton="myschema.xsd"/>
>
</xsd:schema>
</wsdl:types>
<wsdl:message name="myType">
<wsdl:part element="imdschema:myType" name="myType"/>
</wsdl:message>
....
</wsd:definitions>
Example XSD snippet:
<?xml version....?>
<schema
targetNamespace="http://myschema.com"
xmlns:tns="http://myschema.com"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
....
>
<import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd/>
<complexType name="myType">
<sequence>
<element ref="ds"Signature minOccurs="0"/>
<element ref .....
<element ref .....
.....
</complexType>
....
</wsdl:definitions>
--
__________________________________________________________________________________
James J. Moore
IBM Systems Group
Advanced Systems Infrastructure Development
Fellowship Assignee
USC/Information Sciences Institute
Center for Grid Technologies
PhD Graduate Research Assistant
Email: mooreja [at] isi.edu