You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Diego Vaille <di...@yahoo.com.br> on 2006/05/08 16:49:00 UTC

Axis and XML Schema (help)

Hi everyone,

I am wondering if it's possible to use Axis and disable XML Schema for a while, and I'm not getting very far. I dont think it's that easy to disable or not use XML Schema on Axis (at least from what I've been reading), but I'm willing to try anything to keep Axis cause it's a great tool.

I have a couple of questions that could help me guide on this and any reply would be of great assistance:

1 - According to W3C SOAP specifications (http://www.w3.org/TR/soap/) it's not needed XML Schema on a SOAP message correct?

2 - I just need to send string types from client to server and server to client, so the use of XML Schema as far as I can see wouldn't be needed? 

3 - If I use security on Axis (digital signature and soap encryption) would that make XML Schema needed?

4 - Just rebuilding SOAPEnvelope and other SOAP elements on org/apache/axis/message/ and removing XML Schema from the constructor would solve anything?

5 - If question 4 isn't correct, manually removing all XML Schemas on Axis source code and recompile libraries for client and server will disable XML Schema without removing any important features on Axis?

---------------------------------------------------------------------------------------

Here's my server WSDL I removed the xsd and xsi types from the elements but still XML Schema is being addressed on Envelope also the binding on RPC and the encoding of my methods seems to be using XML schema.

<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/PnPServer">
&#8722;
    <!--
WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT)
-->
&#8722;
    <wsdl:message name="sipParametersRequest">
<wsdl:part name="name" type="soapenc:string"/>
<wsdl:part name="password" type="soapenc:string"/>
</wsdl:message>
&#8722;
    <wsdl:message name="sipParametersResponse">
<wsdl:part name="sipParametersReturn" type="soapenc:string"/>
</wsdl:message>
&#8722;
    <wsdl:portType name="PnPServer">
&#8722;
    <wsdl:operation name="sipParameters" parameterOrder="name password">
<wsdl:input message="impl:sipParametersRequest" name="sipParametersRequest"/>
<wsdl:output message="impl:sipParametersResponse" name="sipParametersResponse"/>
</wsdl:operation>
</wsdl:portType>
&#8722;
    <wsdl:binding name="PnPServerSoapBinding" type="impl:PnPServer">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
&#8722;
    <wsdl:operation name="sipParameters">
<wsdlsoap:operation soapAction=""/>
&#8722;
    <wsdl:input name="sipParametersRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://pnp" use="encoded"/>
</wsdl:input>
&#8722;
    <wsdl:output name="sipParametersResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/PnPServer" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
&#8722;
    <wsdl:service name="PnPServerService">
&#8722;
    <wsdl:port binding="impl:PnPServerSoapBinding" name="PnPServer">
<wsdlsoap:address location="http://localhost:8080/axis/services/PnPServer"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>


		
---------------------------------
 Navegue com o Yahoo! Acesso Grátis, assista aos jogos do Brasil na Copa e ganhe prêmios de hora em hora.

Re: Axis and XML Schema (help)

Posted by Anne Thomas Manes <at...@gmail.com>.
I'm sorry, Diego, but I'm still having trouble understanding what you're
trying to do.

Is your goal simply not to include type information in the actual SOAP
message? e.g, don't include xsi:type="xsd:string" in the message? That's
easy. Just don't use RPC/encoded. Use document/literal instead. You only
need to include the xsi:type information if you don't know the element's
type ahead of time, which is the case when using RPC/encoded. With
document/literal, you know the schema ahead of time, so there's no need to
include the type information in the message.

Note, though, that document/literal works on the assumption that the message
structure is defined using XML Schema. But your SOAP engine could ignore the
schema completely and just convert everything to string. That should work as
long as you don't try to exchange complex types.

It could get tricky, though, if you want to sign the contents of the
message. I recommend that you use WS-Security (in conjunction with XML
Signature) to attach the signature to the SOAP message. Apache WSS4J is an
implementation of WS-Security.

Anne

On 5/9/06, Diego Vaille <di...@yahoo.com.br> wrote:
>
> The reason for not using XML Schema is that other projects that are being
> conceived on my research institute are not using XML Schema on the transport
> of SOAP messages.
>
> I'm trying to work on the possibility of using or generating a SOAP engine
> that don't map XML to Java with XML Schemas. The problem would lie on the
> XML Signature since according to W3C Specifications (
> http://www.w3.org/TR/xmldsig-core/#sec-Signature) I would need my
> implementation to generate my Signature elements as XML Schema or a DTD
> which isn't really a good approach.
>
> *Anne Thomas Manes <at...@gmail.com>* escreveu:
>
> Diego,
>
> I'm confused by what you're trying to do. You're correct that the SOAP
> spec doesn't *require* use of the XML Schema type system, but it's the only
> type system that's been defined. (SOAP Encoding is based on XML Schema.)
> Even if all you do is pass strings back and forth, you still need a way to
> identify the fact that the type you are sending is a string (xsd:string or
> soapenc:string).
>
> More to the point,  the Axis serializaton engine supports only XML Schema
> of Java/XML type mapping. If you "disable" XML Schema, then Axis won't be
> able to map java objects to XML and back again.
>
> Can you explain to us why you want to disable XML Schema?
>
> Anne
>
>
> On 5/8/06, Diego Vaille <diegovaille@yahoo.com.br > wrote:
>
> > Hi everyone,
> >
> > I am wondering if it's possible to use Axis and disable XML Schema for a
> > while, and I'm not getting very far. I dont think it's that easy to disable
> > or not use XML Schema on Axis (at least from what I've been reading), but
> > I'm willing to try anything to keep Axis cause it's a great tool.
> >
> > I have a couple of questions that could help me guide on this and any
> > reply would be of great assistance:
> >
> > 1 - According to W3C SOAP specifications ( http://www.w3.org/TR/soap/)
> > it's not needed XML Schema on a SOAP message correct?
> >
> > 2 - I just need to send string types from client to server and server to
> > client, so the use of XML Schema as far as I can see wouldn't be needed?
> >
> > 3 - If I use security on Axis (digital signature and soap encryption)
> > would that make XML Schema needed?
> >
> > 4 - Just rebuilding SOAPEnvelope and other SOAP elements on
> > org/apache/axis/message/ and removing XML Schema from the constructor would
> > solve anything?
> >
> > 5 - If question 4 isn't correct, manually removing all XML Schemas on
> > Axis source code and recompile libraries for client and server will disable
> > XML Schema without removing any important features on Axis?
> >
> > ---------------------------------------------------------------------------------------
> >
> >
> > Here's my server WSDL I removed the xsd and xsi types from the elements
> > but still XML Schema is being addressed on Envelope also the binding on RPC
> > and the encoding of my methods seems to be using XML schema.
> >
> > <wsdl:definitions targetNamespace="
> > http://localhost:8080/axis/services/PnPServer">
> > âˆ'
> >
> >     <!--
> > WSDL created by Apache Axis version: 1.2.1
> > Built on Jun 14, 2005 (09:15:57 EDT)
> > -->
> > âˆ'
> >
> >     <wsdl:message name="sipParametersRequest">
> > <wsdl:part name="name" type="soapenc:string"/>
> > <wsdl:part name="password" type="soapenc:string"/>
> > </wsdl:message>
> > âˆ'
> >
> >     <wsdl:message name="sipParametersResponse">
> > <wsdl:part name="sipParametersReturn" type="soapenc:string"/>
> > </wsdl:message>
> > âˆ'
> >     <wsdl:portType name="PnPServer">
> > âˆ'
> >
> >     <wsdl:operation name="sipParameters" parameterOrder="name password">
> > <wsdl:input message="impl:sipParametersRequest"
> > name="sipParametersRequest"/>
> > <wsdl:output message="impl:sipParametersResponse"
> > name="sipParametersResponse"/>
> > </wsdl:operation>
> > </wsdl:portType>
> > âˆ'
> >
> >     <wsdl:binding name="PnPServerSoapBinding" type="impl:PnPServer">
> > <wsdlsoap:binding style="rpc" transport="
> > http://schemas.xmlsoap.org/soap/http "/>
> > âˆ'
> >
> >     <wsdl:operation name="sipParameters">
> > <wsdlsoap:operation soapAction=""/>
> > âˆ'
> >
> >     <wsdl:input name="sipParametersRequest">
> > <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
> > namespace="http://pnp" use="encoded"/>
> > </wsdl:input>
> > âˆ'
> >
> >     <wsdl:output name="sipParametersResponse">
> > <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
> > namespace="http://localhost:8080/axis/services/PnPServer "
> > use="encoded"/>
> > </wsdl:output>
> > </wsdl:operation>
> > </wsdl:binding>
> > âˆ'
> >     <wsdl:service name="PnPServerService">
> > âˆ'
> >
> >     <wsdl:port binding="impl:PnPServerSoapBinding" name="PnPServer">
> > <wsdlsoap:address location="
> > http://localhost:8080/axis/services/PnPServer"/>
> > </wsdl:port>
> > </wsdl:service>
> > </wsdl:definitions>
> >
> > ------------------------------
> > Navegue com o Yahoo! Acesso Grátis, assista aos jogos do Brasil na Copa
> > e ganhe prêmios de hora em hora<http://us.rd.yahoo.com/mail/br/tagline/freeisp_promo_copa/*http://br.yahoo.com/artilheirodacopa/>.
> >
> >
>
>
> ------------------------------
> Yahoo! Messenger: transmita imagens de vídeo ao vivo<http://us.rd.yahoo.com/mail/br/tagline/messenger/gmail/*http://br.messenger.yahoo.com/>para sua família e amigos!
>
>

Re: Axis and XML Schema (help)

Posted by Anne Thomas Manes <at...@gmail.com>.
Diego,

I'm confused by what you're trying to do. You're correct that the SOAP spec
doesn't *require* use of the XML Schema type system, but it's the only type
system that's been defined. (SOAP Encoding is based on XML Schema.) Even if
all you do is pass strings back and forth, you still need a way to identify
the fact that the type you are sending is a string (xsd:string or
soapenc:string).

More to the point,  the Axis serializaton engine supports only XML Schema of
Java/XML type mapping. If you "disable" XML Schema, then Axis won't be able
to map java objects to XML and back again.

Can you explain to us why you want to disable XML Schema?

Anne


On 5/8/06, Diego Vaille <di...@yahoo.com.br> wrote:
>
> Hi everyone,
>
> I am wondering if it's possible to use Axis and disable XML Schema for a
> while, and I'm not getting very far. I dont think it's that easy to disable
> or not use XML Schema on Axis (at least from what I've been reading), but
> I'm willing to try anything to keep Axis cause it's a great tool.
>
> I have a couple of questions that could help me guide on this and any
> reply would be of great assistance:
>
> 1 - According to W3C SOAP specifications (http://www.w3.org/TR/soap/) it's
> not needed XML Schema on a SOAP message correct?
>
> 2 - I just need to send string types from client to server and server to
> client, so the use of XML Schema as far as I can see wouldn't be needed?
>
> 3 - If I use security on Axis (digital signature and soap encryption)
> would that make XML Schema needed?
>
> 4 - Just rebuilding SOAPEnvelope and other SOAP elements on
> org/apache/axis/message/ and removing XML Schema from the constructor would
> solve anything?
>
> 5 - If question 4 isn't correct, manually removing all XML Schemas on Axis
> source code and recompile libraries for client and server will disable XML
> Schema without removing any important features on Axis?
>
>
> ---------------------------------------------------------------------------------------
>
> Here's my server WSDL I removed the xsd and xsi types from the elements
> but still XML Schema is being addressed on Envelope also the binding on RPC
> and the encoding of my methods seems to be using XML schema.
>
> <wsdl:definitions targetNamespace="
> http://localhost:8080/axis/services/PnPServer">
> −
>     <!--
> WSDL created by Apache Axis version: 1.2.1
> Built on Jun 14, 2005 (09:15:57 EDT)
> -->
> −
>     <wsdl:message name="sipParametersRequest">
> <wsdl:part name="name" type="soapenc:string"/>
> <wsdl:part name="password" type="soapenc:string"/>
> </wsdl:message>
> −
>     <wsdl:message name="sipParametersResponse">
> <wsdl:part name="sipParametersReturn" type="soapenc:string"/>
> </wsdl:message>
> −
>     <wsdl:portType name="PnPServer">
> −
>     <wsdl:operation name="sipParameters" parameterOrder="name password">
> <wsdl:input message="impl:sipParametersRequest"
> name="sipParametersRequest"/>
> <wsdl:output message="impl:sipParametersResponse"
> name="sipParametersResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> −
>     <wsdl:binding name="PnPServerSoapBinding" type="impl:PnPServer">
> <wsdlsoap:binding style="rpc" transport="
> http://schemas.xmlsoap.org/soap/http"/>
> −
>     <wsdl:operation name="sipParameters">
> <wsdlsoap:operation soapAction=""/>
> −
>     <wsdl:input name="sipParametersRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://pnp" use="encoded"/>
> </wsdl:input>
> −
>     <wsdl:output name="sipParametersResponse">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:8080/axis/services/PnPServer" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> −
>     <wsdl:service name="PnPServerService">
> −
>     <wsdl:port binding="impl:PnPServerSoapBinding" name="PnPServer">
> <wsdlsoap:address location="http://localhost:8080/axis/services/PnPServer
> "/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
> ------------------------------
> Navegue com o Yahoo! Acesso Grátis, assista aos jogos do Brasil na Copa e ganhe
> prêmios de hora em hora<http://us.rd.yahoo.com/mail/br/tagline/freeisp_promo_copa/*http://br.yahoo.com/artilheirodacopa/>.
>
>
>